View Full Version : Discussion Accelerometer and gyro choices?
Ben C
Oct 23, 2008, 03:56 AM
Hi. I'm interested in making an IMU and I'm currently trying to decide on the sensors to use.
For gyros, I'd like to use the ADXRS610, but I don't think I'll be able to solder the BGA package. Thus I was thinking of using the ADXRS300 (the older model) that has a SparkFun breakout available. I don't think the 10-bit ADC on the LPC2148 will be good enough, so I was thinking of using a 16-bit external ADC.
For the accelerometers, I'm not sure whether to go analog (ADXL330) or digital (LIS3LV02DQ). Both have Spark breakouts, so that's not an issue. Digital would be easier, but if I'm going to be Kalman filtering anyway, is it better to start off with the original signal?
Can anyone give their recommendations?
Cheers
Ben
Terry S
Oct 23, 2008, 04:36 AM
I can't help much but I will say that I think 10-bit is enough. Higher than 10-bit will probably have noise in the readings anyway. I think if your final accuracy output was even 8-bit it would be fine.
Just my take on it, I guess there will be lot's that think the output must be a high as you can get.
Terry
Razor_Racer
Oct 23, 2008, 08:08 AM
Why not use the Sparkfun ADXRS401 breakout?
Ben C
Oct 23, 2008, 12:33 PM
Why not use the Sparkfun ADXRS401 breakout?
That's only 75 deg/sec. Hence the ADXRS300/610, which are 300 deg/sec.
eddymoore
Oct 23, 2008, 05:41 PM
AD make nice parts. We have gone down a similar route to you for some of our projects. AD inertial stuff, 16-bit ADC over SPI to an LPC2148. KISS and do the cunning stuff in software. Sound PCB routing and perhaps an LPF between sensor and ADC (with a 3dB point of, say, 600Hz - you probably won't be sampling near that fast, and it'll stop any shizzle from your radio/whatever affecting ADC readings) would be a good design choice.
G'luck.
Ben C
Oct 23, 2008, 06:51 PM
Hi Eddy
Thanks for the advice. I was wondering, at what rate would you sample the accelerometer? The gyro?
If I'm reading the datasheets right, the Spark breakout (http://www.sparkfun.com/commerce/product_info.php?products_id=692) seems to include the X/Y/Z caps for you, at 0.1uF. This would seem to bandlimit to 50Hz (page 12 on the datasheet). Going back to my Nyquist lectures, that would imply a sample rate of 100-200Hz. Is that enough for a quadcopter? Too much?
Sorry for all the questions, but I'm a CS guy. Analog electronics is not my strong point. :)
Cheers
Ben
eddymoore
Oct 24, 2008, 03:06 AM
Enough. I think the internal filter in the AD parts is 400Hz, for the accelerometers at least.
Too much/enough is quite a hand wavy distinction, but realistically there's enough information there for a well design control system and state estimator to keep it rock solid to the human eye. You'll have much larger problems to deal with than sensor bandwidth.
Quad? Cool. I am just beginning an adventure with an actively stabilised rocket. Probably using similar hardware to you. If you ever want to talk shop, that'd be grand. How near are you to Cambridge? If you want to conduct offline I can be reached at eam52 at cam dot ac dot uk
Ed
P.S. CS guys can sometimes be useful, don't worry. Just not very often :p
shanghai_fool
Oct 24, 2008, 03:18 AM
That's only 75 deg/sec. Hence the ADXRS300/610, which are 300 deg/sec.
Please, can you explain the reasoning behind the use of 75/150/300 °/S gyros?
I mean what are the advantages/disadvantages for the different scales? Especially for slow responding devices like helis, VTOL's, etc.
Thanks
Donald
Ben C
Oct 24, 2008, 03:52 AM
Donald: TBH, I'm just starting with what I've seen other similar projects use. But 300 deg/sec seems easily achievable (exceedable in fact) in roll on a plane, or yaw on a rotor.
Eddy: No way! I still live here. Is that CU Spaceflight? Email sent.
eddymoore
Oct 24, 2008, 04:14 AM
The very same! cuspaceflight.co.uk
shanghai_fool
Oct 24, 2008, 04:16 AM
That is true, but that is not why we use gyros. Their purpose is to provide a sensor to limit , stop or invert (cancel) any unwanted movement such as with wind or other causes of non-intentional movement (regardless of axis). It just seems to me that the lower degrees/second would be providing greater accuracy for small ovements.
Since the application of these devices are not for acrobatics and are trying to keep the airframe/device steady, it just seemed to me that you would need more accuracy/resolution than speed, but, thats why I asked the question. I do not know for sure.
Terry S
Oct 24, 2008, 12:15 PM
Seeing as we seem to have the right people here I will ask a question about accelerometers. I'm I right in saying we need 2 accelerometers to calculate the correction angle for a gyro?
A friend says he dose it with only one but I don't think it would work for a moving platform.
Terry
eddymoore
Oct 24, 2008, 12:48 PM
For one axis, you only need, mathematically speaking, one gyro and one accelerometer.
You have two sensors that can give you some kind of an idea of tilt - an accelerometer that measures the component of 1g of gravity in its particular axis, and the gyro which provides a rate output which, when discretely sampled and summed (ie integrated), gives you some idea of angular displacement from the original point.
Individually, each has its flaws (the accelerometer only measures gravity when there are no other accelerations, and that's rarely the case in anything that moves). The gyro has noise on the output and 'DC' errors like temperature related drift that soon add up and give you inaccurate information. However, it responds well in the short term, before these errors have the chance to become significant.
If you combine the two - use the gyro to give you the angle but keep its longer term drift in check by comparing it to the accelerometer than you know is stable in the long term, even if other accelerations affect it in the short term, you can make a good estimation of your angle.
What's the best way of combining those two sensor outputs to make this estimation? The kalman filter that often gets mentioned, though is not always that well understood. Fair enough, it's quite non-trivial linear algebra and statistics.
So for my rocket, accelerometers are not really very useful because they don't measure the 1g of gravity over time - they either have a rocket underneath them during burn or are in a 0g parabola after the burn. I need some other way of getting my 'stable' long term, non-drifting tilt sensing, to combine with the very good short term dynamic response of the gyroscopes. For aeroplanes or quadcopters or para-kites or whatever, you're generally in equilibrium most of the time so you have no such problems.
Lucky you.
Ed
Terry S
Oct 24, 2008, 01:05 PM
Ahh so my friend is right, I was thinking that any side movement would throw it out but I see your point. All I need to do now is find a way to make the measured angles match from both the accelerometer and the gyro, lucky it's a long term project :)
Terry
Ben C
Oct 24, 2008, 05:21 PM
Terry - Yes, as Eddy said, in theory you only care about the component of gravity along that axis. However I imagine in practice it may be useful to have more due to alignment errors, which you can resolve in software. From the datasheet for the 3-axis ADXL330:
The ADXL330 uses a single structure for sensing the X, Y, and Z axes. As a result, the three axes sense directions are highly orthogonal with little cross axis sensitivity. Mechanical mis-alignment of the sensor die to the package is the chief source of cross axis sensitivity.
Eddy - I hadn't considered the 0g parabola bit. That's quite fun.
Do you recommend then that I go for an analog accelerometer? You say KISS, but KISS for me is digital, not analog. :P The magnetometer I'll be using will be digital (MM3).
Ben C
Oct 24, 2008, 05:26 PM
By the way, can you recommend a good book on Kalman filtering? The last time I tried to read the 1960 paper my eyes glazed over, but I'll give it another go.
eddymoore
Oct 24, 2008, 07:09 PM
Optimal State Estimation by Dan Simon did it for me. Original paper is useless and for mathmos.
eddymoore
Oct 24, 2008, 07:12 PM
Ben I have just looked you up on FB and I know you. Or at least, you came to a couple of CUSF meetings a couple of years ago in that abandoned second floor empire of the engineering department.
It's a small place, the net.
Comatose
Oct 24, 2008, 07:24 PM
Thermopile (infrared)horizon sensing would seem to be an excellent choice once you're a few hundred or thousand feet up.
Though, an accelerometer isn't as useless as you'd think, at least during boost phase. Sure, you might have 10g of thrust, but you know exactly along what axis that thrust is. So, align one of your three axes with that, and whatever is read on the other two axes is... inclination
Ben C
Oct 24, 2008, 07:50 PM
Ben I have just looked you up on FB and I know you. Or at least, you came to a couple of CUSF meetings a couple of years ago in that abandoned second floor empire of the engineering department.
It's a small place, the net.
Yeah, I wondered if we had after you mentioned rockets. Crazy.
Thanks for the book recommendation - after checking it out on Amazon inside I have placed an order. :)
eddymoore
Oct 24, 2008, 07:50 PM
I'm not convinced that is the case. A vector summing argument shows that the 'inclination' accelerometers, orthogonal to the thrust axis, have no forces other than gravity acting on them in their axis, i.e. no resistance to the acceleration from gravity, so they will probably just show free-fall. I think.
Comatose
Oct 24, 2008, 08:21 PM
I'm not convinced that is the case. A vector summing argument shows that the 'inclination' accelerometers, orthogonal to the thrust axis, have no forces other than gravity acting on them in their axis, i.e. no resistance to the acceleration from gravity, so they will probably just show free-fall. I think.
Presumably the accelerometer is attached to something preventing it from falling out of the rocket?
*edit* without knowing what you're doing, you might be right. If your goal is simply "get up there in whatever path one might take" then you're right. If you're working to hold some specific trajectory then the accelerometers yield interesting data. *edit*
eddymoore
Oct 25, 2008, 04:24 AM
Sure - as soon as there is some thrust vectoring input, there are suddenly components of thrust in the inclination accelerometer axes. I think I ened some kind of closed loop system to make it viable.
I will have to think about this more, or just use IR sensors as was an original intention.
Ed
Terry S
Oct 25, 2008, 07:02 AM
IR sensors work fine on my plane as soon as its over tree top height so should work well for a rocket.
Terry
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.