I am trying and setting up a second external compass to my vehicle for redundancy. Even though I set the compass1 and compass2 as external (even forced external), I still have compass2 the internal compass.
What is even more strange is that both the external compasses are fused in compass1.
Here is a telemetry I recorded in the lab. I have two external compasses (A and B). I rotated backward twice the A and then twice the B, and here is compass1, x component:
As you can see, the graph shows first that I rotated compass A and then compass B on the same compass1 value. Compass2 is the internal, as you can see in green unchanged.
Here is the .bin
34 8-28-2018 4-54-26 PM.zip (710.0 KB)
All external are auto detection. So check wiring is correct
They are connected to the i2c bus. And they are read, as the telemetry shows. In the telemetry you can see two series of rotations
I’m guessing that they are the same type of compass, on the same i2c bus, so when the bus is probed they appear to be the same device (as they have the same factory set i2c address on the bus).
Do you have an alternative type of compass you could swap one with, or access to the other i2c bus?
Unfortunately they are two totally different systems.
A Comes from CSG Shop:
B Comes from Hobbypower:
I bet they both have the same mag sensor inside fighting for the same I2C address. To make it sure, open up and look for a mag chip it is very likely a HMC5983L…even if one has an older hmc5883 it has the same address…
I thought so. Even though, isn’t it weird that in the telemetry I didn’t see any noise or interference between them?
I would think that if they’re contesting for the same address, that only the one that first attaches to that address will work, hence not seeing anything from the other, as the address will already be reserved.
That’s right. But that is not what happens. I have two distinctive movements of the two sensors in the telemetry, as they were a single one…
To make sure, detach one of them from the frame, but keep connected and do the test, then change and do again.
If you have two compasses on the same address, then it is only random which one’s response is processed by the FC. It is not fusing but a very non supported setup
That was the first test I did. Plugged one, then the other. They are both recognized and both work. I noticed that the COMPASS_ID parameter was the same for both, so that might explain the overlapping. But still I cannot figure why I got both connected at the same time in the telemetry I uploaded