# maximum pulse frequency

17 Jul 2019 19:10 - 17 Jul 2019 19:14 #139714
How many pulses per turn?

This depends very much on the application you have. The details are the maximum rotating speed, the maximum number of turns you want to count, the resolution needed, the with of the index stripes and the slit width of the photointerrupter.

Maximum Pulse Frequency

When you multiply the maximum rotating speed with the number of the stripes on the disc you will get the maximum pulse frequency. E. g. 1500 rpm = 25 turns per second. The disc on the picture has 36 stripes. The pulse frequency is 25 1/s * 36 = 900Hz.

This frequency can easily be handled by your photointerrupter. When you want to reduce power consumption of the photointerrupter look at the last post to get good pulses.
Last edit: 17 Jul 2019 19:14 by Dinuka_Shehan.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

17 Jul 2019 22:13 #139729
Replied by tommylight on topic maximum pulse frequency
Some info there is a bit amiss, but the calculations are OK.
Normal computers usually can do 20000 pulses per second, that is enough for most hobby uses, a Fujitsu Siemens Celcius workstation with 8 Xeons can do 50000 pulses with RTAI kernel, but it does not boot anymore past BIOS.
New computers are also mostly good for 20000, but new laptops are not as they have to much power saving options active and can not be disabled.
Mesa cards like 5i25 or 6i25 or 7i92 or 7i96 or 7i76 and 7i76E can do over 1000000 ( 1 milion ) pulses easily.
The following user(s) said Thank You: Dinuka_Shehan

Please Log in or Create an account to join the conversation.

18 Jul 2019 00:11 - 18 Jul 2019 00:12 #139746 by PCW
Replied by PCW on topic maximum pulse frequency
That's correct as far as it goes but if you want to count a 900 Hz square
wave you need to read (sample) the detector at a minimum of 2 * 900 Hz
or 1800 Hz.

This assumes perfect square waves and perfect sampling.
Practically speaking you may need to sample at closer to 3 times
the pulse frequency. to avoid miscounts.

If you are reading quadrature ( A and B ), the minimum sample rate for
perfect signals is 4 times the per channel pulse frequency and for real
signals perhaps 6 times the per channel pulse frequency.
Last edit: 18 Jul 2019 00:12 by PCW.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

18 Jul 2019 11:19 - 18 Jul 2019 11:20 #139781

This assumes perfect square waves and perfect sampling.
Practically speaking you may need to sample at closer to 3 times
the pulse frequency. to avoid miscounts.

If you are reading quadrature ( A and B ), the minimum sample rate for
perfect signals is 4 times the per channel pulse frequency and for real
signals perhaps 6 times the per channel pulse frequency.

Please explain this I'm using a 20kHz breakout board
if my max rpm is 1500
60 slots encoder disc

sample rate meaning?
Can I use this bob to quadrature encoder
for real signals perhaps 6 times the per channel pulse frequency what is this meaning of this?
Last edit: 18 Jul 2019 11:20 by Dinuka_Shehan.

Please Log in or Create an account to join the conversation.

18 Jul 2019 13:47 - 18 Jul 2019 13:48 #139803 by PCW
Replied by PCW on topic maximum pulse frequency
For LinuxCNC parallel port systems, the sample frequency is the base thread rate
(1/ base thread period)

Note that the maximum base thread rate is determined by your CPU and how it is set-up.

The highest practical base thread rate can be determined by running the latency test
on your PC, have you done this?

The breakout boards 20 KHz limit may limit your maximum encoder counting
rate but the maximum counting rate is more likely to be limited by your base thread rate.

With 60 slots and 1500 RPM you get a maximum frequency of 1500 Hz
so using my guide (3x for straight counting, 6X for quadrature) you would need
a base thread rate of 4500 Hz minimum to read the 60 slot encoder at 1500 RPM
(A only) or 9000 Hz to read the same encoder with quadrature ( A,B )

Note that these assume the slots are 50% open so you get close to square waves
Last edit: 18 Jul 2019 13:48 by PCW.

Please Log in or Create an account to join the conversation.

18 Jul 2019 17:39 #139828
I have done latency test with laptop and it is about 84000.

Please Log in or Create an account to join the conversation.

20 Jul 2019 17:26 - 20 Jul 2019 18:48 #139984

Note that these assume the slots are 50% open so you get close to square

Last edit: 20 Jul 2019 18:48 by Dinuka_Shehan.

Please Log in or Create an account to join the conversation.

Time to create page: 0.087 seconds