Projects / Ideas / Tilt-compensated compass

Tilt-compensated compass

IntermediateSensorsIdeaReviewed
In short

How do you build a tilt-compensated compass?

A compass that stays right when tilted, using a magnetometer and accelerometer together. You need Arduino Nano, ICM-20948 9-axis IMU and SSD1306 OLED Display.

Level
Intermediate
Time
About 180 min
Parts
3
An idea, not a guided build yet. Goal, parts and steps; no wiring, code or tests. Copy it to My Garage to plan it.
Goal

Fuse magnetometer and accelerometer data.

Parts list

How to build it

  1. Calibrate by rotating through all directions
  2. Read tilt from the accelerometer
  3. Rotate the magnetic vector to horizontal
  4. Compute heading
  5. Compare with a phone compass

Related projects

Common questions

What parts do I need for the tilt-compensated compass?

Arduino Nano, ICM-20948 9-axis IMU and SSD1306 OLED Display.

How long does the tilt-compensated compass take to build?

About 180 minutes for a intermediate maker.