Onboard Mag Calibration not working

Hello
I am running Mission Planner 1.3.83 build 1.3.9396.7566 on Windows 10 on Parallels on a Mac.
I can connect a Matek H743 Slim flashed with Ardupilot Plane with a Matek M10 GPS/compass. The data shows that I am connected and I can do the accel calibration. However I cannot get the compass calibration to work. The compass is identified by Mission Planner, but upon starting the onboard mag calibration nothing happens.
The same happens with a holybro H7 V1.5. with the latest Ardupilot Plane firmware connected to a micro M10 GPS/compass. I can perform the accel calibration but nothing happens when it comes to the onboard mag calibration. Previously the onboard mag calibration worked for me.
I do not know if I am doing something wrong, or if something changed in Mission Planner.
By the way I tried to run Windows 11 on Parallels with no difference. Thank you for any help.

Do you have a GPS fix when trying to calibrate the compass?

Rolf

Hi thank you for the hint. I moved the FC and GPS outdoors to get a GPS fix. Despite having a GPS 3D fix the calibration is not working. Below is a screenshot of the calibration page I see.

To clarify: What does not work when you click on “Start” and rotate the aircraft in different positions around the spatial axes?

1 Like

The green status bar does not show up at all when rotating the aircraft. No progress is shown.

I can’t reproduce this with Win11, Mission Planner 1.3.83 build 1.3.9396.7566 (same MP version), Matek H743 wlite, and Plane 4.6.2. The connection is to the FC via USB.
Could you post a log file showing the problem? To do this, set LOG_DISARMED to 1.
Does Large Vehicle MagCal work?

Rolf

Hi ok thank you. I will post a log file as soon as I can. I tried the Large Vehicle MagCal, but I don’t think it worked.
Let me give you some more detail that may be related. After not being able to perform the onboard mag calibration I did the large vehicle calibration. Then I proceeded to fly the plane wanting to collect the data on a micro SD Card (holybro Kakute H7 and micro 10 GPS). The Kakute H7 has been flashed with the latest ardupilot plane firmware. After that I installed a custom .apj file in order to access the new blackbox function for FlightCoach (a flight analysis software). The data logged on the micro SD card was not complete. The LOGS folder was missing and hence I had no .BIN files either. I am sending you a picture of the APM folder. I attribute this problem to the fact that the compass has not been calibrated. But maybe this problem is related to the failed calibration issue. I am also going to upload the adj file if possible. Thank you very much for looking into this. I am about to leave for vacation but I will try to do these things before leaving.


arduplane.apj (680.7 KB)

Did the calibration work with the Arduplane firmware before installing a modified firmware?

The folder is created immediately, regardless of whether the compass is calibrated or not.
Either your SD card is corrupt, your custom.apj file is corrupt, or both. Initially, you mentioned a Matek H743 Slim, but now you’re talking about a Kakute H7.

I don’t know what to do with the .apj file. Where did you get it from, and has it been compiled for the correct flight controller?

If your firmware isn’t writing log files at all, I would recommend staying on the ground until the problem is solved. This sounds like more than just a compass calibration issue.

Rolf

1 Like

About the Kakute H7 and the Matek 743 Slim: I have the same problem on both flight controllers. The onboard mag calibration does not work.

The Kakute H7 is on an actual plane but is only responsible for recording the compass, GPS and accelerometer data on a micro SD Card. It has no impact on flight control.

The Matek 743 Slim is on my desk for testing.

Both FC have been flashed with the latest corresponding Ardupilot plane firmware using the STM32CubeProgrammer.

On the Kakute H7 I installed a custom apj file created with ArduPilot Custom Firmware Builder. It has been compiled for the Kakute H7. I have done this step, because the custom build facilitates the use of an analytical software called FlightCoach.
I uploaded this file in the previous post.

The difference between the Kakute H7 and the Matek 743 ist that on the Kakute I installed the custom build, while the Matek 743 has the non-customized Ardupilot Plane firmware.

