I want to datalog some rpm pulses from a motor. The motor may run up to 50,000 rpm.
I want to have more than one pulse per revolution. I wanted to know how many pulses per revolution i could use.
100 pulses per rev would give me high accuracy.
If the processor speed is 16 million cycles per second then the arduino should have no problems?
Grumpy_Mike:
Yes at 100 pulses per second the arduino should have no problem.
It might be best to look at using interrupts to read the time between the pulses.
I am no expert but wouldn't using the PulseIn() function be better and easer.
And with it being able to read 1pulse per 10microseconds that would be exactly what you needed.
Let's see....50,000 RPM is 834 rotations per second, multiplied by 100 pulses/rotation gives 83,400 pulses/second. That's about 12 microseconds between pulses.
That's definitely "fast" but probably doable as long as your code doesn't have plans to do much of anything else.
A speed of 16 MHz for the Arduino sounds high but it takes several instructions to handle an incoming pulse, then you have to save it somewhere, and each instruction takes 2-3 clock cycles (on average) so it is not as high as it seems in practice.
--
The Rugged Circuits Yellowjacket: 802.11 WiFi module with ATmega328P microcontroller, only 1.6" x 1.2", bootloader
I am no expert but wouldn't using the PulseIn() function be better and easer.
No because while you use that function the arduino is not doing anything else. By using interrupts you free up that time to do something with the data you are getting.
I am no expert but wouldn't using the PulseIn() function be better and easer.
No because while you use that function the arduino is not doing anything else. By using interrupts you free up that time to do something with the data you are getting.
Last time I played with microseconds, they came in units of 4, so don't expect very good resolution down at the 12microsecond range of things.
(It counted: 4, 8, 12, 16, etc.)
most also come with a few standalone that do not have the engine attached but do have the sensor and (what do you call it anyway) plus the ones with the engine to.
What is the basis of that statement? What are you doing with the RPM value and what kind of resolution do you need on the RPMs to effectively accomplish whatever it is you are doing with the value? Any resolution beyond what is necessary to accomplish the task is not only simply wasted, but adds complexity, time, and cost to a project with no benefit. So, just enough pulses to accomplish the task is the best and any more than that is in fact, not better.
i was recommended 100 pulses per rev by a guy who has been doing this stuff since the 1960's
the number is used to determine the firing angle of an engines injectors
So how did he do this back before Arduino (or micro-controllers, or even computers, for that matter)?