Im thinking of a senior project for next year, and thought of making a module that calculates velocity and then can transmit the data wirelessly. I could demonstrate it on a r/c car, rocket, etc.
The wireless data transmission isnt the problem, the speed calculation is what Im thinking about. Analog Devices (ADXL202) and ST have accelerometers that output a PWM signal that a micro could then count over time and determine velocity.
But since theres no absolute reference coming from the accelerometer, it seems like the calculated velocity could easily get out of sync over time and with stop/go bumpy acceleration.
Anybody have any thoughts on this? Are there other approaches better suited?
Even a 1% acceleration zero error will accumulate rapidly into a big velocity error. And tilt looks just like acceleration. For a rocket, with high g's and a short burn time, this would be usable (in fact, it's done), but for something like a car, probably not.
Integral of acceleration provides velocity information, subject to restrictions of the resolution of your measurements and the bandwidth of your integrator.
Voltage across the drive motor also provides velocity information, subject to a voltage drop error in the armature resistance when providing torque (either due to friction (minimal) or acceleration), and scaled by an unknown constant.
Creative cod> Im thinking of a senior project for next year, and thought of making a
Using accelerometers by themselves tends to become inaccurate very quickly, since any dc offset or drift turns into a position error that grows quadratically or cubically, respectively, with time.
Inertial navigation of this sort is very much easier for a land vehicle than for a rocket, because in free fall, the acceleration due to gravity won't register on the accelerometer--and tiny, tiny errors in finding the vertical direction have large effects.
If you think about it, an accelerometer measures change in velocity. At a constant velocity, the accelerometer output would be zero (or nearly zero). A more appropriate way would be to sense motor speed with a tach or by sensing power being supplied to the motor.
-- Dave M MasonDG44 at comcast dot net (Just subsitute the appropriate characters in the address)
Congradulations, you just fell upon the problem with inertial navigation; that and drift in the gyros. Better components, lower drift, better tracking.
If I went with a GPS approach, would a GPS have enough precision to resolve between an rc car moving pretty short distances, on the order of a tens of feet maybe?
If the resolution is there, it seems plausable that changes in position could be timed.
On 7 Mar 2005 13:39:25 -0800, snipped-for-privacy@hotmail.com wroth:
For a rocket, the easiest way would be to include a small transmitter in the rocket. The transmitter's output frequency would be doppler shifted due directly to velocity. A receiver on the ground would measure the shift. Both transmitter and receiver would need appropriate frequency stability.
There was a thread about this right here in this newsgroup a while back. IIRC, it is not at all obvious that this is the best approach or that it will even work.
I don't think the vehicle case is any easier. You have the lumps and bumps and jerking around to make sure that any inaccuracy in the ADC gets found.
When a lump pushes the car up, tips it and shoves it sideways all at once, you are really screwed unless you have a rotation detector that is quite good. With out it, the exact same data can come from two very different events where the car speed and direction are both different between the cases.
Kalman filters are nice but they can easily lead you to making pretty looking lies. GPSes commonly use Kalman filters. Sometimes you'll see a path like this:
The GPS'es model for what was going on got very far from the real physics for a while and then the code realized it screwed up and corrects its self. I've seen as many a 3 or 4 of these in 8 hours of GPS data.
The position reported by the GPS has plenty of precision. But there is a lot of error. How the error varies with time is something I'm not too sure about, but that is what you need to know. For example, if you imagine logging positions from a stationary GPS over half an hour, you would expect that the reported position would wander during that half hour. But if it never wanders more than a foot or two over the course of a minute, then GPS might work. If it jumps around 20 feet per second, then it probably won't work for you.
There are differential GPS's that will definitely work, but for that, you have to buy two, and they are expensive, and require either a radio link or data post-processing. These things will give you sub-inch precision and relative accuracy.
The way they work in the post processing mode is that instead of just solving for position, they record all the GPS information from all the satellites they can track. Later the post processing software figures out the position of the mobile GPS with respect to the stationary one to very high resolution.
If you have a real-time radio link between the two units, then they transmit enough information back and forth to do the same thing, but the mobile unit then does it itself, internally, in real time.
I wonder whether you could just use two regular GPS's, with one on the vehicle, and one stationary, but nearby. Then whatever hardware is receiving the messages from the RC car could also receive messages from the stationary GPS, and subtract the two GPS positions (vector wise) to get a vector from the known location of the stationary GPS.
There are a lot of reasons why this might not work very well, but it is a thought. I doubt it would work any worse than a single GPS, which still might work OK, especially if you have a good view of the sky.
Good luck. Don't let the scope of this project get out of control. Otherwise you'll never finish! ;-)
All of the GPS receivers that I am familiar with will give you a speed calculation once per second, not very practicle for an R/C vehicle moving in fits and spurts.
I don't think the accelerometer is a bad idea, its a senior project afterall, here are some suggestions
1) You could limit the r/c car to travel on a smooth flat surface
2) Use a big heavy slow r/c car and soft mount your electronics on the car with foam
3) If you want to get carried away add a analog devices gyro to your dual axis ADXL202 accelerometer and you have a complete 2 dimensional inertial navigation system which is a very good learning experience. Basic idea is the gyro tells you what direction your pointing in the then you determine your acceleration in that direction with the dual axis accelerometer you are using. Integrate that to get your velocity and position.
4) Take 64 or so readings of the gyro and accelerometers and average them before using them, this will lower the noise level. Since your integrating the accelerometer outputs, any noise left will tend to averaged out (its the constant offsets that kill you)
The drift of analog devices gyros are good to about 70deg/hour (after some simple calibration), so you should have plenty of accuracy for a few minute demo before the car gets lost and doesn't know where it is. The car should be able to drive itself around a simple maze in this time too.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.