Blog Home

This electronic compass guides you using LEDs and OLED display

Arduino TeamJuly 11th, 2023

Of all the tools humanity has developed for navigation over our history, the humble compass is arguably the most important. A compass is cheap to produce, reliable, and incredibly useful for every kind of navigation. But standard mechanical compasses aren’t perfect; they can stick, are easy for people to misread, and don’t always indicate exact angles well. This simple digital compass built by Mirko Pavleski solves those problems.

There are, of course, many digital compasses on the market that will work just as well as this device. But this could still be a fun weekend project. It is a digital compass that aids navigation in two ways. First, it indicates magnetic north using an outer ring of LEDs. But there are only 60 LEDs, so that can be off by as much as three degrees in either direction. For that reason, this device also contains an OLED display that shows the exact angle (down to two decimal places) relative to magnetic north.

This is a very simple device to build and it only requires four components: an Arduino Nano board, an HMC5883L compass module, a ring with 60 WS2812B individually addressable RGB LEDs, and an OLED screen. If you want to use it on the go, a standard 9V battery will provide portable power. Those components fit into a basic 3D-printable case that protects the electronics and puts everything in the correct orientation.