Main Content

I found the personal compass project at Instructables.com quite interesting. Basically, a personal compass works like a regular compass, but instead of pointing to magnetic north, it points to a particular location of personal interest. Maybe it is pointing to the place where you were married, perhaps where your childhood home is.

All this compass magic is done using an Arduino with a compass (magnetometer) sensor, GPS module and a servo motor to point the way. However, there were a couple of things I didn’t like about the original project:

Extra gears were needed to increase the servo’s sweep to 360 degrees
Location was hard coded into the code
The extra gears complicated the build and it still had to “rewind” itself when it reached its 360 degree limit, so I decided to use a continuous servo with feedback. This allowed for full 360 degree rotation and beyond of the compass needle. The feedback wire is used to determine where the pointer is located so it can be positioned at the correct angle. The one drawback for the continuous rotation servo with feedback is that there are not that many available, and the only one I found required 5V to run, even with no load on the servo. So, I added a 3V to 5V booster module to get the servo to work with the 3V battery power.

To solve the hard coded position issue, I decided to go with an ESP32 based Feather processor from Adafruit, the HUZZAH 32. This processor includes WiFi and Bluetooth features. I didn’t really need the processor to connect to a WiFi network or Bluetooth, but its web server feature provided a way to save configuration settings like the location’s coordinates from a cell phone quite easily. While I was at it, I wanted to add a smart button feature.

My code for the improved personal compass and supporting applications can be found on GitHub.”

Link to article