Sunteți pe pagina 1din 9

EE 100 Ten Second Digital Clock Experiment John Wheeldon Purpose: This experiment will acquaint students with

some of the basics of electronic circuitry. The student will build a two digit electronic clock using the DIGI DESIGNER, two BCD Display Boards, two 7490 Binary Counters, one 555 timer chip, and various resistors and a capacitor. Using a step-by-step procedure the student will assemble and test various blocks of the clock. One of the final steps will have students adjusting the clock speed using an oscilloscope and a variable resistor. Introduction: The Digital Clock that we will build will consist of three building blocks (See Figure 1) that will produce a clock having digital readouts going from 0.0, 0.1, and 0.2 up to 9.9. The three building blocks are seven-segment displays with drivers, binary counters, and a simple timer circuit. It would be easy for us to add on additional digits but the wiring gets a little more complicated than we have time to implement in a twohour laboratory.

7 segment display BCD display driver


BCD Display Board

BCD Binary Counter

555 Timer Circuit

Figure 1. Block Diagram of Digital Clock. If we think about a clock what do we need? We know that a clock must have some way of displaying values for seconds, minutes, and hours. This is what the BCD display board does. The clock must have a way of incrementing its value or adding 1 to a number. That is what the BCD counter does. Finally a clock needs to know when to change from one value to the next. The Timer Circuit has that function. All three parts are necessary or we wont have a clock. Let us begin by examining the method our circuit uses to display the current value. A seven-segment display is a common device used to display numbers in the world of electronics. (Think of your digital watch, your calculator, odometers in many cars, etc.) Seven segment displays are usually made from light emitting diodes (LEDs) or liquid crystal displays (LCDs). (See Figure 2) Different numbers are displayed by turning on a certain pattern of segments. The number 4 is obtained by lighting b, c, f and g. Table 1 shows the segment patterns needed to form numbers 0 to 9.

a f g c d Figure 2. Seven segment display with label on each segment. Table 1. Table showing which segments are lighted for each digit. (1 is on, 0 is off) digit 0 1 2 3 4 5 6 7 8 9 a 1 0 1 1 0 1 0 1 1 1 b 1 1 1 1 1 0 0 1 1 1 c 1 1 0 1 1 1 1 1 1 1 d 1 0 1 1 0 1 1 0 1 0 e 1 0 1 0 0 1 1 0 1 0 f 1 0 0 0 1 0 1 0 1 1 g 0 0 1 1 1 1 1 0 1 1 b

How does the clock circuitry know which numbers to display? The middle block of Figure 1 is a BCD Binary counter that is a circuit that counts from 0 to 9 in Base 2. Computers do not use the decimal system (digits 0 to 9) to do internal calculations. Instead computers use base 2 or binary to do their calculations. Base two has only two digits, 1 and 0. Table 2 shows 5 different ways to count from 0 to 20. Hexadecimal is used to represent binary numbers as a sort of short hand. Octal is used in Programmable Logic Controllers (PLCs). Note that BCD and binary are very similar. The main difference is that binary numbers use all the number combinations from 0 to 1111 while BCD uses binary combinations from 0000 to 1001. BCD does not have the combinations 1010, 1011, 1100, 1101, 1110, or 1111. BCD stands for Binary Coded Decimal because it uses binary digits (1 and 0) to encode the Decimal Digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.

Table 2. Five different Number Systems. 2

Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Binary 0 1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1110 1111 1 0000 1 0001 1 0010 1 0011 1 0100

BCD 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 0001 0000 0001 0001 0001 0010 0001 0011 0001 0100 0001 0101 0001 0110 0001 0111 0001 1000 0001 1001 0010 0000

Hexadecimal 0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14

Octal 0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23 24

The BCD counter will output 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, and 1001 on four output pins. These output pins are connected to our BCD Display Board. The four BCD bits (a bit is one binary digit) enter the 7447 BCD to LED driver chip and output the bit patterns recorded in Table 1 needed to light up the proper LCD seven segment display. When the BCD counter produces 0101 the 7447 chip produces the pattern abcdefg = 1011101 which lights up a 5 on the LED display. The 555 timer circuit produces an output clock signal that is used by the BCD counter to determine the speed at which the BCD counter changes numbers from 0000 to 0001 to 0010 etc. The block in Figure 3 represents the 555 timer integrated circuit. The 555 has eight total pins. Pin 5 is an NC or no connect pin and pin 3 is the Output pin. The output pin has a clock signal for its output. The distance between rising edges of the clock cycle is called the clock period. For this circuit the clock period is determined using the equation: T = TH + TL = 0.69 C1 (R1 + 2*R2) (equation 1)

There is a large amount of possible values for T if we use all the resistor and capacitor values available to us in the Technical Support center. For a 2-digit clock going from 0.0 to 9.9 in 0.1 second intervals it is reasonable to have a period of 0.1 seconds. Then we just need to select values for C1, R1 and R2.

Figure 3. 555 Timer Circuit As you gain a greater experience in Electrical Engineering you will find that we generally choose the values for capacitors before the values for resistors. Resistors come in a wide range of values while capacitors only come in a few values. Let us select a value of 10 micro Farads for C1 and solve for R1 and R2. 0.1 seconds = 0.69 * (10 m F) * (R1 +2*R2) R1 + 2 *R2 = 14.49 kilo Ohms A second engineering judgment you will gain with experience is that Capacitor values can vary by as much as 10%. Resistor values will also vary depending on their tolerances. If we let R1 = R2 = 5kW our circuit will be quite close to the period that we desire. If our resistors and capacitor are the designed values the period will be 0.1035 Seconds. To make our circuit work even better we will replace one of the resistors with a variable resistor that we can adjust to make our period closer to 0.1 s.

