3. Electronic Tachometer Circuit Board

(article continued from previous page)

Tachometer circuit board featuring an Atmel ATTiny861 microcontroller.

Tachometer circuit board featuring an Atmel ATTiny861 microcontroller.

The entire tachometer circuit is contained on a single 1.8-inch diameter PCB, with a small display board connected perpendicularly. The main printed-circuit board was cut into a circle using a rotary table on the milling machine.

The small size of the board pressed me for space. But, I decided against using surface-mount electronic components because I thought I might offer this board to other hobbyists as a kit. So, through-hole electronic components are used.

The microcontroller is an Atmel ATTiny861 available from DigiKey. It has 8 KB of program space and 512 bytes of memory. The tachometer program uses 7 KB of program space but less than 100 bytes of memory. I wrote the program in C using the ImageCraft ICCAVR compiler. Program space would have been smaller if I owned the professional version of the compiler with the optimizer.

The microcontroller is running from its 8 MHz internal clock. This isn’t as accurate as using an external crystal. I know people are going to think I’m crazy to not use an accurate clock on a timing device! But, I ran out of room on the board and I ran out of microcontroller pins.

In the end, I was pleasantly surprised to find the internal clock was accurate within plus/minus 1.25%. I suppose this is because it is factory tuned, and the voltage and temperature don’t vary much during usage.

The board also features:

Side view of milling-machine tachometer showing washers to hold the board flat and right-angle headers to connect the numeric LED display board.

Side view of the milling-machine digital tachometer showing washers to hold the board flat and right-angle headers to connect the numeric LED display board.

Because this board uses through-hole components, the ends of the soldered leads stick out the bottom of the printed circuit board. Two flat nylon washers raise the board up so that the leads don’t make contact with the top surface. Otherwise, when tightened, the uneven leads would cause the board and LED display to sit askew (technically termed "it’s all caddywampus”).

The numeric LEDs are soldered to a separate board which connects to the main board with right-angle headers. Here’s another good view of it...

Lite-On blue numeric LEDs soldered to a daughterboard that connects to the motherboard using a strip of right-angle headers.

Lite-On blue numeric LEDs soldered to a daughterboard that connects to the motherboard using a strip of right-angle headers.

Before we get to the movie and the labeled-vs-actual RPMs, let’s see how the electronic tachometer project enclosure was made...