next up previous contents
Next: Tooth-to-tooth counting Up: Tachometers / Frequency Detection Previous: Introduction to tachometers   Contents

Some simple algorithms

The most basic algorithm is to simply count the number of cycles (zero crossings) of the sine wave over some time period and then divide to get cycles per second. So if we count for 1 second, and see 600 pulses, then we have 10 revolutions per second, or 600 RPM (note the immediate attraction of the 60 tooth wheel- 600 RPM gives 600 Hz, no conversion is necessary so this is a popular number). See Figure 5 for the performance of this algorithm on the example. The true speed is blue and this algorithm is red. Note the red dots show the update rate is once per second. The speed bounces back and forth from 10 to 11- the precision is 1 RPM so increments smaller than that cannot be displayed. On the transient, the lag time is 2 seconds. Update rate and lag time could be decreased by counting over, say, 0.5s, but then the precision is only 2 RPM.

The precision could be improved by increasing the number of teeth on the wheel. This will be true of all the algorithms and so will not be mentioned again.

This approach has relatively low computational cost, but is adequate only for slowly varying speeds or where the transient behavior is not of interest.

Figure 5: Comparison of simple tachometer algorithms

The most simple extension is to add overlap. For example, count how many pulses are seen in a block of 0.1 second. Then, report the average over the past 10 blocks. We are still averaging over 1 second, but now the update rate is 10 times/s. See the green line in 5. The precision is still 1 RPM, but the lag time is now only 1.7 second.


next up previous contents
Next: Tooth-to-tooth counting Up: Tachometers / Frequency Detection Previous: Introduction to tachometers   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