BNO005 mag heading error on sailboat - Calibration option?

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
mrcw
 
Posts: 11
Joined: Tue Mar 17, 2015 1:49 am

BNO005 mag heading error on sailboat - Calibration option?

Post by mrcw »

I have a BNOO005 working perfectly on a sailboat which is not moving.
Pitch/Roll/Yaw(magnetic heading) are very accurate if I just just rotate the sensor by itself.

However if I fix the sensor and do a sea trial, turning the boat in 360s
the sensor has +/- 20 degree error (while reporting it has full calibration).

I understand the BNO SW actively recalibrates ... can it handle a large ferrous object (a few hundred pound diesel engine)
rotating with it several feet away, off centerline?

Very repeatable results... am I missing a setting? Thanks.

User avatar
adafruit_support_bill
 
Posts: 88944
Joined: Sat Feb 07, 2009 10:11 am

Re: BNO005 mag heading error on sailboat - Calibration optio

Post by adafruit_support_bill »

can it handle a large ferrous object (a few hundred pound diesel engine)
rotating with it several feet away, off centerline?
That is what is known as a "Soft Iron Error". There is a good article here on compensating for that with calibration:
http://diydrones.com/profiles/blogs/adv ... or-dummies

User avatar
mrcw
 
Posts: 11
Joined: Tue Mar 17, 2015 1:49 am

Re: BNO005 mag heading error on sailboat - Calibration optio

Post by mrcw »

Thanks you for the link. I'm familiar with soft/hard iron field distortions which is one of the reason I chose the BNO055.

From your video I thought the advantage of the BNO055 is that it's self calibrating (after some initial movements)
and it does the 'math/calculations' & calibration for you. In fact it's my understanding, even though it's possible to load a
set if initial calibration values, the BNO055 will continually adjust those values while it's powered on.

Even if I can manually calibrate the BNO055 using a tool like MagMaster (that you linked to) is there
a way to disable auto calibration with the BNO055 after I load those values?

How can I get accurate magnetic heading value in the presence of soft iron (several feet away)?

User avatar
adafruit_support_bill
 
Posts: 88944
Joined: Sat Feb 07, 2009 10:11 am

Re: BNO005 mag heading error on sailboat - Calibration optio

Post by adafruit_support_bill »

The BNO055 is pretty sophisticated and the self-calibration feature is great. But as it notes in the datasheet, the magnetometer auto calibration is primarily aimed at dealing with the more common hard-iron errors.

Would it be possible to re-locate your sensor further from the engine?

User avatar
mrcw
 
Posts: 11
Joined: Tue Mar 17, 2015 1:49 am

Re: BNO005 mag heading error on sailboat - Calibration optio

Post by mrcw »

Perhaps if I acquire its initial calibration by sailing in circles instead of rotating the BNO055 by hand
the sensor may be able to provide accurate heading (and keep them)?

The sensor is currently mounted about 6' away from the engine and off its centerline. A cellphone's compass reads correctly in this location.
The ships compass is at a similar distance and also reads correctly. The BNO055 can be off by 20 degrees or more.

--> Is there a way to disable the continual re-calibration feature of the BNO055?

If not I may have to go back to my MINIMU-9 sensor and use some sort of deviation table.
Seems odd that a cell phone at the same location as the BNO055 is accurate. Am I orienting the sensor incorrectly?
(I wouldn't think so as I'm receiving correct pitch & roll values)

Thanks.

User avatar
adafruit_support_bill
 
Posts: 88944
Joined: Sat Feb 07, 2009 10:11 am

Re: BNO005 mag heading error on sailboat - Calibration optio

Post by adafruit_support_bill »

There is the NDOF_FMC_OFF operating mode which disables the magnetometer calibration. I believe this is intended for use in conjunction with a stored calibration profile.

User avatar
mrcw
 
Posts: 11
Joined: Tue Mar 17, 2015 1:49 am

Re: BNO005 mag heading error on sailboat - Calibration optio

Post by mrcw »

