A tachometer is a device which measures the speed of an electric motor. Speed of an electric motor is determined by the number of revolutions made by the motor in one minute. In other words speed is measured in rpm. Here we design a simple non contact tachometer using microcontroller which can measure speed with an accuracy of 1 rev/sec.
Principle Behind the Circuit:
The basic principle involves a simple embedded system with a sensor, a controller and an actuator. The sensor used here is Infrared (IR) transmitter – receiver pair, the controller used is the microcontroller loaded with a compiled code and the actuator is a display device, displaying the speed of the motor.
The sensor senses the speed of the motor without actually being in contact with it by the principle of light transmission and reflection and generates a signal. This signal is converted into an electric signal and fed to the microcontroller, which is programmed to calculate the speed in terms of number of motor revolutions in one minute. This speed is displayed on the 7-segment display.
Non Contact Tachometer Circuit:
A tachometer is basically used to measure angular speed of a motor. It can be mechanical device with a warm gear and spindle arrangement or a electrical device which converts the angular speed into electrical signal. The electrical tachometer in turn can be an AC tachometer or a DC tachometer.
While a conventional tachometer is a contact tachometer which can produce erroneous results due to change in contact parameters, a digital tachometer is preferred which doesn’t requires any contact with the device whose speed is to be measured.
It basically works on the principle of retro reflective scanning, wherein a light source device like LED transmits light signal to the retro reflective target device which reflects the light, which is in turn received by the light detector.
Circuit Diagram of Non Contact Digital Tachometer:
How to Design Digital Tachometer:
Sensor Circuit Design: The sensor circuit consists of an IR transmitter and an IR receiver. An IR LED is used as the transmitter and a photo diode is used as the receiver. A reflective type of IR sensor is used in this project. In this type, the IR transmitter and receiver are placed side -by – side.
The IR transmitter circuit is very simple. The anode of the IR transmitter is connected to 5V supply through a current limiting resistor of 150Ω and the cathode is connected to ground. Thus, the IR transmitter starts emitting infrared rays.
IR receiver used in the project is a photo diode and it must be connected in reverse bias. The negative terminal or cathode is connected to 5V supply through a current limiting resistor of 10K Ω and the positive terminal or anode is connected to ground.
And finally, the output of the IR receiver is given to the comparator. The comparator compares the input from the IR receiver with a reference value. If the input from the IR receiver is greater than the reference value, the output of the comparator will be HIGH or else, the output will be LOW.
Controller Circuit Design: The controller circuit consists of the microcontroller and its interfaces. Here we chose AT89C52 microcontroller. Microcontroller reset circuit consists of a resistor and a capacitor with values such that the voltage at the reset pin doesn’t falls below 1.2V and the timing constant is never less than 100ms.
Here we select a 10K resistor and 10uF capacitor. Since the oscillating frequency of the microcontroller is 11.0592MHz, we selected the values of ceramic capacitors to be 22pF.
The EA’ pin must be pulled high via a 10K resistor as we are not using any external memory.
The interfacing is accomplished by connecting the output pin of the IR sensor to port pin P3.4 and the 4-digit 7-segment display to ports P1 and P2 such that the data pins of the display are connected to port P2 and the digit selection pins are connected to P1.
Microcontroller Code: Once the circuit is designed and drawn on a piece of paper, the next step is to write and compile the code. Here we select the Kiel uVision software to write the program in C language.
Prior to writing the code, general steps needs to be followed like creating a new project and selecting the target device or the required microcontroller. Once the code is written, we saved it with .c extension and then added it to the source file group under the target folder. The code is then compiled by pressing F7 key.
Once the code is compiled, a hex file is created. In the next step, we use Proteus software to draw the circuit. The code is dumped into the microcontroller by right clicking on the IC and then adding the hex file. The microcontroller oscillating frequency is selected here to be 12MHz.
Note: Also read the interesting post – Password Based Door Lock System using Microcontroller
How to Operate the Circuit?
When the IR sensor is powered, the IR transmitter emitting IR rays. A motor is placed in front of the IR sensor, with its shafted marked with a white dot.
As the motor shaft rotates such that the white spots comes in contact with the sensor, the IR rays are reflected by the dot and falls on the IR receiver. The photo diode, which is used as the IR receiver, starts conducting whenever the IR rays are reflected.
At this point, the output of the IR sensor is given to the comparator and the output of the comparator is HIGH when the IR rays are reflected and the output of the comparator is LOW when there are no reflections. Hence, the output of the comparator is in the form of a ON-OFF pulse.
This pulse is given to the microcontroller as a timer input and the microcontroller is programmed to calculate the number of times the motor rotates in a second.
The speed of the motor is calculated by multiplying the value of final count by 60 to get the speed in revolutions per minute. This value is then displayed on the 4-digit 7-segment display.
Related Post – Digital Voltmeter using ICL7107
- This circuit can be used to calculate speed of rotating wheels, discs and motor shafts.
- This circuit can be used at places where direct contact with motor shafts or wheels is not possible to be made, as in case of vehicles and also in industrial machines.
- This circuit can be used at homes to check speed of small battery operated fans and other motor based devices.
Limitations of the Circuit:
- The ICs used in this circuit are CMOS devices and are highly static, making it impossible to touch them with bare hands.
- It has limited life time due to use of battery for powering the circuit.
- Speed calculation may be affected by the varying duty cycle of the timer.