BNO085 or BNO080 IMU

It is really simple to know which BNO080 mode and configuration CMPS14 uses. Just use an I2C sniffer to sniff data between the PIC microcontroller (which processing data from BNO080 in CMPS14) and BNO080. For example GitHub - kongr45gpen/i2c-sniffer: Debugging tool for I2C networks, built for STM32 microcontrollers. I can do this but unfortunately, CMPS14 is not available in Poland :frowning:

Hello,

Some field test with the BNO08x. So BNO08x in my steering box instead of MMA & BNO055.

I also put the comparative board in the tractor, to make some log with MMA, BNO055 and BNO08x and plot the results.
BNO08x of the comparative board was calibrated in my lab.
I was following a AB ligne on a flat trail with AOG, one round trip.
Here is the results:
Log08 - Tractor test 1 - plot all Log08 - Tractor test 1 - plot roll only Log09 - Tractor test 2 - plot all Log09 - Tractor test 2 - plot roll only
So clearly, the BNO08x is less noisy compare to MMA. And heading of BNO08x is clearly more stable.

After, went to a field: clearly an improvement compare to MMA, no more oscillation like here (Perfect straight line without MMA, slight oscillation with MMA).
Flat part of the field, guidance error was 1 to 2cm, as the tilt of the field is increasing, the guidance error is increasing: 9cm for 10° of tilt. Test condition was difficult: rain and slippery field.

But pass to pass on the same track (so one time tilt left, and after tilt right), the tractor was always driving on the same track (wheel exactly at the same place). Very repeatable behavior.

So, some people does observe the same behavior (error increasing with tilt) when driving on tilt ? It’s as if when the tilt is too important, AOG doesn’t compensates enough.

20201221_152810 20201221_153035

Also, during my test, I observe that sometime, there is some “jump” with BNO08x heading. Like in just one time (whereas I was autosteering on a straight line), BNO08x heading increasing of something like 10°. Generating an slight oscillation in AOG.
I catch this in video, I will try to share it.
It’s look like potential behaviour of BNO08x with magnetometer described in BNO08x datasheet.
image
During my test, I was using rotation vector with defaut background calibration enable (accelerometer and magnetometer). BNO08x was calibrated for accelerometer and gyroscope, but I never succed to calibrate magnetometer in the tractor.
So I will try this to solve this problem:

  • Disable all background calibration with Rotation Vector
  • Use Game Rotation Vector instead of Rotation Vector

Have someone noted same behavior with BNO08x ? And for those using CMPS ?
Was also very present when I was doing some tests of U-Turn.

Don’t know exactly. But somewhere in the datasheet it’s writen that Game Rotation Vector induce a long term drift. By long term drift, I wasn’t expected 0,5°/min.
What did it give with your tests ?
And also, how did you calibrate magnetometer when BNO08x wa installed in the tractor.

Math

1 Like

Make yourself a tractor sized compass rose on the ground. preferably away from buildings, cables etc.
Make a central point and record its GPS location, take a good quality hiking compass and mark out the points of the compass, (no ferrous material nearby to minimise deviations).
Mark numerous possible mounting locations on tractor for magnetmeter.
Sequentially park tractor on central location pointing at each compass point & record deviation from magnetmeter at each mounting location.
Position with least deviation for all points is best mount location, any remaining minor deviations can be filtered out.

The roll is a no brainier.
(Test 2). Yaw has definitely got slightly more drift on the bno055 but the 10 degree blip is visible simultaneously on both sensors so to me that points to outside interference. Doesn’t help with the bno055 running at virtually zero degrees. Hence the obvious 0 to 360 swings.

With regard to the magnetometer calibration. Lively driving around an undulating part of our yard! I got to medium for the mag.

Given we only need a relative reading and we are dealing with inexpensive sensors with known drift, that would be an almost futile operation surely?!!

Hello,

Yes. Just want to record datas to see influance on tractor integration compare to lab test or test in my car.

Sorry, wasn’t clear. Graph of test 1 and test 2 are just 2 records on straight line to compate all unit. Yes oscillation on begening of test 2 is normal: steering engage far away from the line, so little bit oscillation time AOG catch the line. After this 2 records, I remove the comparative board from the tractor, and just go to make some test in the field, with steering box equiped with BNO08x.

