Find all your DIY electronics in the MakerShed. 3D Printing, Kits, Arduino, Raspberry Pi, Books & more!

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]

John Baichtal

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


Related

Comments

  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:

    http://en.Wikipedia.org/wiki/revolutions_per_minute

    If your going to talk about a tach learn your terminology

  3. 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?