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

Comment by Michael on February 1, 2008 at 1:55am
I'm running into the same problem as you two with the resolution of a 3.3v accelerometer on the Arduino. Although I think I've found a way to get full 10-bit resolution on ANY voltage range with using op-amps. Using an op-amp, a reference voltage, and trim pots, exactly 0v can be outputted on the low end of the accelerometer ~ .8v (or whatever you choose), and exactly 5v outputted on the high end, ~1.8v( "" ). All you need is a few equations to trim up the pot values.

If I get it working, I'll be sure to let you guys know..

Btw, how difficult is it to set the +aref pin on the Arduino?

Developer
Comment by Jordi Muñoz on February 1, 2008 at 1:57am
well, at the beginnig of the code, put this code:
//////////////////////////////////////////////////////
#ifndef cbi
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif
#ifndef sbi
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
#endif
///////////////////////
And thats all!!! just connect a ref voltage to the aref pin and ready!!!
Comment by @vi@tor on September 12, 2008 at 7:33am
hello!

why ı can not see the source code
it gives an error like this "This site has been disabled for violations of our Program Policies. If you feel this disabling was in error, please visit our contact page to let us know. Contact Us"

3D Robotics
Comment by Chris Anderson on September 12, 2008 at 11:38am
Jordi's account got hacked and he's out of the country and away from his files. I'll remind him to upload them again when he gets back.
Comment by @vi@tor on September 12, 2008 at 12:45pm
thanks for your hepls..
Comment by Gus on September 15, 2008 at 9:55pm
Very impressive work, thank you very much for posting the code, i was wondering though how much is the Arduino able to handle? I have one on order, but would it also be able to process the data from a compass and also control 3 motors if the proper hardware was used? As you may have guessed i am working on a tri copter style AUV. Thanks to anyone that can shine some light on this.

3D Robotics
Comment by Chris Anderson on September 15, 2008 at 10:13pm
Yes. The Atmega168 does 20MIPS. You'll want to use outboard H-bridge motor driver chips, but reading a compass and sending reference voltage to the motor drivers is very easy.
Comment by Gus on September 16, 2008 at 2:19pm
Okay thanks. What motor drivers do you (or anyone here) reccomend? Something cheap that can handle decent sized motors? Also two other questions is the aurino capable of contolling the kalaman filter ( with gyro and accelerometer), a compass, 3 IR range sensors in chain, 3 motors (with outboarded H-Bridges) and possibly a GPS module? Any help is great!

3D Robotics
Comment by Chris Anderson on September 16, 2008 at 3:58pm
I don't know what motor controller would be best (we just use really small blimp motors) but the answer to your second question is that sounds like a bit much for one Atmega. In ArduPilotPro we used dual-core (2 atmegas) Arduinos to do similar work. If you really want a powerful single-chip solution, you might want to consider the Parallax Propeller, which has 8 cores, or if you can handle the toolchain complexity, a higher-end ARM.
Comment by Gus on September 16, 2008 at 8:58pm
I have done lots of research into the propeller chip and while it is a superior chip it is a bit above my level. By the way i have become quite good with the basic stamp over the last year or so and have basically maxed out it's abilities that's why i am moving on. Anyhow, i have readthe articles on the ArduPilotPro i just am unsure as to how you go about linking the two chips, how is this accomplished? I have thought of this as a possibility before but have never really known how.

Comment

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

Join DIY Drones

Groups

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service