Getting the most out of my IMU (BNO055)

Hey guys,

Im using the BNO055 9 axis intelligent IMU DOF Orientation sensor on a leveling project, therefore Im looking for very accurate roll and pitch values.
Datasheet: https://www.adafruit.com/datasheets/BST ... 000_12.pdf

The BNO055 is a great device which combines a Gyro an accelerometer and a magnetometer in one chip. On top of that it also has an an internal MCU which can output fused sensor data. (see Datasheet page 20-23) So far so good.
I'm currently using it in the NDOF Fusion Mode with the accelerometer range set to 2G.
Unfortunately the bno in my current setup is not accurate enough for what I'm trying to do, as my system is changing orientation very slowly.
What happens is that my angle changes and for a while the values for pitch and roll stay the same until a certain point and then jump up to +/- 0.3 degrees. I can also trigger a jump by shaking the system. Setting the accelerometer range from 4g to 2g helped a little to get better values but not much. I feel like setting the gyro from 2000 dps to 125 would fix my problems but I can't change the range while I use the bno in Fusion Mode (see Datesheet page 28). I think the internal algorythm ignores the gyro data until it gets valided by the accelerometer that there was indeed a change in orientation.

I was wondering if anyone has experience with a similar application of an IMU and could help me out with some advice on how to use either fused or raw data from the bno to get accurate orientation values for slow movements.

I know there is a thing called kalman filter and some other filters but I don't really know where to start with that.

Any advice is appreciated!

You are limited by the resolution of the ADC on the accelerometer.

For your purposes an analog output accelerometer might be better - you can then low pass filter
and stick though a high resolution ADC... Of course MEMS devices are very limited in their precision,
you need a proper accelerometer - expensive.

I've worked with that sensor quite a bit. The BNO055 is accurate to +/- 1 degree at best, so "jumps" of 0.3 degrees are meaningless. It has a built in sensor fusion algorithm, and I doubt if you could improve on it by external manipulations. However, you could average a number of readings and display those.

I suggest to carefully go through the calibration procedure several times (in the sensor's final place of installation) and average and store the 11 values that result. Then disable the autocalibration function and with every power up, write the calibration values to the sensor. Recheck from time to time.

You should also be continuously monitoring the calibration status variable, and can choose to ignore or downweight results that are delivered at less than full 0xFF calibration status.

Looking at the datasheet it seems it has 14bit ADC for the accelerometer which is plenty - if its possible
to get the raw accelerometer samples out and filter those alone, that might help - for slow rotation the
gyro drift will prevent it being very useful, but the raw accelerometer should be reasonable if not
much vibration or movement. However MEMS sensors are pretty noisy and you'll have to filter down to
0.5Hz or lower I suspect.

Solved by using the accel only in 2G mode. Works with a repeatability of 0.1 degrees! :slight_smile:

I am also trying to solve this issue and I also tried changing the accelerometer range to +/- 2g but it didn't seem to want keep the range change. Data sheet version 1.2 stated the range was user selectable but the BW and Power Modes were auto controlled in fusion mode. A newer data sheet (1.3) states that the range is also auto controlled in fusion mode so that explains why I can't change it. This is from the discussion on the Adafruit forum:

Which datasheet are you looking at? The one on our product page is the latest.
https://cdn-shop.adafruit.com/product-files/2472/BST_BNO055_DS000_13.pdf
table 3.8 on Page 27 shows that range is autocontrolled in fusion mode

How did you change the accelerometer range? There doesn't seem to be an enum for it in the header..

i am using bno055 adafruit sensor. i use linear acceleration values from the sensor to get distance values after double integration. But there is drift seen in acceleration values. So i am planning to use complementary filtering to remove the drift.But, it seems that complementary filtering uses angles of acceleration rather than linear acceleration values. How can i code bno055 for a complementary filter?

Hi Roseann,

Did you manage to get the code for a complementary filter?

I know, old past.

Sabvip:
Hi Roseann,

Did you manage to get the code for a complementary filter?

You can use the words "arduino complementary filter" and your favorite internet search engine to gain access to the complementary filter code.