RPM using 1 inductive sensor

Basically use the time from 1st to last impulse within a fixed update period, and count the number of pulses within that period. That will give greater precision.
It will be slightly more complex to program, but not by much.


If I understood, what you are saying is to take for example 10s fixed period, count the number of pulses, divide that number with this fixed period, and multiply by 6 to get RPM. Please correct me if I am wrong.
 
If I understood, what you are saying is to take for example 10s fixed period, count the number of pulses, divide that number with this fixed period, and multiply by 6 to get RPM. Please correct me if I am wrong.
No, I said "use the time from 1st to last impulse within a fixed update period"

If you have an update "window" between r and r (reset), you count the no of impulses by the rising edges.
And you start another timer at the 1st rising edge.
For every subsequent rising edge you indrement the counter, and you save the time value.
When the window closes, you calculate the flow based on the no of counted impulses and the saved time.

Pulses:
__-__-__-__-__-__-__-__-__
window:
r--------------------------r
count:
--0--1--2--3--4--5--6--7--8
timer:
--t(start)----------------t(end)
 
No, I said "use the time from 1st to last impulse within a fixed update period"

If you have an update "window" between r and r (reset), you count the no of impulses by the rising edges.
And you start another timer at the 1st rising edge.
For every subsequent rising edge you indrement the counter, and you save the time value.
When the window closes, you calculate the flow based on the no of counted impulses and the saved time.

Pulses:
__-__-__-__-__-__-__-__-__
window:
r--------------------------r
count:
--0--1--2--3--4--5--6--7--8
timer:
--t(start)----------------t(end)


Sorry for bothering you, but I don't understand. What do you mean by "update window"? When you say "start another timer", does it mean that I should use two timers?


Anyway, I understand how to count impulses by rising edges, but I am on fire when it comes to implementing RPM. The problem is that I have to measure the drum speed per minute (which is by the way very slow, approximately 7 RPM), but I have to update HMI screen for example every 20 seconds. So I am confused on should I set the timer to 20 seconds and then multiply the calculated value by 3.


I don't think this is good idea because 60/7 = 1 impulse per every 8.5 seconds. Which means I could loose information. But I don't come up with another idea, since I am a beginner.
 
Last edited:
Correct me if I'm wrong, but couldn't one add a gear to the
slow moving shaft and a prox to count the gear teeth as
the shaft turns? (Generating a number of pulses for each
partial revolution.)
Poet.
 
When you say "start another timer", does it mean that I should use two timers?
Yes.
Let one timer be the one that updates your calculation every 20 seconds.
The other timer is for measuring the time from the 1st rising edge to the last rising edge of the impulses you count.

The problem is that I have to measure the drum speed per minute (which is by the way very slow, approximately 7 RPM), but I have to update HMI screen for example every 20 seconds.
You have approx 8.5 seconds per revolution. So you would get 2 or 3 impulses per 20 seconds. That is just barely enough. You need at least 2 impulses within the 20 seconds window.
I would consider adding some measure to get more impulses per revolution.

So I am confused on should I set the timer to 20 seconds and then multiply the calculated value by 3.
As you argue yourself it is not good enough to assume a fixed time of 20 seconds.

You have to measure the time between the first rising edge and the last rising edge. And then calculate the RPM = ((no of impulses -1) * (60 sec per min) / ((time between 1st edge and last edge) * (impulses per revolution)).
For example if you measure 3 rising edges within 16 seconds then
(3 - 1 impulses) * (60 sec per min) / (16 sec) * (1 impulse per revolution)
= 7.5 revolutions per minute
 

Similar Topics

Studio 5000 & PF 525, Ethernet Comms, Encoder FB, Using Motor RPM as speed reference I'm trying to figure out how to send a speed reference in...
Replies
6
Views
889
Good Morning , I am going to be re-working 2 portable machines. I am going to have one main panel with a CompactLogix and 3 PowerFlex...
Replies
2
Views
1,480
I am looking to detect the RPM/speed of a conveyor belt using a Micro820 processor and a magnetic sensor. The magnetic sensor would pickup the...
Replies
4
Views
3,364
Hello I am new to programming Analog inputs and am wondering how to use the analog output from my inverter drive to an analog input on the...
Replies
1
Views
7,262
Back
Top Bottom