I agree that there is a larger issue, but I cannot figure it out right now.
For about two years the Matek 743 Slim was working fine for recording data on a micro SD card.
In June it stopped working and I was not able to troubleshoot this problem. I tried with different micro SD cards. Therefore I decided to get different hardware (Kakute H7 with the micro M10 GPS), update the firmware, and get new micro SD cards. That is how I arrived at this point.

Would it help if I uploaded the parameters list? Since my intention is to use the Kakute H7, I would like to focus on this controller.

I never tried to calibrate the compass of the Micro M10 GPS compass connected to the Kakute H7 before installing the custom apj file mentioned above. Since I had the Matek 743 on my desk and it had previously been compass calibrated without a problem I was surprised to discover that I could not execute the compass calibration on the Matek 743 with M10 compass/GPS either.

I appreciate all your help.

Thank you very much.

Francesco

I see, so it sounds like nothing is working. That’s not very helpful in narrowing down the compass problem.

Ok, the Kakute should be able to write log files. So please provide a link to a log file (LOG_DISARMED set to 1).

If no log files are being written, please reinstall the original AP firmware and check again.

Are you sure you selected the correct Kakute in CustomBuildServer?

Is the connection to Mission Planner via USB or telemetry? An insufficient transfer rate can also cause the problem. To be on the safe side, I would then connect the FC with a USB cable.

Rolf

Hi
I agree. I will do a new installation on the Kakute H7, skip the custom build and see if I can get the mag calibration working or at least a log file.

The connection to the Mac has been both via USB C cable and via the Holybro SIK 3 telemetry radio. Since the plane is large, I prefer to use the telemetry radio.

It’s off topic, but the type of USB C cable plays a huge role. I have a high quality data and charging USB C cable that works with the Matek H743, but it does not turn on the Kakute H7. I have only one USB C cable that works with the Kakute H7 and I think that it is a data only and no charging cable. I wonder if there is a go to brand for a long USB C cable that works with the Kakute H7?

I will post here the results in a couple of weeks when I am back from my trip.

Thanks again.

Quick note on USBC cables that has tripped me up. For reasons I’m not 100% sure of, I’ve found a number of items with a USBC socket that dont work with a regular USBC to USBC cable. The T-Motor Vlink is one example. However, these all work with a USBA to USBC cable. So, try one of those if you are having issues with USBC-USBC!

I believe it is related to the power level negotiation that is supposed to happen over USBC, but that can only happen if the peripheral is correctly designed and set up for that (and it seems a lot of these things arent).

Hi That is a great point. I am on the hunt for USBC-USBC cables that work, but I didn’t think about a USBA to USBC cable. I will try that as well. Thank you for this advice.

Hi Rolf and Justin
Thank you very much for your help. I think that the problem is solved with the Kakute H7 V 1.5. I only need to check if the data will be logged on a micro SD card.
The steps I did are as follows:

  1. I got different USBA to USBC cables (instead of using a USBC to USBC cable) to connect the FC to my Mac with Parallels. I tried one and it worked in the sense that it powered the FC and the attached GPS. This seems obvious, but it is not guaranteed with USBC to USBC cables – I still don’t know which type of USBC to USBC cable works in this application.
  2. I did a full chip erase and installed the latest stable ardupilot plane firmware with bl. using the STM32CubeProgrammer.
  3. I omitted the installation of a custom firmware.
  4. After the “accel calibration” the “onboard mag calibration” worked flawlessly. There was no GPS fix during the onboard mag calibration. Here I am not sure from a post above if I need a GPS fix before the onboard mag calibration or not.

The custom firmware mentioned in 3. may have been the culprit. There is a “blackbox” function on the custom firmware page of Ardupilot designed to simplify the log files for the FlightCoach application I mentioned above. I have to review again carefully the settings for this application. I wonder if I have accidentally impaired the ability to calibrate the magnetometer and to properly record log files by using this custom firmware.

Let me know if you have a feedback.

Thank you!
Francesco