Home www.play-hookey.com Thu, 04-02-2020

Manual Pulse Generator

### Introduction

Continuous clock pulses at a constant frequency are very important in a wide variety of digital circuits. However, there are also cases where you will want to be able to test a circuit with single clock pulses, or with a specific number of clock pulses. You'll also want to be able to reset a counter or, in some cases, to preload a counter with a specific initial value. To do this, you will need something similar to the logic switches you already have on your breadboarding system, but momentary in nature. This can be accomplished with momentary-contact pushbuttons.

### Schematic Diagram

One of the problems with a manual pulse generator is that any mechanical pushbutton exhibits a phenomenon known as "contact bounce." Contact bounce is the term used to describe the fact that physical contacts in a real-world switch or pushbutton do not simply make contact or break contact when the switch is toggled or the button pushed. Instead, the contacts are actually a bit flexible. When they initially touch, they bounce apart slightly, then touch again. As they come apart, the same thing happens again as the pressure holding them together is released. As a result, physical contacts may actually make and break contact several times at each actuation. The result is multiple pulses for each press of the button.

To prevent this phenomenon and obtain clean, single digital pulses, we need to include with the switch a digital circuit that will react to the first contact closure, but will ignore subsequent contact bounce. The classical way to accomplish this is to adapt a basic RS latch for use with a single-pole, double-throw (SPDT) switch or pushbutton. The resulting circuit is shown to the right.

One potential problem with this circuit is that we want to be able to use it with multiple logic families in our experimental circuits. This means our gates must cover the voltage requirements of CMOS gates and still have the current drive capabilities needed to control RTL, DTL, and TTL gates. This is not possible with ordinary ICs in any logic family, as they are designed only to interface with other ICs in the same family. However, if we use an IC specifically designed to interface with other logic families, then we can design our circuit to meet this requirement and provide a more generally usable pulse.

The schematic diagram to the right shows an alternate debouncing method, using two inverters from a 4049 CMOS IC. This circuit makes practical use of two of the characteristics of CMOS ICs: high gain transistors and high input impedance.

We know that we can cross-connect two inverters to form a latch circuit, but this normally does not allow any external inputs. Each output forces the other input to a valid logic state. CMOS ICs, however, have such high gain that the output tends to go to one logic state or the other, even for very slowly-changing input signals.

We therefore simply cascade two inverters, and use a high-value resistor to pull the input up to +5 volts. The inverter input, being CMOS, draws no current so we can use any resistance value we need or want to. This resistor, which is 10 Megohms in our circuit, forces the initial input to logic 1, so the Q output is logic 0 and Q' is logic 1 again.

Next, we add the .01µf capacitor shown in this circuit. This capacitor is discharged when power is first applied, and cannot change its voltage instantly. Therefore, the input is forced to start at logic 0, and the Q' output is initially logic 0. However, the capacitor now charges towards +5 volts through the 10M resistor. At some point in the charging process, the capacitor voltage will exceed the switching threshold of its inverter (Q), and the Q output will therefore change state from a logic 1 to logic 0. This will immediately force the second inverter to change state, and Q' will become a logic 1. The time required for this is set by the RC time constant, which in this case is 10M × .01µf = 0.1 second. The switching threshold may be anywhere from 30% to 70% of the supply voltage, but is nominally at 50%, so switching will take place when the capacitor has charged halfway. This means that our Q output will start in the ON state, and will change to OFF 0.693RC seconds later, or about 0.07 second for our component values. The timing range will be between 0.04 second and 0.11 second, which will still work satisfactorily.

The final step is to add a momentary-contact pushbutton, which will short out the capacitor, and therefore discharge it, each time it is pressed. This will force the Q output ON as long as the pushbutton is held, and allow it to turn OFF again 0.07 second after the button is released. Q' will, as expected, be the inverse of Q.

The whole point of doing it this way is that contact bounce in the pushbutton cannot affect the behavior of the circuit. This phenomenon lasts only for a few milliseconds, which is not enough time for the capacitor to recharge enough to allow the Q output to change state. As a result, each press of the button will produce one and only one output pulse. Furthermore, the circuit will reset itself rapidly, so you can readily generate fast manual pulses as needed. If your component tolerances happen to be extreme, you may experience a bouncing effect. You will detect this as soon as you start using these pulser circuits in other experiments. It is unlikely, but if you happen to beat the odds, you can increase the value of the capacitor to eliminate the problem.

### Pushbuttons

In this project, we introduce a new component: the pushbutton. We've all seen a wide variety of examples of pushbuttons in use. Elevator call buttons and the floor selection panel inside the elevator are common examples. Digital watches have small pushbuttons to select the displayed function, set time, etc., while modern appliances have touch panels containing multiple internal pushbuttons. Even the keyboard of your computer uses them; each key is a pushbutton, although you may not have realized this.

