15
Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics

Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics

Embed Size (px)

Citation preview

Page 1: Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics

Digital Tachometer

ENGR 4803 Electromechanical Systems &

Mechatronics

Page 2: Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics

Digital Tachometer

Page 3: Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics

Basic stamp : Measurement of Encoder Pulses

• Use the COUNT function to determine the speed of the motor. The syntax of COUNT is:

COUNT pin, period, variable Count the number of cycles (0-1-0 or 1-0-1) on the specified pin during period number of milliseconds and store that number in variable.

PBASIC Program‘Tachometer Programcounts VAR word ‘counts is a 16 bit variableRPM VAR word ‘RPM is a 16 bit variablecounts = 0 ‘initialize countsloop: count 0, 1000, counts RPM = counts * 60 debug dec ? RPM, 13 goto loop

Page 4: Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics

Earlier we said that a pn junction is sensitive to light. Special diodes, called photodiodes, are designed to detect photons and can be used in circuits to sense light as shown in Figure 3.14 . Note that it is the reverse current that flows through the diode when sensing light. It takes a considerable number of photons to provide detectable voltages with these devices. The phototransistor ( see Section 3.4.6) can be a more sensitive device, although it is slower to respond. The photodiode is based on quantum effects. If photons excite carriers in a reverse- biased pn junction, a very small current proportional to the light intensity flows. The sensitivity depends on the wavelength of the light.

Page 5: Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics

LED SwitchOur objective is to turn a dashboard LED on or off with a digital device having an output voltage of either 0 V or 5 V and a maximum output current of 5 mA. The LED requires 20– 40 mA to provide a bright display and has a 2 V voltage drop when forward biased. We use a transistor switch circuit employing a small- signal transistor ( e. g., 2N3904 npn) to provide sufficient current to the LED. The required circuit follows.

Page 6: Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics

A special class of transistor is the phototransistor, whose junction between the base and emitter acts as a photodiode ( see Section 3.3.3). LEDs and phototransistors are often found in pairs, where the LED is used to create the light, and this light in turn biases the phototransistor. The pair can be used to detect the presence of an object that may partially or completely interrupt the light beam between the LED and transistor ( see Lab Exercise 5). An optoisolator is composed of an LED and a phototransistor separated by a small gap as illustrated in Figure 3.27 . The light emitted by the LED causes current to flow in the phototransistor circuit. This output circuit can have a different ground reference, and the supply voltage Vs can be chosen to establish a desired output volt-age range. With no common ground, the optoisolator creates a state of electrical isolation between the input and output circuits by transmitting the signal optically rather than through an electrical connection. A benefit of this isolation is that the output is protected from any excessive input voltages that could damage components in the output circuit. Also, because the supplies and grounds are separate, any fluctuations or disturbances that might occur in the output circuit have no effect on the control signals on the input side.

Page 7: Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics

Angular Position of a Robotic Scanner

Page 8: Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics

A circuit to count and display the pulses over a given interval of time T.

The following figure illustrates all the required components.

Page 9: Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics

555 Timer

Page 10: Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics

1/3Vcc

(Charging)

LOW

LOW LOW

OFF

1/3Vcc

1/3Vcc

HIGH

555 Timer

Page 11: Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics

2/3Vcc

HIGH

LOW HIGH

ON

2/3Vcc

2/3Vcc

LOW

555 Timer

Page 12: Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics

William KleitzDigital Electronics: A Practical Approach, 7e

Copyright ©2005 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

LOW HIGH

ONDischarge

LOW

LOW

555 Timer

Page 13: Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics

1/3Vcc

(Discharging)

LOW

HIGH LOW

OFF

1/3Vcc

1/3Vcc

HIGH

555 Timer

Page 14: Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics

The 7490 decade counter counts the pulses and is reset by a negative edge on signal R after the time period T.

The period T is set by a resistor- capacitor combination using a 555 oscillator circuit. If the count can exceed nine during the period T, additional 7490s must be cascaded to provide the full count.

Just prior to counter reset, the output count is stored by 7475 data latches that are enabled by a brief pulse on signal L. The latches are necessary to hold the previous count for display while the counter begins a new count cycle.

Page 15: Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics

One of the two 74123 one- shots is positive edge- triggered by the clock signal CK to generate a latch pulse L of length t. Note that the latch and reset pulse widths must be small ( t T ) to maintain count accuracy ( see Class Discussion Item 6.15 ). The trailing edge of the latch pulse triggers the second one- shot, which is negative edge- triggered, to produce a delayed reset pulse R for the counter.

The 7447 LED decoder and driver converts the latched BCD count into the seven signals required to drive the LED display. The display reports the number of pulses that have occurred during the counting period T.