Best IMUs for absolute heading

I have been using a BNO080 to calculate absolute orientation (0-360 degrees wrt North) on a spheroid “hamster ball” robot. Once calibrated the orientation seems quite reliable but upon reboot the precision often drops drastically. Worse, after a while the orientation seems to drift.

I am using a BNO080 on a Sparkfun breakout board (SparkFun VR IMU Breakout Board - BNO080 (Qwiic) - RobotShop) with an ESP32 and the Sparkfun BNO080 Arduino library.

Are there alternative IMUs which would be more reliable to get that information? I am ready to pay a bit more (100-250$ max., let’s say) if necessary. Ideally it should be easy to interface with an ESP32.

Have you considered a magnetic compass? They don’t have drift or need to be recalibrated.
https://www.robotshop.com/en/magnetic-sensors-compass.html
“Tilt compensated” include an IMU, and 9DoF includes a gyro.

Well isn’t this what I already have with the BNO080?
I used non-tilt compensated conpasses in the past and they needed to be calibrated nonetheless.

Most MEMS magnetic compasses measure the earth’s gravitational field without any need for calibration at every startup. The BNO080 seems to be an IMU (not a compass) so you’ll certainly get drift etc.

I see. I thought the BNO080 included a magnetic compass (magnetometer), is there a way to use only this sensor together with the accelerometer (without gyro) to measure tilt-compensated orientation? What sensors would you suggest as an alternative (the link you sent included BNO050 which in my understanding is also an IMU, no?)

Quick search online shows that sensor does need calibration. Example:

Also - not sure why I didn’t see this - it does have a “geomagnetic sensor” (so it is a 9-DoF IMU?). My apologies (perhaps clicked a wrong link?). Sparkfun has this data for the BNO080:

  • Rotation Vector
    • Dynamic Error: 3.5°
    • Static Error: 2.0°
  • Gaming Rotation Vector
    • Dynamic Error: 2.5°
    • Static Error: 1.5°
    • Heading Drift: 0.5° / min
  • Geomagnetic Rotation Vector
    • Dynamic Rotation Error: 4.5°
    • Static Rotation Error: 3.0°
  • Gravity Angle Error: 1.5°
  • Linear Acceleration Accuracy: 0.35m/s2
  • Accelerometer Accuracy: 0.3m/s2
  • Gyroscope Accuracy: 3.1° / sec
  • Magnetometer Accuracy: 1.4µT

Need to find something with better specs. Without direct experience with a wide range of magnetic sensors, can’t really suggest any alternatives unfortunately, so would need to suggest based on spec sheets).

For example: HMC6343 I2C 3-Axis Accelerometer / Compass - RobotShop
This seems to have a “Heading accuracy” of 1 to 3 degrees RMS with a resolution of 0.1 degrees. It still mentions calibration however. No good answer to provide you with unfortunately. Perhaps someone else from the community has some insights / suggestions.

1 Like

I think any magnetometer needs some kind of calibration because it will differ depending on your location on the planet; and perhaps the environment (eg. if there are big metal beams around). But once it is set, it should not need to be re-calibrated, it should not drift.

But yes maybe I could try to use the geomagnetic rotation vector. From the BNO080 datasheet:

2.2.1 Geomagnetic Rotation Vector

The geomagnetic rotation vector is an orientation output that is expressed as a quaternion referenced to magnetic north and gravity. It is produced by fusing the outputs of the accelerometer and magnetometer. The gyroscope is specifically excluded in order to produce a rotation vector output using less power than is required to produce the rotation vector of section 2.2.4. The consequences of removing the gyroscope are:
• Less responsive output since the highly dynamic outputs of the gyroscope are not used
• More errors in the presence of varying magnetic fields

I don’t see then what would be an advantage of using it beyond saving power, but could the gyro introduce drift?

A gyro on its own measures angular acceleration which needs to be integrated twice to get position. Given that it’s impossible to every reading over every microscopic period of time, gyros inherently have drift.

Interesting. In other words, using the geomagnetic rotation vector should technically solve the issue of the drift?

A magnetic compass is about as close to an “absolute” sensor for heading as I’m aware of, whereas a gyro offers relative heading and drift is problematic.