The image to the right shows four typical pushbuttons used in electronic applications. The two on the left are designed to be mounted on the front or rear panel, with wires soldered to the terminals. The third one is designed to be mounted on and soldered to a printed circuit board. The rightmost pushbutton is also known as a "microswitch," and can be mounted to any surface to help detect when a door or access panel has been opened. This pushbutton can be mounted directly to a printed circuit board, or solderless connectors and wires may be used to wire this pushbutton to the rest of its circuitry.

There is no limit to how pushbuttons may be used in a wide range of applications. They are manufactured in a wide variety of sizes and shapes, for use under any number of conditions, including some very rough or harsh environments. Accordingly, the selection of which sort of pushbutton to use in a given application is determined in accordance with the conditions to which it will be exposed. This is why the front panel of a microwave oven, for example, is a single sheet of flexible plastic with the actual pushbuttons underneath it — the unbroken surface is easy to clean and protects the circuitry underneath from spilled or splashed liquids.

Because we want to mount our pushbuttons on our breadboard socket, the third example seems to be a reasonable choice. The pins are placed at the corners of a 0.2" square and are long enough to fit directly on the breadboard.

There is one characteristic of this particular pushbutton that must be recognized and taken into account: two of the four pins are permanently connected together. There is actually a logical and practical reason for this, but to understand it we need to look inside it. The image to the right shows all the parts inside this component.

The oblong metal piece is also cupped, with its center raised above the level of its edges. It is placed in the red cap section so that it normally forms a small dome up into the cap. The round metal disc goes in next, followed by the spring, which is placed around the central post in the cap. This assembly snaps into place over the white base, and holds itself together as a complete component.

When this construction is quiescent, the spring holds the round metal disc away from the contacts, and there is no electrical connection other than the two connected pins. Thus, this pushbutton is normally an open circuit.

When you press down on the cap, the spring compresses. At some point, the downward pressure on the center of the cupped oblong piece of metal causes its middle portion to snap downwards and reverse the direction of the cupped shape. This forces the metal disc into contact with all three electrical connections inside the pushbutton body. Now we can see why two of the pins need to be connected together: three points determine a plane in geometry, and we can be sure that the flat metal disc will make full contact with each of the three conductors. If there were four separate conductors, any error in construction would leave one of the contacts not touching the disc, thus causing the pushbutton to fail. This is akin to a four-legged stool that rocks because one leg is shorter or longer than the others. A three-legged stool never has this problem, even if the seat is not perfectly level.

When you release the pushbutton, the spring takes over and pushes the metal disc upwards and out of contact. This also pushes the shaped metal oblong back to its normal state, waiting for the next time you press the button.

Of course, you may choose to use a different kind of pushbutton for this project, depending on your preferences and what you can find. If so, you may need to adjust the assembly instructions slightly to accommodate the differences in pushbutton types. This is something you'll need to get used to doing, when breadboarding various circuits.

### Parts List

To construct and test the manual clock pulse generator circuit on your breadboard, you will need the following experimental parts:

• (2) 10M, ¼-watt resistors (brown-black-blue).
• (2) .01µf disc capacitors.
• (2) Momentary contact pushbuttons.
• (1) 4049 CMOS hex inverter/buffer IC.
• Black hookup wire.
• Brown hookup wire.
• Red hookup wire.
• Blue hookup wire.
• Violet hookup wire.

### Constructing the Circuit

You will build the manual pulse generator circuit in the remaining open space at the right end of your breadboard socket. This will finish filling up this breadboard socket, so you'll need to either get another breadboard or else obtain a complete breadboarding system in order to construct and demonstrate future experimental circuits. When you are ready, refer to the image and text below and install the parts as shown.

### Circuit Assembly

#### Starting the Assembly

The manual pulse generator circuit goes into the last open space on your breadboard socket, immediately to the right of the one Hertz line clock, which is shown in the assembly diagram. Make sure that the remaining space is clear of all experimental components, as you will need all of this space to complete this project.

Click on the `Start' button below to begin. If at any time you wish to start this procedure over again from the beginning, click the `Restart' button that will replace the `Start' button.

#### 0.3" Black Jumper

Locate or prepare a 0.3" black jumper, and install it in the location shown in the assembly diagram to the right.

Click on the image of the jumper you just installed to continue.

#### 0.3" Black Jumper

Locate or prepare a second 0.3" black jumper, and install it as indicated to the right. Note that this jumper must be installed on a diagonal.

This is the first of two grounding jumpers for your pushbuttons, which will be installed later. If you use a different type of pushbutton than the one described on this page, you may need to move this jumper in a later step.

