External Compass Issues with APM 2.6/8?

Yes, I know I’m somewhat on my own with an off-brand APM but up until just now, I have only used genuine 3DR gear. I only got it to have a beater board on a wing I plan on flying hard and didn’t want to lawn dart a genuine board and lose all that money.

I purchased a witespy APM 2.8 that has the upgraded voltage regulator. It also has the MAG onboard but is disabled by a jumper so you can use an external mag. I have a GPS/compass combo and set the parameters properly and my board orientation is correctly set too and I see the artificial horizon responding properly in MP. However, my board compass orientation is based on the onboard mag, not the external one I have set up. When I do the compass calibration, I have to move the external compass, which is exactly what it should be doing. Then once that is all taken care of, when I go to look at which way the GPS/compass is pointing, the MP HUD only responds to movement of the onboard compass.

Is this some issue using an off-brand board and MP? It seems odd that both mags are being used in some sense, the external for the calibration and the onboard for the HUD and it just seems wacky that it would do that.

Any ideas?

The way I understand it, if using the internal compass, is when you move the APM, both the compass and gyro/accel are fused to show the yaw movement on the HUD.

If the internal compass is broken or disabled the HUD will still show apparent yaw changes due to this inertial nav function. If the compass is not working (or disabled although I haven’t checked this) the HUD will start on 0° each time no matter which way the board is pointing whereas with a working compass the heading will be correct on each startup.

If you rotate the external compass without moving the APM the heading should change quite slowly because the inertial nav is not complimenting the compass heading change.
Quick check: I presume the external compass is selected in your parameters?

Just an update. Seeing AC 3.2 is what more people are running with an external compass, I loaded that up to see if the behavior was different and sure enough, it is!
To me, that means that this is both a hardware and software issue for APM:Plane 3.2.0.
The hardware side of things could be solved if I can figure out how to disable the onboard compass completely. I’ll work with witespy to get that figured out, although I did find what he had put online. Regardless, I’ll stop wasting people’s time with this part.

The software side, I’m not sure what exactly is going on. In AC 3.2, when I do the external compass calibration, all works well when I go through the steps to get it calibrated properly. Then in the HUD, it too responds as expected, which is great. However, if I leave the external compass still and move the board, the compass heading will show changes as I rotate the board. As soon as I stop moving the board, the heading will then go back to the direction the external compass is pointing, which is what it should be as the parameter is set to use the external compass. Is there a reason the HUD responds to both compasses?
More importantly, why does APM:Plane 3.2.0 not exhibit this same behavior in the HUD? I would expect it to respond to the external compass and also react in the HUD similar to AC 3.2 but it’s not doing so and worries me.
Is it abnormal to use an external compass on APM 2.X? I guess most are using APM 2.6 and there is no compass onboard so there is no reason you would really see this behavior so maybe it’s just because of the specific hardware I’m running.
Any ideas would be great!
Thanks!

[quote=“Graham Dyer”]The way I understand it, if using the internal compass, is when you move the APM, both the compass and gyro/accel are fused to show the yaw movement on the HUD.

If the internal compass is broken or disabled the HUD will still show apparent yaw changes due to this inertial nav function. If the compass is not working (or disabled although I haven’t checked this) the HUD will start on 0° each time no matter which way the board is pointing whereas with a working compass the heading will be correct on each startup.

If you rotate the external compass without moving the APM the heading should change quite slowly because the inertial nav is not complimenting the compass heading change.
Quick check: I presume the external compass is selected in your parameters?[/quote]
Graham,

Looks like we posted at the same time!
Yes, I did make sure the external compass is selected in the parameters. I do realize this is a slightly weird test since nothing is mounted in a plane yet but I want to make sure the hardware is working so I can start an RMA if there is an issue.
Based on what you wrote and what I found with AC3.2, I don’t think I have a broken onboard compass, which is good. Upon powerup, it always shows whichever way the board is pointing so it is working from what I can tell. I also know in APM:Plane 3.2.0, the external compass works because when I do the calibration, I have to move that compass as it won’t respond to movements to the onboard compass so I do know it all works, it just is confusing to know which one the code is actually going to use when I actually go to fly.
A stop gap measure could be to just disable the external compass and run off the onboard one but this wing is pretty small and the battery/ESC/PM wires are going to be near the board so I wanted less interference and opted for an external compass.

Okay, just to update everyone, I got it all figured out.
First off, if you get the APM 2.8 from witespy, know that the 6 pin GPS port pinout is not the same as the 3DR APM 2.5/2.6. It is different and caused some issues.
First, I set one board up to use the onboard compass as I don’t need an external for a plane I’m running and only have the original 3DR LEA-6H GPS v1.1. With that, you configure the MUX jumpers the way you want as described on the witespy store and then solder the MAG jumper together. That gets the onboard compass working properly. I had issues when I then connected the GPS and realized after that the pinouts were different. Luckily, I didn’t short anything out. Once I got that corrected, everything was fine on that board.

For the second board with the external compass, I found that what Graham posted helped me figure out what was going on. It was the AHRS algorithm that was making the compass heading in the HUD look like it was working even when the external compass wasn’t connected. It did indeed show 0 every time I powered up. When I got the external compass connected, if I moved the compass without moving the board, just as Graham stated, the heading only changes slowly.

Thanks again for the help. Getting all the information from various places helped me figure out what was going on and now I have it all working properly as expected.

can you explain what you actually did to fix it in combination with the external compass,
i bought one of banggood.com, same problem, i cant get the internal compass to shut down even when i remove the jumper. if i only turn the external compass, the heading changes slowly, pitch and roll are stil controled bij the onboard compass though when i calibrate it shows the external compass being calibrated.
I tried to untherstand the meaning of AHRS algorithm but it didnt get me very far.

Pleas help

My explanation about the second board should answer your question. Read Graham’s response to me and my report back and if you can’t figure it out from that, then I’m not sure what to say as you don’t seem to be having any different issues than what I had.

Hi. i want to apm 2.8 internal compass disable but i cant please help me. ozzypozzy have same problem

anyone that cannot get the external compass to work with the APM 2.8 YOU MUST FIRST pull the internal compass jumper pin right next to the GPS port! ALSO make sure you use the 4port plug under the GPS port NOT the I2C port! Problem SOLVED! took me a day to figure that out!

1 Like