Go back

Minecraft Compass IRL: Building and Using MCompass

Published:  at  08:00 AM
⏱️ 784 words • 4 min read

阅读中文版

Building and using MCompass, an ESP32-C3 and GPS-based Minecraft compass with lodestone targeting, overshoot animation, firmware setup, and a bill of materials.

Build a real-life Minecraft compass (MCompass)! This project is based on ESP32-C3 and GPS modules, and has now perfectly reproduced the Lodestone magnet pointing function in the game.

OSHW Hub PCB Project

GitHub Source Code Repository


1. Hardware preparation and bill of materials (BOM)

MCompass structural member (3D model)

If you have a 3D printer (Bambu Lab series is recommended), you can directly go to MakerWorld to download the project file with the consumable parameters configured.

  • Official model address: MakerWorld - MCompass (The Lost Compass)
  • Print Recommendation: It is recommended to use PLA or PETG material. A black shell with an appropriate fill rate can give you a better texture.

Electronic bill of materials (BOM)

CategoryNameSpecificationsRemarks
MasterESP32-C3-MINI
MagnetometerQMC5883L/PLGA-16 3x3L Discontinued and mostly refurbished, it is recommended to use P Model
GPSATGM336H-5N7113.1x15.7mmRequires matching ceramic antenna
LEDWS2812B 08071.7x2.0x0.85mmRequires 42 pcs, fog LEDs recommended
Battery213455 Lithium battery500mAhThe size must strictly match the housing space

Key supporting originals

  • LDO power supply: AP2112K-3.3 or ME6211 (saving model)
  • Charging Management: MCP73831
  • USB interface: GT-USB-7010ASV (USB-C 16P)
  • Structural Hardware:
    • Knurled nut: M2x3x3.2 (for hot melt insertion into housing)
    • Screw: M2x4 hexagon socket

2. Flashing and Compilation Guide

How to obtain firmware

If you do not plan to modify the source code, you can directly download the compiled binary file (Firmware).

This project has been configured with GitHub Actions for automatic compilation. Go to the Actions page of the GitHub project, find the “Build Firmware Workflow” record of the latest successful build, and download the corresponding version of .bin in the Artifacts area. file.

2.2 Manual compilation (PlatformIO)

  • Firmware: Based on the Arduino framework, the dependent libraries are located in the local lib folder.
  • Web resource: Enter the Server folder, execute npm i and npm run build, and copy the contents of the out directory to the data folder of the firmware.

Flashing Guide

Download Flash Download Tool:

  • Chip Select: ESP32-C3, Download Mode: USB
  • File selection: Load the .bin file to the address 0x0.
  • Parameters: SPI SPEED: 40MHz, SPI MODE: DIO.

If you want to use your phone to burn, you can use ESPFlash (Android) developed by the author:


3. Interactive usage instructions

Button operation

Number of operationsFunction descriptionRemarks
Click 1 timeSwitch modeSwitch between “Spawn Point Mode” and “Compass Mode”
Click 4 timesQuery statusIn web mode, the IP address of the current device will be displayed
Click 6 timesGeomagnetic calibrationAfter the countdown is over, you need to hold the compass firmly and draw an “8” in the air to rotate smoothly
Press 8 timesFactory settingsClear all configurations and restart
Press and hold for 3 secondsSpecial functionsSpawn point mode: reset the coordinate point; compass mode: enter Nether mode (random rotation)

Backend configuration

  1. Bluetooth background: Search for connection through WeChat applet “Compass Console”. Pointer color and map point selection can be customized.
  2. Web backend: Connect to hotspot The Lost Compass, visit 192.168.4.1 for WiFi configuration and sensor debugging.

  • Material Statement: Minecraft visual materials are copyrighted by Microsoft/Mojang. This project only provides dot matrix open source design and does not distribute the original game resources.
  • Commercial Use Restrictions: Use of for commercial profit is strictly prohibited. Please delete the standard Galaxy letter screen printing on the back of the PCB if it involves commercialization.
  • Manufacturing Suggestions: This device involves lithium batteries, please have common sense in electronic production.

Changelog

  • 2025.09.17: Introduce pointer overshoot physical effects; optimize startup fault tolerance; add smart GPS power strategy.
  • 2024.12.14: Initial version released, supporting magnet positioning.

Frequently asked questions

Can I build a real-life Minecraft compass? +
Yes. MCompass uses an ESP32-C3 microcontroller, a magnetometer, and a GPS module to recreate the Minecraft compass in a physical device.
How does MCompass reproduce lodestone targeting? +
MCompass obtains its current coordinates through GPS and uses a magnetometer to calculate the bearing toward the target coordinates, the real-world equivalent of a lodestone. A pointer animation recreates the movement seen in the game.
How long does GPS positioning take? +
A cold-start fix usually takes more than 30 seconds in an open area. Once the module has acquired satellites, subsequent updates are much faster.
What does a green 'x4' on startup mean? +
It indicates an I2C communication failure, usually caused by a poor solder joint on the QMC5883 sensor or pin header.
Does it support charging with a USB-C to USB-C cable? +
The PCB needs the appropriate CC1 and CC2 pull-down resistors to detect a USB-C to USB-C connection.

Share this post on:

Previous Post
Driving a WS2812 RGB LED over SPI on the DWM3001CDK
Next Post
Friday Ink: Is It Friday Yet?