Again, click on the image of the jumper you just installed to continue.

#### 0.3" Black Jumper

Locate or prepare another 0.3" black jumper, and install it as indicated in the assembly diagram. Note that this jumper must be installed on a diagonal.

This is the grounding jumper for the second pushbutton. If you use a different type of pushbutton than the one described on this page, you may need to move this jumper in a later step.

As before, click on the image of the jumper you just installed to continue.

#### 0.5" Red Jumper

Locate or prepare a 0.5" red jumper, and install it in the location shown to the right.

Again, click on the image of the jumper you just installed to continue.

#### 0.3" Brown Jumper

Locate or prepare a 0.3" brown jumper and install it as indicated in the assembly diagram.

As before, click on the image of the jumper you just installed to continue.

#### 0.3" Blue Jumper

Locate or prepare a 0.3" blue jumper and install it in the location indicated to the right.

Once again, click on the image of the jumper you just installed to continue.

#### 0.3" Blue Jumper

Locate or prepare a second 0.3" blue jumper and install it as indicated in the assembly diagram.

As usual, click on the image of the jumper you just installed to continue.

#### 0.1" Bare Jumper

Locate or prepare a 0.1" bare jumper and install it in the location shown to the right.

Again, click on the image of the jumper you just installed to continue.

#### 0.1" Bare Jumper

Locate or prepare a second 0.1" bare jumper and install it in the location indicated in the assembly diagram.

Once again, click on the image of the jumper you just installed to continue.

#### 0.6" Brown Jumper

Locate or prepare a 0.6" brown jumper and install it in the location shown to the right.

As usual, click on the image of the jumper you just installed to continue.

#### 0.6" Brown Jumper

Locate or prepare another 0.6" brown jumper and install it in the location indicated in the assembly diagram.

Again, click on the image of the jumper you just installed to continue.

#### 0.7" Violet Jumper

Locate or prepare a 0.7" violet jumper and install it in the location shown to the right.

Once more, click on the image of the jumper you just installed to continue.

#### 10M, ¼-Watt Resistor

Locate a 10M, ¼-watt resistor (brown-black-blue) and form its leads to a spacing of 0.5". Install this resistor in the location indicated in the assembly diagram.

Click on the image of the resistor you just installed to continue.

#### 10M, ¼-Watt Resistor

Locate another 10M, ¼-watt resistor (brown-black-blue) and form its leads to a spacing of 0.5". Install this resistor in the location shown to the right.

Again, click on the image of the resistor you just installed to continue.

#### 4049 CMOS IC

Locate a type 4049 CMOS hex inverter/buffer IC, and make sure all sixteen pins are straight. Place this IC gently on top of your breadboard socket in the location indicated in the assembly diagram, with the notch indicating pin 1 oriented to the right as shown. When you are sure that all sixteen pins are aligned with their contact holes, press this IC down into firm contact with your breadboard socket.

Click on the image of the IC you just installed to continue.

#### .01µf Disc Capacitor

Locate a .01 µf disc capacitor (may be marked "103") and, if necessary, form its leads to a spacing of 0.3". Clip the formed leads to a length of ¼" and install this capacitor in the location shown to the right.

Click on the image of the capacitor you just installed to continue.

#### .01µf Disc Capacitor

Locate a second .01 µf disc capacitor (may be marked "103") and, if necessary, form its leads to a spacing of 0.3". Clip the formed leads to a length of ¼" and install this capacitor in the location indicated in the assembly diagram.

Again, click on the image of the capacitor you just installed to continue.

#### Momentary Contact Pushbutton

Locate one of your momentary contact pushbuttons. If you are using the type suggested in the discussion above, make sure the flat side is oriented towards the center channel as shown, and that the four pins are aligned with their respective contact holes. Then, press the pushbutton into firm contact with your breadboard socket.

If you are using a different type of momentary contact pushbutton here, you will need to take your own steps to make it fit in the remaining space at the right end of your breadboard socket. If necessary, you may move the black grounding jumper to accommodate your pushbutton.

Click on the image of the pushbutton you just installed to continue.

#### Momentary Contact Pushbutton

Locate another momentary contact pushbutton. If you are using the type suggested in the discussion above, make sure the flat side is oriented towards the center channel as shown, and that the four pins are aligned with their respective contact holes. Then, press the pushbutton into firm contact with your breadboard socket.

Again, if you are using a different type of pushbutton, you may need to adjust the black grounding jumper or take other steps to make the pushbutton fit in the remaining space at the end of the breadboard socket.

Again, click on the image of the pushbutton you just installed to continue.

#### 0.5" Raised Violet Jumper

