Disable external compass on Pixhawk

Hey guys,

I have been doing a heap of searching and have found similar problems but nothing the same as mine.

The situations.

The first time I connected the Pixhawk via USB, I had nothing but the Buzzer connected. I played around a bit and did the Accel Calibration and compass calibration. At this time I can only remember seeing one compass screen with the white dots.

Later during the construction on my QAV500. I installed my 3Dr GPS with Compass module, the power module and safety button.

Now when I connect via USB and Mission Planner and try and do a compass calibration I get 2 compass screens. My problem is with the external compass connected, I get neither compass calibrating.

Since connecting the external compass, everytime I do a compass calibration, I get 2 compass screens. When I disconnect the external compass, I get movement on the internal compass screen but nothing on the external. As the external compass is disconnected and not moving, it wont complete the calibration.

I would like to know how I can disable the external compass so I can just pass compass calibration on the internal compass.

I will contact 3Dr later tonight (in Australia, Morning in the US) about the compass and if they think it’s faulty.


You can just leave the 4-pin wire connector disconnected and the external compass won’t be used. Leave the 6-ping wire connected though 'cuz that’s for power and the GPS.

That doesn’t work because the Pixhawk still looks for the second compass and won’t pass compass calibration with only one compass.

I need to know how to disable it in the software.

Happy Days.

If you boot the Pixhawk with the External Compass disconnected, look at the COMPASS_EXTERNAL parameter. What value is stored 0 or 1? I believe if you don’t have an external compass connected it should be 0. If it reads a value of 1 when you boot and have the external compass disconnected, try changing the value to 0 and reboot. See if the value stayed at 0. Also what is the value after boot of COMPASS_DEV_ID2. Does it read 0?
I admit I’m not really sure what’s going on but it would be helpful if you post a copy of your parameters.
Nathaniel ~KD2DEY

Hey “Nathaniel Caner”,

I managed to get it working on just the internal compass this morning.

No matter what the “COMPASS_EXTERNAL parameter” is set at it wont work with the external compass connected.

The notes for “COMPASS_EXTERNAL parameter” state this is for APM only as the Pixhawk and PX4 will autodetect.

Funny enough changing this setting got me working on the internal compass only but I don’t know why.

As I said previously, once I connected the external compass, it would always look for the external compass (whether it was connected or not) and wouldn’t pass the compass calibration.

I know the “COMPASS_EXTERNAL parameter” says it’s not for the Pixhawk but I was trying almost everything. One thing at a time and then changing it back if it didn’t help.

By changing the “COMPASS_EXTERNAL parameter” to “1”, it allowed me to pass compass calibration and then everything worked as it should on only the internal compass. I have only just looked but the Pixhawk has changed “COMPASS_EXTERNAL parameter” back to “0” automatically as it should without the external compass connected.

I just don’t understand why I needed to tell it there was an external compass before it worked out there wasn’t.

So I’m up and working. I’ve contacted 3Dr to see what they think. If they agree the external compass is cactus then I’ll purchase a new GPS + Compass module, send mine back when it arrives and they can refund me once they test the old one and find it faulty. I don’t want to sent this one back as I can still use the GPS functionality.

Happy Days.

Do you have a spare DF13 4-pin cable? If so try swapping the cable. Are you connecting via the I2C extension board, or directly to the Pixhawk. Do you have another FC board you can connect the GPS/Compass to? What version of MP are you using, have you tried updating to the most recent version 1.3.15?
Nathaniel ~KD2DEY

Hey mate,

Sorry for the tardy reply. I didn’t know I had to subscribe to a thread. Most other forums it’s automatic just from posting in a thread and definitely for starting a thread.

I did try another cable. No good.

No extension board. The compass is the only I2C sensor, I’m using.

Nope. My only other FC is an old Dragon OSD.

I’m on Mission Planner

I have run out of reasonable options to test the compass so I’m getting 3Dr to replace it. Another option was to test it on the I2C port of an Arduino Mega. There are instructions on DIY Drones but I don’t have an Arduino Mega and the cost to get one just to test a compass that’s under warranty didn’t seem sensible.

The compass being faulty aside. I think the problem remains that once I connected the faulty compass, I was not able to use the Pixhawk without an external compass. It automatically detected the compass connected but didn’t detect it removed.

Happy Days

Joel, I think that is by design. The idea is that if a person connects an external compass, they intend to use one. Then in future, if the external compass fails, they should be warned. If the system simply said “Oh, I guess we’ll just use the internal compass today” with no indication to the pilot, then that could lead to crashes because the internal compass may not be usable (I have helis with internal compass offsets of 13,000 because they are right next to the motor). So if the external compass ever fails, the system must alert the pilot. The only way to do that, is to have it expect the external compass to be there, unless explicitly told by the user that it is not present (by changing the parameter).

Thanks Rob,

That makes complete sense. Might be handy if you could get that documented. At least it’s here now.

Happy Days