Unable to calibrate Matek M9N-5883 compass

A while back this forum solved my problem calibrating the compass on an mRo R15 board, but now I’m having a problem doing the same thing with my Matek H743 Mini board and Matek M9N-5883 compass:

This time there is no internal compass, and MP recognises my external compass as QMC5883L, but when I go through the calibration process the green progress bar goes to 100% and then immediately goes back to zero and starts again. I started with “Default” fitness but then changed to “Relaxed” after several cycles of 0 to 100% and back again to 0, but that made no difference. All three steps in the Accel Calibration section were completed successfully before I tried to calibrate the compass. The compass heading in the MP “Data” page doesn’t change when I move the compass around, but the horizon responds correctly when I move the H743 board.

Using QGC to calibrate the compass results in the green bar going from 0 to 100%, but then an error message “Mag(0) bad orientation: 0/25 1.0”, but it does recognise the orientation I’ve already set for the H743 board (-270).

The GPS/Compass unit is connected as per the Matek diagram below, and the H743 board is powered externally as well as from the USB socket.


Any ideas what the problem might be, please?

Did you switch off auto-rotation?

Thanks for your reply andyp1per, but what’s that? I see nothing about it in the wiki – only the bit that says no need to set orientation for an external compass.

COMPASS_AUTO_ROT set to 1 will mean that whatever orientation you have set will be ignored and the calibration step will try and figure out the correct orientation. If you want your orientation to persist then set this to 0.

It’s there:
Auto ROT

OK, got it now. I didn’t switch it ON, and doesn’t “None” in the “Orientation” box in my screenshot confirm that it’s OFF? I’ll check the parameter list tomorrow. So “0” should be the normal value? Thanks guys.

The normal value is 1

Thanks andyp1per. According to the notes alongside the COMPASS_AUTO_ROT parameter, “1” is “Check” but “2” is “Check and fix”. So I’ve tried both, as well as “0”, and the result when trying to calibrate is the same. The wiki says that, for an external compass (which is what we’re talking about) the orientation will be figured automatically during the calibration procedure.

I think I’d better extract my param file and post it here, in case there’s something obscure in it. Give me a few hours!

Here’s the param file. I hope someone will be able to find something that’s preventing successful compass calibration, otherwise it means I’ve got get another component doa.

Hughes 500 initial setup – not ready for flight.param (20.4 KB)

Bear in mind I’ve so far only completed a few steps of the setup:-

  • I’ve set the parameters to enable the use of Rx6 pin as the SBUS input from the receiver, as specified in the wiki, but haven’t connected a receiver yet

  • I’ve successfully gone through a couple of the items in the Install Firmware >> Mandatory Hardware page – Frame Type and all three steps of Accel Calibration

  • I’ve set the orientation for the main board to -270 degrees, and verified in the MP Main page that the horizon responds correctly (it’s going to be side-mounted on a heli frame)

  • I’ve connected the Matek GPS/compass unit as per Matek’s wiring diagram, and the GPS gives me the correct location on the MP map. The compass registers correctly in the Compass Calibration screen, but turning it around results in no change of the compass heading on the MP Main page. And calibration just keeps on repeating from 0% to 100% until I get tired and exit the process. I’ve tried it with both Default and Relaxed fitness, and with and without a power supply direct to the main board (it’s running off a 4.5v pad, so is powered whenever USB is connected).

Thanks in advance for any further help anyone can give.


Because there’s no compass in the H743 board I thought I could calibrate the external compass just by waving it around in its six different directions, irrespective of it’s relationship to the main board. It’s still not installed in my heli, but by holding it firmly to the top of the main board’s casing, so that they both go through all the motions together, calibration was completed successfully first time.

Sorry to have troubled you guys :grin:

Maybe not relevant but I noticed Matek stopped selling the M9N and replaced it with M10
although both use the same QMC5883L compass chip, Therefore, probably just an upgrade for the GNSS chip :man_shrugging:

And here’s me thinking that M9N was the latest thing! Strangely, I see on their web site that Matek are offering M10 (as you say) but also M8Q. But no M9N. I wonder why?