Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

BNO055 not giving consistent bearing (X axis)
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

BNO055 not giving consistent bearing (X axis)

by Keep_Looking_Up on Sat Aug 22, 2020 9:31 pm

I'm trying to use a BNO055 board in an application in a vehicle. I need it to tell me changes in the direction the vehicle is pointing (X axis in the example program). I'm using the Adafruit example programs with the BNO055 library on an arduino nano. Primarilly I'm using the sensorapi example. When I get the board calibrated (Sys:3 G:3 A:3 M:3), it doesn't give accurate or consistent direction results, and it loses magnetic calibration quite often. I'm thinking the magnetic field distortions might be too much in a car.

Since my application doesn't really need absolute pointing (relative to magnetic north), but simply to tell me the relative change in direction, I tried putting the board in IMU mode 0X08 where it doesn't use the magnetometer, but just the accelerometer and gyro. It just reads relative direction based on the direction it was powered up in. But I can't get consistent readings in the vehicle there either. When I turn the car to the right in a full circle at a steady rate of about 12 deg/s, it counts up fast, then slow, kind of randomly. If I stop, the bearing sometimes keeps going for a few degrees then slows and stops. Continuous slow right hand turns sometimes even result in it pausing and not changing for several seconds, or even going backwards. When I turn through 360 degrees, it might only count 140 degrees, but the amount varies. It usually undercounts. It seems like turning faster makes it more accurate.

I've tried mounting the board in various orientations with the same results.

But yet I've started the software with the board mounted in a vise, danced around the house carrying the laptop and board spinning and turning and moving for a few minutes, then returned and placed the board in the vise and found the resulting orientation correct to within 0.25 deg.

I can't figure out what I'm doing wrong. Could the board be bad?

Keep_Looking_Up
 
Posts: 4
Joined: Sat Aug 22, 2020 8:17 pm

Re: BNO055 not giving consistent bearing (X axis)

by jps2000 on Mon Aug 24, 2020 1:24 am

Good that you found it working in a different setup.
Now you just have to find out the differences ......

The cause of such a behaviour is likely drift of the gyro in these consumer devices. There is an undisclosed software in the BNO that compensates that drift assuming that there are periods where the sensor is at rest. They are using acc and mag for that. If they detect no change also the gyro has to output zero angular velocity. This is how they compensate gyro offset. Also slow turns with low accelerations are used to calibrate gain of the gyro.
So the BNO likes slow movements with phases of rest in between.

Drift however, is mainly caused by temperature changes of the chip and/ or mechanical stress to the package (Supply voltage drift is considered less). Both may be linked to different temp coefficients of board , chip and housing. Hence apply single-screw mount of the board and thermal shielding. Wait 3- 5 min after on and then do calibration. You can even use a thermostat like used for chrystals.


Also vibrations from the car chassis may play a role. You can apply a mass to the sensor board and then wrap mass + board in foam and put all together in an outer box that is then attached to the car. This is a mechanical low pass filter (damper) that uses the inertia of the mass and the spring behaviour of the foam to reduce mechanical noise.

I would start first with your working setup in the car and see if it is doing better.

Note that magnetometer calibration for soft iron in a car would need to turn the car and the attached sensor all around which seems somehow dangerous.

Good luck

jps2000
 
Posts: 569
Joined: Fri Jun 02, 2017 4:12 pm

Please be positive and constructive with your questions and comments.