A Digital Tachometer is a tool designed to observe the rotational velocity of a rotating object, such as an electric motor or the crankshaft of a vehicle’s engine. It quantifies the speed of an electric motor in terms of the number of rotations it completes within a minute, expressed as RPM (Revolutions per Minute). In this project, we have developed a simple yet accurate non-contact or contactless digital tachometer using an 8051 microcontroller. This tachometer can precisely measure speed with a resolution of 1 revolution per second.
- 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?
- Limitations of the Circuit
Principle Behind the Circuit
The Contactless Digital Tachometer operates on a basic embedded system framework consisting of a sensor, a controller, and an actuator. The sensor is comprised of an infrared (IR) transmitter-receiver pair, the controller is an 8051 Microcontroller running pre-compiled code, and the actuator is a display unit that presents the motor’s speed.
Utilizing the principles of light transmission and reflection, the sensor detects the motor’s speed without making physical contact and generates a signal as a result. This signal is then converted into an electrical signal and transmitted to the microcontroller, which is programmed to calculate the motor’s speed in rotations per minute (RPM). The resultant speed value is then showcased on the 7-segment display.
Construction and Output Video
Contactless Digital Tachometer Circuit
A Tachometer is primarily employed to gauge the angular speed of a motor. It can take the form of a mechanical device featuring gears and a spindle arrangement or an electrical device that transforms angular speed into an electrical signal. In the realm of electrical tachometers, they can further be categorized as either AC tachometers or DC tachometers.
Traditional tachometers, often referred to as contact tachometers, make physical contact with the measured object. However, they can yield inaccurate readings due to variations in the contact parameters. In contrast, a Contactless digital tachometer is a preferable choice as it doesn’t necessitate direct contact with the object whose speed is being measured.
The working principle of a Contactless digital tachometer is rooted in retro-reflective scanning. In this process, a light source component, such as an LED, emits a light signal towards a retro-reflective target unit, which in turn reflects the light. This reflected light is subsequently captured by a light detector.
Circuit Diagram of Contactless Digital Tachometer
- 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 is composed of two key components: an IR transmitter and an IR receiver. In this setup, an IR LED serves as the transmitter, while a photodiode functions as the receiver. Specifically, this project employs a reflective-type IR sensor configuration, where both the IR transmitter and receiver are positioned adjacent to each other.
The IR transmitter circuit is straightforward. The anode of the IR transmitter is linked to a 5V power source, while the cathode is connected to ground through a 150Ω current-limiting resistor. Consequently, the IR transmitter commences emitting infrared rays.
As for the IR receiver employed in the project, it’s based on a photodiode, which must be connected in reverse bias. A 10KΩ current-limiting resistor bridges the negative terminal (cathode) to the 5V supply, while the positive terminal (anode) is connected to ground.
Finally, the output from the IR receiver is fed into a comparator. This comparator conducts a comparison between the IR receiver’s output and a reference value, which is established by a 10KΩ potentiometer. If the input from the IR receiver exceeds the reference value, the comparator yields a HIGH output; otherwise, it produces a LOW output.
For a visual representation of the circuit, please refer to the circuit diagram depicting the Reflective-type IR Sensor used in this project, as displayed in the accompanying image.
Controller Circuit Design
The controller circuit is comprised of the microcontroller and its various interfaces. In this particular project, the AT89C52 microcontroller has been selected.
To ensure proper operation of the microcontroller, a reset circuit is incorporated, consisting of a push button, a resistor, and a capacitor. These components are carefully chosen to maintain the voltage at the reset pin above 1.2V and to guarantee a timing constant of at least 100ms. For this project, a 10K resistor and a 10μF capacitor have been employed.
Furthermore, ceramic capacitors with values of 33pF have been chosen to suit the microcontroller’s oscillation frequency of 11.0592MHz. In the absence of external memory usage, the EA’ pin necessitates a pull-up resistor with a value of 10K to be set high.
The interface between the Microcontroller and the IR Sensor is established by linking the output pin of the IR sensor to PORT3 pin P3.4. Additionally, the circuit interfaces with a 4-Digit 7-Segment Display, the pin-out diagram of which is depicted in the provided image.
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.
After the circuit design has been sketched out on paper, the subsequent step involves the development and compilation of the code. In this context, we employed the Keil µVision software to craft the program using the C programming language.
To begin, we undertook general tasks such as initializing a new project and specifying the target device or the required microcontroller. After crafting the code, we saved it with the .c extension and added it to the source file group within the designated target folder. Subsequently, we compiled the code by pressing the F7 key.
Following the compilation process, a hex file is generated. Moving on to the next phase, the circuit is replicated using Proteus software. For the final step, we utilized an 8051 Microcontroller Programmer along with its accompanying software to load the code into the microcontroller.
How to Operate the Contactless Digital Tachometer Circuit?
Upon powering the IR sensor, the IR transmitter commences its emission of infrared rays. Positioned in front of the IR sensor is a motor, featuring a shaft marked with a white dot.
As the motor’s shaft rotates and aligns the white dot with the sensor. The dot reflects the IR rays, directing them onto the IR receiver, which in this setup functions as a photodiode. The photodiode begins conducting when exposed to the reflected IR rays.
At this juncture, the output from the IR sensor is transmitted to the comparator. The comparator generates a HIGH output when the IR rays are reflected and a LOW output in the absence of reflections. Consequently, the comparator’s output takes the form of an ON-OFF pulse.
This pulse is subsequently fed into the microcontroller as a timer input. The microcontroller’s programming is designed to compute the number of times the motor completes a rotation within one second.
To determine the motor’s speed, the final count value is multiplied by 60, resulting in the speed being expressed in revolutions per minute (RPM). This calculated value is then presented on the 4-digit 7-segment display.
- 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.