I’d like to put here some consideration about the imu calibration, that means how  it is mounted the imu on the drone respect the propeller plane. This information is fundamental to garanty a perfect hover position without lateral mevement of the drone.

In other words, if I set roll=0 and pitch=0  I want that the prop plane is aligned with the  world, evenif the sensor can be not perfectly aligned with the world (and also with the propeller plane).

In this pictures you can see this case: the world (blue) , the sensor (red) and the prop plane ( orange).

In the next picture let’s put some names to the angles:

Important: Note that gamma is the angle measured by the accelerometer.

The most important information I need to know is the angle beta : the offset between the sensor and the prop plane . this is the error  generated to the mechanical installation of the imu.

This value is used to compensate the measured value from the accelerometer.

alpha and beta are the 2 unknowns  so I need 2 equations to solve this problem.

I decide to use this simple method  to calibrate imu:

1) Take a reference plane ( my kitchen table) . It does not metter if it is not perfect alingned to the world, it is just enough it is stable.

2)Place from behind the prop plane on the “table roof”.

3) Measure the angles  of the accelerometer (gamma1).

4)turn the drone 180 degree respect yaw and place it again on the table roof.

5)Measure the angles again ( gamma2) .

6)consider that, in those 2 measurements, the alpha angle is constant ( i do not move the table…) , while the angle beta is equal but inverted ( due to the rotation of the drone).So the result is:

In order to  manage this  method in a easy way  I added in the code the option called “fine calibration” .

The last  version is now on github.

Just run the myQrc.py , move to the new mode “IMU”  and follow the instructions.

## 6 thoughts on “About IMU calibration”

1. Imcia

Hey. Notr sure if you’re still updating this blog, there’s no date anywhere, but I’m just dropping by to say that I’m finding all the information very helpful. I will likely write my own soft for my quad, and use different gear, but the theory is solid and hard to find elsewhere. Thanks for all the work

1. solenerotech Post author

Thanks Imcia,
The post yuo commented has been added yesterday, so slowly, but I’m still working and updating it.
You can find my code on github, the link is on the top right side of the blog.

2. Julio

Hi,

Are you still updating this blog? Have you made any new progress with the quadrotor using the Raspberry Pi?

Julio

3. stewe93

Hy Sole Nero,

Do you still updating the blog? I didnt saw new posts since this one 😦 You did a really great work and as Imcia mentioned cant find these informations together nowhere else so thank you very much. Now im really thinking about building my own quadrocopter based mainly on your project.