How the pulse output calculator works
Many sensors report through pulses rather than an analogue signal. A turbine, oval-gear or electromagnetic flow meter gives a pulse for a fixed volume, stated as its K-factor in pulses per litre. An incremental encoder gives a fixed number of pulses per revolution on two channels, A and B, a quarter period apart. The controller counts the pulses or measures their frequency.
The calculator gives the pulse frequency, the period, the volume per pulse or the angle per count, the count rate the counter input must follow, and the resolution of a frequency measured over a gate time. Enter the counter input’s maximum frequency to check that it keeps up.
Flow meters and the K-factor
The frequency is K × flow rate. A meter with 100 pulses/L at 30 L/min gives 50 Hz; each pulse is 10 mL, and a totaliser counts 100 000 pulses per cubic metre. The K-factor is on the meter’s calibration certificate and may differ slightly between meters of the same type; use the certified value.
Encoders and quadrature decoding
An encoder with 1024 pulses per revolution at 3000 rpm gives 51.2 kHz on each channel. Counting the rising edges of channel A gives 1024 counts per revolution (×1), both edges of A give 2048 (×2), and both edges of both channels give 4096 (×4) and the direction. The counter must handle the decoded count rate, 204.8 kHz in this example, not just the frequency of one channel. With ×4 the angle per count is 0.088°.
Enter the travel per revolution, the pitch of a lead screw or the circumference of a measuring wheel, to see the linear resolution and speed.
Gate time and resolution
Counting pulses for a fixed gate time gives the frequency to within one count. The relative resolution is 1 / (f × gate time): 2 % for 50 Hz over 1 s, 0.02 % for 5 kHz over 1 s. At low frequencies a longer gate, or measuring the period between pulses instead of counting them, gives a better result. For speed from an encoder, the resolution is 60 / (counts per revolution × gate time) rpm.
To bring a counter or flow value into a controller over Modbus, the Modbus register decoder reads the registers; the 4–20 mA converter scales an analogue output of the same meter.
Frequently asked questions
Why does the counter miss pulses at high speed?
The input’s maximum frequency, its minimum pulse width and any input filter all limit the count rate, and a long cable rounds the pulse edges. Check the counter at the decoded count rate and at your cable length.
Push-pull or open collector?
Push-pull (HTL or TTL) outputs drive both edges and work at higher frequencies over longer cables. An open-collector output relies on a pull-up resistor, and its rising edge slows with cable capacitance. For long cables, differential RS-422 encoder outputs are the robust choice.
Can I get a flow rate from a totaliser count?
Yes, from the difference between two counts divided by the time between them. It is the same gate-time measurement, with the same one-count resolution.