Thanks for your input.
There is the NDOF_FMC_OFF operating mode which disables the magnetometer calibration
However I believe the NDOF_FMC_OFF setting just disables the 'fast mode calibration' and not continual calibration.

Datasheet:
Fusion modes - NDOF_FMC_OFF: This fusion mode is same as NDOF mode, but with the Fast Magnetometer Calibration
turned ‘OFF’.

3.10.4 Reuse of Calibration Profile: Once the device is calibrated, the calibration profile can be reused to
get the correct orientation data immediately after ‘Power of Reset’ (prior to going through the steps
mentioned in the above section). However, once the sensor enters the internal calibration
routine, the calibration profile is overwritten with the newly obtained sensor offsets and
sensor radius. Depending on the application, necessary steps had to be ensured for proper
calibration of the sensor.
This is the only mention of ''internal calibration routine' I've found. I'm assuming this is the continual calibration correction?

Anyway if you have an insight on how I can disable continual calibration that would go a long way.

In the meantime I got a little closer yesterday by doing a power on reset, and immediately disabling FMC mode all while
the boat was turning in circles. (sensor turning with the boat though I also moved it around pitch&roll axis) Once the sensor
obtained calibration I saved those values. They seemed to work better than the previous values I was loading.

I may try again to get more usable magnetic calibration values by putting the sensor in 'Compass' only mode while turning boat in circles.

If I can obtain reasonable values and IF I can keep the 'internal calibration routine' from not making them worse I may
finally have a workable solution. (If I can get close I could generate and use a deviation table to make small (+/- a few degrees)
corrections based on measured heading value)

Sure would be nice to disable the internal calibration routine as the sensor seems to loose magnetic calibration (Mag_cal goes from value of 3 to 2)
several times a day or even in the same hour just sitting there not moving. Is the auto function too much of a good thing?

