Description: A three-digit contactless digital tachometer utilizing an 8051 microcontroller is presented for measuring the revolutions per second of rotating objects such as wheels, discs, or shafts. The tachometer can measure up to a maximum of 255 revolutions per second with an accuracy of 1 revolution per second. To operate, the sensor must be aligned closely with a reflective strip (such as aluminum foil or white paper) attached to the rotating surface, allowing the meter to display the revolutions per second. The circuit diagram of the digital tachometer includes an optical pickup based on a phototransistor (Q4) and a red LED (D4). When the reflective strip on the rotating object passes in front of the sensor assembly, the reflected light activates the phototransistor, causing it to conduct more and reducing its collector voltage towards zero. Observing the collector waveform of the phototransistor (2N5777) through an oscilloscope reveals this behavior.
The next component is the signal conditioning unit, which employs an LM324 operational amplifier (IC1). Only one op-amp from the quad LM324 is utilized, configured as a comparator with a reference voltage set at 3.5V using resistors R16 and R17. This comparator converts the spiky collector waveform into a clean square pulse train suitable for input to the microcontroller. Each time the collector voltage of the phototransistor drops below 3.5V, the comparator output saturates negatively, and when it rises above 3.5V, the output saturates positively, resulting in a distinct waveform. The negative-going edges of this waveform indicate the passage of the reflective patch across the sensor, signifying one revolution. The microcontroller measures the number of these negative-going edges occurring within one second to calculate the revolutions per second of the rotating object.
For counting purposes, both timers of the 8051 microcontroller (Timer0 and Timer1) are employed. Timer1 is configured as an 8-bit auto-reload counter to register the incoming zero-going pulses, while Timer0 is set up as a 16-bit timer to generate the necessary one-second time span for Timer1 to count. The assembly code provided initializes the data pointer, sets up the output ports, and configures the timers for counting and display purposes. The main loop includes instructions for loading initial values, starting the timers, and checking for Timer0 rollover. The counting process is repeated until the specified number of counts is reached, after which the display subroutine is called to convert the count into a seven-segment display pattern for visual output.
The tachometer circuit's design emphasizes precision and efficiency in measuring rotational speed, utilizing a combination of optical sensing, signal conditioning, and microcontroller programming to achieve accurate results in real-time applications.A three digit contact less digital tachometer using 8051 microcontroller which can be used for measuring the revolutions/second of a rotating wheel, disc, shaft or anything like that is introduced in this project. The tachometer can measure up to a maximum of 255 rev/sec at an accuracy of 1 rev/sec. What you just need to do is to align the sensor close to the reflective strip (aluminium foil, white paper or some thing like that) glued on the rotating surface and the meter shows the rev/sec on the display. The circuit diagram of the digital tachometer is shown below. The first section of the circuit is the optical pickup based on photo transistor Q4 and red LED D4. Every time the reflective stripe on the rotating object passes in front of the sensor assembly, the reflected light falls on the photo transistor which makes it conduct more and as a result its collector voltage drops towards zero.
When viewed through an oscilloscope the collector waveform of the photo transistor Q4 (2N5777) would look like this: Next part is the signal conditioning unit based on the opamp LM324 (IC1). Only one opamp inside the quad LM324 is used here and it is wired as a comparator with reference voltage set at 3.
5V (using resistors R16 and R17). The job of this comparator unit is to convert the spiky collector wave form into a neat square pulse train so that it can be applied to the microcontroller. Every time the collector voltage of the photo transistor goes below 3. 5V, the output of the comparator goes to negative saturation and every time the collector voltage of the photo transistor goes above 3.
5V, the comparator output goes to positive saturation resulting in a waveform like this: From the above two graphs you can see that the negative going edge of the waveform indicates the passage of the reflective patch across the sensor and that means one revolution. If you could some how measure the number of negative going edges occurring in one second, then that`s the rev/sec of the rotating object and that`s what the microcontroller does here.
For the counting purpose both the timers of 8051 (Timer0 and Timer1) are used. Timer 1 is configured as an 8 bit auto reload counter for registering the number of incoming zero going pulses and Timer0 is configured as a 16 bit timer which generate the necessary 1 second time span for the Timer1 to count. ORG 000H MOV DPTR, #LUT // moves the addres of LUT to DPTR MOV P1, #00000000B // Sets P1 as an output port MOV P0, #00000000B // Sets P0 as an output port MAIN: MOV R6, #14D SETB P3.
5 MOV TMOD, #01100001B // Sets Timer1 as Mode2 counter & Timer0 as Mode1 timer MOV TL1, #00000000B //loads initial value to TL1 MOV TH1, #00000000B //loads initial value to TL1 SETB TR1 // starts timer(counter) 1 BACK: MOV TH0, #00000000B //loads initial value to TH0 MOV TL0, #00000000B //loads initial value to TL0 SETB TR0 //starts timer 0 HERE: JNB TF0, HERE // checks for Timer 0 roll over CLR TR0 // stops Timer0 CLR TF0 // clears Timer Flag 0 DJNZ R6, BACK CLR TR1 // stops Timer(counter)1 CLR TF0 // clears Timer Flag 0 CLR TF1 // clears Timer Flag 1 ACALL DLOOP // Calls subroutine DLOOP for displaying the count SJMP MAIN // jumps back to the main loop DLOOP: MOV R5, #100D BACK1: MOV A, TL1 // loads the current count to the accumulator MOV B, #100D DIV AB // isolates the first digit of the count SETB P1. 0 ACALL DISPLAY // converts the 1st digit to 7 seg pattern MOV P0, A // puts the pattern to Port 0 ACALL DELAY // 1mS delay ACALL DELAY MOV A, B MOV B, #10D DIV AB // isolates the secong digit of the count CLR P1.
0 SETB P1. 1 ACALL DISPLAY // converts the 2nd digit to 7 seg pattern MOV P0, A ACALL DELAY ACALL DELAY MOV A, B // moves the last digit of the count to accumulator CLR P1. 1 SETB P1. 2 ACALL DISPLAY // converts the 3rd digit to 7 seg pattern MOV P0, A ACALL DELAY ACALL DELAY CLR P1. 2 DJNZ R5, BACK1 // repeats the subroutine DLOOP 100 times RET DELAY:
A servo motor employs a servo mechanism, which is a closed-loop system that utilizes position feedback to accurately control the angular position of its shaft. Stepper motors, which operate as an open-loop system, can also achieve precise angular control, but...
The unit consists of a sensor, timer, and electric water pump. The sensor is embedded in the soil, and when dry, the electronics operate the water pump for a preset time. The circuit is composed of a level-sensitive Schmitt trigger,...
Throughout this year, significant attention has been dedicated to the development of an embedded web server device, a concept that has long been envisioned. This idea is not entirely original; it builds upon existing developments and references available on various...
Stepper motors consist of a permanent magnet rotating shaft, known as the rotor, and electromagnets on the stationary part that surrounds the motor, referred to as the stator. One complete rotation of a stepper motor is illustrated. At position 1,...
The DC millivoltmeter features a three-and-a-half digit display, offering high accuracy, performance, stability, and user-friendliness. Its measurement range extends from 0 to 1.999 mV, with a measurement accuracy of 1 mV.
The DC millivoltmeter is designed to provide precise voltage measurements...
In machine and equipment design, certain applications necessitate the measurement of both shaft speed and direction of rotation. The circuit of a tachometer, which also indicates the direction of rotation, is illustrated. A flywheel is equipped with two magnets embedded...
The CODE and CONST memory classes are generally stored in ROM, which can be either off-chip or on-chip. The CODE memory class is utilized for the actual program code, while the CONST memory class is designated for constant variables declared...
A six-function, eight-channel light chaser utilizing the 8051 microcontroller. The AT89S51, a member of the 8051 family, is employed to produce six distinct lighting sequences. The design incorporates straightforward software and hardware components.
The circuit design features the AT89S51 microcontroller at...
To enable a robot to detect objects in its surroundings, an ultrasonic sensor is recommended. While infrared (IR) sensors are inexpensive, their operational range can fluctuate due to ambient light changes, resulting in inaccurate range measurements. Ultrasonic sensors operate based...
We use cookies to enhance your experience, analyze traffic, and (if you allow) serve personalized ads.
By clicking Accept All, you agree to our use of cookies.
Learn more