Experimental Work: As you design and build more complicated circuits and electrical systems you will find that it works best to build a portion of your circuit, test it and then build another portion of the circuit. We will follow this method in constructing the 10 second digital clock. You will need the following components and equipment from the Technical Support Center: Digi Designer 1 BCD Display Board 2 Logic Probe 1 4.7kW 1 3.3kW 1 5kW Potentiometer 1 10 mF Capacitor 1 Wire Bundles 2 DM74LS90 Chips 2 555 Timer Chip 1 4 single LEDS

Power Switch

Bread Board

Clock

Figure 4. Digi Designer Board

Pulsers

The Digi Designer Board has several parts of interest to us. After the board is plugged in to a power outlet it must be turned on using the power switch. The switch lights up red when the board is on. When wiring your circuit keep the power off until you are ready to test your circuit. The Bread Board is where you will place your components. Notice that on the top are two horizontal lines of dots and on the bottom are two horizontal lines of dots. The dots are connected horizontally and we usually use these four lines of dots to run our power and ground. (The top two strips will be wired to +5v and the bottom two strips will be wired to GND.) In the middle of the breadboard are two screws. These screws mark the center of the board. The horizontal power strips on the right of the middle are not connected to the horizontal power strips on the left. If you want the two sides to be connected you must run a jumper wire from the left to the right side. There is a notch running down the vertical center of the board. We will place integrated circuits so that one side of the chip is on the top of the notch and the other side of the chip is on the bottom. Unlike the power strip, these dots are arranged vertically. If a chip has a pin on the lowest dot of a vertical strip, there are 4 more dots or holes where additional connections may be made to the chip. The clock switch sends a signal out one of the holes just above the clock switch. We can have frequencies ranging from 1 Hz up to 100 k Hz. 1/frequency is period so that if we want a period of 0.1 seconds we put the clock on 10 Hz. Run a wire from the clock pin up to a pin just below one of the lamp monitors located in the top center. You will see that by changing the clock frequency you can make the lamp blink at higher frequencies. The pulser switches may be used to pulse your circuit. We will use the pulsers to reset our clock circuit to 0.0. Layout of Our Breadboard: When a breadboard is used you need to layout the components in such a way that your circuit will be divided into sections that are easily debugged. For this circuit start by placing one of the DM74LS90 chips to the far right of the notch on the breadboard. 14 13 12 11 10 Bread Board Notch 1
Notch on Chip

9 8

Figure 6. The Notch or circle used to locate pin 1. We normally locate the notch on the chip to the left. Just below the notch, the first pin on the left is pin 1. From the left side the second pin is pin 2. Sometimes you will see a circle located right by pin 1. Next place one of the BCD display boards just left of the 7490 chip and four rows up from the top of the middle notch in the breadboard. Now you are ready to wire the chips

together to make a single 7 segment LCD counter. Use Table 3 as a guide as you wire the chip to the board. Table 4 will show the connections that the BCD display board needs to have with the 7490 chip. Pin 1 should be wired to pin 12 of the 7490. Pin 2 should be wired to pin 3. NC means No Connection. Vcc will be wired to the power strip on the top. Gnd will be wired to the Gnd strip on the bottom. When all the connections are made properly the display should count from 0 up to 9. Wire the DP (Decimal Point) pin to the Gnd strip. You may twist the clock knob to make the circuit count faster or slower. Next take the second 7490 chip and place it just to the left of the first BCD Display Board. The second BCD Display board should go to the left of the second 7490 chip. Table 3. Pin connections for the 7490

7490 Pin Name Input B R0 (1) RO(2) NC Vcc R9(1) R9(2) Oc Ob Gnd Od Oa NC Input A

7490 Pin 1 2 3 4 5 6 7 8 9 10 11 12 13 14

7490 Connection 12 3 2 / Left Pulser 1 NC Vcc = 5 Volts 7 6 / Right Pulser 1

BCD Display Connection

3 2 Gnd = 0 Volts 7 1 8 NC Clock or 555 output 3

Wire these two together exactly as you did the first 7490 and BCD board with the following exceptions: The Input A pin of the second 7490 should be connected to the Output of the first 7490 which is the first BCD pin 7 or pin 11 of the 7490. The DP for the second BCD board is a no connect because we dont need a second decimal point. Looking again at Figure 2 we see that we are still missing the 555 Timer circuit. Put the 555 timer chip to the left of the second set of 7490 chips and BCD displays. Remember to place pin 1 on the lower left-hand side. Connect the 555 like Figure 3. Let R1 be the 3.3kW resistor in series with the 5kW potentiometer. Replace R2 with the 4.7kW resistor. C1 should be the 10 mF capacitor. If the capacitor has polarity markings be sure that goes to +0 Volts and + goes to pin 2. Connect the output pin 3 to one of the lamp monitors so that you can see how fast the output will make the lamp blink. This blinking speed may be adjusted by turning the potentiometer. If you have time take the output of the 555 Timer chip and check it with the oscilloscope. You may use the oscilloscope to adjust the output to exactly 0.1 seconds period. When you are sure this circuit is operating properly connect the output pin 3 to pin 14 of the first 7490 chip to replace the clock. Table 4. Pin Connections for the BCD Display Board BCD Board BCD BCD Board 7490 Pin Pin Name Board Pin Pin Vcc 1 Vcc = +5 Volts A1 2 9 A2 3 8 LTI 4 NC RB0 5 6 RB1 6 5 A3 7 11 A0 8 12 Gnd 9 Gnd = 0 Volts DP 10 Gnd = 0 Volts

7 segment display

BCD display driver 8

BCD Display Board


1 2 3 4 5 6 7 8 9 10

Pins

Figure 7. Pins on the BCD Display Board. Last Thing to do: Please fill out the experiment survey form and return the form to the instructor.