Main Content

This instructable explains how to build, and calibrate, a tilt-stabilized compass using an Arduino UNO R3 and an MPU-9250 accelerometer | gyro | magnetometer. [1]

The following options are available for displaying the compass heading | pitch | roll:

Serial Monitor
LCD display
A graphics “compass rose” on your PC screen
Calibration is simple … three methods are provided:

Tumble the compass every time at switch-on
Tumble the compass once and save the results
Use my “compass_cal” software and save the results
A compass-heading of +/- 2 degrees is possible using my “compass_cal” software.

The estimated cost for this project is $20 USD.”

Link to article