Topic: RPM Counter?
(Read 639 times)
Jun 15, 2013, 08:10 pm
: Jun 15, 2013, 08:18 pm by CQB_insomnia
I am building an octocopter and I'm trying to figure out how to implement an rpm counter.
I purchased 10 of these sensors which will output a digital pulse.
I'm unsure if the pulse is a PWM signal or just a short pulse for every rotation. If its PWM I know how to handle that but the "short pulse" is where I'm having a problem. I have a digital oscilloscope so ultimately I'll be able to figure out once I get them ahhhhh the waiting time. **If anyone knows please let me know!!!**
I would need to create an arduino system that could count up to (10,000 rpm) or roughly 170 pulses per second ON EACH MOTOR so its essentially counting 170 pulses per second on 8 individual channels. This arduino system would be DEDICATED to nothing but RPM sensing and (8 channel analog current sensing) then outputting that information over serial or i2c. The serial information will be fed into a Beagleboard which will then act as the brain. In total I've got 3 arduinos + the beagleboard so that's why this arduino is dedicated, its just one of many sub systems.
What would be the best way to go about setting up an arduino for a task like this? Are there external IC's for the frequency counting I could get and hook up to the arduino or would I be able to do it in software RELIABLY?
Thanks a lot,
Location: United Kingdom
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
Re: RPM Counter?
Jun 16, 2013, 11:15 am
The manual doesn't say, however I think it almost certainly outputs 1 pulse per revolution, or a small fixed number of pulses per revolution. I would use them to generate interrupts so that you can easily time the interval between pulses. If you use 8 pins on the same logical port, then you can use a singe pin change ISR to handle all 8 channels. If it's 1 pulse per revolution, then you will get up to 2 * 8 * 170 = 2720 transitions per second, which should not be difficult to handle.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.