» S
h
o
w
 
M
e
n
u

Simple Onboard DIMU Calibration

Introduction

Onboard DIMU calibration offers a simple way to calibrate your DIMU based AQ board without having to connect to a computer or generate log data. The calibration values are calculated inside the FC. The whole process can be completed in a matter of minutes.

Onboard calibration is ONLY supported on DIMU based boards (M4 or AQ6 with DIMU add-on).

Note: Before beginning the Onboard DIMU calibration, you should set up your radio control or a wireless telemetry link to be able to start the process and save the calibration parameters. Refer to Radio Options and Telemetry pages for more details.

 

The onboard calibration routine consists of 2 procedures:

Tare (leveling)

Tare zeroes out all ACC and GYO bias and fixes scales to 1. If done with the board level, it will “level out” the attitude estimation. Tare takes 2 seconds, and is executed by stick command or from QGC.

The tare is a simple and very basic way to calibrate Gyros and Accellerometers to an acceptable state sufficient to fly most crafts. But it wont give you temperature bias, alignment or scale compensation, so if you want more precision or have an AIMU, you should consider doing a IMU calibration without temperature compensation or a Fully temperature compensated IMU.

 

Compass calibration

In the compass calibration routine, the craft is spun randomly on its own axises to measure the earths magnetic field and the magnetometers bias, scale and alignment offsets are calculated onboard. There is no temperature compensation but for a DIMU, there is limited temp drift, and whatever temperature induced drift is left in the magnetometers will be corrected by Autoquads Unscented Kalman Filter.

 


Procedures

TARE (leveling)

Tare can be executed from QGC or via a simple radio stick command. Pulling a tare zeroes out all Gyro and ACC bias and fixes scales to 1. The tared values are used immediately in the flight configuration, but the parameters generated are only kept in the non-permanent memory. So If you want to make tared values permanent, you have to write them to flash or Eeprom. More on this further down.

Copter must be placed on a level surface before performing the tare.

To perform the tare from QGC, press the “DIMU Tare” button in the “onboard parameters” of QGC for AQ.

You should see the artificial horizon line up, and if you hit “refresh” you will see that scales are now fixed to 1 and that bias values have been calculated for ACC and GYO.

Tare function can also be pulled up on the fly using the following stick command:

Throttle stick left/down, pitch stick left/down for 1 second, then release the sticks.

null

The Ready and Debug LEDs will do a long blink to confirm.


On-board compass calibration

You can start the process by a Radio stick command or from QGC. Since you need to move the copter around to complete the sequence, it is convenient to use the radio stick command, but if you have a wireless link connected, you can also call the function up from QGC by pressing “Mag calib” in the “onboard parameters” window.

Before running onboard compass calibration, you need to set your magnetic declination and inclination in your Autoquad controller. This is done in the “Misc. Settings”, “mounting and environment”:

Refer to Magnetic inclination and declination for details on setting inclination and declination for your location.

So make sure Inclination and Declination is set correctly. Then write them to Flash Memory and restart board.

Compass calibration should be performed away from magnetic fields and electrical noise. So go outdoors, away from houses and huge chunks of metal (cars, manhole covers, rebar, etc), power wires and other magnetic objects.Remove magnetic or electronic devices from yourself before beginning.

To start the compass calibration do the following stick command on your radio:

Throttle stick left/down, Pitch stick left/up.

null

Ready, Debug & GPS LED´s should start to flash rapidly indicating the board is in compass calibration mode.

The goal is to gather multple readings from all octants around the mag vectors. So all you need to do is to randomly rotate the craft on all axises. (You dont need to be particularly slow or smooth). Keep an eye on the LED´s while doing this.

The LEDs act as a process gauge. So they will blink fast, then go slower and finally go solid one by one as data is gathered. The whole sequence can be done in less than 60 seconds, but usually takes up to 2-3 minutes.

When the last LED goes solid, the compass calibration is complete and controller will return to normal running state after placing the new mag calibration values into the non-permanent memory. You need to store values to Eeprom or flash memory and restart before they can take effect. See below!


Storing calibration values

Using RC radio

After performing a compass calibration (or if you want to make tared values permanent), you need to place the generated parameters into flash or eeprom memory to make them permanent.

All DIMU based Autoquad controllers has an onboard Eeprom memory chip that can be used to store IMU calibration params so they are not lost in a firmware update. You can do the Eeprom write via the following stick command:

Throttle stick left/down, Pitch stick up/right.

null

LEDs should all go solid for a second, then go back to normal to confirm Eeprom write.

Using QGroundControl (QGC)

  • Perform tare or compass calibration.
  • Do not restart controller
  • Connect to QGC
  • Open all parameters window
  • click refresh to read values in volatile memory
  • Click Write flash to store values to flash memory
  • Click “Calib. Save” to save IMU params to Eeprom memory

Verifying on-board calibration

Restart the controller, connect it to QGC and take a look at the IMU section of the All Parameter window

You should now see new values there generated by the tare and compass calibration. If you dont see new values, something went wrong, and you will have to redo the processes.

Once you confirmed values, Start by taking a look at the primary flight display:

Place the board level and pointing north. Horizon should be level and the heading should be north.. Heading beeing few degrees (up to +/- 5) off is ok and the GPS will correct it in flight. But if its way off, you need to repeat the compass procedure.

For a closer look, you can also open up the telemetry and take a look at MAG_Magnitude. It should stay close to 2.0 regardless of board orientation.

A tared only board should show very close to 9.806 ACC magnitude around level position, but may be off as board position begins to change. This is because scales are fixed to 1 with the tare, so unless your ACC scales by divine luck happens to exactly 1 on all axises there will be error buildup as attitude changes.

 

 

This page was created on 17-Apr-14 by kinderkram. Last modified on 22-Dec-14 by kinderkram.