Temperature Calibration of IMU/Barometer Does Not Work on Matek F405-STD

As title. I left my autopilot in the freezing cold for several hours. I turned it on and set TCAL_ENABLED to 2.

I moved the autopilot from outside where it was -1 deg C to indoors at 23 deg C and saw that TCAL_BARO_EXP had not changed.

I post this here to help others that have TCAL problems.

This website needs updating BTW: IMU Temperature Calibration — Copter documentation

I assume temperature calibration is not a core feature of ArduCopter.

1 Like

Based on your description it seems to me that you misunderstood how the calibration is performed and what it does.

To calibrate you set the TCAL parameter to 2, then you put it in the freezer for a while, take it out, turn it on and let it sit for a while (until completion). After this the TCAL_EXP value will be set to a fixed value.

It doesn’t change if you move to a hotter place. The sensor measurements are getting scaled with the current temperature and the constant TCAL_EXP value.

Sorry for any confusion… I set TCAL_ENABLED to 2 while it was outdoors in the cold. I turned the drone off and brought it inside. Then I turned it on and left it. I checked 15 minutes later to see if TCAL_EXP had been set and nothing had changed.

Is this the correct procedure?

The correct procedure is explained in excruciating detail in the ArduPilot Methodic Configurator software. It also does the off-line calibration process for you, that has been demonstrably superior to the on-line calibration process done by the FW itself. And does not require you to install, nor use python.
It Also explains 3 different methods to detect when the process is completed: it either beeps, or LED changes color or the TCAL_ENABLED parameter changes to 1.

2 Likes

I don’t think the temperature calibration is enabled on F405 boards unless you do a custom build.

!HAL_INS_TEMPERATURE_CAL_ENABLE
1 Like

Gahhh! That’s the one. Thank you! I’ll do a custom build now. Much appreciated.

1 Like

Good to know this is the up to date guide to follow, rather than any ardupilot webpages that come up from Google.

I’m getting a strange error in the configurator… maybe I should create a new thread?

It says “Vehicle template directory does not exist”. If I go to “Template overview and selection” it is blank:

I googled the error but seems it’s unique. :-S

It’s not unique. It’s a known bug in some linux based distributions.

Explain which OS are you using and how you installed the software and how are you running it.

1 Like

I did pip install on Debian.

I just did the calibration with the new firmware and it seemed to work. I manually set the TCAL* params and LOG_DISABLE.

Edit: I run the “ardupilot_methodic_configurator” command from the command line.

See the debug instructions i posted on the github issue above

1 Like

Is this of use?

user@home:~$ ardupilot_methodic_configurator --loglevel DEBUG
2025-01-12 13:46:10,919 - INFO - Available connection ports are:
2025-01-12 13:46:10,919 - INFO - tcp:127.0.0.1:5760 - tcp:127.0.0.1:5760
2025-01-12 13:46:10,919 - INFO - udp:127.0.0.1:14550 - udp:127.0.0.1:14550
2025-01-12 13:46:10,921 - DEBUG - Auto-detected device /dev/ttyS0
2025-01-12 13:46:10,921 - INFO - Will connect to /dev/ttyS0
2025-01-12 13:46:20,381 - WARNING - Will proceed without FC connection. FC parameters will not be downloaded nor uploaded
2025-01-12 13:46:20,381 - WARNING - Only the intermediate '.param' files on the PC disk will be edited
2025-01-12 13:46:20,386 - DEBUG - Vehicle type not set explicitly, auto-detected .
2025-01-12 13:46:20,386 - DEBUG - File 'vehicle_components.json' not found in /home/user.
2025-01-12 13:46:20,426 - DEBUG - current script directory: /home/user/.local/lib/python3.11/site-packages/ardupilot_methodic_configurator
2025-01-12 13:46:20,426 - DEBUG - site_directory: /home/user/.local/ardupilot_methodic_configurator

Edit: TBH I can just use the Windows version instead. I don’t want to take up your time unnecessarily if there’s a quick workaround.

Yes, use windows. It works

@arduouspilot,

Thanks for the ping on the IMU temp cal wiki issue, I’ve added it to the 4.6 issues list

1 Like

I just realised it is not compatible with Windows 7 so back to Linux! I have all the source code so I’ll investigate myself and report back (hopefully).

All the relevant details are on the bug report, it also explains where the relevant code is. The fix is straightforward, I just haven’t done it yet. PRs are welcome

1 Like