2025 · mobile hardware

Minecraft Compass

A real compass inspired by the in-game item. Phase 1; software validation via simulation ported below. Phase 2; prototyping with a perf board, oversized enclosure, and a hand-wired LED grid. Phase 3; custom PCB, refined SolidWorks enclosure, and optimised design.

Finished compass outdoors with the LED needle lit
Finished compass outdoors with the LED needle lit

Interactive Software Demo

40-LED Compass Simulator

An interactive pre-hardware simulation demonstrating dynamic heading vector math, irregular-grid pixel mapping, and battery monitoring logic.

Desktop: drag heading. Phone: enable the device compass (HTTPS).

Hardware

  • Custom PCB Design & SMT Assembly: Engineered a custom printed circuit board (Bedrock V1.0) using EasyEDA to integrate a XIAO ESP32-C3 (MCU), a QMC5883L magnetometer, a TP4056 charging module, and a custom 5×10 (40-LED) NeoPixel matrix. Commissioned fabrication through JLCPCB, utilizing SMT assembly for top-face LEDs, resistors, and bypass capacitors, while hand-soldering the remaining components on the back face.
  • Enclosure CAD & 3D Printing: Modeled a custom, space-optimized enclosure in SolidWorks. Utilized heat-set threaded inserts to mount the PCB and backplate for serviceability, and integrated a black plexiglass faceplate to diffuse the LED output and conceal internal hardware, creating a high-contrast, seamless display interface.
  • Power & Peripheral Architecture: Paired a TP4056 lithium-ion battery charging module with a 3,500 mAh battery pack to enable a modern Type-C charging interface. Enabled real-time battery telemetry by tapping into the TP4056's charging status LED and utilizing an ADC-based voltage divider. Ensured accurate magnetometer readings through strict I2C sensor routing and physical component isolation.

Software

  • Embedded Firmware & Sensor Integration: Developed firmware (MicroPython, later adapted to C++ for low-power mode reliability) on the ESP32-C3 to interface with a QMC5883L 3-axis digital magnetometer over I2C, computing real-time heading vectors and integrating GPS data pathways.
  • Custom Matrix Rendering & Coordinate Mapping: Engineered an irregular-grid mapping algorithm to translate dynamic 360° heading vectors into animated directional needles and custom visual state indicators across a non-standard 40-LED (5×10) matrix.
  • Pre-Hardware Simulation & Validation Engine: Created a standalone Python simulator to validate spatial vector math, coordinate transformations, and display states prior to hardware testing.
  • Power Management & Telemetry Logic: Programmed ADC-based battery voltage monitoring, charging status indicators, and low-power standby routines to maximize runtime efficiency on a portable 3,500 mAh battery pack.
  • Magnetometer Calibration & Noise Filtering: Programmed dynamic calibration algorithms for the QMC5883L magnetometer to filter environmental magnetic noise and offset hard-iron distortions, ensuring high-fidelity 360° heading accuracy regardless of the enclosure's orientation.

Build Photos

Board and Enclosure

Enclosure backplate — with recessed pocket for battery mounting.

PCB export from EasyEDA.

Enclosure body — optimized for the internal component layout.

Display stand — printed holder for the compass with integrated charging.

Schematic

EasyEDA schematic for the MC compass: XIAO ESP32-C3, 40 LEDs, GPS, charger