Home www.play-hookey.com Tue, 08-04-2020

One-Second Line Clock

### Introduction

One thing we'll need as we continue our experiments with digital circuits and ICs is a precise, 1-second time reference. Such a time reference forms the basis for all sequential digital circuitry. Note that it is not necessary for every time reference to be based on a one-second interval. Indeed, any time interval may be used, according to the application. However, one second is the standard increment of time used in science, and it is easily derived from your local AC power line, in line-powered equipment. We will therefore use your local power frequency to give us a precise, 1 Hz square wave that will serve as an accurate time and frequency reference for a number of experiments.

In North America, the power grid operates at a frequency of 60 Hz, or 60 cycles per second. It is absolutely essential that this frequency be maintained accurately, because many different electrical generators all over the continent are all connected to the grid, and are all pouring power into the grid for people and businesses to use. To keep the generators from overloading each other, they must be matched to each other in frequency and they must be phase-locked to each other as well. A third requirement is that their voltage outputs must be matched so that no generator finds itself drawing current from others. The capability to do this has been available and in use now for many years, and there are constant improvements in the monitoring and control technology used to keep the system running smoothly.

In Europe, the power grid and system work essentially the same way, but the line frequency is 50 Hz. Other parts of the world use one of these two frequencies, and can therefore use electrical equipment designed for use on that system.

In this experiment, we will add two CMOS ICs to our digital breadboard socket, plus the wiring necessary to connect them to each other and to the line clock you installed earlier. You will need to position a single jumper according to your line frequency. Other than that one jumper, however, the circuit is the same either way.

### Schematic Diagram

The one-second clock reference is derived from the line clock circuit you installed in the previous project. To accomplish this, we'll use a pair of CMOS ICs that are designed as Johnson counters. This type of counter allows easy decoding to obtain separate output signals for each count as well as a symmetrical square wave as its Carry Out signal, which can be used as the input clock to a succeeding stage.

The first counter is a type 4022 CMOS octal counter, with connections to reset the count at either 5 or 6, depending on your particular line frequency. The Carry Out signal will therefore not be a symmetrical square wave, but will have a frequency of 10 Hz regardless of your line frequency. This 10 Hz reference is available if needed, but probably won't find much use in future experiments.

The second counter is a type 4017 CMOS decimal counter. We make no effort to disturb its counting sequence, so it simply divides its input clock signal by 10. As it does so, it produces separate output signals for each count, plus a 1 Hz symmetrical square wave output as its Carry Out signal. Except for a brief experimental procedure, we won't be interested in the individual outputs. However, that 1 Hz square wave will serve nicely as a highly accurate 1-second time reference that we can use in a wide range of future experiments.

In most ways, we could easily use two 4017 ICs instead of a 4017 and a 4022. We chose to use the 4022 as the first divider to allow more readily for the European 50 Hz power frequency. The Carry Out signal (CO) is normally high for the first half of the counting sequence, then low for the second half. The counters are clocked on the rising edge of the clock signal, so the Carry Out signal is quite suitable as the clock signal to the next stage. Now, if we used a decimal counter for the first stage, the Carry Out would be low for a full count at 60 Hz, but at 50 Hz would only go low long enough to reset the counter. This is not sufficiently reliable. To avoid this problem, we use an octal counter here. As a result, Carry Out is low for one count at 50 Hz, or two counts at 60 Hz. This avoids any possible problems with narrow clock pulses.

### Parts List

To construct and test the one-second line clock circuit on your breadboard, you will need the following experimental parts:

• (1) 10K, ¼-watt resistor (brown-black-orange).
• (1) 4017 CMOS decimal counter IC.
• (1) 4022 CMOS octal counter IC.
• Black hookup wire.
• Brown hookup wire.
• Red hookup wire.
• Yellow hookup wire.
• Green hookup wire.
• Blue hookup wire.

### Constructing the Circuit

Make sure the area to the right of the center of your breadboard socket is clear of all experimental components. You'll need three adjacent sets of five bus contacts for this project. Then refer to the image and text below and install the parts as shown.

### Circuit Assembly

#### Starting the Assembly

As you begin this assembly procedure, you should have only the four jumpers shown to the right connected to any part of the right side of your breadboard socket. These jumpers provide power and ground connections to the circuitry you are about to install.

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

In the usual manner, locate or prepare a 0.3" black jumper. Install this jumper in the location indicated in the assembly diagram to the right.

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

#### 0.3" Black Jumper

In the same manner, locate or prepare a second 0.3" black jumper. Install this jumper in the location indicated in the assembly diagram.

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 this jumper in the location indicated to the right.

As before, 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 this jumper in the location indicated in the assembly diagram.

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

#### 0.3" Black Jumper

Locate or prepare one more 0.3" black jumper, and install this jumper in the location indicated to the right.

Once again, 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 this jumper in the location indicated in the assembly diagram.

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

#### 0.5" Red Jumper

Locate or prepare a second 0.5" red jumper, and install this jumper in the location indicated to the right.

As usual, 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 this jumper in the location indicated in the assembly diagram.

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

#### 0.1" Bare Jumper

Prepare a 0.1" bare jumper, and install this jumper in the location indicated to the right.

As before, 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 this jumper in the location indicated in the assembly diagram.

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

#### 0.5" Green Jumper

Locate or prepare a 0.5" green jumper, and install this jumper in the location indicated to the right.

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

#### 0.7" Blue Jumper

Locate or prepare a 0.7" blue jumper, and install this jumper in the location indicated in the assembly diagram.

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

#### 2.5" Yellow Jumper

