Topic Finder for Chapter 6
Introduction
The Monostable Pulse Generator
Mechanical Switch Bounce
74121 Debounced Switch
Application
The Astable Pulse Generator
Logic Devices as Signal Gates
Circuit Applications for
the 555
Chapter 6 Overview
Review Questions
Figure 6.1 Pinout for the
74121 Monostable Multivibrator
Figure 6.2 Illustation of
Contact Bounce Phenomena
Figure 6.3 Debounced Switch
for Box filling Control Circuit
Figure 6.4 RC External Circuti
for Output Pulse Width
Figure 6.5 A 555 Square
Wave Generatro Circuit
Figure 6.6 Dual 555's Circuit
Example
Figure 6.7 A Sequencer Circuit
Using a 555, 74161 and a 7442
Figure 6.8 An Alternate
Sequencer Circuit using a 555 with a 4017
Problem 6.5a
Problem 6.5b
Problem 6.6
Most digital circuits rely on square waves to synchronize circuit device behavior, provide a time base for the desired circuit function sequence and facilitate digital circuit interface with microprocessors and other digital circuit subsystems. The most popular TTL square wave generator is the 74121. Figure 6.1 provides the pin assignments for this device.
Another very popular square wave generator is the 555. This is not a TTL device but at this point it is not important to distinguish between the 74121 and the 555 with respect to why the 74121 is a TTL device and the 555 is not. The 555 is compatible with most TTL control circuits and it will be discussed later in this chapter. For now the focus of attention is the 74121. There are many names for the 74121. It is often called a "one shot" or simply a "monostable" when there is only one square wave pulse generated at a time. For this presentation it will be identified as a monostable pulse generator.
The Monostable Pulse Generator
The 74121 is the first example to be discussed of a digital device that has a pair of inversely related outputs, pin 6 and pin 1. Many TTL devices provide this feature. Each output is the compliment of the other. If the 74121 forces pin 6 high then it will also force pin 1 low. The reverse is also true. The 74121 was also the device used to discuss the various ways to enable device. The device in Figure 5.3a is actually a 74121.
The 74121 is a monostable pulse generator. The logic states on the three 74121 input pins (pin 3, pin 4 and pin 5) govern when the 74121 output pin generates a single square wave. Figure 5.3A shows the possible ways input pin signals generate a square wave on 74121 output pins. For example if logic zero signals are provided to pin 3 or pin 4, an input logic signal level change from 0 to 1 on pin 5 forces a single square wave, a clock pulse, to be generated on pins 6 and 1. For pin 6 the wave starts low goes high for a period of time and then returns low. For pin 1 the square wave starts high goes low for the same period of time and then returns high again. Pins 3 , 4 and 5 on the 74121 function basically as enable pins. The logic levels on these pins determine if and when the 74121 is to respond to any input logic signal activity. The common practice is to use two of the three pins as enable pins and the remaining pin, usually pin 5, as the trigger pin. Table 15 summarizes the 74121 pin functions.
The two diagrams in Figure 6.2 illustrate a common problem that can be eliminated with the use of the 74121. Humans like to use mechanical push buttons and switches to start, stop and generally operate equipment. Unfortunately switches and push buttons do not really function as expected. Figure 6.2A shows the expected way a normally open, NO, push button wired to a 5 V power source should work. When the button is not pushed it is correct to assume that the free end of the wire is at 5V. It is also correct to assume that when the button is held down the free end of the wire changes to 0 volts.
The problem arises when the button is being pushed. It has been proven by microscopic examination that the contact points do not just close once. They bounce up and down a few times each time making and breaking the circuit's electrical continuity. This bounce is not detected by the human but it is certainly noticed by any digital device input pin connected in series with the button.
Figure 6.2B illustrates this bounce phenomena. The push button is attached to the clock input of the 74161. A before and after scenario is depicted. Before the button is pushed the 74161 clock pin is at 5V and the counter display shows a zero. After the button is pushed once, the counter display shows a six instead of the expected 1. No matter how careful you are or how hard you try it is not likely you would get the counter to register just one clock pulse because you pushed the button once. You may not get 6 pulses every time but you will seldom get 1 pulse.
This multiple bounce result, as show in Figure 6.2B, reflects the problem with all mechanical buttons and switches that have moving parts. The electrical contact is made and broken several times even when the mechanical contact appears to be made and broken only once. Contact bounce can be a nightmare! Suppose you are trying to drop 32 plastic bottles of Best Belch into a box before it is automatically closed and sealed. To keep track of the bottles there is a push button under the conveyor belt where the box awaits its bottles. After 32 bottles the full box is pulled to the stage where it is sealed and a new empty box takes its place ready to receive its first bottle of golden nectar from the gods. A Simplified control circuit for this process is discussed below.
74121 Debounced Switch Application
Figure 6.3 provides a crude view of a not so brilliant digital control scheme that provides a debounce function for the packaging process under discussion. The digital circuit shown has three sections and consists of a push button, (there must be a better way to do this), strategically located under the box. One output of the button is connected to a 74121 pulse generator. Two 74161 counters and a 7400 complete the circuit elements. Before examining the 74121's circuit function, the roles of the 74161 and 7400 are explained. Figure 6.4 gives the pinout for the 74121 and the function of the 74161 carry pin is discussed first.
Pin 15 of the 74161 is known as the carry pin. The carry pin remains low while the counter generates binary output patterns from 016 through E16. Once the counter reaches F16 the carry pin goes to logic 1 and stays high until the count rolls over to zero again. Thus the carry pin provides a method to cascade two counters together to extend the counter's range. In the specific application shown in Figure 6.3, the two 74161 counters are linked by the lower place counter's carry pin. This arrangement allows the two counters to have a total range that starts at zero but goes way beyond the 32 bottle count needed. The 7400 NAND does have the significant assignment in this control scheme. The chip is used as the decoder to reset both counters when the box is full. The NAND's active low output signal also provides the control signal to start the conveyor belt so the full box can be moved out of the way.
Table 15 shows some of the output patterns for this duel 74161 counter as the box is being filled. The table picks up the bottle count at 3010. It does not show the count patterns for the first 29 bottles. (Remember that the carry output stayed low until the count on the first counter reached 15 bottles. At that point, the lower counter's carry pin went high and then low to provide a single count pulse for the second counter. Now the upper counter shows a 1 in its 2QA position and the carry has returned low as the bottle count continued from 15 to 30.) The next bottle into the box generates a total count value from both counters as 3110 and sets the carry pin to logic 1. This situation is shown as the second column in Table 15 and this count value represents the next to the last bottle to be dropped into the box.
The pattern generated when the last bottle drops into the box is shown as the third column in Table 16. The significant part of this pattern is the fact that output pin 2QB is set and thus provides a logic 1 to the input of the NAND device. This, in turn, allows the NAND to generate a logic 0 output. This output signal is sent to the conveyor belt motor ON control circuit. The signal is also returned to the clear pins on the two counters so that the next count pulse represents the first bottle being dropped into a new empty box. (If you were to build this two counter cascade with the 2QB fed to an NAND input and add a set of display LED's so that you could observe the count, you would be able to read each of the numbers for 0 to 31 on the display. You would not see the number 32 before the counters reset.)
The 74121 provides the interface between the push button and the counter/decoder section of the circuit shown in Figure 6.3. It's primary role is to electronically debounce the contact action of the push button so that only one clock pulse is delivered to the 74161 clock pin when the weight of one bottle depresses the button. This is accomplished by the combination of a resistor and capacitor network attached to pins 9 and 10 of the 74121. See Figure 6.4 for an example of this type of connection. Sometimes you will find pin 11 also used in this pulse duration passive circuit.
These resistor/capacitor circuit elements dictate how long the 74121 output pins stay active. Thus with specific values for resistor/capacitor combinations, the engineer can dictate the total time output pin 6 stays high before it returns to logic 0 again. For the debounce situation shown in Figure 6.3, if this time is longer than the time the switch bounces because of the belt bounce, then the counter circuit will only register one clock pulse each time a bottle lands in the box.
At this point it is important to borrow but alter a familiar T.V. warning. "Just try this at home". The control scheme illustrated in Figure 6.3 is a bad design. There are many reasons why it will not work well and many ways to improve its performance. The goal here is to expose you to the switch debounce idea and provide a little more experience in digital circuit diagram analysis. To assign it more value than the accomplishment of these educational objectives would be sillier than the circuit application itself.
Figure 6.5 shows a circuit with another popular pulse generator. The 555 is not a TTL device but is often used in TTL digital circuits. It has the useful property of being able to act as an astable pulse generator. An astable square wave generator is characterized by the continuous generation of pulses. By contrast, the 7421 in its monostable mode only generates one pulse for every logic transition on its trigger pin, pin 5. The 555 circuit configuration shown in Figure 6.5 includes resistors, capacitor and a diode. The graphic indicates that if the 555 is wired as suggested then a stream of square pulses will continuously be delivered to the input of an AND device. This will continue to happen as long as the 555 has good connections to power and ground.
Figure 6.5 also indicates an additional important concept, i.e. the logic gate. The diagram shows a 555 wired as an astable oscillator with its output connected to the input of an AND device. The 555 supplies a continuous string of square pulses to that input. The other input to the AND is connected to a normally closed contact circuit. If the contacts are not pushed and held open the logic zero signal is present at the corresponding input to the AND device. This AND input value assures that the output of the AND is logic 0 no matter what logic signal is delivered by the 555 circuit to the other AND input. Thus the AND is now preventing the logic signals from the 555 from reaching the output pin of the AND, i.e. the gate is closed. If the button is pushed and held down, then a logic 1 is delivered to one input of the AND device. Under this condition, the logic signals from the 555 will pass through the other input of the AND device and be delivered to the AND's output pin, i.e the gate is open. Therefore, a two input AND device may also be viewed as a gate device that has a gate input pin that controls whether a pulse train, i.e. a series of logic 1's and logic 0's, can pass through the other input of the AND. This image of an AND device is very popular since the logic gate is often used to isolate logic signals from various parts of a digital circuit. Specific examples of logic devices as gates will be presented later.
Circuit Applications for the 555
The 555 can be wired so that it will continue to generate nonstop square pulses as long as power and ground are connected to the device. The resistor and capacitor arrangement shown in the figure illustrate how this is done. The duty cycle, the percent of the square wave that is at logic 1, is determined by the capacitor and resistor values selected. The diode is installed to assure that the electron flow to pin 6 is in the proper direction. This additional circuit element is dictated by instructions provided in the 555 manufacturer's literature. It is common and acceptable to follow such manufacturer's advice without much attention as to the reasons behind the recommendation.
Figure 6.6 illustrates how to combine two 555 astable devices to obtain different output square wave frequencies. The wiring shown is typical for dual 555 applications. The blowups in the figure show the relative frequencies of the 555 output pulses. The higher frequency square wave is emitted from pin 3 of the 555 illustrated on the right side of the diagram.
Figure 6.7 illustrates a single 555 in a sequencer application. The 555 provides the series of pulses while the 74161 and 7442 arrangement produce the sequence of control pulses to be connected to the various final control element starter circuitry. If you reexamine Figure 4.2 you will note that Figure 6.7 is essential the same as that diagram except now more detail has been given to the pulse generator portion of the circuit in Figure 4.2.
Figure 6.8 shows another version of a sequencer circuit. This time the 4017 has been used. This chip is actually called a sequencer. The name is used to relay the idea of its function. Notice that the counter is no longer needed.
The main lesson of the graphic in Figure 6.8 is to bring out the point that new chips are always being made to include more and more parts of popular control circuits. In this case, the counter function is included inside the 4017. This trend should not discourage new digital technology users. The best path is to keep focus on the control idea that circuits perform and look for new circuits that do that idea with less chips.
6.1 Using the information in Table 15 and the 74121 pin out in Figure 6.1, draw a function diagram of a 74121 circuit that will provide a single pulse when a push button is pressed.
6.2 Examine Figure 6.3 and Table 16. Draw a new function diagram for the "Best Belch" application such that the box is considered full after 24 bottles of brew are placed in a box.
6.3 What are the two most popular modes of operation for the 555?
6.4 Draw a function diagram of a 555 circuit that will deliver square waves to a 74161 only when a push button is held down. ( Do not have any push buttons attached to the 74161)
6.5 Examine the two function diagrams and determine if they represent a control scheme for the same process.
a) Stop action control scheme for a process ( problem 6.5a).
b) Run action control scheme for a process (problem 6.5b).
6.6 Develop the function diagram for the control scheme indicated in the relay ladder diagram for this problem.