A tachometer, also called tach, revolution-counter, rev-counter or RPM gauge, is a device that measures and displays
the rotation speed of engine, motor or other machine, usually in revolutions per minute (RPM).
This is very simple digital tachometer suitable for most vehicles - motorcycles and cars, or even other machines.
Measured speed range 0-9900 RPM with a resolution of 100 RPM. It displays using a two-digit LED display.
The value is in the thousands, ranging from 0.0 to 9.9.
This digital speedometer is controlled by a microcontroller Atmel AVR ATtiny24A (ATtiny24, ATtiny24V).
Program to download and configuration bits setting you can find below.
Cathodes of a two-digit LED display (a-g) are connected to the port PA (except pin PA4).
The anodes are connected to bits 0 and 1 of port B. The cathode of decimal point (h) is connected to PB0, where logic 0
occurs if and only if the multiplex scans left digit and thus the point after the left digit is lit.
Using super bright display allows to omit the usual current
amplifying transistors. The display is controlled multiplex way. This is the type with common anode.
The microcontroller is clocked by the internal RC oscillator operating at 1MHz.
Frequency of multiplexing is about 100 Hz, ie about 1/10 000 of clock frequency and thus you can check the proper oscillator operation
connection the frequency counter to PB0 or PB1.
Capacitor C1 should be placed as close as possible to the AVR microcontroller.
R1 to R8 determine the display current and thus the brightness. They are chosen so that the current does
not exceed the maximum AVR pin current (40 mA). Digital tachometer is powered from approx 5V power supply.
Current at 5V is about 15-30 mA, depending on the number of lit segments (most consumption is the LED display).
5V can be obtained from the on-board voltage using simple power supply with 7805.
Put an appropriate fuse on the input of this supply!
PA4 pin serves as the input of pulses (it is used to clock timer/counter1).
Put signal from the sensor to the input using appropriate shaping circuit (depending on the type of engine and method of sensing).
Wire jumper DP1 on pin PB2 selects engine speed factor.
If the factor is 1 (1 revolution = 1 pulse), do not connect jumper DP1.
If the factor is 2 (1 revolution = 2 pulses), connect the DP1 jumper.
The AVR program for download:
source code in Assembly (ASM)
compiled HEX file (200 Bytes)