Compass issue

Hello,
I have made a drone with raspberry PI B + and navio+ whom I’ve configured with mission planner following the guidance http://docs.emlid.com/navio/Navio-APM/configuring-raspberry-pi/ and I finally did not get any error, but the other day I went to try to see how my drone fly, but it didn’t fly properly because the drone is not stable and the copter accelerates in some random direction. The flight mode we have configured in a stable mode.
The first few times when I armed drone I obtained bad AHRS but I correct the problem and now I can arm drone without errors.
I think my mistake is because when I realize compass calibration on mission planner get a very high offset value in y (y = -418) while my x is -34 and z is 20. I have repeated many times and I have not managed to reduce the value of y. In addition I have also tried Rotation_NONE, Rotation_Roll_180 … and in no way I managed to lower the value of y. I have also read that these high values may be interference problem, but if I’m Optional Hardware and Compass / Motor Calibration I observed interference is below 30%, so it is a correct value.

Finally I tried yaw sensitivity down to see if turning left or was slower, but I have obtained the same results.
I hope someone knows how to solve my problem or what I could to try…

Thank you!

Hello Victor,

There is no need to manually adjust orientation of the compass. Maybe you can try to locate Navio+ differently on the frame? You can also try using external compass.

1 Like

Hi Igor,

finally I’m using an external compass with good results in the calibration (x,y and z less than 100) but… Its not working well. When I arm the drone, if I incline it, in mission planner I see a problem with EKF, more exactly with the compass value, start in green but easily go to red and my friend error: " error compass variance"

Trying auto fly mode, when the drone take inclination start to do strange things and take bad altitude.

What could I try to do?

Thanks for your help!!

Im having the same problem, Im using the internal compass and getting compass variance error all the time. I have the Navio 2 and in mission planner I have the compass setup as: Compass 1 - Internal , Rotation 0 (none)

Is this right? I dont know if Im missing something.

Hi Xavi,
I solved my problem improving the protection in the barometer, try that.

I have the same setup, I think that is ok, but I have sometimes “error compass” that doesnt affect to my flights.

Thanks for your support Vic!!

The weird thing is that Im getting compass variance all the time and EKF is almost all the time in red.
Do you think that could be interference from all the ESC and motors to the internal compas?
How do you improve the protection to the barometer?

Thanks

This easily could be interference. You can try using an external compass. I have also noticed that EKF does not reset after calibration, so right after calibrating the compass I was getting constant compass variance error, but after I rebooted the board the issue was gone.

Thanks Igor, I will try that!! :grinning:

I tried all of these suggestions but I still get bad ahrs and compass variance errors. My GPS still cuts in and out constantly. I wish someone could develop a guide on this subject as it’s quite frustrating.