I'm trying to develop an IMU for my Arduino-based UAVS (heli) project. In my first test I just used a three-axis accelerometer, but it didn't work because the motor vibration generated too much noise. I then tried it just with gyros, but of course the the gyros drifted. So I learned through experience what everyone already knows: that the onlyway to make a good IMU is by mixing accelerometers with gyros andKalman Filters, which is eventually what I did ;-)
I ran a test to see how my IMU is responding, and I made a line chart to see the results. The test consists of rotating the device to 70 degrees and then shake it, to see how the filters reduce the "noise". It looks pretty good:
The samples was taken every 20 miliseconds, the blue line is just accelerometer and the red line is Accelerometer+Gyros+KalmanFilters.
Source code here: ArduIMU Beta1
Special thanks to Tom Pycke
Comments
So imagine you can do your ADC over the range of 1.1 to 1.9v, with 0 deg/s at 1.5v. You'd be able to resolve .78 deg/sec of rotation, from -200 to +200. Everything outside of that range just gets clipped to the max or minimum.
For an helicopter= 0.1 deg/s resolution is ok.
Now you have a range of 0.5v to 1.7v, with 1.5v being the center. The arduino can detect 1.66 deg/s of rotation with a range of -500 to +100 deg/sec. There must be some simple way of centering that too... I just don't really know what the minimum deg/sec resolution and the total range you practically need.
1023 (10bits)/ 2500 mVolts = 2.44, so Arduino is capable to represente a decimal value every 2.44milivolts.
The gyro is +-500degrees/s, when is neutral the output voltage is 1.5Volts, when you rotate the gyro to a positive way, the max output is going to be 2.5Volts@+500 degrees/s, and the negative way is going to be .50Volts@-500 degrees/s.
That means we have a range of 2Volts (2000 mVolts) and 1000 Degrees/s, so if we divide: 2000mVolts / 1000 Degrees/s = 2mV/Degree/s.
Arduino only detect changes every 2.44mvolts, and the gyro change every 2mV/Degree/s. So, is not enough. We need an ADC of 12 bit of resolution or a gyro with less range (300 degrees/s is enough)
http://tom.pycke.be/mav/71/kalman-filtering-of-imu-data