Contactless Digital Tachometer using 8051 Microcontroller
A Digital Tachometer is a device that monitors the rotational speed of a spinning item such as an electric motor or a vehicle engine’s crank shaft. The number of revolutions made by an electric motor in one minute determines its speed. In other terms, RPM is the unit of measurement for speed (Revolutions per Minute). We created a basic non-contact or contactless digital tachometer using an 8051 microcontroller in this project, which can monitor speed with a precision of 1 rev/sec.
- Principle Behind the Circuit
- Construction and Output Video
- Contactless Digital Tachometer Circuit
- Circuit Diagram of Contactless Digital Tachometer
- Components Required
- How to Design Contactless Digital Tachometer?
- Sensor Circuit Design
- Controller Circuit Design
- Microcontroller Code
- How to Operate the Contactless Digital Tachometer Circuit?
- Applications
- Limitations of the Circuit
Principle Behind the Circuit
The Contactless Digital Tachometer works on the basis of a simple embedded system comprising a sensor, controller, and actuator. The sensor is an infrared (IR) transmitter-receiver pair, the controller is an 8051 Microcontroller loaded with compiled code, and the actuator is a display device that displays the motor’s speed.
By using the concept of light transmission and reflection, the sensor detects the motor’s speed without actually coming into touch with it and provides a signal. This signal is translated to an electric signal and sent to the microcontroller, which is programmed to determine the speed in motor rotations per minute. On the 7-segment display, this speed is displayed.
Construction and Output Video
Contactless Digital 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 an 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 Contactless 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 Contactless Digital Tachometer
Components Required
- 8051 Microcontroller
- 8051 Development Board
- 8051 Microcontroller Programmer
- IR Sensor Module (Reflective Type)
- 4 – Digit 7 – Segment Display
- 4 x 2N2222 NPN Transistors
- 4 x 470Ω Resistors (1/4 Watt)
- 8 x 100Ω Resistors (1/4 Watt)
- If Development Board is not used, then you need
- 11.0592 MHz Quartz Crystal
- 2 x 33pF Ceramic Capacitors
- 2 x 10 KΩ Resistor (1/4 Watt)
- 10 µF Capacitor (Polarized)
- Push Button
- 1 KΩ x 8 Resistor Pack
How to Design Contactless 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 and the cathode is connected to ground through a current limiting resistor of 150Ω. Thus, the IR transmitter starts emitting infrared rays.
The project’s IR receiver is a photo diode, which must be wired in reverse bias. A current limiting resistor of 10K connects the negative terminal, or cathode, to the 5V supply and the positive terminal, or anode, to ground.
Finally, the comparator receives the output of the IR receiver. The comparator compares the IR receiver’s output with a reference value (provided by a 10K potentiometer). If the IR receiver’s input is greater than the reference value, the comparator’s output will be HIGH; otherwise, it will be LOW.
The following image shows the circuit diagram of the Reflective type IR Sensor used in this project.
Controller Circuit Design
The microcontroller and its interfaces make up the controller circuit. The AT89C52 microcontroller was chosen for this project. The reset circuit for a microcontroller is made up of a push button, a resistor, and a capacitor with values so that the voltage at the reset pin never falls below 1.2V and the timing constant never falls below 100ms. We chose a 10 K resistor and a 10F capacitor for this project.
The ceramic capacitor values were chosen to be 33pF because the microcontroller’s oscillation frequency is 11.0592MHz. Because we aren’t using any external memory, the EA’ pin must be pulled high using a 10K resistor.
The interfacing between the Microcontroller and the IR Sensor is accomplished by connecting the output pin of the IR sensor to PORT3 pin P3.4. Next is the 4 – Digit 7 – Segment Display. The following image shows the pin out diagram of this display.
The A, B, C, D, E, F, G, and DP segment inputs of the 4 – Digit 7 – Segment display are coupled to PORT0 through separate 100 Resistors. The Emitter terminals of 4 2N2222 NPN Transistors are linked to the Digit Selection Pins of the 4 – Digit 7 – Segment display (Dig1, Dig2, Dig3 and Dig4). Through 470 Resistors, the base terminals of these Transistors are connected to PORT2 pins P2.0, P2.1, P2.2, and P2.3.
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 used the Keil µVision software to write the program in C language.
General tasks such as creating a new project and selecting the target device or needed microcontroller must be followed before writing the code. We saved the code with a.c extension and added it to the source file group beneath the target folder once it was completed. By pressing the F7 key, the code is then compiled.
A hex file is created once the code has been compiled. The circuit is then drawn using Proteus software in the next stage. An 8051 Microcontroller Programmer and the software that comes with it are used to dump the code into the microcontroller.
How to Operate the Contactless Digital Tachometer Circuit?
When the IR sensor is powered, the IR transmitter starts 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 an 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.
Applications
- The Contactless Digital Tachometer 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.