I’m facing big problems of compass calibration with two Pixhawk boards from Mrobotics and 3.4.5 firmware.
Compass are two M8N Gps with integrated compass (HMC5983) from Drotek and two stand alone HMC5983 external compass.
One of the M8N DRotek gps that worked properly on a original Pixhawk always give high Z offset, over 560 .
The other M8N Drotek Gps
even if it is aligned with the Pixhawk , the heading red line in Mission Planner is less or more 90° rotated
The red heading line continues slowly to rotate over 360° even if the drone is steady
With 3.4.5 the internal compass disappear when I2C connector from the Gps Mag is connected, with 3.3.3 both are present.
Using the I2C splitter seems to make things even worst .
I did everything I could to obtain a proper compass calibration , upload again the firmware, compass are far from esc , iron , power lines .
I2C wires are short, far from power lines , I use outdoor calibration with USB connection since it gets samples faster.
With 3.4.5 and “auto complete” option sometimes the calibration is successfull even if just one axis is rotated.
Guys , a real nightmare , that cost me hours and hours of work and failure as the only final result.
In fact the calibration can be successfull but then I got wrong heading , even 80° and a lot of error messages related to compass like “EKF2 IMU1 ground mag anomaly, Yaw realigned”
I tried to add some pull up resistor on the I2C bus with 3,4K but things get worst , without an osciloscope here where I am is pretty impossible to check the I2C bus.
Interesting. Do you have anything unique about your compass setup on the I2C bus (ie long wires, routed close to power bricks, etc)? I am surprised that the MRobotics Pixhawks have issues
Jordi answer and ask me to send back the boards to check them.
Nothing unique, I also tried to mount an external compass with very short cables , 3 cm , but did not help, and since the CAN bus Gps & compass mount in the same location is perfect the problem is on the I2C bus .
On both Mrobotics Pixhawk , with 4 different I2C compass, the heading is wrong , with an error about 80 - 100°, when the copter is stil the heading is changing all over 360° slowly , like a clock hand.
In flight, EKF tries to correct the heading and generate all sort of EKF and Compass message errors.
The good thing is that I never lost control of the copter , flew mostly in stabilize and althold modes but also when compass was allowing it Loiter mode never got toilet bow effect I guess because I always had very good Gps fix , 10 - 16 satellites with 0,4 - 0,8 Hdop.
EKF seems to work properly now on 3.4.5 .