Locate or prepare a raised 2.5" yellow jumper (cut the insulation to a length of 2¾", and bend the ends to have 1/8" insulation above the exposed ends). Connect one end of this jumper to the CLK output at pin 4 of the 4049 IC at the left end of your breadboard socket, just above the IC. That will keep this jumper out of the way as much as possible. Connect the other end of this jumper to the location indicated to the right.

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

#### 10K, ¼-Watt Resistor

Locate a 10K, ¼-watt resistor (brown-black-orange) and form its leads if necessary 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.

#### 4022 CMOS IC

Locate a type 4022 CMOS octal counter IC and make sure that all 16 pins are straight and properly aligned to fit on your breadboard socket. Then, carefully insert this IC on your breadboard socket, in the location indicated to the right. Make sure the notch indicating Pin 1 is oriented to the left, as shown in the assembly diagram.

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

#### 4017 CMOS IC

Locate a type 4017 CMOS decimal counter IC and make sure that all 16 pins are straight and properly aligned to fit on your breadboard socket. Then, carefully insert this IC on your breadboard socket, in the location indicated in the assembly diagram. Make sure the notch indicating Pin 1 is oriented to the left, as shown.

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

#### 0.3" Brown Jumper

Refer to the pictorial below, and prepare a 0.3" brown jumper that will hold itself ¼" above the surface of your breadboard socket. This jumper will select the frequency division ratio of the 4022 IC, and will be referred to as Jumper 'T' for 'Timing.'

If your power frequency is 60 Hz (North America), use this jumper to connect the blue jumper below to the brown jumper above the center channel, as shown to the right. If your power frequency is 50 Hz (Europe), install this jumper to connect the green jumper below to the brown jumper above the center channel.

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

#### 10" White Jumper

Locate or prepare a 10" white jumper wire. You should have some left over from previous experiments, but if necessary, cut a 10" length of white hookup wire and remove ¼" of insulation from each end. Connect one end of this jumper to the location shown in the assembly diagram. Connect the other end to LED input L0.

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

#### 10" White Jumper

Locate or prepare a second 10" white jumper. Connect one end of this jumper to the location shown to the right. Connect the other end to L1.

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

#### 10" White Jumper

Locate or prepare another 10" white jumper. Connect one end of this jumper to the location shown in the assembly diagram. Connect the other end to L2.

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

#### 10" White Jumper

Locate or prepare a final 10" white jumper. Connect one end of this jumper to the location shown to the right. Connect the other end to L3.

Once more, 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.

The circuitry you have assembled in this project will remain as a permanent part of the demonstration system on your digital breadboard socket.

### Performing the Experiment

Step 1. Turn on power to your experimental circuit, and observe the four LEDs for a few moments. Do you note a definite pattern of activity from these LEDs?

Step 2. Time the activity at L0 over a period of a minute or two. How many pulses do you see in one minute?

Step 3. Move Jumper T to the other position, to change the division ration of the 4022 counter. As you move it, note the behavior of the LEDs when you remove it, and then count the number of pulses per minute displayed by L0 after installing this jumper in the alternate position. Restore Jumper T to the correct position once you have completed this step.

Step 4. Look again at L3, L2, and L1. If we specify that L0 is on during the first half of the counting sequence and off during the second half, which digit outputs, 0 through 9, are displayed by these three LEDs?

### Discussion

In Step 1, you should have noticed that L0 blinked steadily at one pulse per second, and was on for just half of that time. The other three LEDs blinked briefly in sequence, with L2 turning on at the same time as L0, but turning off again as L1 turned on.

When you timed the blinking of L0 in Step 2, you should have found that you saw precisely 60 pulses per minute. If you did not get exactly this count, you very probably had Jumper T in the wrong position.

You demonstrated exactly this point in Step 3. First, when you removed Jumper T from its initial place, all counting stopped, and the four LEDs remained unchanging. This is because the 10K resistor activates the reset function of the 4022 counter while the jumper is removed. Its basic purpose is simply to prevent the Reset input from remaining open circuited while the jumper is disconnected.

Then, when you installed Jumper T in the wrong location for your power frequency, you found that L0 no longer displayed 60 pulses per minute. If you set it for 50 Hz in a 60 Hz country, you will have counted 72 pulses per minute. If you set it for 60 Hz in a 50 Hz country, you only counted 50 pulses per minute. Clearly, Jumper T must be correctly placed for accurate timing.

Finally, in Step 4, you monitored three of the individual digit outputs. Since they turned on in immediate sequence, they were necessarily sequential digits in the counting sequence. Also, since L2 turned on at the same time as L0, this must be the digit 0 output. In fact, you were watching digits 9, 0, and 1 in order.

The figures to the right show the pin configurations of the 4017 decimal counter and 4022 octal counter. You can use these, if you like, to monitor all of the individual digit outputs from these counters. The 4022 octal counter is very similar to the 4017, as you can see, but the digit outputs are mostly at slightly different pins.

When you have completed this experiment, make sure power to your experimental circuit is turned off. Remove the four white jumper wires connected to the LED displays and put them aside for future use. Leave the remainder of your circuitry in place. It is now a permanent part of your digital circuit experimental setup.

At this point, your breadboard is nearly filled with digital testing circuitry, leaving almost no room for experimental circuits to be constructed and tested. Your next experiment will finish filling up your breadboard socket, leaving no spare room at all.

In view of this, you should consider building or purchasing a breadboarding system, with all of the power supplies and input/output circuitry kept separate from the breadboard socket (typically mounted on a printed circuit board). If you prefer not to do this, it's time to get a second breadboard socket, so you will again have plenty of room to construct and demonstrate your experimental circuits.

 Prev: Line Clock Next: Manual Pulse Generator