And it’s when I was driving making some test (and U-Turn test) I was facing this heading “jump”. Record it in video, you can see here:

Just autosteering on a AB line. BNO08x IMU heading is arround 157°. And suddently jump to arround 170°, causing AOG oscillation. Same phenomen repeated a few seconds latter, just before U-Turn.
BN008x configuration:

  • Accelerometer and gyroscope calibrated to hight, magnetometer not calibrated
  • Using Rotation Vector with defaut accelerometer and magnetometer enable.

Have you never see that with yours ?

Math

I have tried cmps14 for about one hour, never happened a jump in heading. Cmps14 is inside the autosteer box which is on the left window of my tractor, so not central or on the roof.

Does this jump happen every 13 seconds when continuing driving “straight” on the AB line

I can’t say I’ve seen that, unless I’ve not noticed? My test field is pretty rough and rutted though. I will test again today in an hour or two. I’ve got the BNO085 in my steer box with the tractor ecu’s. going to try remote mounting with the i2c extenders. I will try with some other settings too then. Will be interesting to see how stable we can get a true compass reading with cab roof mounting.

Hello,

Same installation, on the right window.

No, randomly.

I’ve test this morning, using Game Rotation Vector instead of Rotation Vector. “Jump” doesn’t happen. Driving 2 return trip on a 1km line (~30min of drive).
I would like to do more tests too, but definitely too rainy here, not sure I can. What I would like to test:

  • Rotation vector with background calibration disable
  • Succed to calibrate magnetometer and test with Rotation Vector with backgroud calibration enable and disable.
    Too check if this “jump” is du to a non calibrated magnetometer, background calibration or something else.

Math

I also did not experience any sort of “jump” really ever in the tractor - only once when it fell on the floor off the dash :slight_smile: . Although i did notice a slight jump, about a degree or 3, while just sitting on the floor in the living room. I will do a long term plot and see if i can catch it.

Using the CMPS

I’ve had a drive again tonight. I couldn’t replicate your heading jump. I was in game rotation vector mode though. The field is too rutted and wet to really get a grip on any overall accuracy improvements.

I have background calibration disabled.

I’ve found I can use much more aggressive steer settings with the 085 and the whole system still performs smoothly. I’m guessing better roll is mainly to thank for that.

Hello,

I hope you won’t see it: it would meaning that it’s only a calibration issue (magnetometer not calibrate or background calibration disable), not a algorithm issue.

It’s happen in Rotation Vector mode. Not see it in Game Rotation Mode.
I’m pretty sure it’s an issue with magnetometer (calibration or background calibration).

Math

Perhaps it would be better to take the quaternions and calculate RPH when using the 085?

In RotationVector it seems to be possible to cause heading jumps very occasionally, with the introduction of magnetic fields. Getting a video of that was difficult as it was hard to predict when it would jump.

However, in GameRotationVector it is completely oblivious to even very strong magnets, millimetres away from the BNO085. Driving using 1m fix to fix, and the slider across to IMU bias as much as it will go is stable at any speed. With the BNO055 and MMA is was very unstable at higher speed, set like this.

This is in GameRotationVector mode. The small ‘X’ on the project box is where the BNO085 is glued to the inside.

3 Likes

Toi find out more about how CMPS does the output, you could do the magnet test like Alan did.

Found this pdf about calibrating bno080, easy to follow.
I know, today magnetometer might not even be needed/used to achieve good heading info for AGOpen

Edit: I think this command is important:
6. When finished with the calibration motions, run the Save DCD Now command, which
will save this calibration data into flash

Hello,

Not sure to understand: calculating RPH in AOG ? BNO08x only output Quaternion (expect in UART-RVC mode), so RPH are already calculated in Arduino (Sparkfun library).

Yes I know it. Have you try it ? Easy to calibrate gyro and accelerometer. Harder to get a “medium” or “Hight” calibration status on magnetometer.

Yes requied to store calibration parameter when you have a status different to “unreliable” on accelerometer/gyroscope and magnetometer.

