using an accelerometer to measure speed and distance
JWF
Posts: 4
Hi all,
I would like to use the basic stamp and the accelerometer (dual axis) to make a speed and distance data logger fro my car. Just like the ones that can be bought for around $300.. I want to be able to do 0-60 times and 1/4 mile times in my car to determine if a particular performance mod really helped where it counts. I did some forum searching and was not able find any projects like this. If anyone has already built something like this and would like to share, I would appreciate it. I'm not looking to reinvent the wheel, just want to tinker a bit and build something that I can use...
thanks in advance.
-John
I would like to use the basic stamp and the accelerometer (dual axis) to make a speed and distance data logger fro my car. Just like the ones that can be bought for around $300.. I want to be able to do 0-60 times and 1/4 mile times in my car to determine if a particular performance mod really helped where it counts. I did some forum searching and was not able find any projects like this. If anyone has already built something like this and would like to share, I would appreciate it. I'm not looking to reinvent the wheel, just want to tinker a bit and build something that I can use...
thanks in advance.
-John
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
device reading rpm off one of the wheels. A Basic
Stamp can calculate speed and distance and report
to a serial two line display or do some data logging.
humanoido
BTW, I'm sure you know that·rear-wheel HP is·always significantly·less than advertised engine specs. Always quite depressing to account for that discrepancy.
Nonetheless, if you want to use an accelerometer to read your car's acceleration, it is a fun and worthwhile project, you'll learn a ton. You'll be able to test engine mods for relative improvement, but·all your test runs must be 100% identical for any meaningful comparison. Same street, same distance, same direction, same driving style, same wind, fuel, weather, plug condition, vehicle weight (fuel+passengers), tire pressure/condition, etc. Only·your test·variable can change, everything else must be controlled. And even identical runs will vary, so you'll need to make·several runs in each configuration and average them together.
Now the bad news. All that careful testing I just described as necessary is the·hardest part to implement. The best results you will ever get with a properly-working accelerometer·will never be as·good as if you just used a simple stopwatch over a fixed distance. Reality often deals us a cold hard slap in the face.
Not that I'm advocating street racing, but if you're after real·timing results,·you efforts might be better spent building an accurate·stopwatch that gets started and stopped by breaking a laser beam at the start and finish. Use wireless communication to send the finish signal back to a stamp-controlled timer at the start line. Your own personal drag strip. Make small paint marks on the street/curb to place your sensors in consistent locations. Aligning the laser will be the hardest part, but it can be done with a screw-adjustable platform. Don't ask me how I know, as·I will deny any and all allegations of impropriety. BTW, we never had this conversation.
Alternatively, you could mount the timer in the car, and use wide reflective tape for your start/finish lines. You'll shoot an IR beam downward and look for a reflection to start & stop your timer.
As always, drive responsibly and keep the·rubber side down.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
Post Edited (erco) : 4/19/2008 4:27:21 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
-John
p.s. Thanks for all the great input
You CAN approximate velocity with an accelerometer by integrating it once, and distance by integrating it twice:
velocity=previous velocity (in units/sec) + acceleration (same units/sec^2) * sample time
distance=previous distance (in units) + velocity (same units/sec) * sample time + 1/2 *acceleration (same units/sec^2) * sample time^2
You'd also need a real-time clock that the stamp could access to figure out accurate time intervals.
Measuring distance, and even velocity, with a noisy accelerometer is difficult. And almost all chip-based accelerometers are noisier than more traditional accelerometer technologies.
Hope that helps,
Dave