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 only way to make a good IMU is by mixing accelerometers with gyros and Kalman 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

Views: 3751


Developer
Comment by Jordi Muñoz on January 15, 2008 at 10:26am
I don't know if the amplifier can eliminate the .50v@-500degrees/s of the gyro, to adjust it to 0V. Any way is better put an ADC with more resolution, because you can reduce some "noise".
Comment by Jason Striegel on January 15, 2008 at 10:45am
So what if you set the arduino to look for voltages up to something like 1.7v (assumption: does anything above that just clip?).

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.

Developer
Comment by Jordi Muñoz on January 15, 2008 at 10:56am
With more resolution more precision, 1.66 deg/s resolution no so good, 1 degree/s resolution is good, but 0.1 degrees/s would be super good.

Developer
Comment by Jordi Muñoz on January 15, 2008 at 10:58am
For an airplane= 1 deg/s resolution is ok
For an helicopter= 0.1 deg/s resolution is ok.

Developer
Comment by Jordi Muñoz on January 15, 2008 at 11:07am
maybe, if we put a resistance, to reduce .50v. Then when we have -500 deg/s = 0v, and +500deg/s = 2 volts, and 1volts = central point. But remember is just theory, maybe in the real world we can have noise, or something. 2000mV/1023= 1.94mV/Deg/s, Good enough to have a resolution of 1deg/s.
Comment by Jason Striegel on January 15, 2008 at 12:16pm
I guess what I was thinking is that you could somehow clip off the low and high end of the output and just quantize the middle. Essentially, you'd turn it into a +-200 deg/sec range device and toss away the rest. It's the same thing you'd get with a higher resolution ADC, except you sacrifice some of the range.

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.

Developer
Comment by Jordi Muñoz on January 15, 2008 at 6:01pm
Yes sounds possible, some solutions cross my mind, but i don't know exactly how to do that (clip off the low voltage), the high voltage you can adjust it using the external reference pin (AREF), so we only need to investigate how clip off the low voltage. Some ADC have the option of two external reference pins (+AREF and -AREF), so in that way you can adjust the lowest voltage too. Arduino only have +AREF.
Comment by Jason Striegel on January 20, 2008 at 1:31am
Anyone having trouble getting the boarduino working with the nunchuck accelerometer? The example code just hangs during the nunchuck_init function for me.

Developer
Comment by Jordi Muñoz on January 20, 2008 at 7:42am
Are u using 3.3V for power supply???
Comment by Jason Striegel on January 20, 2008 at 11:07am
no, i've been testing with the 5v. it's a bad idea, but nobody else had mentioned having problems.

i dropped the speed in twi.h from 400000 to 300000 and it seems to be working now. maybe it's just flaky when overpowered.

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service