Tachometer

Here's a super simple ciruit for a Tachometer.

Prototype

This shows the prototype. The processor is an ATTiny45. The current code size is 1190 bytes, so it will fit comfortably on an ATTiny25 as well. The LED display is an HC4LED that I purchased from SparkFun (although they don't carry it any more). The HC4LED has a SPI like interface.

The pulse generator is generating a 10 Hz signal (My multi-meter measured it as 9.9 Hz). A 10 Hz signal would correspond to 600 RPM. You can see that the Tach is displaying 593 RPM (which agrees with the 9.9 Hz signal).

So far, I've tested the circuit with 1 Hz through 1,000 Hz signals, which corresponds to 60 RPM through 60,000 RPM. The processor is currently only running at 1 MHz, and is capable of running at 8 MHz using the internal oscillator. So it could deal with 480,000 RPM as long as there is only 1 pulse/rev. Bigger...

Closeup

This is a closeup of the wiring. The squarish block of headers just to the right of the ATtiny45 is the ISP connector. The gray vertical wire near the bottom is the input line. The Parallax Professional Development Board includes a pulse generator which I used for verifying the functionality. Bigger...

Schematic

The schematic for the tachometer. The LEDs and ISP connector are optional. The BEAT LED flashes once per second and indicates that the tach is running. The TACH LED flashes when the software detects a pulse on the input line. Both of these LEDs are primarily for debugging. Bigger...

Optical Sensor

Any sensor which generates a clean pulse can be used. This shows a typical optical sensor based on the QRB1134. Bigger...

The source code for the tachometer is available from my SVN server. A precompiled binary is also available for the ATTiny-45 and the ATTiny-25. The current software only deals with one pulse/rev signals, but it's pretty trivial to modify the code to deal with multiple pulses/rev.

For progrmming in C, I use WinAVR which is a free GCC based C compiler.

For downloading through the ISP, I use an AVRISP mkII.

For testing and debugging, I developed the code on Pololu's Baby Orangutan Robot Controller, which uses an ATMega168. More importantly, it has a serial port which makes it easier to figure out what the program is doing.

I also have some ATTiny-25's with preloaded software for sale in my store.

Here are some links to other Tachometer designs. If you know of any others please let me know, and I'll add them here. Note that I haven't personally used any of these.

Here are some files I posted to the Sherline yahoo group site a few years ago. This is based on this article from Sherline.

Home - Electronics

Copyright 2010 by Dave Hylands