next up previous contents
Next: Real-world problems with the Up: Tachometers / Frequency Detection Previous: Some simple algorithms   Contents

Tooth-to-tooth counting

In this method, instead of recording the number of zero-crossings over a time period, we instead record the times at which each zero crossing happens. Then, subtract subsequent time periods to find a velocity. For example, if one tooth crosses at t=0 and then next at t=0.001, then we have 1000 pulses/second, or 16.66 RPM. See 6 for the perfomance of this algorithm. Compared to the previous one it looks almost perfect. Lag time is a mere 0.050s and the precision is approx 0.1 RPM.

The speed precision in this case is driven by the time resolution of the signal processor. At 20.5 RPM with 60 teeth, a zero-crossing happens every 0.04875s. In this example, I assumed an A/D with a 4kHz sample rate and assigned the time of the zero crossing as the time of the sample nearest where the signal crossed. So, the time resolution is .00025s. The algorithm cannot tell the difference between an interval of 0.04875s and an interval of 0.04900s. The difference between these two intervals works out to be approx 0.1 RPM. As shaft speed increases, the interval decreases, so an error of .00025s becomes a larger percentage of the interval. At 200 RPM, the precision of this example would be only 10 RPM; at 2000 RPM, the precision is a horrible 700 RPM. This will be illustrated in an example in the next section.

To get acceptable precision at high speeds, increasing the sampling rate becomes prohibitive. There are two solutions which could be employed. The first is to use interpolation to determine the zero crossing time more accurately instead of rounding to the nearest sample. The second is to use a hardware timer device instead of an A/D converter. For example, the National Instruments NI-6602 card can return the time of zero-crossings based on a very accurate time base (~10 MHz).

Since the algorithm returns a speed point at every zero crossing, the update rate increases with shaft speed and the lag time will decrease with shaft speed.

Figure 6: Tooth-to-tooth timing algorithm


next up previous contents
Next: Real-world problems with the Up: Tachometers / Frequency Detection Previous: Some simple algorithms   Contents " . $row['Name'] . " Posted on " . $row['DateTime']; echo "
"; echo $row['Comment']; echo "

"; } echo "
"; ?> Leave a comment on this page:

Name: (optional)
To prove you are not a robot, what is 2+3?

Creative Commons License
This work by Daniel Kiracofe (daniel dot kiracofe at gmail dot com) is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License./' $I