Prepare a violet jumper with 1" of insulation, and form this jumper so the leads are 0.5" apart and the jumper will be raised ¼" above the surface of the breadboard socket. Install this jumper as shown in the assembly diagram, crossing over the top of the 4049 IC.

Click on the image of the jumper you just installed to continue.

#### 0.5" Raised Blue Jumper

In the same fashion, prepare a blue jumper with 1" of insulation, and form this jumper so the leads are 0.5" apart and the jumper will be raised ¼" above the surface of the breadboard socket. Install this jumper as shown to the right, crossing over the top of the 4049 IC.

One more time, click on the image of the jumper you just installed to continue.

#### Assembly Complete

This completes the construction of your experimental circuit. Check your assembly carefully against the figure to the right, and correct any errors you might find.

In addition to the two manual pulse circuits, you have also connected the 10 Hz and 1 Hz clock signals to the remaining two inverters in the 4049 IC, so they can now be used to drive TTL and DTL circuitry. All outputs and the pushbutton designations are now shown in the assembly diagram.

When you are ready, proceed with the experiment on the next part of this page.

### Verifying the Manual Pulse Generators

Use four 10" white jumpers (if necessary, cut a 10" length of white hookup wire and remove ¼" of insulation from each end, for each jumper you need to construct) to connect your pulse generator outputs to your LED driver inputs as follows:

1. Connect the A output to L3.
2. Connect the A' output to L2.
3. Connect the B output to L1.
4. Connect the B' output to L0.

Step 1. Watch the four LEDs as you turn on power. How do the pulse generator circuits behave when power is first applied to this circuit?

Step 2. Press pushbutton A and hold it down. Finally, release it as you watch the LEDs. Repeat with pushbutton B. Do they behave the same way?

Step 3. Press and immediately release pushbutton A (just tap the button without holding it), while watching the LEDs. Do the LEDs respond precisely to your action? If not, can you explain why not? Try it also with pushbutton B.

This completes your testing of the manual pulse generator circuitry. Turn off power to your breadboarding system, and continue on to the Discussion below.

### Discussion

When you first turned on power in Step 1, the LEDs showed that both the A and B outputs were initially logic 1, but that they rapidly switched to logic 0 and remained in that state. At the same time, the two inverted outputs were initially logic 0 and switched to logic 1.

This occurred because the two .01µf capacitors were initially discharged, and required a fraction of a second to charge up to their quiescent state. In most applications, this makes no difference. In some cases, it can be used to advantage, to automatically reset a group of flip-flops or counters when power is first turned on.

In Step 2, you pressed and held each button in turn. You found that the LEDs changed state immediately, and remained with A at logic 1 and A' at logic 0 for as long as you held the button down. Pushbutton B behaved in exactly the same way.

Finally, in Step 3, you attempted to generate the narrowest possible output pulse. You did this by tapping the pushbutton as briefly as possible. In doing so, you should have noticed that the LEDs do not return to their quiescent state immediately upon release of the pushbutton. You may also have noticed this phenomenon in Step 2. Instead, the LEDs show that the output pulse remains in the temporary state for a fraction of a second before switching back to the quiescent state.

This is because of the same delay to allow the capacitor to charge that you noticed in Step 1. The time delay with the component values we're using is nominally 0.07 second (70 ms), and may range from 40 ms to 110 ms. This is plenty of time for any contact bounce to settle out, yet is brief enough that you have to look for it to really notice the difference. Both buttons exhibited the same behavior.

If your manual pulse generator circuits behaved correctly throughout these steps, they are working properly and this project is complete. If you noticed any problems, or if they failed to provide individual pulses on demand, you'll need to go back and check your installation before leaving this project. Any wiring error will prevent this circuit from operating correctly, so such errors need to be corrected before you move on.

When you have completed this project, make sure power to your breadboarded circuitry is turned off. Remove the four white jumper wires connecting the pulse circuit outputs to the LED inputs, but leave all other components in place on your breadboard socket. Future experiments and projects will be constructed on a separate breadboard socket.

As an alternative, this is the time to consider moving your digital test bed circuits from your breadboard socket to a more permanent home, or obtaining a complete commercial breadboarding system. The choice is of course yours, and depends on your future plans. Either way, we will not change the circuits currently on your breadboard socket, and we will refer to them and use them in future experiments.

If you choose to move your test bed to another location, you might want to consider adding a second group of LED driver circuits (six more LEDs, using another 4049) so you will be able in the future to monitor an 8-bit byte plus a couple of status bits. A third pushbutton circuit, of the type you demonstrated in this experiment, might also prove useful in the future.

 Prev: One-Second Line Clock Next: Counters and Displays

All pages on www.play-hookey.com copyright © 1996, 2000-2015 by Ken Bigelow
Please address queries and suggestions to: webmaster@play-hookey.com