

Digital compass
A basic LED ring compass
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 10
- Nets
- 31
- Pads
- 65
- Tracks, vias
- 125, 21
- Routed
- Yes
- KiCad
- KiCad 7 (file 20221018)
- Created
- 15 Jan 2024
- Updated
- 21 Feb 2024
Overview
Digital compass is an open-source printed circuit board by fmenozzi, from the fmenozzi/digital_compass repository on GitHub, published under the MIT licence. It is a 2-layer board with 10 parts on 31 nets, routed with 125 tracks and 21 vias.
It is built around the QMC5883L and L7805. Its parts include 5 ICs, 2 capacitors, 1 resistor and 1 switch. It belongs with the SAM D and SAM boards of this library.
Main components
2QMC5883L
LGA-16(3x3)-40℃~+85℃ 16bit 2.16V~3.6V 75uA Built-in temperature sensor I2C ±8Gs ±8Gs LGA-16(3x3) 3D Magnetic SensorsQST3D Magnetic SensorsL7805
TO-220ST0℃~+125℃@(Tj) 1 1.2A 20V 2V@(1A) 42uV 500uA 5V 73dB@(120Hz) Fixed Positive Short Circuit Protection TO-220ST Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSOSENVoltage Regulators - Linear, Low Drop Out (LDO) Regulators
README
README.mdA digital compass that uses an LED ring to display the compass rose.
Upon startup, the compass enters magnetometer calibration mode, shown by the led chase sequence:
https://github.com/fmenozzi/digital_compass/assets/4451432/49a2e2fe-652e-430a-9320-a2c4e0b69866
During calibration, the compass should be moved around in all directions. Calibration ends after calibrated values do not change for five seconds.
Once the chase sequence ends, the compass rose will be displayed and the compass is now active, with the red LED pointing very roughly north:
https://github.com/fmenozzi/digital_compass/assets/4451432/9e37ce8d-d3a7-4e10-ac38-1c5cc8147863
Accuracy will suffer for a couple of reasons, such as being limited to only 24 possible directions and the magnetometer calibration being suboptimal. Regardless, this was a fun little proof-of-concept project for me, and my first non-trivial hardware project.
The microcontroller is a Seeeduino Xiao, and the magnetometer board uses the QMC5883L chip. The LED ring is an Adafruit Neopixel Ring 24, and a basic level shifter board does the conversions between the Xiao's needed 3.3V and 5V.
The software was programmed using Arduino. The circuit board was designed in KiCAD and manufactured by JLCPCB. The 3D-printed enclosure was designed in FreeCAD.
All software, schematics, and design files are licensed under the MIT license.
Parts
10| Qty | Value | Footprint | References |
|---|---|---|---|
| 1 | 0.1uF | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C2 |
| 1 | 0.47uF | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C1 |
| 1 | 330 | Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolder | R1 |
| 1 | Adafruit_Neopixel_Ring_24 | digital_compass:Adafruit Neopixel Ring 24 | U5 |
| 1 | Battery | Battery:BatteryHolder_Eagle_12BH611-GR | BT1 |
| 1 | L7805 | Package_TO_SOT_SMD:TO-252-3_TabPin2 | U1 |
| 1 | Level_Shifter | digital_compass:Level_Shifter | U3 |
| 1 | QMC5883L | digital_compass:QMC5883L | U4 |
| 1 | SW_SPDT | digital_compass:JS102011SCQN_SPDT_Switch | SW1 |
| 1 | Seeed Studio XIAO SAMD21 | digital_compass:XIAO-SAMD21-RP2040-14P-2.54-21X17.8MM (Seeeduino XIAO) | U2 |
Questions
What parts does the Digital compass use?
10 parts, built around the QMC5883L and L7805. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Digital compass KiCad files?
From the fmenozzi/digital_compass repository on GitHub, at the commit this page was made from: the board is pcb/digital_compass/digital_compass.kicad_pcb and its schematic pcb/digital_compass/digital_compass.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Digital compass design in my own project?
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).
Similar boards
- 2 layers47 × 28 mm

- 2 layers100 × 100 mm

- 4 layers108 × 74 mm

STM32 Drone
bassammorsy/stm32-flight-controller
Custom 4-layer STM32F405RGTx quadcopter flight controller PCB designed in KiCad. Betaflight compatible, 4S–6S LiPo input, SMT assembled by JLCPCB.
104 parts3MIT - 2 layers40.1 × 70.1 mm

ESP32-DWM1000-local
jh247247/DW1000-fan-video
Using UWB to make an indoor location system, to get a fan to point at me.
53 parts3 - 2 layers100 × 60 mm

- 2 layers25 × 17 mm

- 2 layers66 × 74.1 mm

GPS Travel Navigator
shubhamp2007/GPS-Travel-Navigator
A 5 inch offline maps with compass, powered by Radxa Cubie A7Z.
9 parts1MIT - 2 layers48.9 × 33.7 mm