Interesting, BNO085 seams to be quite robust to the magnet. But it’s on a steady situation, so not driving (no variation on accelerometer and gyroscope). I only saw it when driving. To get it in video, I just record the AOG screen while driving (original record from my previous video was something like 20min). As it’s radomly, not easy to catch. But seems to correspond to what is described in the BNO08x datasheet (risk of “jump” when using magnetometer).

So yesterday, I made new test: switched the BNO08x in Game Rotation Vector. I drive in the field for more than 30min, with a lot of U-Turn. The tilt of the fiel varied between 5° and 10°. No jump anymore.

So the “Jump” phenomen that I encounter is linked to the use of the magnetometer. Using Game Rotation Vector like @Alan.Webb does is the good solution. And no need to calibrate the magnetometer.
What I haven’t time to test to see if it’s solve the “jump” phenomen I encounter in Rotation Vector mode:

  • Obtain a “High” status on magnetometer
  • Disable background calibration

But I’m very happy, with BNO08x, no more oscillation in riving like with MMA. Again, thank to @BrianTee_Admin for this great software.

Math

2 Likes

I wrote a little window that shows the easting, the roll corrected easting, and the roll itself. Very interesting to watch. It seems the GPS fix is filtered when the tractor pitches sideways on rough ground. It’s like it knows it’s average speed so one or two fixes far exceeding what would be the current speed/distance are clamped. Now, the CMPS deadly accurately measures the sharp rolls back and forth on those rough spots - accurately calculating where the antenna will end up. Problem is, the fix isn’t where the antenna actually is. The result, the roll now makes the position far worse then no roll at all. So I added a “quick” kalman to limit only those quick snaps on rough surface and the improvement in steering was dramatically smoother. Timing seems alright and timely as the roll corrects not only the roll on hills, but “slower” rough ground as well.

Now they look noisy as a waveform, but keep in mind the wiggle is only a couple cm. Top 2 image used Kalman. Very interesting drive.

Screenshot_5 Screenshot_6 Screenshot_7

1 Like

Finally got the bno085 hooked up:
Did the example 9 calibration ino from sparkfun `
After advise from Alan I put 0x4A in the empty brackets at the top of the example 9 ino, so it looks like this.
myIMU.begin(0x4A);
That was instead of changing to bno085 adress in library.h where they write the standard default adress of bno080

/*
  Using the BNO080 IMU
  By: Nathan Seidle
  SparkFun Electronics
  Date: December 21st, 2017
  SparkFun code, firmware, and software is released under the MIT License.
	Please see LICENSE.md for further details.

  Feel like supporting our work? Buy a board from SparkFun!
  https://www.sparkfun.com/products/14586

  This example shows how to calibrate the sensor. See document 1000-4044.

  It takes about 1ms at 400kHz I2C to read a record from the sensor, but we are polling the sensor continually
  between updates from the sensor. Use the interrupt pin on the BNO080 breakout to avoid polling.

  Hardware Connections:
  Attach the Qwiic Shield to your Arduino/Photon/ESP32 or other
  Plug the sensor onto the shield
  Serial.print it out at 115200 baud to serial monitor.
*/

#include <Wire.h>

#include "SparkFun_BNO080_Arduino_Library.h" // Click here to get the library: http://librarymanager/All#SparkFun_BNO080
BNO080 myIMU;

void setup()
{
  Serial.begin(115200);
  Serial.println();
  Serial.println("BNO080 Read Example");

  Wire.begin();

  myIMU.begin();

  Wire.setClock(400000); //Increase I2C data rate to 400kHz

  //Enable dynamic calibration for accel, gyro, and mag
  myIMU.calibrateAll(); //Turn on cal for Accel, Gyro, and Mag

image
Calibration done in the office, sitting on chair about a meter away from pc and lcd screen.
Did the 180 degree turns all 3 axis(many times), but it stayed in unreliable.
Then started waving around in circles and after 3 seconds it was High.
If placed on wooden table (with metal bar underneath) it goes medium, but right back to high when out in the free again.
Did the s and it saved succesfully, so now it goes right to high when power off - on after restarting serial monitor, AND not on table.
Next I did more calibration close to the spot I would put it on the table, and after a lot of attempts it got high when placed on table, but sensor must be within a 5 cm range from the spot on table when doing the 180 turns and the small circles.