PDA

View Full Version : Discussion Details of an Accelerometer


nate3711
Mar 09, 2007, 11:59 PM
I've been researching some different accelerometers for use in a rc helicopter but I ran into a few problems. Say for example the heli was moving at a constant speed to the left (using only roll). How would the accelerometer be able to distinguish between static(tilting, due to gravity) and dymanic acceleration(actual movement) in that direction. This would cause problems in knowing what servo needed to be adjusted to correct the movement.

Another example would be with wind... If the the heli was hovering but slightly tilted due to wind adjustment, how would the accelerometer know it is hovering and not moving.

I guess what I'm mainly asking is should I use two different accelerometers, one for measuring static acceleration and the other for dynamic?

I mainly researched the ADXL330 (3-axis accel.) Specs are at:
http://www.analog.com/UploadedFiles/Data_Sheets/ADXL330.pdf

macboffin
Mar 11, 2007, 09:00 PM
Think you are a bit confused there.An accelerometer registers an accelerational force, ie a change of position.In hover, nothing to register!

pmackenzie
Mar 11, 2007, 09:07 PM
Short answer is that an accelerometer can't distinguish between "static" and "dynamic" tilt. ( Using your terms)
This is just like a pilot not being able to "fly by the seat of his pants" in cloud or at night.
For that you need an artificial horizon which uses gyros to give visual feedback.
Same thing in this case. Add a gyro on each axis and you can sense the tilt as it occurs, so you can separate the static and dynamic components of the "tilt".

Pat MacKenzie

clolson
Mar 11, 2007, 10:01 PM
Think you are a bit confused there.An accelerometer registers an accelerational force, ie a change of position.In hover, nothing to register!

Actually in a free fall there's nothing to register. It still seems a bit mind bending, but stick a z-axis accelerometer motionless on a table and it reads -9.8 m/s*s ... maybe I should have paid more attention in physics. :-)

Part of the algorithm to fuse all the data from these accelerometers and gyros involves sensing the direction of gravity to help combate the rapid divergence due to the noise in the sensor data. That's not the whole picture though since a coordinated turn will fool the math into thinking the wings are level when they aren't. There's all kinds of pretty sophisticated stuff people start doing to figure out a better reference to "down" and a way to correct for your heading (for which we have even fewer clues.) The amazing thing is when they figure out a way to do this on a minimal embedded computer.

One of my points of reference is the Xbow MNAV. They have pretty much similar sensors to everyone else out there doing this sort of thing, but their open-source sensor fusion algorithms are pretty basic and simplistic, but yet they push a 400mhz arm processor pretty close to it's limit.

Wish I understood more about the math behind all this since it's pretty cool stuff, maybe I'll get to that someday.

For what it's worth, I have made some good progress on my xbow mnav based autopilot code now. I have some more work left to do, but in a week or two I'm hoping to be pretty close to being able to go autonomous on the individual axes ... and at least test out a wing leveler, altitude hold, and autothrottle in isolation. I'm starting to run out of Mhz on my embedded cpu though ... that appears to be the biggest thing that will limit my fun. :-)

Curt.

nate3711
Mar 12, 2007, 02:21 AM
So basically I would need one accel. and one gyro for each axis. The logic would be like this:
-Check accel for output
-If accel has output, check gyro to see if tilted
-If gyro is tilted, then accel output is static(tilted)
-Else accel output is dynamic(change in movement)

I realize this is simplified and you could have a mixture of tilt and movement but I just want to get the basic concept down.

Clolson, I noticed you said 400Mhz for your ARM processor. Wouldn't this consume a lot of power, I was thinking more along the lines of 60Mhz.

clolson
Mar 12, 2007, 08:43 AM
Clolson, I noticed you said 400Mhz for your ARM processor. Wouldn't this consume a lot of power, I was thinking more along the lines of 60Mhz.

At room temperature, I'm seeing about an hour run time with a 1320mAh 3.7v lipoly battery. I'm also seeing closer to 2 hours of run time with a 1200mAh 4.8v NiMH battery. The NiMH battery has much better performance in cold weather (as compared to our lipoly) which can be important depending on where you live.

Curt.