View Full Version : Discussion ADXL330 Question
shanghai_fool
Dec 18, 2007, 12:29 AM
I am working on a mixing circuit using a ADXL330 ( in the IMU-5DOF from Sparkfun) and have just hooked it up to the MCU for testing. I'm not familier with what it is supposed to do but it sure seems like a leveling detector. I get changes in output when I tilt the circuit board. Its operation is very different from the gyros. Can this not be used for attitude control?
It seems to go back to zero reference when the board is level.
Donald
poynting
Dec 18, 2007, 02:16 AM
It's an accelerometer. You'll get a change in voltage with respect to sensed acceleration. Since the sensor senses not only dynamic acceleration, but static accelerations as well, you're seeing it sensing acceleration due to gravity. In a static sense, it is a tilt sensor. When on an accelerating platform (like if you move it back and forth while holding it level) it will sense gravity plus the platform acceleration.
So, if it's on the table in the proper orientation, it should measure -1g in the Z axis and 0 in the other axes. If you rotate it 90 degrees in pitch or roll, it should measure -1g in the appropriate axis and 0 in the other two.
The sensor can be considered "driftless" in that over long amounts of time it will converge on a constant "steady state" value. This value may have some amount of error, but that error will be relatively constant.
Gyros, on the other hand, measure instantaneous angular rates. They will be zero when the board is stationary, and will read if the board is subject to an angular rate in any direction. Gyros are not driftless, meaning that if you integrate them (remember they measure the rate of change of the orientation), over long periods of time they will not tend to converge on a single value, but will continuously wander about.
Gyros and accelerometers, together with a good magnetometer to sense heading, can be used together to sense attitude. The gyros tell you what's happening right now, the accelerometer lets you correct the long-term drift of the gyros by giving you a stable steady state value to converge to in pitch and roll, and the magnetometer compensates for drift in the heading gyro with a stable steady-state heading value.
Hope this helps.
shanghai_fool
Dec 18, 2007, 03:41 AM
Yes, it does help. Thanks. Since what I am trying to do involves VTOL's, the static is more important to airframe stabilization during ascent and descent than the acceleration. Although I plan to use these in conjunction with the gyros, I wasn't sure if the speed of the sensor was important. They do seem to be slower reacting than the gyros. They seem to be almost like the turn and bank indicator except faster but not as fast as the gyro. The gyros sense the movement but not the position.
I haven't played with the magnetometer yet as the heading has not been a problem, so far. I am also debating whether or not to add amplification to the sensor output but it seems to work quite well without it. I do think that since the outputs are ratiometric with the supply voltage, I should use a well regulated Vss. Probably the same as the A/D reference.
I am only thinking about the hardware aspects at the moment. The software will follow later and I'll probably have more questions then.
Donald
kbosak
Jan 22, 2008, 08:28 PM
Just got same IMU on the desk.
Not perfect choice for me - for stable AP UAV with some degree of aerodynamic stability, I would prefer more gyros (instead of accelerometers) to smooth out flight.
shanghai_fool
Jan 22, 2008, 09:03 PM
Its just a starting point to see if it works on pitch/roll. For AP, you will probably add a yaw gyro. I'm not sure at this point. I did not seem to have a problem with yaw in my initial tests but for photo, you probably want more stability. The accelerometers will at least give a calibration point for gyro drift. I'm still working on fuselage. I hope to get back to the mixer soon.
funkysnail2k
Jun 10, 2009, 03:22 PM
Hallo!
I realise this is an old post but i was wondering how well you cracked on with the VTOL.
I'm working on a uni project and one of the options is to use 3 of the very same sensors. using 2 accelerometers in the same allignment but a distance apart can give rotational acceleration as well as acceleration due to gravity and movement.
I was curious as to how you were gathering the analogue signal, are you using an ADC in your microcontroller or a seperate ADC?
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.