Hi guys,
I wonder if somebody can give me some pointers here as to whether the Arduino Diecimila is what I'm after for this project or not.
What I'm trying to do is build a dyno to calculate the horsepower output of motorcycles. So the rear wheel sits on a heavy metal drum and is accelerated to full speed, some simple math allows you to calculate the horsepower based on the acceleration of the drum knowing its interia.
So the mechanical side of things is built and I've got an encoder connected to the drum to give me TTL pulses either once per revolution or fifty times. The encoder is a Hengstler RI38.
To calculate power I need to find the acceleration of the drum, so I need to find the time between one set of pulses from the encoder and see how much faster/slower the time between the next set is. It's pretty simple really, but the problem is speed and accuracy. As I'm comparing such small times they need to be quite accurate and because the time between pulse is so small a PC is useless for reading the data.
Just some figures -
The encoder will spin from between 200RPM and 2500RPM, so at 50 pulses per revolution and max RPM you're talking about 2083 pulses per second. So the time between pulses will be between 6000 microseconds and 500 microseconds as the speed of the drum increases. As I need to tell the difference between one time and the next it needs to be quite accurate. Also a run will last between 5-15 seconds depending on the power of the bike, so I'll be looking at maybe 5-6000 values.
So what are my options with the Diecimila? If I hook the TTL output from the encoder to one of the interrupt pins is there a function/timer/counter that will allow me tell exactly how ong ago (in microseconds) the last interrupt happened? Do I have enough memory to do this or can I be pushing the values to the PC as they happen without worry of destroying the accuracy of the timers?
Any pointers would be great. Not looking for the whole solution or anything, just some ideas I can go and research.
Thanks!