Basic Arduino Tachometer

Basic Arduino Tachometer
YouTube player

Chris at PyroElectro built this simple Arduin-controlled IR pair that can be used to measure the RPMs of a CPU fan.

A tachometer is a useful tool for counting the RPM (rotations per minute) of a wheel or basically anything that spins. The easiest way to build a tachometer is using a transmitter and receiver. When the link between them is broken, you know that something is spinning and can execute some code that calculates the current RPM of whatever is spinning to break the transmitter/receiver link.

In this article we will explore how to use an IR transmitter and receiver break-beam pair similar to the PIC Tachometer project I built a few months ago, but because of popular demand, the Arduino system will be used for all the processing and break-beam interruption counting. The end result will be a 16×2 LCD displaying the RPM of some computer fans.

[via Embedded Projects]

8 thoughts on “Basic Arduino Tachometer

  1. T Hudson says:

    Three ideas to improve the accuracy and reduce the overhead:

    1. Use the ICP instead of reading the timer in the interrupt. This way the hardware will capture the clock at the moment that the interrupt fires, so even if your code is in a sei()/cli() critical section the timer will be preserved.
    2. A low-pass filter can eliminate the need to track multiple samples. One of the simplest is to just compute avg = (avg * weight + sample) / (weight+1). If weight+1 == 4, 8, 16, etc the division is very fast.
    3. This operation can be done in the interrupt handler, so that the global avg is always updated, not just when the mainloop happens to be consulting it for display. As it stands the code can miss fan passes while it is updating the LCD.

    Also, the time value should also be zeroed after it is read in the mainloop, otherwise a stalled fan will continue to report the last RPM forever.

  2. Sean says:

    If your going to talk about a tach learn your terminology

  3. Rich Quackenbush says:

    If you’re going to call out an author about word usage, please try use the correct words (your is possessive, not the contraction of you are).

    BTW – who cares? What is the difference between rotations and revolutions?

Comments are closed.

Discuss this article with the rest of the community on our Discord server!

My interests include writing, electronics, RPGs, scifi, hackers & hackerspaces, 3D printing, building sets & toys. @johnbaichtal

View more articles by John Baichtal


Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).