Saturday, September 30, 2023

Microcontroller-Based Tachometer

Prof. K. Padmanabhan

- Advertisement -

A tachometer is nothing but a simple electronic digital transducer. Normally, it is used for measuring the speed of a rotating shaft. The number of revolutions per minute (rpm) is valuable information for understanding any rotational system. For example, there is an optimum speed for drilling a particular-size hole in a particular metal piece; there is an ideal sanding disk speed that depends on the material being finished. You may also want to measure the speed of fans you use. This easy-to-make microcontroller based tachometer measures the rpm of most shop-floor tools and many household machines without any mechanical or electrical interface.

Working of a microcontroller based tachometer

Just point the light-sensitive probe tip atop the spinning shaft towards the spinning blade, disk or chuck and read the rpm. The only requirement is that you first place a contrasting colour mask. A strip of white adhesive tape is ideal on the spinning object. Position it such that the intensity of light reflected from the object’s surface changes as it rotates.

Fig. 1: Circuit of microcontroller based tachometer
Fig. 1: Circuit of microcontroller based tachometer

Each time the tape spins past the probe, the momentary increase in reflected light is detected by the phototransistor. The signal processor and microcontroller circuit counts the increase in the number of such light reflections sensed by it and thereby evaluates the rpm, which is displayed on the 4-digit, 7-segment display.

- Advertisement -

The phototransistor is kept inside a plastic tube, which has a convex lens fitted at one end. A convex lens of about 1cm diameter and 8-10cm focal length is a common item used by watch repairers and in cine film viewer toys. It can be obtained from them to set up the experiment. The phototransistor is fixed on a piece of cardboard such that it faces the lens at a distance of about 8 cm. The leads from the phototransistor are taken out and connected in the circuit shown in Fig. 1. Fig. 2 shows the suitable arrangement of phototransistor.

part list

The detected signal is amplified by transistor 2N2222 (T5) and further amplified by operational amplifier CA3140 (IC3). The reference voltage point for the operational amplifier is obtained by resistor divider network comprising R2 and R3. The output from pin 6 of IC3 is fed to pin 12 of microcontroller AT89C2051. Note that pins 12 and 13 of microcontroller AT89C2051 are the inputs (+ and -) of its internal analogue comparator. Pin 13 is adjusted to nearly half the supply voltage using a potential divider comprising resistor R7 and preset VR1 across the supply.

Fig. 2: Suitable arrangement of phototransistor
Fig. 2: Suitable arrangement of phototransistor
Fig. 3: Pin configuration of transistor BC557
Fig. 3: Pin configuration of transistor BC557

The pulses picked up by the phototransistor are sensed by the internal comparator of AT89C2051 and, through software, each pulse representing one rotation of the object is detected. By counting the number of such pulses, on an average per minute basis, the RPM is evaluated. It is displayed by a software routine to light up the LED segments of the 4-digit, 7-segment display.


  1. Sir,
    I am third year electronics engineering poly student. I am doing this digital tachometer as my 3rd year project. I completed everything. I even loaded hex file into the micro controller. But its not working. Please help. Is there any modification in program or hardware? Plz help.


Electronics News

Truly Innovative Tech

MOst Popular Videos

Electronics Components