How to use 3nd compass

I installed two sets of GPS/Compass module on Pixhawk with 3.5RC2. The compasses linked together with I2C expend board to Pixhawk I2C and enabled in MP. But in live calibration, only internal compass and one ext compass show the data, no 3nd compass. How can I make 3nd compass work?


I don’t believe 2 external compass’s are supported. One external compass and 2 internal compass’s are.

1 Like

It would be good if @proficnc could chime in here with his design knowledge of the Pixhawk1 and Pixhawk2. (or any other hardware dev.)

I am currently chasing the same issue with a Pixhawk2 which @proficnc had stated can take 1 external compass on the external I2C bus and another external on the internal I2C bus (now an accessible port on Pixhawk2).

This indicates there is a reason the external I2C bus will not handle 2 compasses.

The issue is the type of compass.

The Normal compass we use is the HMC5983 it has a fixed i2c address, and only one can be fitted per bus

On PH2, we have 2 external busses, so we can use 2.

However, if you use a different type of compass, that has a different i2c address, then you can use 3 etc…

got your point, thanks lot.
Let me search if there is another compass chip or vendor available. But not sure all compass have fix assigned address or not, the code can identify different address as compass. would like to learn some about I2C protocol.

A pixhawk 2.1 with dual Here gps has 3 compasses available to it.

Is there any reason you want 3? There is zero benefit to more than two good ones.

It’s not so much the actual application use of 3 compasses (I know we only use one) but the documented redundancy of having 3 compasses, multiple IMU, CPU’s, GPS’s, etc, etc, which is a requirement for some places that want drone work done.

We fly at Power Stations, Refineries, mines, that sort of thing, which require a ridiculous amount of safety requirements for people and machinery.
If we couldn’t claim redundancy in the equipment then some places would not let us operate there.

@mboland +1 here. The internal compasses are very often disturbed badly by local magnetic noises (Frames, high current through wide wires, magnetic interference from gimbal motors etc…)
While the external compass mounted 15 or 20 cm away from the frame, above on a small tower, seems happy. So if you find a good external one recognised by the current arducopter 3.5 please let us know. :slight_smile:

From memory I have been using a sump,ly of hmc5843 I had lying around with good success.
There are later versions more readily available.

so , I am running two here gps, on gps port 1 and 2 , but when I try to calibrate compas 1 and 2 (set as extern and use on boath) calibration on compas 2 wont go throught … it stand still on half way … am I missing something …

Do you have the compasses on different I2C busses?

Have you checked the ID of the compasses in the parameters?

Apparently you cannot run 2 compasses on the same I2C bus.
You need to have one on each bus, internal and external.

how do I set separete i2c busses …

compass1 is 466441 , compass2 is 466433 , compass3 is 131874

Compass redundancy sounds great, but it doesn’t actually really work like that. Today, ArduPilot does not have a process to detect a compass that going bad, reject it, and use another one instead. That would be great, but we’re not there yet. That among other things would be great improvements on the compass handling

All it can do today is look at them both and monitor for consistency. If they become inconsistent due failure or calibration problems, it will generate an EKF error and stop using them altogether. It cannot pick one or the other. It can only tell you “hey, something is wrong with my compasses”.

As such, the more compasses you introduce, the more likely it is one will fail or get confused, and the more likely it is to cause a problem rather than solving one.