Skip to main content

RoboFly IMU Thermal Drift and Calibration

Due to the inherent limitations of the IMU in RoboFly (MPU6000), there are issues with thermal drift. You can have the Z acceleration at 9.8 m/s^2 at room temperature, and 11.0 m/s^2 at 60°C. To remedy this issue, we need a thermal calibration.

The full PX4 thermal calibration guide is available here: https://docs.px4.io/main/en/advanced_config/sensor_thermal_calibration.html

Simplified Thermal Calibration Guide for RoboFly

You will need:

  • RoboFly
  • Fridge/Freezer (freezer is better)
  • Hot air gun
  • PC with QGroundControl and a cable to connect to the RoboFly

Calibration Steps:

  1. Firstly, Connect to the RoboFly FCU with QGroundControl and set these parameters (its needed for other parameters to be visible):

    • TC_A_ENABLE: 1
    • TC_B_ENABLE: 0
    • TC_G_ENABLE: 1
    • TC_M_ENABLE: 0

    This will enable the use of the thermal calibration for the Accelerometer and Gyro, but disable it for Baro and Magnetometer. We do not want to use the calibration for Baro, as the hot air gun disturbs the baro measurement.

  2. Set thermal calibration parameters:

    • SYS_CAL_TDEL: 55
    • SYS_CAL_TMAX: 20
    • SYS_CAL_TMIN: 10

    This will set up the temperature range for calibration. The thermal calibration will start between 10-20°C and finish when the temperature rises by 55°C (so we need to reach 75°C).

  3. Set these parameters:

    • SYS_CAL_ACCEL: 1
    • SYS_CAL_GYRO: 1

    This will enable the thermal calibration for the Accelerometer and Gyro. We do not want to use the calibration for Baro, as the hot air gun disturbs the baro measurement. RoboFly will attempt thermal calibration on the next power up, so do not power it up again until you are ready to calibrate!

  4. Now, we need to cold-soak the RoboFly. Place it inside a fridge or a freezer.

    • In a freezer, roughly 5 minutes are usually enough.
    • In a fridge, it's more like 30 minutes.
  5. While the RoboFly is cold-soaking, prepare a flat and stable spot for the RoboFly, the hot air gun, and a computer with QGroundControl. You cannot move or shake the RoboFly during calibration.

  6. Run QGroundControl on your computer.

  7. Retrieve the RoboFly from the fridge/freezer and quickly place it on the prepared flat spot. Connect it to your computer.

  8. In QGroundControl, go to AnalyzeTools -> Mavlink Inspector and display the message HIGHRES_IMU. Part of this message is the current IMU temperature. Verify that it is below 20°C. If not, repeat from step 1.

  9. Keep the RoboFly stationary; do not move it or shake it. Let it heat up on its own and monitor the temperature.

  10. Once the temperature reaches 30-35°C, you can slowly introduce the hot air gun. Set it to 100°C and the lowest air-flow, and start slowly heating the FCU. Be careful not to move the RoboFly!

  11. Continue slowly heating the FCU. If the temperature plateaus, you can increase the airflow. Our target is to reach 75°C slowly; the heating process should take about 10 minutes.

  12. Once you reach 75°C, disconnect power from the RoboFly and stop the hot air.

  13. Let the UAV cool down to room temperature.

  14. Connect again with QGroundControl and check the TC_A0_X*** parameters. If you see non-zero values, the calibration was successful. If you see zeroes, repeat the calibration.

  15. Perform normal calibration (in the Sensors tab) for Gyro and Accelerometer.

Verify the calibration is good:

  1. Turn on the calibrated, room-temperature RoboFly and place it on a flat surface.
  2. Check the HIGHRES_IMU topic:
    • The acceleration in Z should be around 9.8 m/s^2.
    • The acceleration in X and Y should be around 0.0 m/s^2.
  3. Now, heat up the FCU to approximately 70°C and observe changes in the measured values. The Z acceleration should not deviate by more than 0.4 m/s^2. If it deviates more, repeat the calibration.