Why external compass?

Hello,

Why does the Pixhawk use an external compass ?
Why not simply integrate it on the same PCB as the accelerometer and gyro ?

Interference. The Magnetometer is heavily impacted by other electronic components. We discovered this in the APM series of autopilots which is why in an APM2.6 the compass was made external as apposed to an APM 2.5 where its still internal.
Thanks, Grant.

Thanks for your help.

Another question.
I know that the Pixhawk MUST be mounted at the dead center of the vehicle.
Why isn’t it also mandatory for the compass ?

Actually, the APM/Pixhawk does not need to be mounted dead center, it just works slightly better if it is near the center. The accelerometers will see somewhat different forces if it is very far off center, usually this isn’t a problem.

Very few of the controllers are actually aligned with the vertical rotation center of the craft in any case.

Among other things the accelerometer which is the only chip affected by CG (or more correctly roll center) alignment isn’t in the exact middle of the controller board.

On a multicopter, the roll center is actually more dependent on the horizontal and vertical centers of the props than it is by CG. :wink:

And the compass doesn’t matter because it is looking at compass yaw in 3 axes and that will be the same no matter where it is mounted.

It is much more important that it is mounted with the 3 compass axes aligned with the correct axes on the UAV / multicopter.

That is also true of the flight controller (the axes need to be correctly aligned with the orientation of the UAV.)

Axes of either the controller or the compass can also be changed in 90 degree segments in the setup firmware parameters if you need to use a different orientation.

Best regards,

Gary

Thanks for your help!

The compass is susceptible to Electro Magnetic Interference (EMI). Not to be confused with Radio Frequency Interference (RFI) which corrupts radio/video transmissions. Untwisted power cables can and do generate magnetic fields. However, it is possible to use the on-board compass. Mine works fine in a Crius All-In-One. EMI is OK, but it EMI must be equidistant from the sensor; i.e., to cancel each other out. Routing power leads properly will prevent most if not all EMI problems. Twisting wires that produce magnetic fields will prevent fields from being generated, but it is typically unpractical to twist high current power leads. Usually only an inch or two of separation from the EMI source is sufficient to avoid EMI at the compass sensor.