My monitor sw from the last 12 hours boat/sensor not moving (code reloads stored values when sensor looses calibration):
2016-02-12 03:26 : Air Temp 68.0 Heading=155.00 Roll=-1.19 Pitch=-6.25 Sys_cal=3 Gyro_cal=3 Accel_cal=1 Mag_cal=2
2016-02-12 03:26 : *** RESTARTING & RELOADING CALIBRATION DATA ***
2016-02-12 07:01 : Air Temp 66.2 Heading=159.69 Roll=-1.12 Pitch=-6.25 Sys_cal=3 Gyro_cal=3 Accel_cal=3 Mag_cal=2
2016-02-12 07:01 : *** RESTARTING & RELOADING CALIBRATION DATA ***
2016-02-12 07:48 : Air Temp 66.2 Heading=160.62 Roll=-2.25 Pitch=-6.25 Sys_cal=3 Gyro_cal=3 Accel_cal=3 Mag_cal=2
2016-02-12 07:48 : *** RESTARTING & RELOADING CALIBRATION DATA ***
2016-02-12 07:49 : Air Temp 66.2 Heading=359.94 Roll=-1.44 Pitch=-6.19 Sys_cal=0 Gyro_cal=3 Accel_cal=0 Mag_cal=0
2016-02-12 07:49 : *** RESTARTING & RELOADING CALIBRATION DATA ***
2016-02-12 12:23 : Air Temp 71.6 Heading=158.75 Roll=-1.06 Pitch=-6.00 Sys_cal=3 Gyro_cal=3 Accel_cal=3 Mag_cal=2
2016-02-12 12:23 : *** RESTARTING & RELOADING CALIBRATION DATA ***
2016-02-12 12:30 : Air Temp 71.6 Heading=160.88 Roll=-3.06 Pitch=-6.19 Sys_cal=3 Gyro_cal=3 Accel_cal=3 Mag_cal=2
Is there a chance I just have a defective unit? (finally, moving sensor location didn't seem to help)

User avatar
gammaburst
 
Posts: 1088
Joined: Thu Dec 31, 2015 12:06 pm

Re: BNO005 mag heading error on sailboat - Calibration optio

Post by gammaburst »

NDOF does fast calibration. NDOF_FMC_OFF does slow calibration. The BNO055 data sheet page 47 says: "It is not possible to disable the automatic calibration which runs in the background".

Someone please clarify. When calibrating a 3D magnetometer, we rotate the sensor to various extreme 3D angles. Isn't it also necessary for the sensor to be attached to its platform so all the distorting metal bits move along with it? How to do that? I have visions of Superman standing on the shore twirling a boat over his head.

User avatar
mrcw
 
Posts: 11
Joined: Tue Mar 17, 2015 1:49 am

Re: BNO005 mag heading error on sailboat - Calibration optio

Post by mrcw »

Ahh... that's what I was looking for. Thanks.

Adafruit has an old version of the datasheet. The 2015 version notes the inability to disable automatic calibration. Ughh.

Funny your mention of Superman... I must head out on the roughest day, find the largest tanker/ferry/tug wake to do donuts in and see what sort of calibration I can get.


Seems like this sensor has some drawbacks... but hopefully I can come up with a work around. If I can get the calibration rate slow enough (perhaps the 'COMPASS' fusion mode is slower to calibrate than NDOF_ FMC_ OFF) to get decent calibration values in situ it might just work after all. As long as I don't have to reload these calibration values every few minutes or less to keep it's heading accurate. (note: my autopilot has a mechanically gimbaled single axis magnetometer which is calibrated by make two slow turns in flat water. w/o a gyro it's accuracy/refresh rate is low. )

I'm still wondering why when the BNO055 is not moving (boat in it's slip for hours) it just losses it's calibration (drops from 3 down to 2 or less).

Anyone else seeing this problem? If not perhaps I have a defective sensor?

User avatar
adafruit_support_bill
 
Posts: 88944
Joined: Sat Feb 07, 2009 10:11 am

Re: BNO005 mag heading error on sailboat - Calibration optio

Post by adafruit_support_bill »

The testing we have done on these is either on a lab-bench or with small hand-held devices. Beyond that, what we know is from what we can see in the data-sheets.

Bosch technical support may have some ideas on how best to calibrate the sensor for an application such as yours.

User avatar
mrcw
 
Posts: 11
Joined: Tue Mar 17, 2015 1:49 am

Re: BNO005 mag heading error on sailboat - Calibration optio

Post by mrcw »

I think I may just have a bad sensor after all. After several hours of relatively stable readings I 'moved' the sensor yesterday (took the sailboat out so the sensor was moving with it) and it quickly started having issues with calibration. Not only was the sensor loosing mag calibration it was also losing gyro and accelerometer calibration.

Here's the output from a simple monitoring program that checks the calibration once/minute:
2016-02-13 10:42 : Heading=158.81 Roll=-0.19 Pitch=-6.62 Sys_cal=3 Gyro_cal=3 Accel_cal=3 Mag_cal=0
2016-02-13 10:43 : Heading=159.56 Roll=-0.19 Pitch=-6.56 Sys_cal=3 Gyro_cal=3 Accel_cal=3 Mag_cal=0
2016-02-13 10:44 : Heading=160.00 Roll=-1.25 Pitch=-6.06 Sys_cal=3 Gyro_cal=3 Accel_cal=3 Mag_cal=0
2016-02-13 10:45 : Heading=0.00 Roll=0.00 Pitch=0.00 Sys_cal=0 Gyro_cal=0 Accel_cal=0 Mag_cal=0
2016-02-13 11:02 : Heading=345.38 Roll=-1.31 Pitch=-7.00 Sys_cal=1 Gyro_cal=3 Accel_cal=1 Mag_cal=0
2016-02-13 11:33 : Heading=267.62 Roll=-0.56 Pitch=-6.69 Sys_cal=1 Gyro_cal=3 Accel_cal=1 Mag_cal=2
2016-02-13 12:00 : Heading=313.94 Roll=-8.81 Pitch=-8.44 Sys_cal=3 Gyro_cal=3 Accel_cal=0 Mag_cal=0
2016-02-13 12:23 : Heading=111.44 Roll=1.50 Pitch=-7.88 Sys_cal=2 Gyro_cal=3 Accel_cal=1 Mag_cal=0
2016-02-13 12:36 : Heading=225.75 Roll=1.81 Pitch=-7.50 Sys_cal=3 Gyro_cal=3 Accel_cal=1 Mag_cal=2
2016-02-13 12:47 : Heading=99.50 Roll=2.31 Pitch=-7.38 Sys_cal=3 Gyro_cal=3 Accel_cal=1 Mag_cal=0
2016-02-13 12:53 : Heading=26.88 Roll=-1.00 Pitch=-9.00 Sys_cal=2 Gyro_cal=3 Accel_cal=1 Mag_cal=0
2016-02-13 12:57 : Heading=86.50 Roll=2.00 Pitch=-7.81 Sys_cal=0 Gyro_cal=3 Accel_cal=1 Mag_cal=0
2016-02-13 13:07 : Heading=141.19 Roll=1.12 Pitch=-10.06 Sys_cal=2 Gyro_cal=3 Accel_cal=1 Mag_cal=0
2016-02-13 13:27 : Heading=195.75 Roll=-2.31 Pitch=-6.69 Sys_cal=2 Gyro_cal=3 Accel_cal=1 Mag_cal=2
2016-02-13 13:38 : Heading=59.25 Roll=-1.12 Pitch=-8.69 Sys_cal=3 Gyro_cal=3 Accel_cal=1 Mag_cal=0
Has anyone else lost calibration like this after the sensor obtained full calibration?

User avatar
adafruit_support_bill
 
Posts: 88944
Joined: Sat Feb 07, 2009 10:11 am

Re: BNO005 mag heading error on sailboat - Calibration optio

Post by adafruit_support_bill »

We can try replacing the sensor. Please contact [email protected] with a link to this thread.

User avatar
dmitry420
 
Posts: 1
Joined: Tue Feb 23, 2016 7:01 pm

Re: BNO005 mag heading error on sailboat - Calibration optio

Post by dmitry420 »

I get similar results with the sensor at my bench.

I will lose various sensor calibrations after attaining full calibration (4x3) and without moving whatsoever.

Whats worse is I'll attain full calibration, then, without moving and intermittently, the 'system' calibration will drop to 0 while the individual sensors are still reporting 3... The only way to get the system calib register back to 3 is with a system reset.

My workaround has been doing system resets but it has become quite a hassle, perhaps my chip is bad also?

User avatar
mrcw
 
Posts: 11
Joined: Tue Mar 17, 2015 1:49 am

Re: BNO005 mag heading error on sailboat - Calibration optio

Post by mrcw »

Sounds like you are seeing the same thing that I saw when the sensor was held in a stable position for many minutes/hours.

You could have a bad sensor or perhaps the sensors code is assuming more consistent movement (typical to cell phone or small robotic device) though I would think the designers would have tested their device/code in a long term stable state. While mine also looses calibration when left in stable position looses it much more often when it and my sailboat are turning and ferrous objects (engine) turn with it. (I've never tested only moving the sensor for more than a minute or two so I don't know if it would also loose calibration).

I recently moved the sensor 15 feet from the engine and further from pumps/e-motors and it's still loosing calibration regularly... as well as having 10-20 degree mag heading error. Not sure what to do next, especially if it continues to loose calibration as mapping/correcting deviation would likely fall short against its dynamic calibration.

One thing that might help in your case, when mine looses calibration I don't do a full reset I just reload the calibration values that I had saved earlier... though this does take it offline for a moment, or two. Good luck.

User avatar
adafruit_support_bill
 
Posts: 88944
Joined: Sat Feb 07, 2009 10:11 am

Re: BNO005 mag heading error on sailboat - Calibration optio

Post by adafruit_support_bill »

@mrcw & @dmitry420

We can try replacing the sensors. Please contact [email protected] with a link to this thread.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”