Compass problem

Our octocopter was flying fine with manual controls but not with auto mode (error compass variance). I have set AHRS_orient and compass_orient to zero both facing the reference arm (octo +). I have tried using the internal compass but it has very high offsets and error compass variance is still present during missions. Now Im using external compass with offsets (-74,14,65) tried compassmot shows interference:2 which I think is fine. During missions after 3-4 waypoints the EKF in the HUD just turns red and reports error compass variance after that the copter just fly erroneously, unstable and high gps offset so when I land it in stabilize mode the compass in the HUD is pointing to the opposite. I had to reboot the rpi to correct it. I also noticed that when I move the copter it reports the same error (compass variance). I had some crazy flight with the error (ERR:EKF_CHECK_2) which I think is linked with the error compass variance but luckily EKF failsafe kicked in (AltHold) which saves my copter everytime. I already searched and read anything related to the problem still doesnt fix the issue. I just dont know what is the problem anymore, help me guys :fearful:

logs- http://www.filedropper.com/2016-03-1915-20-31

Maybe you have interference? Are there cell towers in your flight zone?

There is one but 100-150m away from me. Does cars also affect the compass?

I have the same problem with compass. High off sets.

Project in “freezing”

My contribution:

After upgrade my board to Navio2, I having real problems with “compass”.
(4g Video Streaming is working fine, Noip is working fine, Camera USB on Board OK.)

My tests and conclusions.

Hardware and Software used for Tests : Navio+ and Navio2, RP2 , APM FW for Navio+ was 3.3.3 and for Navio2 was 3.4 Dev (I can’t understand, but I followed the DOCs)

I have many frames with Navio, so it’s easy to test in different conditions:

Test 1) Frame Avenger

    a)	Upgrade de Navio board from Navio+ to Navio2 using     Raspberry PI 2

Result: High Off Set values in compass
E.g. With the previous boar (Navio+) was working really fine.

    b)	Added an External Compass (using the same Navio2).

Result: Compass Variance errors.

    c)	I also did the compass Calibration outside (only to be shure there is no magnetic field inside my apartment)

Result: Compass Variance, same problem
So…. Maybe is a Frame problem ??? I change the frame.

Test2) Frame Pegasus

   a)	I did the calibration using Navio+

Result: Normal values for x,y,x offsets.
Flight Test = Perfect.

   b)	I change from Navio+ to Navio2 and did the calibration

Result: High Off Set values in compass

   c)	Add an External Compass (using the Navio2).

Result: Compass Variance errors and others….

CONCLUSION: we (or me) have a Navio2 board with real problems or the APM code V3.4 Dev has real problems, no more options, 2 compasses are useless in Navio2 today, even with the external.

Based on these evidences I will Downgrade to Navio+ and wating for a solution (HW or SW)
Attached the Evidences with Frame Pegasus.

  1. Tests with Navio+

  1. Tests with Navio2

Frame:

@robertb Thank you for a very detailed report! We have also observed high offsets on external compass. We will find the issue.

Igor, thanks a lot for your quick response.

please let me know if I can help .

and congratulations, your support is really outstanding…

Just to make sure, you are selecting Compass #1 in APM when you have the external compass connected to the I2C port correct? I had an issue like this once before and it was because when you plug in the external compass it becomes Compass #1 in APM. I thought I had plugged in the external compass and that it would be Compass #2, but in fact you need to disable Compass #2 and use Compass #1 in APM when your external compass is plugged in.

This is what happens when you don’t do that.

I already try this…

are you using Navio2 ? with APM 3.4 dev ?

I have both Navio+ and Navio2, the Compass#1 vs Compass#2 behavior is the same. I also don’t use development APM code on my copter, currently running v3.3.

did you already check the EKF status for compass in mission Planner for Navio2?

Hey all, not to hijack the thread but I am also running into the same issue as robertb, high offsets.

Error:

PreArm: Compass offsets too high

I have calibrated the compass in mission planner and qgroundcontrol with the same results.

X: -140 Y:-391 Z: 804

My offsets are always around those values. I have flown with the arming check disabled and have a small amount of constant yaw, I am not sure if that is tuning or the compass, as the compass looks perfectly correct in mission planner.

I am running a Navio2 on the raspi 2 model b, I have built from scratch as recommended in another post I can’t seem to find now, always the same results. I do not have an external compass to test with but I am not confident it will fix the issue as it did not work for robertb.

Current setup is: case found on thingiverse mounted on standard pixhawk vibration foam feet, piece of microphone foam over the barometer, ESCs are mounted underneath inside the frame.
Related to interference, the frame is almost entirely carbon fiber and the last thing I can think of is to try removing the Navio2 and calibrating off of the frame just to be sure.

Any updates or suggestions for things I overlooked? Thanks!

Setup Pics:


1 Like

You might find that the cases of the USB sockets on the RPi are made of magnetic material, mine are! (in fact all the RPi that I have are)
Most parts are advertised as brass/copper with nickel plating. I’m surprised if the nickel plating is responsible, but they are magnetic. The Ethernet socket appears to be OK.

For what its worth my x,y offsets are suspiciously similar to yours: -179, -364, -108

Interesting… Hopefully today I can try calibration off of the quad to eliminate that. Not much one can do about interference within the pi though unfortunately…

@igor.vereninov, any updates on this issue or potential fixes?

Thanks!

Tried calibrating off of the frame, no luck. New offset values:

X: 90 Y: -85 Z: 710

I also went out for some test flights yesterday. Handled relatively well in stabilize mode, tried to switch to althold and it was jumping around everywhere. I have reviewed the logs and I do not think it is related to the barometer, it seems to have recorded altitude nicely.

That being said I was not even touching yaw and it had that same weird constant twist. Toward the end I had a roughish landing and after that it would try and roll/pitch to the back/right, I landed and it looked like my accelerometer or gyro got miscalibrated. Re-calibrated today and it seems to fine. I also tried to download the mavlink dataflash logs but get a timout error.

I also was reviewing the playback and I would get this error intermittently:

Error velocity variance

Haven’t looked into it that much but I am trying to be very detailed.

Anyone know whats going on with yaw? Or any of the other issues?

Thanks!

I too have this problem with my Navio 2, attached to RPi 2 Model B. Doesn’t matter whether I calibrate on or off my frame. Similar offsets as Dylan.
Is this simply a design flaw with the Navio 2?

I sure hope not, I have read of people successfully calibrating their compass’. I have ordered an external compass to test with, although I am unconvinced it will fix anything. Fingers crossed this is just a huge bug that magically only affects a few if us :sweat_smile:

Hi folks, I had the EKF issue, it goes crazy when you just replaced it on another spot (after 30~40 seconds its normalize), but anyway Compass variance occurs every time in MP HUD.
My set is: Navio2, Raspberry pi 2, S550 Hexa, 5200mah 4s.
Offsets: x: 207 y: -27, z: -72.
I’ll try investigate this issue as well as others, hope this will problem will be solved.
P.S. I hope this is not hardware failure, cause 260 bucks for this navio2 supposed to be something of flying out of box after all installation of course

Welcome to the party! I think you hold the record for lowest offsets :smile:

I also am really hoping this is not a hardware issue, but the external compass will be able to tell me that…

@igor.vereninov, can you please comment on the status of this issue?

Try to disable “Obtain declination automatically” and enter the declination for your area by hand. Restart Arducopter and the “compass variance” error should be gone. The offsets might be high, but should be flyable.