Question about EKF Compass Variation Alarm

Just completed a successful short automated mission and the UAV came home safely.

At each juncture in the mission when the UAV turns toward the next waypoint, the EKF indicator turns yellow and sometimes red, and then clears after a few seconds. It appears that I am having temporary problems with the compass. This is a screenshot during on such event:

On the UAV I have installed an LTE modem just above Navio2, separated by about 1/2 inch. Could this additional board above the Navio2 be causing interference for the compass?

If so, would an external compass mounted above and away from the other electronics help? If yes, then can you please recommend a good one that is compatible with the Navio2?

Please advise. Thanks,

Paul

Do not bother with the internal compasses. Have found them to be useless.

We have had good luck with this one:

Mount away from all source of EMI and connect to I2C. Shortest cable run feasible.

Thanks Coby. Will give this device a try and report here. Paul

that should work much better for you. we do not even enable the internal compasses. just use compass 3; primary; external; set your rotation.

if i remember correctly that breakout is setup so pins are forward and chip on top for default orientation.

Ok, got the GY-282 device and am eager to try it. I located the Navio2 pinout and can use the 4-position cable harness that came with the Navio2.

I configured compass three (3) as primary and external, however; I cannot get any response from Mission Planner when I attempt to calibrate.

Do I need any other configuration? The I2C initialization in the Pi’s “raspi-config” utility seems to fail so that is likely already taken care of in Emlid’s setup.

Saw this command and output in another thread; this is what I get:

root@navio:/home/pi# i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- 1e –
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – -- – --
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – -- – -- – -- – -- – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – 77
root@navio:/home/pi#

Also noticed this in the configuration:

And below, I once got the id:2 0% field to change to up 3%, but never beyond that and only once. I simply cannot calibrate.

Also this from the Arducopter-quad console:

0 0 0 DataFlash_File: buffer size=16384
▒ Q}▒LSM9DS1: Onboard compass detected
AK8963: Onboard compass detected
HMC5843: External compass detected

It appears that the Navio2 detects a HMC5843 when in fact the compass board’s part number is 5983 - could this be the problem?

Update, 11pm: figured it out - I was not getting any calibration readings because I was holding the compass board in my hand and turning it alone. Instead you have to move it and the entire Navio2 board together. When I mounted the compass board with the Navio2 on the quad I was able to calibrate it.

Thanks all,.

Paul

Paul,
Glad you got it sorted. Pinouts are silkscreened on the bottom of the Navio2 so as soon as you mount it to the Rpi they are hidden. Good to keep the pinout pic handy.

I have attached stl files of a tiny case you can 3D print. It is designed to use double sided tape on the bottom of the board to attach to bottom of case. Then the top of the case is glued on. In our case we print in ABS so we just acetone weld it together. Then we use gyro tape to mount the entire unit in a good spot.

Ext Compass Case.zip (1.2 KB)

Thanks Coby for your help and the case design. The compass is working very well now. Be well,

Paul