Discovering Electronic Clocks

Page 1

DISCOVERING ELECTRONIC CLOCKS

W. D. Phillips DOCTRONICS EDUCATIONAL PUBLISHING for DESIGN & TECHNOLOGY


DOCTRONICS EDUCATIONAL PUBLISHING for DESIGN & TECHNOLOGY 6 LIMES AVENUE, MILL HILL, LONDON NW7 3PA

ď›™ W. D. Phillips First published by: Doctronics Educational Publishing for Design & Technology, 1998 ISBN 0-9530129-1-3 All rights reserved. This book is copyright material but permission is granted to make photocopies of pages for classroom use provided that the copies are used exclusively within a purchasing institution. Permission is similarly granted to use designs for printed circuit boards within a purchasing institution. No other reproduction, storage in a retrieval system or transmission in any form or by any means may be made without prior permission from the copyright holder.

Acknowledgements: Colleagues and students at Westminster School were the source of numerous constructive comments and suggestions. The author is particularly grateful to Ransford Agyare-Kwabi whose help was invaluable in building and testing prototypes and printed circuit boards.


CONTENTS 1

: Beginnings

2

: Bistables

3

: Tick ... Tock ...

4

: Time setting

5

: Counters & displays

6

: First clock

7

: Big digit clock

8

: Binary clock

9

: Linear clock

10 : Andrew’s clock 11 : Circles clock 12 : Ideas Resources


Discovering


1 : BEGINNINGS Don’t skip this Chapter in your enthusiasm to build your clock straight away. You will understand the circuits better and be able to fault find more effectively by working through some of the underlying theory first. (If you’re going to skip the Chapter anyway, come back and read it later!)

About this book Discovering Electronic Clocks will help you to design and build your own electronic clocks. In addition to a carefully explained digital clock using 7-segment LED displays, you will find designs for a ‘Big Digit Clock’, with a seconds display, for a ‘Binary Clock’, a ‘Linear Clock’, and for ‘Andrew’s Clock’, which gives a semi-analogue display. You will find out enough about these designs and about the integrated circuits used to allow you to adapt and modify and develop your own circuits. It is surprising how versatile clock circuits can be. With a little imagination, you can develop an original, attractive and functional solution to a design problem which has led to just a few commercially exploited solutions. The book assumes that you know a little about the fundamentals of electronic circuits. Hopefully, you will have used components like resistors, capacitors, diodes, transistors and logic gates before, and will have a working understanding of electric current, voltage and resistance. If you are an absolute beginner, it would be helpful to refer to an introductory text (including ‘Discovering Electronics with crocodile clips ©’ from DOCTRONICS.)

Signals from switches Electronic clock circuits are digital electronic circuits, that is, they process signals which are either LOW voltages, called ‘logic 0’, or just ‘0’ or HIGH voltages, ‘logic 1’, or ‘1’. To start investigating the circuits you will use in developing a clock, you need to know how to produce LOW and HIGH voltages by operating a switch. Look at the circuit diagrams at the top of the next page. These show two ways of arranging switches. In the first circuit, the 10 kΩ resistor is connected as a pull up resistor. This means that Vout from the circuit will be HIGH when the switch is open, and LOW when the switch is closed, or pressed. In the second circuit, the 10 kΩ resistor is connected as a pull down resistor, with the result that Vout is LOW when the switch is open and HIGH when the switch is pressed.

Electronic Clocks

PAGE 1.1


V in

10 kΩ

pull up resistor

V in

V out

10 kΩ

LOW when switch pressed

V out HIGH when switch pressed

pull down resistor Both of these circuits are examples of ‘potential divider’ circuits, in which Vout depends upon the ratio between Rbottom, the resistance below the Vout connection, and Rtop, the resistance above the connection. The potential divider formula is: Vout =

Rbottom × Vin Rbottom + Rtop

Work through the formula for the circuit with the pull up resistor, substituting a very large value for Rbottom, say 10 MΩ, to calculate Vout when the switch is open, and a very small value, say 1 Ω, to estimate Vout when the switch is closed. This will confirm the action of the circuit, namely that Vout is HIGH when the switch is open and LOW when the switch is closed. All of this theory is nice (and arguably important) but you need to see the circuit in action to put the theory into context. This involves building a temporary or ‘prototype’ circuit, as explained in the next section.

About prototype board If you know about prototype board already, skip to the next section. Design Sheet DS 1.1 shows a prototype board. This is used for building temporary circuits, without needing to solder components together. Component leads and wire links are pushed into the holes in the board to make the right connections. It is important to understand how prototype board works. Inside the board, there are metal channels with springy contacts. The channels are arranged in rows. There are two long channels at each side of the board. These are used to make power supply connections. As you can see, 0 V is always connected on the left hand side of the board, with +V always on the right hand side. This is a habit you

PAGE 1.2

Discovering




should adopt: most integrated circuits have pin layouts which conform to this arrangement and it is easier to interpret your circuits and fault find if you always know where the power supply connections ought to be. In the centre of the prototype board, there is a gap, and on either side, there are short channels each corresponding to a horizontal group of five holes. • If you want component leads to be connected, plug them into the same horizontal row of holes. • Opposite ends of a single component will always be pushed into holes on different horizontal rows. • Integrated circuits fit across the gap in the centre of the board. If you think about the arrangement of the metal channels inside the prototype board, all of this makes perfect sense. Wire links are made using 0.6 mm solid core wire. You can remove around 5 mm of the outer PVC insulation from each end using wire strippers. Keep wire links for reuse. If you are using a prototype board at school or college, an adjustable voltage power supply will often be available. Alternatively, a 9 V PP3 battery could be used. The ends of the leads from a PP3 battery clip are pre-soldered and can usually be pushed into the power supply holes without difficulty. The red lead is +9 V, and the black lead is 0 V.

Building the prototype circuit Carefully follow the diagram shown at the top of Design Sheet DS 1.2. The push button switches used are ‘miniature tactile switches’ (Order code 78-0600 from Rapid Electronics). These are cheap and have the advantage that the switch terminals can be pushed into the prototype board without damage. You can use an alternative type of switch, or even replace the switch component altogether, using a ‘Scottish switch’ consisting of two bare wires which can be touched together to make the contact:

OPEN

CLOSED

0.6 mm solid core wire A Scottish switch The name ‘Scottish switch’ derives from the extreme economy of this arrangement. You will find that Scottish switches are often faster

Electronic Clocks

PAGE 1.3


and more convenient for prototype board work than wiring in an actual switch component. Returning to your prototype circuit, how can you tell what happens to the output signals when you operate the two switches? One answer is to connect a voltmeter. In the prototype circuit, this is represented by the symbol:

0.00 V -

+

You are most likely to use a multimeter to make measurements from circuits. This is a versatile instrument which can be used as a voltmeter, as an ammeter (to measure electric current), or as an ohmmeter (to measure resistance). The diagram on DS 1.2 shows a typical switched range multimeter, available from electronics suppliers for £15 or less. The meter looks complicated but is simple to use. The central knob is rotated to select the function you want. To measure d.c. voltage, the ranges in the top left corner are used. If the knob is turned to ‘20’, then 20 V is the maximum voltage which the meter can measure. This setting is appropriate for circuits with a 9 V power supply. If the knob is clicked round to ‘2000 m’ the maximum reading will be 2000 mV, or 2 V, and so on. In this case, you want to measure voltages up to 9 V, so the ‘20’ setting is correct. To use the multimeter as a voltmeter, remember that voltmeters are connected in parallel with any test circuit. This makes it easy to connect a voltmeter to the circuit. For the Vout measurements you want to make here, the ‘COM’ socket of the meter is connected to 0 V. It is helpful to use BLACK-coloured leads for 0 V connections. For the ‘VΩ ΩmA’ socket, you should use a RED-coloured lead with a probe or crocodile clip to connect into the circuit. Once you have built the circuit, measure Vout for both circuits. You will find that the potential divider circuit with the pull up resistor gives a HIGH voltage, close to 9 V, when the switch is open and a LOW voltage when the switch is closed. The circuit with the pull down resistor works the other way: Vout is LOW when the switch is open and HIGH when the switch is closed. These potential divider circuits allow you to send HIGH and LOW signals to logic circuits and you will use them often as you develop your electronic clock.

Driving LEDs It is not always convenient to use a voltmeter to investigate logic signals. Sometimes you will want to ‘see’ what is happening using a light-emitting diode, or LED, which lights up when there is a HIGH

PAGE 1.4

Discovering


voltage at some particular point in the circuit. The right way of doing this is about to be revealed. The diagram below shows an LED operated from a 9 V supply. You may know that an LED requires 10-15 mA of current to illuminate brightly and that a voltage of around 2 V, called the forward voltage, is needed across the LED. You should also know that a resistor must be connected in series with the LED in order to limit the current flowing through it.

+9 V 7V across resistor 10 mA 2V across LED 0V How do you decide on the correct value for the resistance of the series resistor? As you can see, the voltage across this resistor is 9-2=7 V, that is, the power supply voltage minus the forward voltage of the LED. The current through the resistor is to be 10 mA. You can calculate the resistor value as follows: R=

V 7 = = 0.7 kΩ = 700 Ω I 10 mA

The nearest E12 resistor value is 680 Ω. (The E12 series is the common series of resistor values available from electronics suppliers.) Although 10 mA is not a huge current, it is more than the output of most logic gates and other similar integrated circuits can provide. This means that you should not connect an LED directly to your logic circuit. What was a HIGH voltage might be a HIGH voltage no longer and what was a functioning circuit could easily be prevented from working! The current required from the logic circuit must be reduced. This is a job for a transistor, as indicated in the circuit shown at the top of the next page.

Electronic Clocks

PAGE 1.5


+9 V 680Ω 10 mA

47 kΩ from logic circuit

base

collector TRANSISTOR

0.1 mA

emitter

0V The essential feature of transistor action is that a small current, the base current, controls the flow of a much larger current at the transistor’s collector terminal. The current gain, hFE, of a typical small signal transistor is at least 100. That is, the collector current can be at least 100 times larger than the base current. In this context, if the LED requires 10 mA, the current required to trigger illumination can be reduced to 10/100=0.1 mA. The 47 kΩ resistor in series with the transistor’s base terminal limits its base current to this sort of level. All types of logic gate can easily provide currents of this magnitude and operation of the logic circuit will be unaffected. Design Sheet DS 1.3 shows you how to add transistor/LED driver circuits to your switch circuits. Build the circuit following the prototype board layout and then test the operation of the two switches. Do the LEDs illuminate when Vout from the switch circuits is HIGH?

NAND gates Now that you can produce HIGH and LOW logic signals and monitor the logic state of any point in a circuit by lighting up an LED, you can start to investigate the properties of logic gates and other logic integrated circuits. NAND gates are the most useful variety of logic gate because thay can be connected together to make all the other types of gate, including AND, OR, NOR, and EOR/XOR. In fact, many logic integrated circuits have an internal circuit which consists entirely of NAND gates. There are several families of logic i.c.’s, each with particular properties and power supply requirements. One of the most important distinctions is between ‘74 series’ devices, which are intended for use with a 5 V power supply, and ‘4000 series’ devices

PAGE 1.6

Discovering




which can work with any power supply from 3-15 V. It is essential to know that the pin arrangements of the two types of i.c. are quite different. You can’t replace a 74 series NAND gate i.c. by plugging a 4000 series device in the same socket. The diagrams below show the pin layout for NAND gate i.c.’s in each of the two series:

7400 NAND gates

4011 NAND gates

1

14 5 V only

1

14 +3-15 V

2

13

2

13

3

12

3

12

4

11

4

11

5

10

5

10

6

9

6

9

0V 7

8

0V 7

8

The first 74 series devices were manufactured using a technology known as transistor-transistor logic, or TTL. The first 4000 series devices used an alternative technology, known as complementary metal oxide silicon, or CMOS. The technology of manufacturing integrated circuits does not stand still. More recent versions of 74 series devices remain compatible with the original devices in the sense that they have the same power supply requirements, can be used in the same circuits and have identical pin arrangements. However, the TTL manufacturing process is largely obsolete, and most new 74 series devices are made using developments of the CMOS process. It is not necessary for you to know the details of all the different logic families provided you remember that a 74 type number i.c. is going to need a 5 V power supply, while a 4000 type number i.c. can operate with power supplies up to 15 V. In general, 4000 series devices require less current and are useful for battery-operated projects. Your electronic clock requires continuous current, more than batteries can sensibly provide, and will be powered by a small encapsulated transformer from the mains (similar to the power supply used with a personal stereo). CMOS integrated circuits will be used because of their wider power supply range. Your clock is designed to work from 9 V, but will function with voltages a little below, or a little above this, to allow for variations in the voltage provided by the transformer.

Electronic Clocks

PAGE 1.7


Checking the truth table Build the circuit shown at the top of Design Sheet DS 1.4. You can do this by inserting a 4011 CMOS i.c. and rearranging some of the components already on the prototype board. The push button switches are wired with pull down resistors. What kind of logic signal will you get when you press the button? With pull down resistors you get a HIGH voltage, logic 1, when the switch is pressed. Operate the switches in all combinations to complete the following table: switch B

switch A

open

open

open

closed

closed

open

closed

closed

output

The output is HIGH when the LED is illuminated and LOW when the LED is off. Representing an open switch by ‘0’ and a closed switch by ‘1’, and writing ‘0’ for LOW and ‘1’ for HIGH should give the NAND gate truth table: input B

input A

output

0

0

1

0

1

1

1

0

1

1

1

0

NAND gate truth table Check through your circuit until you get this result. Possible errors include misplaced, or missing wire links. Now modify your circuit, as shown in the diagram in the lower half of DS 1.4. This gives you two new ways of driving an LED. The circuit diagram for the system you have built is shown at the top of the next page. Although LED 1 and LED 2 are both connected to a NAND gate with its inputs connected together, they are driven in different ways. LED 1 is connected between +9 V and the output of the second NAND gate. This means that LED 1 will light up when

PAGE 1.8

Discovering


the output of its NAND gate goes LOW. Check that LED 1 follows the NAND gate truth table, as before.

+9 V switch A

680 Ω

switch B valid logic signal

NAND 10 kΩ

LED 1 not a valid logic signal

NAND

10 kΩ

NAND

680 Ω LED 2 0V

Now compare this with the behaviour of LED 2, wired fom the output of the third NAND gate to 0 V. LED 2 lights up when the ouput of its NAND gate goes HIGH. As a result, its behaviour is opposite to that of LED 1. In fact, LED 2 follows the AND gate truth table, as follows: input B

input A

output

0

0

0

0

1

0

1

0

0

1

1

1

AND gate truth table In this circuit, you have used NAND gates connected to make two other gates. These are NOT and AND gates:

AND gate

NOT gate input

output NAND

input A input B

output NAND

NAND

Looking again at the circuit diagram, you can see that the output of the first NAND gate is a valid logic signal. The current taken from

Electronic Clocks

PAGE 1.9


this point by the other two NAND gates is small and what is meant to be a HIGH voltage will actually be a HIGH voltage. This is not true after the NAND gates which drive the LEDs. 4011 NAND gates can provide just enough current to drive LEDs, but the HIGH and LOW voltages will be pulled away from their normal values and must not be used as inputs to other parts of the logic circuit. It is instructive to measure the HIGH and LOW voltages at the outputs of the gates driving the LEDs using a voltmeter (you know how to do this) and compare these values with the normal HIGH and LOW voltages. You can use a logic gate to substitute for a transistor in driving an LED, provided you remember that the output of the logic gate is no longer a valid logic signal. If you have worked through this Chapter, and completed all the practical work, you have learned a lot. Stick with it.

PAGE 1.10

Discovering


2 : BISTABLES In this Chapter, you will find out about bistables which are the fundamental building blocks of electronic counting circuits.

Set-reset bistable A bistable circuit, also called a latch, or ‘flip-flop’, has two stable states. The output of a bistable can be either logic 1, or logic 0, according to signals received at its inputs. One of the simplest bistable circuits consists of two NAND gates:

SET

Q NAND

Q

RESET NAND

As you can see, there are two inputs, the SET and RESET . The ‘bars’ over these symbols indicate that these inputs are ‘active LOW’. In other words, each input must be held HIGH and pulsed LOW when you want something to happen. Q and Q are the outputs of the circuit and normally have opposite logic states. The bistable is SET when Q=1 and Q =0, and RESET when Q=0 and Q =1. This kind of bistable is called a set-reset bistable, S R bistable, or sometimes R S bistable, latch or flip-flop, and is often represented by a simplified symbol, as follows:

_ S

Q

_ R

_ Q

Symbol for an S R bistable

A practical circuit for a NAND gate bistable needs switches to provide logic signals. Since the SET and RESET inputs are to be held HIGH and pulsed LOW, you need switches with pull up resistors, as indicated in the circuit diagram which follows:

Electronic Clocks

PAGE 2.1


+9 V 10 kΩ pull up resistors Q NAND

Q NAND SET

RESET 0V

It would be useful to monitor the Q and Q outputs with LEDs which illuminate when each output is HIGH:

+9 V 680 Ω

10 kΩ pull up resistors Q NAND NAND

NAND SET

Q

NAND

RESET 0V Remember that the outputs of the NAND gates driving the LEDs do not produce valid logic signals. As you can see, the whole circuit requires four NAND gates and can therefore be assembled using a single 4011 CMOS integrated circuit. The prototype board layout for this is shown at the top of DS 2.1. Go ahead and build the circuit, following the layout carefully. Look at the way in which the push button switches are connected on the prototype board. The placement of the link wires to the inputs of the 4011 NAND gates exploits the way in which the contacts are

PAGE 2.2

Discovering




arranged inside the switch. As you can see in the diagram below, the top two pins of the switch are internally connected by a metal strip:

metal strip inside switch

minature tactile switch

contacts bridged by pressing button The bottom two pins are internally connected in the same way. As a result, either pin from each pair can be used to make connections to other parts of the circuit. This is a common arrangement for push button switches intended for use on printed circuit boards, PCBs, and helps to simplify the design of PCB layouts for keyboard circuits. An important new component has been added to the prototype board layout. This is the 47 µF decoupling capacitor connected across the power supply from +9 V to 0 V. Why is it there? The answer is that the decoupling capacitor prevents the transfer of rapid or transient signals, or ‘glitches’, from one part of the circuit to another along the power supply connections. CMOS i.c.’s are relatively vulnerable to this sort of interference and the addition of 47 µF, or 100 µF decoupling capacitors, connected as close to the power supply pins of individual integrated circuits as possible, is recommended. Sometimes, you will see a decoupling arrangement like this:

+V 47 µF

+ 100 nF 0V

This arrangement looks strange because the values of capacitors connected in parallel add together: Ctotal = C1 + C 2 . . .

Here Ctotal = 47 + 0.1 = 47.1 µF . Since the tolerance of a 47 µF capacitor is likely to be as much as 20%, it seems pointless to add such a small capacitor in parallel. In fact, the behaviour of practical polarized and non-polarized capacitors is different, with nonpolarised capacitors working more effectively for high frequency signals. Think about decoupling capacitors as part of the ‘recipe’ for getting CMOS circuits to work and don’t forget to put them in. Test your set-reset bistable. • What happens when you operate the SET push button? • What happens when you operate the RESET push button? • What happens when you operate both buttons at once?

Electronic Clocks

PAGE 2.3


In this last condition, both Q and Q LEDs should illuminate. This is often described as a ‘disallowed state’. The bistable isn’t damaged, but it is impossible to predict which output will remain HIGH when the buttons are released. A set-reset bistable is often used as a ‘memory’ device, for example in a burglar alarm, which remains ON once it has been triggered. A different application for a set-reset bistable is in ‘debouncing’ a switch. The metal contacts inside a switch are springy and often bounce when the switch state is altered. Contacts may close, not once, but several times. With an oscilloscope, to monitor voltage/time changes, this is what you might see at the inputs and outputs of the bistable:

'ON' bounces

'OFF' bounces V

SET switch

t switch pressed RESET switch switch pressed Q output

rising edge

falling edge

DEBOUNCED OUTPUT PULSE Although, the signals at the SET and RESET inputs change many times, the Q output changes just once from LOW to HIGH, and once from HIGH to LOW. In this way, you can produce a ‘debounced’ output pulse. Pressing the SET switch gives a rising edge, pressing the RESET switch gives a falling edge.

D-type bistable For electronic counting, a more sophisticated type of bistable is needed. The diagram at the top of the next page shows the connections for a D-type bistable. As you can see, there are four different inputs: • The DATA input is held at logic 1 or logic 0 and can be changed from one logic state to the other at any time. • The small triangle inside the symbol indicates that the CLOCK input is edge-triggered. This is an important property. The CLOCK input of a D-type bistable responds only to rising edges,

PAGE 2.4

Discovering


that is, a rapid change from LOW to HIGH. Slow changes and sustained HIGH or LOW signals have no effect. • The S and R inputs are the SET and RESET. The absence of ‘bars’ above these inputs indicates that they are ‘active HIGH’. In other words, S and R should be held LOW and pulsed HIGH to SET or RESET the bistable. Q and Q are the outputs as before:

DATA input

D

CLOCK input

ck

Q

Q S

R

Symbol for a D-type bistable

To describe the action of a D-type bistable, you can say that the logic state at the D-input is transferred to the Q-output on the rising edge of the clock. This statement is easier to understand once you have built and tested a prototype circuit. This is shown on the lower half of DS 2.1, and uses a new CMOS integrated circuit, the 4013. In fact, a 4013 contains two separate D-type bistables with pin connections as follows:

4013 D-type bistables Q

2

Q

3

ck

4

D-type 1

1

14 +3-15 V 13

Q

12

R

ck

11

5

D

R

10

6

S

D

9

S

8

0V 7

D-type 2

Q

For the present, you are going to use the D-type bistable connected to pins 1-6, leaving the other bistable unconnected. (In any final circuit, all unused CMOS inputs must be connected either to +9 V or

Electronic Clocks

PAGE 2.5


0 V, but you can usually work on prototype board without worrying about the unused parts of the integrated circuit.) Build the D-type circuit, following DS 2.1 carefully. Connect the power supply and the CLOCK input from the first prototype board as shown, then investigate the action of the D-type: • Verify the action of the D-type SET and RESET switches. Whenever these switches are pressed, the output of the D-type will change accordingly. The SET and RESET inputs are ‘levelsensitive’, rather than edge-triggered. • What happens if the SET and RESET are pressed simultaneously? This is a disallowed state, as with the NAND gate bistable. • Press the RESET switch to force Q=0, then connect the DATA input to +9 V, using a ‘flying lead’ from the prototype board, see DS 2.1. • Press the RESET switch on the NAND gate circuit (first prototype board) and then press the SET switch on the NAND gate circuit. This produces a rising edge at the CLOCK input of the D-type bistable, provided you have connected the two prototype boards together. At the exact moment that the rising edge occurs, the Q-output of the D-type bistable will go HIGH. • Disconnect the flying lead from +9 V. Because of the pull down resistor, the DATA input immediately returns to LOW. Does this have any effect on the outputs of the D-type? • Repeat the RESET/SET sequence with the NAND gate circuit. Again, the output of the D-type changes at the exact moment that the rising edge arrives. This is what is meant by edge-triggered behaviour. Continue to investigate the D-type until you are confident that you understand what each of the inputs and outputs will do.

Start counting . . . Don’t take your carefully assembled prototype board circuits to bits. You will need them both for the practical work described in this section. Electronic counting depends on toggle bistables. This isn’t an entirely new variety of bistable you have to learn about but is easily made by connecting the Q -output of a D-type bistable to its DATA input, as shown in the diagram which follows:

PAGE 2.6

Discovering


D pulses IN

Q

pulses OUT

ck Q S

R

A toggle bistable

The special property of a toggle bistable is that its output changes state every time an input pulse arrives. You can convert your D-type bistable circuit to a toggle bistable by removing one link and inserting another. Do this now, following the layout at the top of DS 2.2. There is a new link from Q to the DATA input and the connection to the second LED has been removed. Keep the connections with the NAND gate bistable prototype circuit. • RESET the NAND gate bistable and then press SET and RESET in sequence in order to deliver a series of input pulses to the CLOCK input of the toggle bistable. The output of the toggle bistable changes state for each input pulse received. Strictly, for each rising edge received. With an oscilloscope, the changes observed are like this:

NAND gate bistable switches SET RESET INPUT pulses

Q-OUTPUT pulses

V t As you can see, the Q-output changes at the beginning of each input pulse. You should be able to see this happen when you press the NAND gate bistable SET button. • Count the input pulses in the diagram above. Answer: 4 • Count the output pulses in the diagram above. Answer: 2 The toggle bistable divides the number of input pulses by two. This is really the same as counting the input pulses. To make this clear, you

Electronic Clocks

PAGE 2.7


can now add a second toggle bistable to the first, as shown in the layout at the bottom of DS 2.2. Add the links following the layout carefully. Your circuit is now:

D pulses IN

Q

D

ck

Q

pulses OUT

ck

TOGGLE BISTABLES

Q

Q

S R (SET and RESET inputs connected to 0 V through pull down resistors)

S

R +9 V

47 kΩ

680 Ω

680 Ω

Q1

Q2 47 kΩ

INDICATORS

0V The output of the first D-type is a pulse waveform with rising edges and these trigger the second bistable as follows: NAND gate bistable switches SET RESET

V t

INPUT pulses

Q1-OUTPUT pulses 0

1

0

1

0

1

Q2-OUTPUT pulses 0

1

1

0

0

1

0

1

2

3

4

5

You have added a second divide-by-two circuit, with one Q2-output pulse for every four input pulses. It is helpful to convert these waveforms into truth table format, with each line in the truth table corresponding to one of the numbered arrows at the bottom of the diagram:

PAGE 2.8

Discovering


pulse number

Q2 output

Q1 output

0

0

0

1

1

1

2

1

0

3

0

1

4

0

0

5

1

1

repeated sequence

In the table, the Q1 output is on the right because it is the least significant bit, LSB, of a binary number. The counting sequence for the circuit is 11 10 01 00, in descending binary order. You have built a 2-bit binary down counter. There are 2 D-types and 22=4 different output states. How could you make a 3-bit binary down counter? Easy! add another toggle bistable:

OUTPUTS Q1

D pulses IN

Q

ck

D

Q

ck Q

S 0V

Q2

R

Q3

D ck

Q S

Q

R

Q S

R

3-bit binary down counter How may output states would this have. The calculation is 23=8 output states. For a 4-bit counter (24=16 output states) you would add a fourth bistable, and so on. This is all very well, but how can you make an up counter, which is likely to be more useful for counting in general and for electronic clock circuits in particular? This is easier than it sounds. All you need to do is to rearrange the connections between the toggle bistables. Instead of connecting the Q-output to the CLOCK input of the next

Electronic Clocks

PAGE 2.9


stage, the Q -output is connected to the CLOCK input of the next stage. The circuit becomes:

D pulses IN

Q

D

ck

Q to next stage

ck Q R

S

TOGGLE BISTABLES

Q R

S

(SET and RESET inputs connected to 0 V through pull down resistors)

+9 V

47 kΩ

680 Ω

680 Ω

Q1

Q2 47 kΩ

INDICATORS

0V • Check back with the layout at the bottom of DS 2.2, and make this modification. The waveforms at the counter outputs are changed to: NAND gate bistable switches SET RESET

V t

INPUT pulses

Q1-OUTPUT pulses 0

1

0

1

0

1

Q2-OUTPUT pulses 0

0

1

1

0

0

0

1

2

3

4

5

The truth table for the counter outputs is changed as well and the outputs now follow the repeated sequence 00 01 10 11, that is, binary numbers in ascending order:

PAGE 2.10

Discovering


pulse number

Q2 output

Q1 output

0

0

0

1

0

1

2

1

0

3

1

1

4

0

0

5

0

1

repeated sequence

Notice again, that the Q1-output appears in the table at the right hand side because it is the LSB of the binary number. • Confirm the behaviour of your counter by sending pulses to the CLOCK input from the NAND gate bistable, as before. Here is the circuit for a 3-bit binary up counter:

OUTPUTS Q1

D pulses IN

Q

ck

D

Q

ck Q

S 0V

Q2

R

Q3

D ck

Q S

Q

R

to next stage Q

S

R

3-bit binary up counter To make a 4-bit binary up counter, you add a fourth toggle bistable connected in the same way, and so on. To summarise: DOWN counter:Q to CLOCK input of next stage UP counter:

Electronic Clocks

Q to CLOCK input of next stage

PAGE 2.11


What’s next? You will find out more about counters in due course. The counters described in this Chapter count only in powers of two, 22=4, 23=8, 24=16 and so on. How can you make a decimal counter, which counts in 10’s? How could you link counters together to count up to 60, to count seconds or minutes, or to 12 or 24 for hours? Similarly, how can you process the outputs of counters to give a user-friendly display? All of these questions have answers and, as you work through the next few Chapters, you will find out what they are.

PAGE 2.12

Discovering


3 : TICK. . . TOCK. . . In this Chapter, you will find out how to make a circuit which acts as a source of regular signals, with sufficient accuracy for proper timekeeping.

About clocks Most clocks consist of an oscillator, or astable, section followed by a counting section and then a display. In a grandfather clock, the oscillator is the pendulum, the counting section consists of gears, and the display is formed by the hands which move around the face of the clock. Power to drive the clock mechanism comes from weights which are wound up once a week, and slowly fall, providing just enough energy to keep the pendulum swinging. The same sections can be identified in an electronic clock. Some older alarm clocks (or clock radios) use the 50 Hz from the mains (60 Hz in the USA) as the oscillator. This applies to clocks in older mains-operated appliances, such as cookers and some video recorders. Mains frequency is continually adjusted so that clocks which work in this way will keep good time. Digital wristwatches and digital battery clocks use a piezoelectric crystal as part of the oscillator. The crystal is made of quartz and changes shape when a voltage is applied across it. Under appropriate conditions, the crystal can be made to vibrate at a particular frequency, known as its resonant frequency. The resonant frequency depends on the size and shape of the crystal and can be determined very accurately during manufacture. Your clock is going to work from a 9 V d.c. supply. The supply will be plugged into the mains but is completely enclosed so that 50 Hz is not available. For this reason, you will use a crystal as part of the oscillator (astable) section for your clock.

Introducing the 4060 The 4060 is a CMOS integrated circuit which consists of an astable section followed by a 14-bit binary counter. It’s just what you need to start your clock circuit. It is worth explaining where you can find details about all these exotic integrated circuits. The most obvious source of information is from electronics suppliers’ catalogues. The Maplin catalogue in particular gives pin connections and a brief description of lots of different i.c.’s. Additional suppliers, books, data books, and internet links are listed at the back of this book. Data books and

Electronic Clocks

PAGE 3.1


manufacturer’s CD-ROMs are not expensive, mainly because manufacturers want you to use their products. The 4060 is ‘sourced’ by several different manufacturers, including Philips and Motorola. Its function diagram is shown below: pin number

+3-15 V 16

RESET 12 CLOCK input/ 11 astable pin

14-stage binary counter NAND

NOT R TC

C TC

Q3

Q4

Q5

Q6

Q7

Q8

Q9

Q11

Q12 Q13

10

9

7

5

4

6

14

13

15

1

2

astable pin

3

astable pin

8

0V

4060 function diagram This sort of diagram gives you an overview of the circuits inside this particular ‘beastie’. You will understand what is meant by a ‘14-stage binary counter’ and can guess what the functions of the RESET and CLOCK input pins are likely to be. The pin numbers from the function diagram correspond to the pin positions in the more familiar pin layout diagram:

1

Q11

2

Q12

Q9

15

3

Q13

Q7

14

4

Q5

Q8

13

5

Q4

RESET

12

6

Q6

CLK

11 astable pin

7

Q3

R TC

10 astable pin

C TC

9 astable pin

0V 8

16 +3-15 V

4060 pin connections

Information from data sheets gives two circuits for use with the astable section of the 4060. The first circuit uses resistor/capacitor timing and is shown at the top of the next page. This is an easy circuit to set up and test and will give you a good idea of the capabilities of the 4060. (At this point, you are finding out about a new integrated circuit. Resistor/capacitor timing isn’t accurate enough for time-keeping, but is easier to investigate.)

PAGE 3.2

Discovering


The astable frequency is determined by the timing resistor, RT, and the timing capacitor, CT.

+3-15 V 16

RESET 12 11

NAND

R1

NOT R TC

C TC

10

9

RT

CT

4060 resistor/capacitor astable circuit The design formula for calculating astable frequency is given as: fosc =

1 2.3 × RT × CT

Data sheets suggest appropriate values for RT and CT. These should be in the range: 10 kΩ ≤ RT ≤ 10 MΩ 100 pF ≤ CT ≤ any practical value Within these limits, it is often sensible to choose a large resistor value with a small capacitor value. There are two reasons for this. Resistors cost the same whatever value you use, while large value capacitors are more expensive. In addition, small value capacitors tend to be closer tolerance, that is, more accurate, than larger values. For correct operation, R1 should be much higher in value than RT. You are now going to choose suitable values for RT, CT and R1 to give an astable frequency of around 10 kHz. The best way of approaching this is to rearrange the design equation so that RT and CT are on the left hand side: RT × CT =

1 2.3 × fosc

The design formula works for fundamental units, that is, with resistance measured in ohms, capacitance measured in farads, and frequencies in Hertz. Instead of converting measurements into fundamental units, it is often more convenient to work with combinations of compatible units. For example, with resistance in MΩ and capacitance in µF, frequency will still work out in Hz. The

Electronic Clocks

PAGE 3.3


most useful combinations of units are summarised in the following table : R units

C units

t units

f units

F

s

Hz

MΩ

µF

s

Hz

kΩ

µF

ms

kHz

kΩ

nF

µs

MHz

In this case, you want to make a calculation based on a frequency value in kHz, so it will be easiest to think of values for RT in kΩ and CT in µF. Following through with the calculation: RT × CT =

1 1 1 = = = 0.043 2.3 × fosc 2.3 × 10 23

In other words, to get the astable to work at the correct frequency, you need to choose values for RT (in kΩ) and CT (in µF) which will multiply together to give 0.043. Suppose you decide to make RT =47 kΩ. The value of CT is then: CT =

0.043 = 0.0009 µF, or approximately 0.001 µF=1 nF 47

Alternatively, you might decide to choose RT =22 kΩ: 0.043 = 0.00195 µF, with 2.2 nF as the nearest easily available 22 capacitor value. CT =

• What value of CT should you use if RT =10 kΩ? Calculations like this need a little practice, but are not difficult once you have become familiar with them and with the idea of looking for and using sets of compatible units. If you make a mistake in the calculation, you will find out when you test the circuit. If the frequency ends up 10 times, 100 times or 1000 times too fast or too slow, check the figures! If RT =47 kΩ, R1 could be 470 kΩ, ten times as much. R1 is not part of the timing circuit and, provided it is large compared to RT, its value is not critical. • Build the 4060 circuit following the layout shown in DS 3.1. • In addition to the R1, RT and CT connections, the RESET pin, pin 12, must be connected to 0 V, for the circuit to work.

PAGE 3.4

Discovering




• Investigate the signals at the outputs of the 4060, preferably using an oscilloscope, as indicated. The diagram below shows the sort of result which you might obtain by connecting the oscilloscope to pin 10 of the 4060. The vertical (voltage) scale of the oscilloscope graph is 2 V per division, and the horizontal (time) scale is 0.1 ms per division. period 0.14 ms

0V

V 2 V/div t 0.1 ms/div

From the graph, you can estimate the period, τ, of the waveform as around 0.14 ms (milliseconds). The frequency is given by: f=

1 1 = = 7.14 kHz τ 0.14 ms

This is a bit slower than the expected 10 kHz. This is partly explained by rounding up in choosing the CT value. You may remember that a capacitor consists of two regions of conductor (plates) separated by an insulator. This description applies to the metal tracks of the prototype board and these contribute to a ‘stray capacitance’ which adds to CT. Component tolerances can also result in differences, though resistor and capacitor values are just as likely to be less as they are to be more than the marked, or nominal value. • Measure the period and calculate the astable frequency of your 4060 in the same way. • How could you make the frequency closer to 10 kHz? If it was important to have an output frequency closer to 10 kHz, you could replace the 47 kΩ resistor with another value. If the frequency was too slow, as above, you could try a 33 kΩ, or 39 kΩ. Alternatively, you could replace the 47 kΩ with a variable resistor and adjust its value to give 10 kHz. • Continue to investigate the 4060 outputs. The first available output is at pin 7, after 4 stages of binary division by D-type bistables inside the 4060. The initial frequency is divided by 24=16. You will need to change the oscilloscope TIME/DIV to 1 ms per division to see the new signal.

Electronic Clocks

PAGE 3.5


• Estimate the new period of the waveform and calculate its frequency. • Move the oscilloscope probe to pin 5, to see the next output. This will pulse at half the pin 7 frequency. • Continue moving the oscilloscope probe to the next output along the counter chain, and so on The waveforms of the first few outputs follow the pattern shown in the diagram:

falling edge

pin 7

pin 5

pin 4

pin 6

V

pin 14

t 4060 output waveforms This pattern of output changes is typical for a binary up counter. As you can see, the falling edges of any one output correspond to logic changes, from LOW to HIGH, or HIGH to LOW, in the next output. This doesn’t mean that the D-type bistables inside the 4060 are falling edge triggered. As explained in the previous Chapter, a binary up counter is made by wiring the Q -output of each stage to the CLOCK input of the next. • Add an LED with a current-limiting resistor to monitor the slow pulsing outputs. (Refer to DS 3.1). The slowest pulsing output is at pin 3. Altogther, the 4060 divides its initial frequency by 214=16 384. If the initial frequency is around 10 kHz, the final frequency will be around 0.6 Hz. In other words, the LED should flash rather less often than once per second.

PAGE 3.6

Discovering


• Does all this agree with the behaviour of your circuit? • Using the oscilloscope, measure the voltage at pin 3 before the resistor and LED. Compare this with the voltage at other outputs. The pin 3 voltage will be less. The LED ‘loads’ the input and pulls down the output voltage. This is OK if all you want to do is to monitor the output without connecting it to anything else. Don’t forget to use a proper LED driver circuit if you want to transfer valid logic signals to other parts of a circuit.

Crystal-controlled astable The circuit for the crystal-controlled version of the 4060 astable is:

+3-15 V 16

RESET

12 11

NAND

NOT R TC

C TC

10

R1

9

no connection

10 MΩ R2 220 kΩ

xtal

C1 2-22 pF trimmer

15

2 Hz

C2 15 pF 0V

For your clock, you will use a watch crystal. As the name suggests, these are manufactured for use in digital watches. The standard frequency for a watch crystal is 215=32 768 Hz. • A 4060 can divide by up to 214=16 384 Hz. What will the final frequency be? The calculation is:

32 768 = 2 Hz 16 384

With a watch crystal and a 4060, you can produce a very accurate source of pulses at 2 Hz. To get 1 Hz pulses to drive the counter section of your clock, you will need to add another divide-by-two stage. No problem. You know how to do this already, using a D-type bistable.

Electronic Clocks

PAGE 3.7


It is possible to test the crystal-controlled 4060 circuit on prototype board, but, because of the stray capacitance between the prototype board tracks, it is sometimes difficult to get the circuit to work properly. It will work on printed circuit board with the component values given in the circuit diagram.

PAGE 3.8

Discovering


4 : TIME SETTING In this Chapter, you will investigate a circuit which can be used to allow you to set your clock to the correct time. Initially, you might not think of this as a problem, but, if all you have is an accurate source of pulses at one pulse per second followed by a counting section, there really is a difficulty to be overcome.

The system so far In Chapter 3, you investigated the 4060 CMOS integrated circuit, a useful ‘beastie’ which can be connected as an oscillator and which will divide its initial frequency by up to 214. A watch crystal oscillates at 215 Hz. At pin 7 of the 4060, this frequency is divided by 24=16. • What is the frequency of pulses at pin 7? The answer is (215 ÷ 24)=211=2048 Hz. At pin 13 of the 4060, the original frequency is divided by 29. • What is the frequency of pulses at pin 13? This time the answer is (215 ÷ 29)=26=64 Hz. At pin 3 of the 4060, the original frequency is divided by 214, giving 2 Hz. To get pulses at 1 Hz, you need to add a toggle bistable as shown in the diagram below:

4060 CMOS 2 Hz

BINARY COUNTER

CRYSTAL ASTABLE

pin 7

2048 Hz

pin 3

TOGGLE BISTABLE

pin 13

64 Hz

1 Hz

xtal 2 15 Hz As you can see, the 4060 gives you outputs at much higher frequencies than 1 Hz and, since these are also derived from the crystal, they will be equally accurate. This is the key to time setting. Normally, the clock will count seconds and give displays of seconds, minutes and hours. In order to set the clock, you need to be able to make it count more quickly. If the 64 Hz signals could be

Electronic Clocks

PAGE 4.1


passed through to the clock counters, the displays would change by approximately 1 minute each second: this is SLOW setting. For FAST setting, the 2048 Hz signal would make the hours change quickly enough to be useful, 1 hour in a little less than 2 seconds. How can this be achieved? The answer is a clever integrated circuit called an 8-input multiplexer, or 8-input data selector.

Introducing the 4512 The 4512 is the CMOS version of an 8-input multiplexer. A multiplexer has a many to 1 action, as outlined in the function diagram: pin number

+3-15 V 16

SELECT INPUTS

tristate

S0 11

14

S1

OR

MULTIPLEXER

12

OUTPUT

S2 13

D0

D1

D2

D3

D4

D5

D6 D7

1

2

3

4

5

6

7

9

DATA INPUTS

NOT 10

8

0V

15

OE output enable E enable

4512 function diagram As you can see, there are three SELECT inputs, and eight DATA inputs, but only one OUTPUT. As the name suggests, the SELECT inputs allow you to choose which one of the DATA inputs controls the OUTPUT. The enable, E , input is active LOW. It must be connected to 0 V to allow internal transfer from the multiplexer output to the ‘tristate’. This is a special type of output circuit which makes it possible to ‘connect’, or ‘disconnect’ the chip output from the rest of the electronic system. You don’t need to understand the action of tristates at the moment, but you do need to know that OE , the output enable, is active LOW, like E , and needs to be connected to 0 V, if the 4512 is to function correctly in the clock circuit. The way to understand the action of the 4512 is to build and investigate a prototype circuit. • Build the circuit shown in DS 4.1. You will need a large prototype board to fit everything in. The circuit is less complicated than it looks. It helps to be systematic in placing the wire links. Follow the pin diagram for the 4512 to make

PAGE 4.2

Discovering


sure that the DATA inputs are linked in the correct order to the 10 kΩ pull down resistors:

1 DATA INPUTS 2

D1

OE

3

D2

OUTPUT

14

4

D3

S2

13

5

D4

S1

SELECT 12 INPUTS

6

D5

S0

11

7

D6

E

0V 8

16 +3-15 V

D0

D7

15 output enable

10 enable 9 4512 pin connections

• Check that you have given the 4512 a power supply and that the enable, E , and output enable, OE , pins 10 and 15, are both connected to 0 V. • With the circuit exactly as shown, press the DATA input switch at the bottom of the prototype board. The OUTPUT LED should illuminate. Check your circuit carefully until you get this result. • Now operate the S0, S1 and S2 switches, together with the DATA input switch and find out by experiment which DATA input corresponds to each combination of SELECT input logic states. You should be able to confirm the truth table for the 4512, as shown at the top of the next page. With none of the SELECT input switches pressed, the SELECT input logic state is 0 0 0. This corresponds to DATA input, D0. Changes at D0 are transferred to the OUTPUT. Changes in the logic states of all the other inputs are irrelevant, only D0 is ‘connected’ to the OUTPUT. If S0 is pressed, the SELECT input logic state becomes 0 0 1, and D1 is connected to the OUTPUT and so on. Any one of the inputs can be transferred to the OUTPUT according to the logic states of the SELECT switches. This is just the sort of behaviour you want for time setting. 1 Hz will be connected to D0 so that pulses at 1 Hz will reach the counter and display sections of the clock circuit when none of the SELECT switches are pressed. On the other hand, 2048 Hz and 64 Hz will be linked to other inputs which can be selected by pressing the appropriate combination of switches. This is explained in the next section.

Electronic Clocks

PAGE 4.3


S2

S1

S0

DATA input controlling OUTPUT LED

0

0

0

D0

0

0

1

D1

0

1

0

D2

0

1

1

D3

1

0

0

D4

1

0

1

D5

1

1

0

D6

1

1

1

D7

Truth table for 4512 8-input multiplexer

Using the 4512 In the clock circuit, the 4512 will be connected like this: INPUT frequencies 2048 Hz 64 Hz

1 Hz +9 V

TIME-SETTING SWITCHES

S0

S1

S2 D6

D5

D0 D1 D2 D3 D4 D7

16

S0 S1

4512 8-input multiplexer

S2

OUTPUT E OE 8

10 kâ„Ś pull down resistors 0V

Time setting circuit using 4512 The switches have functions as follows:

PAGE 4.4

S2:

time set ALLOW

S1:

FAST set

Discovering




S0:

SLOW set

If no switches are pressed, the OUTPUT of the time-setting circuit pulses at 1 Hz. With S2 and S1 pressed, the SELECT logic state is 1 1 0 and DATA input 6 is selected. As a result, the OUTPUT will pulse at 2048 Hz so that the clock counters count rapidly for FAST setting. With S2 and S0 pressed, the SELECT input is 1 0 1 and DATA input 5 is selected. This gives SLOW setting, with 64 Hz being transferred to the clock counters. Pressing a single switch, or any other combination of switches changes nothing. The normal 1 Hz signal is still present at the OUTPUT. This is an elegant way of achieving the desired result, and much easier in practical terms than trying to build a circuit to do the same thing from individual logic gates. The 4512 gives a single chip solution to a relatively complex logic problem.

More fun with multiplexers Multiplexers give you a powerful technique for solving simple logic problems. By way of example, this is the truth table for a 3-input AND gate: input C

input B

input A

output

0

0

0

0

0

0

1

0

0

1

0

0

0

1

1

0

1

0

0

0

1

0

1

0

1

1

0

0

1

1

1

1

As you can see, the output is ‘1’ only when all three inputs are ‘1’. In the diagram at the top of the next page, an 8-input multiplexer is connected as a 3-input AND gate.

Electronic Clocks

PAGE 4.5


SELECT INPUTS A used as logic gate inputs B

output

8-input multiplexer

C D0

D1

D2

D3

D4

D5

D6

D7

0 0 0 0 0 0 0 1 DATA INPUTS: used to enter logic gate truth table

To get the circuit to work, all you need to do is to wire the DATA inputs to the appropriate logic levels. To take a slightly more complex example, consider the design of a voting system for competition judges. In weightlifting, at least two judges out of three have to agree that a lift was good and signify this by pressing a button. This gives the truth table: judge C

judge B

judge A

output

0

0

0

0

0

0

1

0

0

1

0

0

0

1

1

1

1

0

0

0

1

0

1

1

1

1

0

1

1

1

1

1

You could solve this truth table by designing a circuit using AND, OR and NOT gates, but with a multiplexer you just wire the DATA inputs as follows: SELECT INPUTS A used as inputs from judges' switches B

output

8-input multiplexer

C D0 0

D1 0

D2 0

D3 1

D4 0

D5 1

D6 1

D7 1

DATA INPUTS: copy the output column of the truth table

PAGE 4.6

Discovering


This is obviously easier! The circuit for the voting system is shown in DS 4.2. Modify your original circuit by making suitable links. • Find out about the truth tables for 3-input OR, NAND and NOR gates and experiment with your circuit to produce these logic gates. There is a method for extending the circuit using an 8-input multiplexer to generate any 4-input/1-output truth table, that is, any 16 line truth table. This is not the place to explain the method fully, but you might like to file away the fact that this is possible for future reference. A clear explanation can be found in the CMOS Cookbook, by Don Lancaster, as listed in the Resources section at the end of this book.

Electronic Clocks

PAGE 4.7


PAGE 4.8

Discovering


5 : COUNTERS & DISPLAYS Counters and displays are at the heart of your clock circuit. The integrated circuits involved are relatively complex internally but have functions which are easy to understand and easy to implement.

Making pulses To test counters and displays, you need pulses. The easiest way to make pulses is to build an astable using a special kind of NAND gate, known as a Schmitt trigger NAND gate. Compare the normal NAND and Schmitt trigger NAND gate symbols:

inputs A B

output NAND

inputs A B

output NAND

normal NAND gate

Schmitt trigger NAND gate

A 4093 CMOS integrated circuit contains four Schmitt trigger NAND gates, as follows:

4093 CMOS integrated circuit

1

14 +3-15 V

2

13

quad Schmitt trigger NAND gate

3

12

4

11

5

10

6

9

0V 7

8

With CMOS, the threshold for a logic 1 signal is usually defined as half the power supply voltage. Any voltage above half the power supply counts as logic 1, any voltage below half counts as logic 0. With a Schmitt trigger gate, there are two thresholds. The upper threshold, above which signals are always recognised as logic 1 is approximately two thirds of the power supply voltage, that is, 6 V with a 9 V supply. On the other hand, the lower threshold, below which signals are always recognised as logic 0, is one third of the power supply voltage, 3 V with a 9 V supply.

Electronic Clocks

PAGE 5.1


If the input voltage is slowly increased from 0 V, logic 1 is first recognised at 6 V. If the input voltage is now slowly decreased, logic 0 will be recognised at 3 V. This effect, in which the direction of voltage change affects the threshold point, is called hysteresis. The difference in thresholds can be exploited to make an extremely simple astable circuit:

R V

NAND

V out

C

t frequency ~ 1 RC

0V Schmitt trigger NAND gate astable The capacitor charges up until the upper (output HIGH to LOW) threshold is reached. The output of the NAND gate suddenly becomes LOW and the capacitor empties. When the lower (output LOW to HIGH) threshold is reached, the output of the gate snaps HIGH and the capacitor starts to fill once more. The capacitor charges and discharges over and over again and the output of the circuit is a regular pulse signal. The frequency of the pulses depends on the exact values of the two threshold voltages and varies with the power supply voltage and other factors. An approximate idea of the frequency you can expect is given by 1/RC. For instance, if R=1 MΩ and C=1 µF, the output frequency will be in the region of 1 Hz, possibly a little faster. Schmitt trigger NAND gate astables don’t produce extremely accurate frequencies, but are ideal for providing pulse signals for prototype board work. • Follow DS 5.1 to build your astable. Use one of the spare gates in the 4093 to drive an LED, which should flash about once per second.

4-bit binary counter There are lots of different CMOS counter i.c.’s. In this book you will find out about several of the most useful devices. The first of these is the 4516 4-bit binary counter. The pin connections for the 4516 are shown at the top of the next page.

PAGE 5.2

Discovering




16 +3-15 V

LOAD input 1 D output 2

power supply pin 16 : +3 to +15 V pin 8 : 0 V input pin 15 : CLOCK input

15 CLOCK input

D load input 3

14 C output

A load input 4

13 C load input

CARRY IN input 5

12 B load input

outputs pin 6 : A output pin 11 : B output pin 14 : C output pin 2 : D output

11 B output

A output 6

10 UP/DOWN input

CARRY OUT output 7 0V 8

other connections for normal operation pin 1 : LOAD input : 0 V pins 3, 4, 12, 13 : load inputs : 0 V or + V pin 5 : CARRY IN : 0 V pin 7 : CARRY OUT output : no connection pin 9 : RESET input : 0 V pin 10 : UP/DOWN input : + V

9 RESET input

Pin connections for 4516 CMOS 4-bit binary counter As you can see, there are quite a number of connections you need to make in order to get the 4516 to work correctly. The prototype layout at the bottom of DS 5.1 shows the 4516 linked to the 4093 astable you have already built. • Assemble this circuit now. Start by making the power supply connections to pins 8 and 16. Pulses from the 4093 go to the CLOCK input, pin 15. The A, B, C and D outputs are at pins 6, 11, 14 and 2. The remaining pins allow you to control counter operation in a number of additional ways. For normal operation, they should be connected as indicated. • Check your circuit carefully and then add LED indicators so that you can monitor the behaviour of the counter outputs. This needs a second small prototype board, as shown in DS 5.2. The circuit diagram for the system you have built is as follows: LED INDICATORS D C +

4093

14

47 µF

1 MΩ

15

NAND

10

16

9

UP/DOWN CLOCK

1 µF

A

4516

B

4-bit binary counter

C

RESET 1, 3, 4, 5

OUTPUTS

12, 13

D 7

8

6

680 Ω

B 680 Ω

A 680 Ω

+9 V 680 Ω

11 14 2

47 kΩ

47 kΩ

47 kΩ

47 kΩ

+ 7

10 kΩ 0V

Circuit diagram showing 4516 test circuit with LED indicators It is useful to compare the circuit diagram with the prototype board layout to confirm that the pattern of connection between the parts of the circuit is the same. As your confidence in handling electronic components develops, you will be able to work out your

Electronic Clocks

PAGE 5.3


own prototype board layouts working just from the circuit diagram. This is an extremely useful skill. • What happens when you press the RESET button? • Check that the 4516 outputs follow the sequence given in this truth table: input pulse

output D

output C

output B

output A

0

0

0

0

0

1

0

0

0

1

2

0

0

1

0

3

0

0

1

1

4

0

1

0

0

5

0

1

0

1

6

0

1

1

0

7

0

1

1

1

8

1

0

0

0

9

1

0

0

1

10

1

0

1

0

11

1

0

1

1

12

1

1

0

0

13

1

1

0

1

14

1

1

1

0

15

1

1

1

1

16

0

0

0

0

sequence repeats This is the pattern for a 4-bit binary up counter. The DCBA outputs in the truth table are in ascending binary order. The truth table is easily translated to give you an idea of the voltage/time changes which can be observed at the A, B, C and D outputs of the counter. These are shown at the top of the next page. The rising edge of the clock signal triggers changes within the counter circuit. However, for binary up counting, changes in successive outputs correspond to a falling edge at the previous output. (As explained in Chapter 3, this doesn’t mean that the D-type

PAGE 5.4

Discovering


bistables inside the 4516 are falling edge triggered. Count direction depends on how the D-types are linked together.) As you can see, pulses at the A output have half the frequency of the CLOCK pulses, pulses at the B output have half the frequency at A and so on. This is characteristic of binary counting.

1

2

3

4

5

6

7

8

9

10 11

12 13 14 15 16 17 18

CLOCK input pin 15 A pin 6 0

1

0

1

0

1

0

1

0

1

0

1

0

1

0

1

0

1

0

0

0

1

1

0

0

1

1

0

0

1

1

0

0

1

1

0

0

1

0

0

0

0

1

1

1

1

0

0

0

0

1

1

1

1

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

0

0

0

B pin 11 C pin 14 D pin 2

sequence repeats Waveforms for 4516 4-bit binary up counter If you able to use an oscilloscope, you can investigate the relationship between the CLOCK pulses and the counter outputs more easily with a higher frequency of CLOCK pulses. Oscilloscopes are designed for looking at high frequency signals and these give a stable picture on the oscilloscope screen. • How can you make the 4093 astable faster? Easy! Replace the 1 µF capacitor with a smaller value and/or replace the 1 MΩ resistor with a smaller value. If C=10 nF and R=100 kΩ, the astable output should be close to 1 kHz. • Try this and monitor the counter outputs with an oscilloscope, if you can. • Change C back to 1 µF and R to 1 MΩ, so that the astable pulses slowly again. • How can you change the 4516 circuit to make a down counter? Look again at the pin layout of the 4516 on page 5.3. Pin 10 is the UP/DOWN input. To make the 4516 count up, pin 10 is connected

Electronic Clocks

PAGE 5.5


HIGH. To make the 4516 count down, pin 10 is connected LOW. It’s as simple as that. • Return to your prototype circuit and replace the link from pin 10 of the 4516 to +9 V with a new link from pin 10 to 0 V. There is an immediate change in the behaviour of the counter outputs. • Press RESET and confirm that the counter outputs follow this truth table: input pulse

output D

output C

output B

output A

0

0

0

0

0

1

1

1

1

1

2

1

1

1

0

3

1

1

0

1

4

1

1

0

0

5

1

0

1

1

6

1

0

1

0

7

1

0

0

1

8

1

0

0

0

9

0

1

1

1

10

0

1

1

0

11

0

1

0

1

12

0

1

0

0

13

0

0

1

1

14

0

0

1

0

15

0

0

0

1

16

0

0

0

0

17

1

1

1

1

sequence repeats It is easy to identify a binary down counter because the counter outputs go directly from 0 0 0 0 to 1 1 1 1. The UP/DOWN input controls a logic gate circuit inside the 4516 which routes connections between D-type bistables in the appropriate way. For UP counting, the CLOCK input of the next

PAGE 5.6

Discovering


stage is ‘connected’ to Q , and for DOWN counting the CLOCK input is controlled by Q. The voltage/time waveforms for a 4-bit binary down counter conform to this pattern:

1

2

3

4

5

6

7

8

9

10 11

12 13 14 15 16 17 18

CLOCK input pin 15 A pin 6 0

1

0

1

0

1

0

1

0

1

0

1

0

1

0

1

0

1

0

0

1

1

0

0

1

1

0

0

1

1

0

0

1

1

0

0

1

1

0

1

1

1

1

0

0

0

0

1

1

1

1

0

0

0

0

1

1

0

1

1

1

1

1

1

1

1

0

0

0

0

0

0

0

0 1

1

B pin 11 C pin 14 D pin 2

after RESET

sequence repeats

Waveforms for 4516 4-bit binary down counter This time, successive outputs change on rising edges.

Shortening the count You will have noticed that you don’t have eight fingers on each hand. It is often less than useful to count in sixteens, as with a 4-bit binary counter. You would prefer to count in tens. In the context of electronic counting, this means shortening the count sequence of a 4-bit binary counter, so that there are just ten different output states. How is this done? The answer is that you need to RESET the counter before the count sequence is complete. For a binary-coded decimal, or BCD counter, you want to see the binary combinations corresponding to the numbers 0-9, but you don’t want to see the binary numbers for 10-15. Look again at the truth table for a 4-bit binary up counter, page 5.4. The binary for 10 is 1 0 1 0. If you examine the table, you can see that this is the first time in the binary sequence that D=1 AND B=1

Electronic Clocks

PAGE 5.7


simultaneously. It is possible to detect binary for 10 using an AND gate, as follows: B D

output goes HIGH for B=1 AND D=1

AND To make a BCD counter, the AND gate is connected to a 4-bit binary counter like this:

4-bit binary counter pulses in

CLOCK A

RESET B

C

D

AND Of course AND gates are available as integrated circuits. The CMOS type number is 4081. You could modify your prototype circuit to make a BCD counter by including an extra integrated circuit. However, you just want one AND gate, rather than four, so it is sensible to ask whether there is a simpler and cheaper way of including an AND gate. In fact, an AND gate can be made with one 10 kâ„Ś resistor and two diodes: +9 V 10 kâ„Ś pull up resistor inputs A

output V out

B

0V

How does this circuit work like an AND gate? Suppose both inputs are connected to 0 V. The diodes are both forward biased and Vout =0.7 V (0.7 V is the forward voltage of a silicon diode). The output is LOW. If one diode is connected to 0 V, and the other to +9 V, Vout is still 0.7 V because the output terminal is still connected to 0 V through a forward biased diode. The other diode is reverse biased and does not conduct. If both diodes are connected to +9 V, or if they are left unconnected, the pull up resistor does its job and Vout is pulled up towards +9 V and the output is HIGH. The truth table for the circuit is:

PAGE 5.8

Discovering


input B

input A

Vout

output

0

0

0.7 V

0

0

1

0.7 V

0

1

0

0.7 V

0

1

1

9V

1

... and it really does work as an AND gate! • Add the diode/resistor AND gate to your prototype circuit, as shown in DS 5.3. You need to change only one or two of your existing links. Remove the link between the RESET push button switch and pin 9. Reconnect the UP/DOWN input to +9 V. Locate the 10 kℌ resistor and the two 1N 4148 diodes needed for the AND gate. Make sure that the diodes point in the right direction. Add two new links to complete the circuit. How can you tell if your circuit is working? The new truth table should be as follows: input pulse

output D

output C

output B

output A

0

0

0

0

0

1

0

0

0

1

2

0

0

1

0

3

0

0

1

1

4

0

1

0

0

5

0

1

0

1

6

0

1

1

0

7

0

1

1

1

8

1

0

0

0

9

1

0

0

1

10

0

0

0

0

sequence repeats The waveforms for a BCD counter are represented in the diagram below. Two count cycles are shown to illustrate the voltage/time changes which are characteristic for this type of counting. You will

Electronic Clocks

PAGE 5.9


see that output A is now the only output which produces a regular pulse waveform. output B shows a pattern of pulses separated by different length gaps. Output C has pulses which are HIGH for four CLOCK input pulses and then LOW for six input pulses. Output D is LOW for eight counts and then HIGH for two counts. • Investigate these waveforms by speeding up the 4093 astable as before and probing the counter outputs with an oscilloscope.

1

2

3

4

5

6

7

8

9

10 11

12 13 14 15 16 17 18 19 20

CLOCK input pin 15 A pin 6 0

1

0

1

0

1

0

1

0

1

0

1

0

1

0

1

0

1

0

1

0

0

0

1

1

0

0

1

1

0

0

0

0

1

1

0

0

1

1

0

0

0

0

0

0

0

1

1

1

1

0

0

0

0

0

0

1

1

1

1

0

0

0

0

0

0

0

0

0

0

0

1

1

0

0

0

0

0

0

0

0

1

1

0

B pin 11 C pin 14 D pin 2

sequence repeats

sequence repeats

Waveforms for BCD (binary-coded decimal) counter These waveforms are diagnostic for a BCD counter. If you look at output D and see the appropriate waveform shape, it follows that your counter is dividing its input frequency by ten.

Making it easier It is obvious that BCD counters are going to be used much more often than unmodified 4-bit binary counters, so it is not surprising that BCD counters, in which the AND gate is already part of the internal circuit, are easily available. The 4510 CMOS integrated circuit has identical pin connections and is pin compatible with the 4516 4-bit binary counter. • Remove your diode/resistor AND gate connections and rebuild your prototype circuit, as in DS 5.2. • Lever out the 4516 integrated circuit using a small screwdriver and replace it with a 4510.

PAGE 5.10

Discovering


• Check the truth table and waveforms for the 4510. These will be identical to the 4516 version. The 4510 gives you BCD counting without the need for an external AND gate.

Decoders & displays The LEDs in your prototype circuit show you that your circuit is counting but the display is not user friendly in the context of an electronic clock. What you need is some way of converting the BCD count into a numerical display. This is the function of an integrated circuit called a BCD to 7-segment decoder, CMOS type number 4511. The easiest way to understand this is to see the 4511 in action. • Follow the prototype board layout given in DS 5.4 and link the decoder and display to your existing circuit. The pin connections for the 4511 are as follows:

B input

1

16 +3-15 V

C input

2

15 f

LAMP TEST input

3

14 g

BLANKING input

4

13 a

STORE input

5

12 b

D input

6

11

A input

7

10 d

0V

8

9

c e

segment outputs

power supply pin 16 : +3 to +15 V pin 8 : 0 V inputs pin 7 : A input pin 1 : B input pin 2 : C input pin 6 : D input

other connections for normal operation pins 3,4 : HIGH (+9 V) pin 5 : LOW (0 V)

outputs pins 9-15 : segment outputs

Pin connections for 4511 CMOS BCD to 7-segment decoder driver Your system should now give a clear numerical display, counting up from 0-9 on the 7-segment display and then repeating. • Check that you can reverse the count direction by connecting the UP/DOWN input to 0 V. The 4511 is designed to drive a common cathode 7-segment display. The cathodes of the LEDs which make up the display are connected together and go to 0 V. It is important to limit the current flowing to protect the LED display and also to avoid damage to the 4511. Series resistors are needed. With a 9 V supply, 680 Ω resistors limit segment current to around 10 mA. To illuminate an individual segment, the corresponding output of the 4511 goes HIGH. The diagram at the top of page 5.12 shows the arrangement of segments in a 7-segement display. It is quite easy to understand the truth table for the 4511 BCD to 7-segment decoder and this is also shown:

Electronic Clocks

PAGE 5.11


a f

b

g

e

c d

decimal point

Arrangement of segments in a 7-segment display decimal

inputs

segment outputs

display

D

C

B

A

a

b

c

d

e

f

g

0

0

0

0

0

1

1

1

1

1

1

0

0

1

0

0

0

1

0

1

1

0

0

0

0

1

2

0

0

1

0

1

1

0

1

1

0

1

2

3

0

0

1

1

1

1

1

1

0

0

1

3

4

0

1

0

0

0

1

1

0

0

1

1

4

5

0

1

0

1

1

0

1

1

0

1

1

5

6

0

1

1

0

1

0

1

1

1

1

1

6

7

0

1

1

1

1

1

1

0

0

0

0

7

8

1

0

0

0

1

1

1

1

1

1

1

8

9

1

0

0

1

1

1

1

1

0

1

1

9

Truth table for 4511 CMOS BCD to 7-segment decoder driver Some 7-segment decoders give 6 and9 with ‘tails’. The 4511 gives them without tails.

Other counters The 4510/4511 combination is obviously useful for an electronic clock display. However, you don’t really need the UP/DOWN and LOAD input facilities. The 4518 is an alternative counter with two BCD counter stages in the same 16-pin ‘beastie’. The 4518 is at least as easy to use and gives you the chance of linking two counter stages, for example, to divide by sixty, so that you can count seconds and produce one pulse per minute.

PAGE 5.12

Discovering


The pin connections for the 4518 are shown below:

CLOCK input

1

ENABLE input

2

ouput A

3

output B

4

13 C output

output C

5

12 B output

ouput D

6

0V

counter 2

7

power supply pin 16 : +3 to +15 V pin 8 : 0 V

15 RESET input 14 D output

counter 1

RESET input

16 +3-15 V

11

rising edge triggering RESET inputs : 0 V ENABLE inputs : HIGH input pulses to : CLOCK input

A output

10 ENABLE input

8

9

falling edge triggering RESET input : 0 V CLOCK input : 0 V input pulses to : ENABLE input

CLOCK input

Pin connections for 4518 CMOS dual BCD up counter You can use the counters in either of two ways. If RESET is connected to 0 V and ENABLE is made HIGH, the counter advances on the rising edge of the CLOCK input signal. Alternatively, the RESET and CLOCK inputs are both connected to 0 V. In this case, the ENABLE is used as the input to the counter and the counter advances on the falling edge of the CLOCK signal. • Which of these counter modes is appropriate for your electronic clock? To preserve BCD counting in the up direction between stages, you want the falling edge from the D ouput of the first counter to advance the count of the second: COUNTER OUTPUTS A

+9 V

B 3

C 4

D 5

A 6

10

B 11

C 12

D 13

14

AND

16

pulse input

2 1 7

ENABLE

ENABLE

CLOCK

CLOCK RESET

RESET

15 8

9

4518 DIVIDE BY TEN (BCD)

DIVIDE BY SIX 0V

Divide by sixty counter using 4518 CMOS In the diagram above, the first counter stage inside the 4518 is set up to count up to ten in BCD. The link from pin 6 to pin 10 connects the D output to the pulse input of the second counter. When the falling edge occurs at the end of the BCD count sequence, the second counter will advance. The AND gate resets the second counter when

Electronic Clocks

PAGE 5.13


0 1 1 0, BCD for ‘6’, is reached. Overall, the two counters divide by sixty. A circuit like this can be used to count seconds from 1 Hz input pulses. Another identical circuit can be used to count minutes. A very similar circuit counts hours. You are going to use and test 4518 counters as part of your final electronic clock circuit. Since you will easily understand what they do from the earlier practical work in this Chapter, you don’t need to test prototype circuits using 4518 i.c.’s at the moment.

Bringing it all together You have investigated all of the important subsystems you need to build your clock. You know how to make an accurate crystal controlled astable using a 4060. You know how to use a 4512 8-input multiplexer for time setting. You know about BCD counters and about shortening the count sequence to deal with seconds, minutes and hours. You know about 4511 BCD to 7-segment decoder drivers and about 7-segment LED displays. In the next Chapter full constructional details are given for the electronic clock using the printed circuit board (PCB) which is supplied with Discovering Electronic Clocks. Later Chapters provide variations on this theme and introduce one or two new integrated circuits which extend the range of possible displays. With the information provided, you will be able to design your own electronic clock, not just as an exercise in packaging a ready made clock, but as an integrated project in which you have also designed the electronic circuit and know and understand how it works.

PAGE 5.14

Discovering



The circuit diagram shown opposite gives all the information needed to build the clock and includes all the necessary components, together with details of pin connections for all the integrated circuits. It is important to have a complete circuit diagram for your system. This is an essential step in transferring the circuit to printed circuit board and as an aid to fault-finding. Although the circuit diagram looks complicated, you can easily associate the functions of the subsystems in the block diagram with particular integrated circuits. The 4060 is the crystal controlled astable and 14-stage binary divider. This divides down the 215=32 768 Hz to 2 Hz, with pulses at higher frequencies available from earlier stages of division. The 4013 is connected as a toggle bistable and gives pulses at 1 Hz. The circuit around the 4512 8-input multiplexer allows time setting, and the transistors drive two LEDs in series to provide a seconds display. Pulses at 1 Hz go to the first of three 4518 dual BCD counters. This is connected as a divide by 60 stage to give one pulse per minute. The 10 kâ„Ś resistor and the two 1N 4148 diodes form an AND gate which resets the counter when the count reaches 60. The next 4518 stage is identical, except that input pulses at one pulse per minute give output pulses at a rate of one pulse per hour. In addition, the BCD outputs of the counter go to 4511 BCD to 7segment decoder driver integrated circuits which drive the common cathode 7-segment displays, giving a minutes display. The final 4518 counts hours and the AND gate is connected to provide a 24 hour display. Decoupling capacitors and a power supply socket complete the circuit. The 1N 5401 is a large diode which protects the circuit from incorrect power supply polarity. The power supply itself is a miniature regulated power supply of the sort often used with personal stereo equipment. It should be able to supply currents of up to 500 mA at 9 V.

Printed circuit board Discovering Electronic Clocks includes printed circuit board designs for several different varieties of clock. If you want to know how to design printed circuit boards, a DOCTRONICS publication, the Absolute Beginners Guide to QUICKROUTE, is planned for late ‘97. The design process is quite easy to learn, but you would expect to start with simpler circuits with fewer components. You may be able to use the professionally produced PCB from DOCTRONICS, but it is quite easy to make your own printed circuit board from the design printed in this

PAGE 6.2

Discovering



Chapter, provided your school or college has a photocopier and a suitable ultraviolet light exposure box and etching equipment. The printed circuit board described in this Chapter has been designed to fit on a standard size photo etch board, 100x220 mm. The track pattern is printed actual size and can be photocopied on to a sheet of acetate, that is, on to a clear plastic sheet. The protective covering of the photo etch board is peeled away and the board is placed on top of the acetate sheet. It is essential to have the acetate sheet the right way up. Identify the printed surface of the acetate and make sure that this printed surface is in contact with the sensitive side of the photo etch board. The next step is to expose the board to ultraviolet, UV, light inside an exposure box (!! Take care: UV radiation damages your eyes !!). The exposure time required depends on the photo etch board and development chemicals used, but is often 5-10 minutes. Once the board has been exposed, you may be able to see the pattern of tracks faintly visible in the photographic emulsion covering the board. The exposed emulsion is removed by placing the board in a developer solution for a minute or two until it can be washed off, leaving the tracks still protected where the emulsion was not exposed to UV because of the pattern on the acetate sheet. At this stage, you can see the areas of copper which need to be removed between the tracks. As soon as the board is placed in an etchant solution, the exposed copper reacts with the solution and these areas begin to be etched away. Etching usually takes 10-15 minutes depending on the temperature and concentration of the etchant solution. (!! Take care: eye protection and protective clothing must be worn when developing and etching your board !!) When the board is fully etched, all the unwanted copper has been removed and only the pattern of tracks is left behind. Wash your board thoroughly to remove all traces of the etchant chemical. The emulsion covering most types of photo etch board is ‘selffluxing’ and should not be removed. It protects the copper tracks from oxidation and does not interfere in any way with soldering. Use a 0.8 mm or 1.0 mm drill to make holes for the integrated circuits and all the components, with 1.5 mm holes for the trimmer capacitor, the 1N 5401 diode and the PCB switches. There are three 4 mm fixing holes. The more carefully you drill all these holes, the easier it will be to fit the components in the correct places. (!! Take care: eye protection must be worn when drilling !!)

Construction Start by inspecting the printed circuit board and place it on the desk with the plain side uppermost so that the pattern of holes corresponds to the position of the components on the PCB component

PAGE 6.4

Discovering


view shown actual size on the following page. The holes for the 7segment displays should be top left. The copper tracks are on the underside of the board. It is usual to design the PCB tracks looking through the board as if it were transparent. This is the arrangement shown in the PCB track view. By holding these two pages up to the light, you will be able to see how the components relate to the copper tracks. Obviously, the connections between components are identical to the connections in the circuit diagram. It is best to solder in sockets for the integrated circuits first. Locate these with the notch to the left, corresponding to the head end of each ‘beastie’. This helps you to insert the integrated circuits correctly later on. Soldering is not difficult but requires a little practice. It is essential to apply the tip of the soldering iron directly to the copper track, where the lead of the component comes through. Try to melt the solder onto the copper track and the component lead, rather than on the soldering iron. Wait for a second or so while the solder spreads out. A well soldered joint never looks ‘blobby’. Next solder in the resistors. It doesn’t matter which way round these go, but you should check the colours carefully to make sure you are using the correct values. There is a copy of the resistor colour code on the back cover of this book. Wire links should come next. If you are careful to bend these to exactly the right length, you don’t need to use insulated wire. On the other hand, if you feel that insulated links look better, you can use the method illustrated at the top of page 6.6 to make links of the appropriate lengths. The remainder of the components can now be soldered in. It does matter which way round the 1N 4148 diodes go: a black stripe indicates the cathode end. The 1N 5401 is marked with a silver stripe at the cathode end. The longer leg of a polarised capacitor is the positive, +, connection, while the negative, -, connection is marked by a prominent stripe on the body of the component. The BC 547B transistors must also be soldered in correctly, as indicated. The LEDs for the seconds display must have their anodes, longer legs, at the bottom, with the cathodes, shorter legs, at the top. Finally, solder in the 7-segment displays, after checking that you are using common cathode types. Once you think everything is soldered in correctly, you should make a visual check of all your soldered joints. Reheat any which look ‘blobby’ with a little fresh solder to confirm that a proper connection has been made. Check for any unwanted connections, called ‘solder bridges’, particularly between the pins of the integrated circuits and the leads of the resistors next to the displays. It is useful to scratch between adjacent connections with the sharp edge of the blade of a small screwdriver. This removes deposits of flux and makes it easier to check for solder bridges. Note that some of the pins of the integrated circuits are meant to be connected. If in doubt, look carefully at the PCB track view. This will be a mirror image of the

Electronic Clocks

PAGE 6.5


pattern of copper tracks seen from the bottom of the board, but you should be able to work out whether adjacent pins are supposed to be linked. All this checking makes it much more likely that your circuit will work first time.

1. strip off outer insulation link length

2. cut wire to link length required push insulationdown with thumb nails

3.

4.

5.

use pliers to bend link leads at right angles hold wire using pliers

Making insulated wire links

Testing and trouble-shooting Very few people are able to resist the temptation of inserting all the integrated circuits and finding out whether the circuit works. Go ahead and try this out, but check that all the integrated circuits have the correct type number and are the right way round, head end to the left, before connecting any power supply. Similarly, check that the power supply voltage is set for 9 V before connecting it to the DC power socket. The 1N 5401 diode protects the circuit from incorrect power supply connection and, if nothing at all happens when you connect the power, you should check that the power supply polarity is correct and try again. Trouble-shooting is what you do if your circuit does not work correctly first time. (continued on page 6.8)

PAGE 6.6

Discovering








FIRST CLOCK: PARTS LIST Qty

Component

Rapid Electronics Order Code*

Resistors: 1 28 1 1 7 1 1

470 Ω (yellow, violet, brown) 680 Ω (blue, grey, brown) 1kΩ (brown, black red) 3.9 kΩ (orange, white, red) 10 kΩ (brown, black, orange) 220 kΩ (red, red, yellow) 10 MΩ (brown, black, blue)

62-0362 62-0366 62-0370 62-0384 62-0394 62-0426 62-0466

Capacitors: 1 1 3 3

15 pF / 100 V low K ceramic plate 2-22 pF miniature trimmer (green) 100 nF /250 V metallised polyester 100 µF / 25 V radial electrolytic

08-0455 12-0105 10-0230 11-0250

Semiconductors: 6 1 2 4 2 1 1 4 1 3

1N 4148 silicon signal diode 1N 5401 3A rectifier diode 5x2 mm rectangular LED/HE red 25.4 mm (1 in) 7-segment LED display common cathode /HE red BC 547B npn silicon transistor (TO92C case) 4013B dual D-type bistable 4060B 14-stage binary ripple counter 4511B BCD to 7-segment decoder driver 4512B 8-input multiplexer 4518B dual BCD up counter

1N 4148 1N 5401 56-0945 57-0207 BC 547B 4013B 4060B 4511B 4512B 4518B

Miscellaneous: 1 1 1 9 1 3 3 1

watch crystal 32.768 kHz printed circuit board (DOCTRONICS) low profile 14-pin DIL IC socket low profile 16-pin DIL IC socket 2.5 mm DC power socket 12x12 mm miniature tactile switch self adhesive PCB pillar, 6.4 mm single sided terminal pin 1/0.6 mm single core wire (links) solder 22swg

90-0105 22-0155 22-0160 20-0975 78-0630 33-2130 34-0610 01-0305 85-0592

Enclosure: 1 1 4 4 4

transparent acrylic sheet 240x120x3 mm opaque acrylic sheet 240x120x3 mm 25 mm hexagonal threaded spacers, M3 6 mm pan head slotted screw, M3 12 mm pan head slotted screw, M3

RS 222-430 33-1500 33-1510

Power supply: 1

miniature regulated power supply/500 mA

85-1685

*Rapid Electronics and RS order codes are given for convenience for UK schools. Similar components from alternative suppliers will work equally well.

Electronic Clocks

PAGE 6.7


(continued from page 6.6) This is what to do to locate any mistakes in your circuit: • Disconnect the power • Remove all the integrated circuits from their sockets, except the 4060 crystal astable/binary divider. To fault find effectively, it is best to use an oscilloscope, but you can improvise with a transistor/LED indicator circuit if required. Design Sheet DS 6.1 shows you how to make the oscilloscope connections and DS 6.2 shows the alternative LED indicator arrangement. To make the measurements, the black lead from the oscilloscope must be connected to the 0 V test point on the PCB. This is necessary because the regulated power supply for the clock includes a transformer so that the clock circuit is electrically isolated from ‘earth’. • Connect the test probe to pin 3 of the 4060. There should be 2 Hz pulses which will be visible either with the oscilloscope or with the LED indicator. If there are no pulses, something is amiss with the circuit surrounding the 4060. Check that you have used the correct integrated circuit and that it is the right way round. Check that all the pins are located in the socket and that none have been bent under without making a connection. Check that pin 16 of the 4060 is connected to the positive end of the power supply and that pin 8 is connected to 0 V. Next check that the resistor values are correct and that the 10 MΩ resistor and 220 kΩ have been put in the correct places. Adjusting the trimmer capacitor sometimes triggers the 4060 into action. The least likely fault is that the 4060 is defective. Once you have exhausted other possibilities, try replacing the 4060 with a new one. Persevere until you have located and corrected any fault. Other pins of the 4060 will give pulses at higher frequencies. With the oscilloscope, you will be able to monitor these pulses, but the LED indicator will appear permanently ON for any frequency above 20 Hz. • Disconnect the power supply and insert the 4013 D-type bistable integrated circuit, then reapply power. Pin 13 of the 4013 should give pulses at 1 Hz. If not check the circuit around the 4013 until you have found the fault. • Disconnect and insert the 4512 8-input multiplexer and reconnect power once more. If the 4512 is working, 1 Hz pulses are transferred to the LEDs which provide the seconds display. These should now be flashing once per second. Check that you have inserted the LEDs the right way round. Use your oscilloscope or LED indicator circuit to probe pin 14 of the 4512. Are 1 Hz pulses present there?

PAGE 6.8

Discovering




As you go, follow the circuit diagram of the clock given on page 6.3. This includes the pin numbers of the integrated circuits and you can work out where particular signals should appear. You can now test the action of the time setting switches. The switch furthest to the right is the time set ALLOW and is connected to pin 13 of the 4512. When this switch is pressed, the voltage at pin 13 should change from LOW to HIGH. Again, you can monitor this with the oscilloscope or LED indicator. In case of a fault, check the track between the switch and pin 13 for continuity, and for solder bridges to adjacent tracks. When the time set ALLOW and the centre FAST set switch are pressed together, pin 14 of the 4512 should pulse at 2048 Hz. Similarly, when ALLOW and SLOW set are pressed together, pin 14 should pulse at 64 Hz. • Next, insert the first 4518 dual BCD counter. You should be able to monitor 1 Hz pulses at pin 10 of the 4518, with slower pulses at pins 11, 12, 13 and 14. Operating the time setting switches will produce faster pulses at all of these pins. You can check that the diode/resistor AND gate is functioning by monitoring the outputs at pins 3, 4, 5 and 6 of the 4518. These should pulse as follows:

1

2

3

4

5

6

7

8

9

10 11

12

input pulses pin 2

V t

A pin 3 0

1

0

1

0

1

0

1

0

1

0

1

0

0

0

1

1

0

0

0

0

1

1

0

0

0

0

0

0

0

1

1

0

0

0

0

1

1

0

B pin 4 C pin 5 sequence repeats

sequence repeats

4518 counter outputs for divide by six section There should be no pulses at pin 6 because the counter is reset before this output becomes active. If this part of the 4518 is not resetting correctly, check that the diodes are inserted correctly. • Continue inserting integrated circuits one at a time and checking the circuit around each until the clock is complete.

Electronic Clocks

PAGE 6.9


Common faults include 1N 4148 diodes inserted the wrong way round, resistors of incorrect value, solder bridges, and ‘dry joints’ where the solder is ‘blobby’ and has not made a proper connection. Unlit or dim segments in the 7-segment displays are usually the result of ‘dry joints’ or solder bridges between adjacent resistor leads. Faulty integrated circuits are possible, but much less likely than other faults. The earliest 4000 series CMOS integrated circuits were easily damaged by static electricity and needed to be handled with care. Modern 4000 series devices include protective diodes as part of the internal circuit and it is not at all likely that you will damage the integrated circuits simply by handling them. They will be damaged if you put them into the circuit the wrong way round, or put a 4511 where a 4518 is supposed to go! If you were careful during construction of your clock, there will not have been many faults to find and you should now have a functional clock. Set it to the correct time and check that it keeps good time over an hour or so. Wildly inaccurate clocks can result if the components around the 4060 astable/binary counter are incorrect, but it is much more likely that your clock will be correct to within a second or two. Fine adjustment to time keeping can be made using the trimmer capacitor. If your clock gains a few seconds over a 24-hour period, you need to increase the area of overlap of the plates in the trimmer capacitor. Rotate the plates slightly using a small screwdriver and wait for a further 24 hours to see whether any additional adjustment is required. Quartz crystal controlled clocks are usually extremely accurate. Clocks using the circuit described in this Chapter have been running for several years without any problems. Yours should do the same.

Enclosure You can make any suitable enclosure, or case, for your clock. A simple but effective possibility is to cut a clear or transparent coloured sheet of acrylic for the front, allowing you to see the displays and all the components on the PCB, with an opaque sheet of acrylic for the back. Cutting details for these sheets are given earlier in the Chapter. The PCB is held in place using self adhesive PCB pillars and the front and back of the case are held together with 25 mm hexagonal threaded spacers. The diagram at the top of the next page shows you how the spacers are meant to be used. With the spacers specified, you will be able to reach the time setting buttons under the front of the case using the tips of your fingers. It is worth the effort to polish the edges of the acrylic sheet, using finer and finer grades of wet and dry paper, until they are perfectly smooth. Light gathering, or ‘live edge’ transparent acrylic makes a

PAGE 6.10

Discovering


pleasing front for the clock. Experiment with different colours to see how they interact with the light from the 7-segment displays.

opaque acrylic back 12 mm M3 screw

transparent acrylic front 25 mm hexagonal threaded spacer 6 mm M3 screw

Joining the front and back panels using hexagonal threaded spacers The completed clock stands on its edge on the desk or on a shelf. The power supply will be warm when the clock is in use. Air currents flowing past carry heat away and stop the power supply from becoming too hot. Don’t interfere with this natural ventilation by covering or enclosing the power supply in any way.

Electronic Clocks

PAGE 6.11


PAGE 6.12

Discovering


7 : BIG DIGIT CLOCK The Big Digit Clock develops from the First Clock but has much larger 7-segment displays and gives a seconds display as well. The display is big enough for a large room or classroom. This Chapter includes a circuit diagram for the Big Digit Clock, together with the PCB component view and track view, and a parts list. The parts list specifies components from Rapid Electronics, but similar components from any other supplier can be used instead. Before you order 7-segment displays, check that they will fit the holes in the printed circuit board. Remember that only common cathode types are suitable. You will need to make your own PCB for the Big Digit Clock, following the instructions given in Chapter 6.

Driving 7-segment displays You should be able to follow and understand most of the circuit diagram. 4511 decoder/drivers are included to provide the seconds display. There are one or two further differences compared with the circuit for the First Clock. The series resistors for the segments of the large displays are 390 Ω, while the series resistors for the smaller displays are 680 Ω. Why? The answer is to do with the number of LED chips per segment. When you calculate the value of series resistor to use with a single LED, you take into account the forward voltage of the LED, usually 1.5-2.0 V:

+9 V voltage across resistor 9-2=7 V forward voltage of LED 2V 0V To illuminate a typical LED requires 10-15 mA, so the calculation becomes: R=

V 7 = = 0.7 kΩ = 700 Ω I 10 mA

The nearest E12 resistor is 680 Ω. The segments of the large displays have four LEDs connected in series. The forward voltages add together so that a total of 8 V is

Electronic Clocks

PAGE 7.1


needed across each segment to make the LEDs light up. This would leave just 1 V across the series resistor with a 9 V power supply and, to allow for variations in forward voltage above 2 V per LED, it makes sense to increase the power supply voltage to 12 V. The circuit for each segment is:

+12 V voltage across resistor 12-8=4 V

total forward voltage 4x2=8 V

forward voltage of each LED 2 V 0V This time the calculation is: R=

V 4 = = 0.4 kΩ = 400 Ω I 10 mA

The nearest E12 value is 390 Ω and this is the value used in the circuit. Although not explained in Chapter 6, the smaller displays used in the First Clock display and for the seconds display have two LED chips connected in series, so that the forward voltage is 4 V. You can work out the corresponding resistor value for yourself. In testing the Big Digit Clock, it was found that a series resistor value of 680 Ω for the smaller displays gave a light intensity which matched the brightness of the large displays. The current flowing is a little bit more than 10 mA, but still well within the rating of these displays. The decimal points of the larger displays also consist of two LED chips, but, in this case, better matching of light intensities was obtained using 1 kΩ resistors. This is the sort of thing which can only be discovered by testing circuits in prototype form. It is worth doing this for any circuit you want to develop. (continued on page 7.4)

PAGE 7.2

Discovering






BIG DIGIT CLOCK: PARTS LIST Qty

Component

Rapid Electronics Order Code*

Resistors: 28 14 2 6 1 1

390 Ω (orange, white, brown) 680 Ω (blue, grey, brown) 1kΩ (brown, black red) 10 kΩ (brown, black, orange) 220 kΩ (red, red, yellow) 10 MΩ (brown, black, blue)

62-0360 62-0366 62-0370 62-0394 62-0426 62-0466

Capacitors: 1 1 4 4

15 pF / 100 V low K ceramic plate 2-22 pF miniature trimmer (green) 100 nF /250 V metallised polyester 100 µF / 25 V radial electrolytic

08-0455 12-0105 10-0230 11-0250

Semiconductors: 1 2 4 1 1 1 6 1 3

1N 5401 3A rectifier diode 25.4 mm (1 in) 7-segment LED display common cathode /HE red 56.9 mm (2.24 in) 7-segment LED display common cathode /HE red 4013B dual D-type bistable 4060B 14-stage binary ripple counter 4081B quad AND gate 4511B BCD to 7-segment decoder driver 4512B 8-input multiplexer 4518B dual BCD up counter

1N 5401 57-0207 57-0237 4013B 4060B 4081B 4511B 4512B 4518B

Miscellaneous: 1 1 2 11 1 3 4 1

watch crystal 32.768 kHz printed circuit board low profile 14-pin DIL IC socket low profile 16-pin DIL IC socket 2.5 mm DC power socket 12x12 mm miniature tactile switch self adhesive PCB pillar, 6.4 mm single sided terminal pin 1/0.6 mm single core wire (links) solder 22swg

90-0105 22-0155 22-0160 20-0975 78-0630 33-2130 34-0610 01-0305 85-0592

Enclosure: 1 1 4 4 4

transparent acrylic sheet 300x150x3 mm opaque acrylic sheet 300x150x3 mm 25 mm hexagonal threaded spacers, M3 6 mm pan head slotted screw, M3 12 mm pan head slotted screw, M3

RS 222-430 33-1500 33-1510

Power supply: 1

miniature regulated power supply/500 mA

85-1685

*Rapid Electronics and RS order codes are given for convenience for UK schools and colleges. Similar components from alternative suppliers will work equally well.

Electronic Clocks

PAGE 7.3


AND gates A 4081 integrated circuit was included in the circuit for the Big Digit Clock. This was done to illustrate an alternative way of resetting the counters. The individual gates of the 4081 have the same functions as the diode/ resistor AND gates in the First Clock. Using a proper integrated circuit is likely to please electronics engineers, but there is no cost advantage and, with this circuit, no difference in performance. With sophisticated circuits, it can be important for each of the subsystems to have the same logic thresholds, particularly if the gates must all switch together at high frequencies. If you follow the printed circuit board tracks to and from the 4081, you will appreciate the problem in track routing which is overcome by placing the diode/resistor gates next to the counter which is to be reset.

Construction and testing Follow the method explained in Chapter 6. Take your time and work carefully. • Start by orienting the PCB plain side up with the displays at the top. • Solder sockets for the integrated circuits. • Solder resistors. • Insert link wires. • Solder remaining components (check polarised capacitors etc. are the right way round). • Visual check for dry joints, solder bridges. • Insert integrated circuits and test circuit. • If faulty, remove all integrated circuits and investigate one subsystem at a time from the beginning of the circuit to locate and correct problems. Once your clock is working, you can build a simple case from acrylic in the same way as described for the First Clock, or design a suitable enclosure of your own.

PAGE 7.4

Discovering


8 : BINARY CLOCK A clock with a binary display is distinctly enigmatic, but, with a little practice, it is quite straightforward to tell the time. The circuit for the Binary Clock provides a starting point for the development of other clocks with more user-friendly displays and is worth describing for this reason alone.

How does it work? Instead of using decoders to drive 7-segment displays, the counter outputs of the binary clock are connected to transistors which drive individual LEDs. The diagram below shows how the LEDs are arranged in groups corresponding to AM/PM, HOURS, TENS OF MINUTES, UNITS OF MINUTES, and SECONDS: AM/PM

HOURS

TENS OF MINUTES

UNITS OF MINUTES

SECONDS

Binary Clock LED display When the clock is first switched on, the SECONDS LED flashes away at 1 Hz, which is easy enough. Usually, all the other LEDs will be off: the clock shows 0:00, or midnight. The UNITS OF MINUTES display follows the same pattern as the truth table for a BCD, or binary coded decimal counter, that is: pulse input

Electronic Clocks

counter outputs D

C

B

A

0

0

0

0

0

1

0

0

0

1

2

0

0

1

0

3

0

0

1

1

4

0

1

0

0

5

0

1

0

1

6

0

1

1

0

7

0

1

1

1

8

1

0

0

0

9

1

0

0

1

PAGE 8.1


A ‘1’ in the truth table corresponds to an LED which is illuminated. When the time is 0:05, the clock will show: AM/PM

HOURS

TENS OF MINUTES

UNITS OF MINUTES

SECONDS

where the shaded circles represent the LEDs which are lit. The TENS OF MINUTES display works in the same way for numbers from 0 to 5. When the time is 0:37, the display will show: AM/PM

HOURS

TENS OF MINUTES

UNITS OF MINUTES

SECONDS

The HOURS display uses the same BCD code for numbers 0-9 and continues with binary 1 0 1 0 for ‘10’ and 1 0 1 1 for ‘11’. In the circuit for the binary clock, the hours display is driven by a 4516 4-bit binary counter, which is reset when the count reaches the binary equivalent of ‘12’. The AM/PM part of the display is driven by a 4013 D-type bistable, connected as a toggle bistable. The details of all these subsystems are explained in earlier Chapters. • Work out what time is shown by the following displays: AM/PM

HOURS

TENS OF MINUTES

UNITS OF MINUTES

SECONDS

AM/PM

HOURS

TENS OF MINUTES

UNITS OF MINUTES

SECONDS

AM/PM

HOURS

TENS OF MINUTES

UNITS OF MINUTES

SECONDS

• The answers are: 5:19 PM, 3:46 PM, and 11:25 AM. To help with converting from binary numbers to decimal ones, think about the value of a ‘1’ in a particular position, or column. A ‘1’ in the leftmost column, corresponding to the least significant digit, or LSB, of the binary number, counts for 20=1, a ‘1’ in the next column counts for 21=2. In a similar way, a ‘1’ in the third column from the left counts for 22=4, and for 23=8 in the fourth column. To work out the decimal value, add together the ‘1’ values for each column, for example: 1 =

PAGE 8.2

0

0

1

8+ 0+ 0+ 1

=9

(continues on page 8.4)

Discovering








BINARY CLOCK: PARTS LIST Qty

Component

Rapid Electronics Order Code*

Resistors: 13 2 21 1 1

470 Ω (yellow, violet, brown) 1kΩ (brown, black red) 10 kΩ (brown, black, orange) 220 kΩ (red, red, yellow) 10 MΩ (brown, black, blue)

62-0362 62-0370 62-0394 62-0426 62-0466

Capacitors: 1 1 4 3

15 pF / 100 V low K ceramic plate 2-22 pF miniature trimmer (green) 100 nF /250 V metallised polyester 100 µF / 25 V radial electrolytic

08-0455 12-0105 10-0230 11-0250

Semiconductors: 6 1 5 5 3 15 2 1 1 1 2

1N 4148 signal diode 1N 5401 3A rectifier diode 8 mm LED red (SECONDS, HOURS) 8 mm LED green (MINUTES, AM/PM) 8 mm LED yellow (TENS OF MINUTES) BC 547B silicon npn transistor (TO92C case) 4013B dual D-type bistable 4060B 14-stage binary ripple counter 4512B 8-input multiplexer 4516B 4-bit binary counter 4518B dual BCD up counter

1N 4148 1N 5401 55-0400 55-0405 55-0410 BC 547B 4013B 4060B 4512B 4516B 4518B

Miscellaneous: 1 1 2 5 1 3 3 1

watch crystal 32.768 kHz printed circuit board low profile 14-pin DIL IC socket low profile 16-pin DIL IC socket 2.5 mm DC power socket 12x12 mm miniature tactile switch self adhesive PCB pillar, 6.4 mm single sided terminal pin 1/0.6 mm single core wire (links) solder 22swg

90-0105 22-0155 22-0160 20-0975 78-0630 33-2130 34-0610 01-0305 85-0592

Enclosure: 1 1 4 4 4

transparent acrylic sheet 240x120x3 mm opaque acrylic sheet 240x120x3 mm 25 mm hexagonal threaded spacers, M3 6 mm pan head slotted screw, M3 12 mm pan head slotted screw, M3

RS 222-430 33-1500 33-1510

Power supply: 1

miniature regulated power supply/500 mA

85-1685

*Rapid Electronics and RS order codes are given for convenience for UK schools and colleges. Similar components from alternative suppliers will work equally well.

Electronic Clocks

PAGE 8.3


(continued from page 8.2) similarly: 0 =

1

1

0

0+ 4+ 2+ 0

=6

and: 1 =

0

1

1

8+ 0+ 2+ 1

=11

This method works for all the groups of LEDs which make up the Binary Clock display.

About the circuit Look at the circuit diagram for the Binary Clock. The first few subsystems of the clock, including the 4060 crystal astable, the 4013 and the 4512 multiplexer, are just the same as in the First Clock and Big Digit Clock. The output of the 4512 drives the SECONDS display through a transistor switch circuit:

+9 V

470 â„Ś 10 kâ„Ś 1 Hz input 0V Assuming a 2 V forward voltage across the LED, you can calculate the current as: I=

V 7 = = 0.0149 A = 14.9 mA R 470

The current through the LED is close to 15 mA. This is more than the 10 mA or so which you have used with 7-segment displays and 5 mm LEDs. However, 15-20 mA is the correct current for the 8 mm LEDs used in this circuit and produces a suitably bright and effective display. The 1 Hz signal from the 4512 also goes to a 4518 dual BCD counter. This is connected as a divide by sixty stage, reset by a diode/resistor AND gate.

PAGE 8.4

Discovering


The pulses at the output of the first 4518 are reduced in frequency to one per minute and are transferred to a second 4518, with an identical divide by sixty function. The BCD outputs of the second 4518 drive the MINUTES and TENS OF MINUTES displays via transistor switch circuits. To give the HOURS display, a 4516 4-bit binary counter is needed. This has a similar diode/resistor AND gate, but resets when the count reaches 1 1 0 0 = 12. The 4516 is rising edge triggered. However, the correct counting sequence for binary counting in the UP direction, requires changes synchronised with the falling edge of the preceding stage. (UP and DOWN counters are described in Chapter 5.) To make the HOURS display change when it is supposed to, a transistor NOT gate is needed between the 4518 output and the CLOCK input of the 4516. In a similar way, the 4013 D-type bistable which drives the AM/PM display is rising edge triggered and a second NOT gate is needed after the 4516. Decoupling capacitors and a protective diode (1N 5401) complete the circuit as before.

Construction and testing Follow the method explained in Chapter 6. Take your time and work carefully. Readability for the Binary Clock is improved by following a colour scheme for the LEDs as indicated in the Parts List. Of course, you can choose which colours to use where, but it helps to distinguish HOURS from TENS OF MINUTES, and TENS of MINUTES from MINUTES, with contrasting colours for AM/PM and for SECONDS. • Start by orienting the PCB plain side up with the LED display at the top. • Solder sockets for the integrated circuits. • Solder resistors. • Insert link wires. • Solder remaining components (check LEDs, polarised capacitors etc. are the right way round). • Visual check for dry joints, solder bridges. • Insert integrated circuits and test circuit. • If faulty, remove all integrated circuits and investigate one subsystem at a time from the beginning of the circuit to locate and correct problems. Once your clock is working, you can build a simple case from acrylic in the same way as described for the First Clock, or design a suitable enclosure of your own.

Electronic Clocks

PAGE 8.5


PAGE 8.6

Discovering


9 : LINEAR CLOCK The design for the clock circuit described in this Chapter was first published in Everyday with Practical Electronics magazine, May 1993, p348-354, and has been rewritten and updated, with minor modifications, and new printed circuit boards for this book. Everyday Practical Electronics, the present title published monthly and available in the UK from W.H.Smith, John Menzies etc., is an excellent source of circuits for project work. Details of articles describing additional clock circuits from EPE are included in the Resources Section at the back of the book.

Keeping time No-one needs a Linear Clock ... but it is different! The circuit offers an interesting variation on traditional displays and provides an intriguing artefact without which your collection of executive playthings is incomplete. A block diagram of the system is given on page 9.3, with the full circuit diagram of the Linear Clock on page 9.5, and the PCB component and track views on following pages. Circuit simplicity dictates that the timing signal should be either a 50 Hz signal derived from the 240 V a.c. domestic mains, or a signal generated by a crystal-controlled astable. Although both sources are sufficiently accurate, a crystal circuit was chosen. Safety was an important consideration in the design of the clock and it was decided to use a regulated a.c. to d.c. adaptor as the power supply. These adaptors are readily available and well-suited to providing continuous power. The mains transformer, rectifier and smoothing and regulating circuits are all safely enclosed, so that there is no danger of receiving a shock from any part of the clock circuit. As a result, the 50 Hz signal from the secondary of the transformer is not available. The time-keeping circuit used is based on a 4060 CMOS integrated circuit. A crystal identical to the type used in digital watches provides a frequency of 215 Hz=32 768 Hz. The 4060 contains a 14-stage binary counter which divides this fundamental frequency, giving a final output at 2 Hz. Outputs from many of the earlier division stages are also available. The 2-22 pF variable capacitor allows fine tuning of the astable frequency (Only a tiny adjustment is possible, on the order of seconds per day.)

Electronic Clocks

PAGE 9.1


Time setting In normal operation, 2 Hz passes directly to the remainder of the clock but, for time setting, higher frequencies are needed. The arrangement around the 4512 integrated circuit provides a FAST setting signal at 2048 Hz, and a SLOW setting signal at 64 Hz. The 4512 is an 8-input multiplexer, or data selector: this has eight DATA inputs and a single OUTPUT. The signal at the output can be made to follow the signal at any of the individual DATA inputs by means of three SELECT inputs. If S2 S1 S0=0 0 0, the data at input 0 appears at the OUTPUT. If S2 S1 S0=0 0 1, input 1 is selected. S2 S1 S0=0 1 0 selects input 2 and so on. As indicated in the circuit diagram, the SELECT inputs are connected to 0 V by 10 kâ„Ś pull-down resistors. If none of the switches are pressed, 2 Hz appears at the OUTPUT. Pressing the ALLOW and FAST switches together makes S2 S1 S0=1 1 0 and selects the 2048 Hz signal at DATA input 6. Pressing ALLOW and SLOW together makes S2 S1 S0=1 0 1 and selects 64 Hz from DATA input 5. It is best to connect the remaining DATA inputs to the 2 Hz signal, so that pressing any other combination of switches will have no effect on the OUTPUT of the 4512.

Division stages Each of the division stages of the Linear Clock is constructed around a 4-bit binary counter, with essential connections as follows:

CLOCK input

rising edge triggered

4-BIT BINARY COUNTER

A

B

C

RESET input

D

outputs

When clock pulses are delivered to the CLOCK input, the counter outputs change according to the truth table shown on page 9.4. This is the truth table for a 4-bit binary up counter, as described in Chapter 5. The corresponding V/t waveforms are given at the top of page 9.6. Note that outputs of this particular 4-bit counter change state on the rising edge of the CLOCK pulses. Output A is a square signal at half the clock frequency, output B changes at one quarter the clock frequency, output C at one eighth and output D at one sixteenth of the clock frequency.

PAGE 9.2

Discovering



pulse

D

C

B

A

0

0

0

0

0

1

0

0

0

1

2

0

0

1

0

3

0

0

1

1

4

0

1

0

0

5

0

1

0

1

6

0

1

1

0

7

0

1

1

1

8

1

0

0

0

9

1

0

0

1

10

1

0

1

0

11

1

0

1

1

12

1

1

0

0

13

1

1

0

1

14

1

1

1

0

15

1

1

1

1

RESET for divide by 6 counter

RESET for divide by 10 counter

RESET for divide by 12 counter

Truth table for 4-bit binary up counter Look again at the truth table and at the pattern of output waveforms. Outputs B and D first become HIGH together at the start of the clock pulse numbered 10. What is needed is a way of resetting the counter at this point, forcing D C B A to become 0 0 0 0. This is easily done by connecting B and D to the inputs of an AND gate, the output of which drives the RESET pin of the counter:

CLOCK input

4-BIT BINARY COUNTER

rising edge triggered

RESET input

AND A

B

C

outputs

D

10 kâ„Ś 0V to next division stage

Divide by 10 counter stage

PAGE 9.4

Discovering



1

2

3

4

5

6

7

8

9

10 11

12 13 14 15 16 17 18

CLOCK input pulses output A 0

1

0

1

0

1

0

1

0

1

0

1

0

1

0

1

0

1

0

0

0

1

1

0

0

1

1

0

0

1

1

0

0

1

1

0

0

1

0

0

0

0

1

1

1

1

0

0

0

0

1

1

1

1

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

0

0

0

output B output C output D

DIVIDE BY 6 DIVIDE BY 10

DIVIDE BY 12

Waveforms for 4-bit binary up counter A divide-by-6 stage can be implemented in exactly the same way by connecting B and C to the AND gate, and a divide-by-12 stage by connecting C and D.

CLOCK input

4-BIT BINARY COUNTER

rising edge triggered

RESET input

AND A

B C D outputs

10 kΩ 0V to next division stage

Divide by 6 stage In the Linear Clock circuit, two sorts of AND gates are used. A 4081 CMOS IC. provides four AND gates which are used individually to reset the second stage of the 4520 and the three 4516 counters. The first stage of the 4520 is reset by a fifth AND gate formed from two 1N 4148 diodes and a 10 kΩ pull up resistor.

PAGE 9.6

Discovering


CLOCK input

4-BIT BINARY COUNTER

rising edge triggered

RESET input

AND A

B

C

outputs

D

10 kΩ 0V to next division stage

Divide by 12 stage The operation of diode/resistor AND gates is explained in Chapter 5. Diode/resistor logic is useful when a single gate is needed and, in this case, avoids the need for an additional 4081 integrated circuit. Because 4516 counters change state on the rising edge of the clock pulse, simple transistor NOT gates are needed to link the signal path between them. The D-type bistable, 4013 CMOS, is toggled by the signal from the D output of the final 4516 counter and drives an LED via a BC 547B transistor to provide AM-PM indication.

Displays The arrangement of the display LEDs can be seen from the diagrams given on the pages which follow. There are three main rows of LEDs. The MINUTES UNITS display consists of ten LEDs with the ‘0’ LED offset to the left of those for the numbers ‘1’ to ‘9’. The MINUTES TENS display consists of six LEDs similarly arranged. The HOURS display consists of twelve LEDs with different colours for the LEDs representing one o’clock to five o’clock, six o’clock to ten o’clock and a third colour for 11 and 12 o’clock. The displays are driven by 4514 CMOS integrated circuits. The 4514 is a 4-16 line decoder: the binary code at inputs D C B A causes the corresponding output to go HIGH. For example, if D C B A = 0 1 0 1, output 5 goes HIGH. The other outputs remain LOW. The outputs of the 4514s provide sufficient current to drive the LEDs directly and, since only one LED is illuminated at a time, only one 390 Ω current-limiting resistor is needed for each row. An LED flashing at 1 Hz gives an indication of SECONDS and is driven via a BC 547B transistor from output A of the first stage of the 4520 binary counter. The final division stage, using a 4013 CMOS D-type bistable, produces an AM-PM display.

Electronic Clocks

PAGE 9.7


Construction Look at the component layout and track views for the Time division and Display PCBs. The track views can be photocopied from this book to allow you to make your own PCBs. Start construction with the Time division PCB. Solder in the IC sockets using pins at opposite corners and check that they are flat to the board before soldering the remaining pins. Next, solder in the wire links: refer to the component layout to make sure that these are fitted correctly. Insulated wire must be used wherever links run parallel. Next, the resistors, capacitors and other components can be added. The SIL (single-in-line) sockets should be vertical. Connect 15 cm flexible stranded wire flying leads to the 1 Hz and AM-PM outputs and to points X, Y and Z. Finally, inspect the underside of the PCB for possible solder bridges and/or dry joints. If all is satisfactory, the board can be put aside and attention now turned to the Display PCB. Assembly of the Display PCB is fairly straightforward. There are only three wire links and all the LEDs face the same way. The Linear Clock uses 8 mm LEDs. Red, R, was used to represent the numbers 1-5, green, G, for 6-10, and yellow, Y, for 0 and 11-12. The 1 Hz indicator was yellow, and the AM-PM indicator red. Other arrangements of colours and sizes could be used. Fitting the pins of the SIL plugs to the underside (copper track side) of the Display PCB is less difficult than it might appear. Push the long ends of the pins in an individual strip through from the copper track side of the PCB as shown below:

SIL pins 10-way plastic spacer strip

copper track

INITIAL SOLDERING

soldered joint

Display PCB

Press the pins back from the plain side of the PCB until they are level. Using a fine-tipped soldering iron, solder each pin to the copper track. (continues on page 9.10)

PAGE 9.8

Discovering












LINEAR CLOCK: PARTS LIST Qty

Component

Rapid Electronics Order Code*

Resistors: 3 2 3 2 10 1 1

470 Ω (yellow, violet, brown) 560 Ω (green, blue, brown) 1kΩ (brown, black red) 3.9 kΩ (orange, white, red) 10 kΩ (brown, black, orange) 220 kΩ (red, red, yellow) 10 MΩ (brown, black, blue)

62-0362 62-0364 62-0370 62-0384 62-0394 62-0426 62-0466

Capacitors: 1 1 4 4

15 pF / 100 V low K ceramic plate 2-22 pF miniature trimmer (green) 100 nF /250 V metallised polyester 220 µF / 25 V radial electrolytic

08-0455 12-0105 10-0230 11-0265

Semiconductors: 2 1 16 9 5 5 1 1 1 1 3 3 1

1N 4148 signal diode 1N 5401 3A rectifier diode 8 mm LED red (MINUTES UNITS & TENS 1-5, HOURS 1-5, AM-PM) 8 mm LED green (MINUTES UNITS 6-10, HOURS 6-10) 8 mm LED yellow (SECONDS, MINUTES UNITS & TENS 0, HOURS 11-12) BC 547B silicon npn transistor (TO92C case) 4013B dual D-type bistable 4060B 14-stage binary ripple counter 4081B quad 2-input AND gates 4512B 8-input multiplexer 4514B 4-16 line decoder (HIGH output) 4516B 4-bit binary counter 4520B dual 4-bit binary up counter

1N 4148 1N 5401 55-0400 55-0405 55-0410 BC 547B 4013B 4060B 4081B 4512B 4514B 4516B 4520B

Miscellaneous: 1 2 2 5 3 6 6 1 3 6

watch crystal 32.768 kHz printed circuit boards low profile 14-pin DIL IC socket low profile 16-pin DIL IC socket low profille 24-pin DIL IC socket SIL 10-way socket SIL 10-way plug 2.5 mm DC power socket 12x12 mm miniature tactile switch single sided terminal pin 1/0.6 mm single core wire (links) solder 22swg

90-0105 22-0155 22-0160 22-0180 22-0615 22-0515 20-0975 78-0630 34-0610 01-0305 85-0592

Enclosure: 2 1 1 4 4

transparent acrylic sheet 220x125x2 mm photocopied acetate sheet with front panel design opaque acrylic sheet 220x125x3 mm 6 mm hexagonal threaded spacers, type 3, M3 12 mm hexagonal threaded spacers, type 3, M3

Electronic Clocks

RS 222-373 RS 222-402

PAGE 9.9


4 4 4

15 mm hexagonal threaded spacers, type 4, M3 6 mm pan head slotted screw, M3 16 mm pan head slotted screw, M3

RS 606-692 RS 523-828 RS 290-196

Power supply: 1

miniature regulated power supply/500 mA

85-1685

*Rapid Electronics and RS order codes are given for convenience for UK schools and colleges. Similar components from alternative suppliers will work equally well.

(continued from page 9.8) Finally, push the plastic spacer strip firmly towards the soldered joints:

plastic spacer strip pushed down next to board

all pins soldered

FINAL POSITION Check the SIL pins carefully for fit with the matching sockets on the Time division PCB, but do not push them home at this stage.

Testing The main Time division circuit board should be tested first. None of the ICs should be fitted in their sockets at this stage. After checking again for solder bridges etc., connect the a.c./d.c. 12 V power supply adaptor and test for power supply voltages at the appropriate pins of the vacant IC sockets. Switch off, wait for a few moments for the power supply decoupling capacitors to discharge, and then insert the 4060 CMOS to complete the crystal controlled astable. An oscilloscope or logic probe can be used to monitor the 2 Hz output at pin 3. If an oscilloscope is available, check the higher frequency outputs from the other 4060 outputs. Switch off. Next fit the 4512 8-input multiplexer, the 4520 dual binary counter and the 4081 AND gate ICs. A 2 Hz signal should be present at pin 1 of the 4520 and 1 Hz at pin 3. Connecting flying leads X and Y, or X and Z, to the positive end of the power supply, should result in higher frequencies at the counter input. The final output of the 4520 appears at pin 14. Fit the remaining ICs and follow their action with X and Y connected HIGH (fast setting). More detailed advice about testing is given in Chapter 6.

PAGE 9.10

Discovering


Once everything is in order, disconnect the power supply adaptor and solder the ends of the flying leads to the corresponding points on the copper track side of the Display PCB. The two boards can now be carefully mated together, using threaded 15 mm spacers to maintain the correct distance between them. When power is connected, the clock should be seen to function and the operation of the time-setting controls can be investigated.

Enclosure A simple but attractive enclosure for the Linear Clock can be made by photocopying the front panel design onto acetate. The acetate sheet is sandwiched between two sheets of 2 mm clear acrylic to form the front panel, as indicated in the diagram below:

6 mm spacer 15 mm spacer with 8 mm stud

photocopied acetate sheet

12 mm spacer

16 mm M3 screw

3 mm acrylic back panel

Time division PCB Display PCB 2 mm clear acrylic front panels

6 mm M3 screw

Linear Clock : enclosure assembly details Threaded M3 12 mm spacers, 6 mm spacers, and a special type of 15 mm spacers with a stud extension, are needed to complete the assembly, together with 6 mm and 16 mm M3 screws and a 3 mm acrylic back panel. At each corner of the enclosure, a 16 mm screw passes through from the back panel, and is threaded all the way through the 6 mm spacer, through the Time division PCB and into the 15 mm spacer. The stud from the 15 mm spacer threads through the Display PCB into the 12 mm spacer. Finally, a 6 mm screw is used to fix the front panel.

Electronic Clocks

PAGE 9.11


PAGE 9.12

Discovering



These dimensions give a large clock which is easy to read. The plan was to make the clock from a square of acrylic 425x425x3 mm, with a second piece of acrylic 200x200x3 mm in a contrasting colour mounted at the centre of the first. Lots of 8 mm holes need to be drilled. LEDs can be mounted securely by pushing them into the holes from the rear of the panel and applying a dot of ‘superglue’.

The problem How can the clock circuit be modified to give a display incorporating 60 LEDs, each of which lights up for the appropriate minute? The answer is to use a matrix arrangement of LEDs. To understand this concept, consider the following arrangement of LEDs:

row 1 A

B

C

D

row 2

Part of an LED matrix

390 Ω

390 Ω

column 1

column 2

How can an individual LED be made to illuminate? In this circuit, row 1 and row 2 are ‘active HIGH’, The row inputs to the matrix are normally held LOW and only one of them can be changed to HIGH at any particular moment. On the other hand, the column inputs are ‘active LOW’. They are normally held HIGH and only one of them can be changed to LOW at any particular moment. With these restrictions, just a few input combinations are possible, as summarised in the table at the top of the next page. If both rows are held LOW and both columns are held HIGH, all four LEDs are reverse-biased and none of them can be illuminated. If row 1 is made HIGH (remember ‘active HIGH’) and column 1 is made LOW, LED A becomes forward-biased and it alone lights up. Check through the circuit diagram to make sure that you understand why none of the other LEDs can illuminate. For example, although the anode of LED B is made HIGH, its cathode, connected to column 2, is also

PAGE 10.2

Discovering


HIGH. In this case, there is no voltage difference across B, no current flows and B remains off. As you can see, each of the individual LEDs is illuminated by a unique combination of inputs. row 1

row 2

column 1

column 2

LED illuminated

LOW

LOW

HIGH

HIGH

none

HIGH

LOW

LOW

HIGH

A

HIGH

LOW

HIGH

LOW

B

LOW

HIGH

LOW

HIGH

C

LOW

HIGH

HIGH

LOW

D

It is not difficult to extend the matrix so that any single LED from 60 can be illuminated. In developing Andrew’s Clock, an arrangement of 15 rows x 4 columns was used. This was convenient from a constructional point of view since the LEDs on the clock face were arranged in groups of 15.

The solution The circuit of the Linear Clock, described in Chapter 9, introduced a new integrated circuit, the 4514 CMOS 4-16 line decoder. The pin connections for this device are as follows: FOLLOW input

1

24 +3-15 V

power supply other connections for normal operation pin 24 : +3 to +15 V ENABLE input pin 12 : 0 V pin 1 : FOLLOW input : D input HIGH (+V) inputs pin 23 : ENABLE input : C input pin 2 : A input LOW (0 V) pin 3 : B input O 10 pin 21 : C input O 11 pin 22 : D input O8 outputs

A input 2

23

B input 3

22

O7

4

21

O6

5

20

O5

6

19

O4

7

18

O3

8

O2

9

17 O 9 16 O 14

pins 4-11, 13-20 : individual 1 of 16 outputs

O 1 10 O 0 11

15 O 15 14 O 12

4514 : active HIGH 4515 : active LOW

0 V 12

13 O 13

Pin connections for 4514 and 4515 CMOS 4-16 line decoders

Electronic Clocks

PAGE 10.3


The 4514 has active HIGH outputs, that is, individual outputs go HIGH according to the binary code presented to the D C B A inputs of the device. All other outputs remain LOW. An alternative device, the 4515 has identical pin connections, but the outputs are active LOW. In other words, the output selected by the D C B A code goes LOW, while all the other outputs remain HIGH. This is extremely convenient for Andrew’s Clock because the 60 LED matrix can be implemented using a 4514 to provide the 15 column inputs and a 4515 for the 4 rows. You can see how the LED matrix fits into the overall design for Andrew’s Clock from the block diagram on page 10.5. You may notice other differences between the block diagram for Andrew’s Clock and the block diagram of the Linear Clock, page 9.3. Some of these arise because the development work for the two clocks was done at different times. Using a 4013 to divide the crystal controlled astable frequency by 2 to give a 1 Hz input to the time setting part of the circuit is sensible if a numerical SECONDS display is intended, as in the Big Digit Clock. In the Linear Clock, the 2 Hz from the crystal controlled astable was connected directly to the time setting section. This was followed by a divide-by-120 subsystem, implemented using a 4520 dual 4-bit binary counter. This makes a numerical SECONDS display impossible, but reduces the integrated circuit, or ‘beastie’, count by one. Very often, there is more than one way of solving a circuit problem.

Construction Dimensions for the front panel of Andrew’s Clock have already been suggested. The circuit diagram, printed circuit board layout and track patterns are given on the following pages. Individual LEDs are located in the front panel with the cathode bent towards the centre of the clock, as follows:

anode (long leg) cathode (short leg)

superglue

acrylic front panel LED fixing detail

PAGE 10.4

Discovering



The anodes of the LEDs correspond to the rows of the matrix. All the connections are made with stranded wire. Pre-tinning of the ends of the wires will help to ensure good soldered joints. Solder a wire to the 4514 LED matrix anodes terminal pin marked ‘0’. Link the other end of this wire to the anode for LED 0. Now add a link from the anode of LED 0 to the anode of LED 15 and another from LED 15 to LED 30 and then from 30 to 45. In this way, LED anodes 0, 15, 30 and 45 are all connected to ‘0’ on the PCB. Connect LEDs 1, 16, 31 and 46 to LED matrix anodes ‘1’ in exactly the same way and continue with LEDs 2, 17, 32 and 47, and so on in groups of four until all the LEDs have been connected. Before you get too involved in making all these connections, remember that the order of the LEDs will run anti-clockwise from the back of the clock. Follow the wiring diagram on the opposite page. The LEDs for HOURS are connected in a similar way. All the cathodes are linked together, while each anode needs its own wire from the PCB. Test points A and B should give outputs at 1 Hz and 1 pulse per minute respectively. Self-adhesive PCB pillars are used to fix the PCB to the back of the main acrylic panel. To complete Andrew’s Clock, you will need to attach some sort of support to hang the clock on the wall. The time setting switches are located on the back of the clock.

PAGE 10.6

Discovering



PAGE 10.8

Discovering






ANDREW’S CLOCK: PARTS LIST Qty

Component

Rapid Electronics Order Code*

Resistors: 5 1 3 7 3 1 1

470 Ω (yellow, violet, brown) 560 Ω (green, blue, brown) 2.2 kΩ (red, red, red) 10 kΩ (brown, black, orange) 47 kΩ (yellow, violet, orange) 220 kΩ (red, red, yellow) 10 MΩ (brown, black, blue)

62-0362 62-0364 62-0378 62-0394 62-0410 62-0426 62-0466

Capacitors: 1 1 5 4

15 pF / 100 V low K ceramic plate 2-22 pF miniature trimmer (green) 100 nF /250 V metallised polyester 100 µF / 25 V radial electrolytic

08-0455 12-0105 10-0230 11-0250

Semiconductors: 8 1 60 12 1 4 1 1 1 2 1 3 1

1N 4148 signal diode 1N 5401 3A rectifier diode 8 mm LED red (MINUTES) 8 mm LED green (HOURS) 8 mm LED yellow (SECONDS) BC 547B silicon npn transistor (TO92C case) 4013B dual D-type bistable 4060B 14-stage binary ripple counter 4512B 8-input multiplexer 4514B 4-16 line decoder (HIGH output) 4515B 4-16 line decoder (LOW output) 4516B 4-bit binary counter 4518B dual BCD counter

1N 4148 1N 5401 55-0400 55-0405 55-0410 BC 547B 4013B 4060B 4512B 4514B 4515B 4516B 4518B

Miscellaneous: 1 1 1 6 3 1 3 35

watch crystal 32.768 kHz printed circuit board low profile 14-pin DIL IC socket low profile 16-pin DIL IC socket low profile 24-pin DIL IC socket 2.5 mm DC power socket 12x12 mm miniature tactile switch single sided terminal pin 1/0.6 mm single core wire (links) solder 22swg

90-0105 22-0155 22-0160 22-0180 20-0975 78-0630 34-0610 01-0305 85-0592

Enclosure: 1 1 3

opaque acrylic sheet 425x425x3 mm opaque acrylic sheet 220x200x3 mm 6.4 mm self-adhesive PCB pillar

33-2130

Power supply: 1

miniature regulated power supply/500 mA

85-1685

*Rapid Electronics and RS order codes are given for convenience for UK schools and colleges. Similar components from alternative suppliers will work equally well.

Electronic Clocks

PAGE 10.9


PAGE 10.10

Discovering


11 : CIRCLES CLOCK Designing electronic clocks gets you thinking about new and different ways of displaying the time and you will want to improve existing designs. In the Linear Clock and Andrew’s Clock, just one LED is illuminated for each hour. Would the display be more attractive if earlier LEDs in the sequence remained lit up? When one o’clock becomes two o’clock, two LEDs are lit and when two o’clock becomes three o’clock three LEDs are lit, and so on, producing a bargraph display of HOURS. With Andrew’s Clock, would it be possible to have all 60 LEDs for MINUTES illuminated at the same time?

A new display Consideration of questions like these led to a new design for a clock display, called the Circles Clock. Two varieties of Circles Clock are shown on page 11.3. The HOURS display consists of 12 LEDs. In the prototype versions built for this book, the LED in the 12 o’clock position illuminates on its own when it is 12 o’clock, but goes off when the time becomes one o’clock. However, later LEDs in the sequence remain illuminated. As you can see, when it is 8 o’clock, a total of eight LEDs are lit, up to and including the LED in the 8 o’clock position. Although difficult to describe, this display is visually both pleasing and obvious. The displays for MINUTES (TENS) and MINUTES (UNITS) work in the same way, with the option of extending the display to include SECONDS (TENS) and SECONDS (UNITS). In the smaller version of the Circles Clock, SECONDS indication was provided by a single flashing LED. You can decide for yourself which colours of LED to use for the different elements of the display. In the prototypes built, the LED in the 12 o’clock or ‘0’ position was made a different colour from the other LEDs in the same section of the display. The prototype Circles Clocks were large, either 180x530 mm or 180x890 mm, with a front panel of black acrylic and looked extremely good.

The bargraph problem In the Linear Clock circuit a single output is available to control each of the individual LEDs to be illuminated. How can this single output be used to control a bargraph in which all the LEDs corresponding to previous LEDs in the sequence remain illuminated?

Electronic Clocks

PAGE 11.1


Look at the arrangement of OR gates in the diagram below: inputs 3

outputs 3

2

2 OR

1

1 OR

0

0 OR

What would be the truth table for this circuit? If input 0 goes HIGH, output 0 will be HIGH also. If input 1 goes HIGH, while all the other inputs are LOW, output 1 goes HIGH. As you can see, this output is connected to one of the inputs of the previous OR gate, so output 0 goes HIGH as well. What happens if input 2 is HIGH while all other inputs are LOW? This simple circuit, which can be described as a cascade of OR gates, is all you need to convert signals from the outputs of a 4514 4-16 line decoder to provide a complete bargraph display.

Redesigning the circuit To make construction of the Circles Clock as convenient as possible, it was decided to divide the circuit into sections which could be built and tested separately. The timing module consisted of the crystal astable, time-setting subsystem and frequency division stages, forming the core of the clock circuits described earlier in this book. The A B C D outputs of each of the division stages are available at terminal pins, which can be optionally connected to other modules. To drive the displays, binary coded decimal, or BCD to bargraph and 4-bit binary to bargraph modules are needed. Each of these consists of a 4514 4-16 line decoder and an appropriate number of OR gates, with transistors to drive the LED displays. Look at the block diagram of the Circles Clock system given on page 11.5. The crystal controlled astable and time setting sections are just the same as in previous clocks and you can follow the frequency division chain down the left hand side of the page. What’s new is how the BCD and 4-bit binary outputs of the counters are dealt with.

PAGE 11.2

Discovering



Each group of A B C D outputs connects to a 4-16 line decoder which drives a bargraph display by way of an OR gate cascade. The details of the circuits for the different parts of the display will vary, but the subsystems used are the same. The circuit diagrams for the timing module and the BCD to bargraph and 4-bit binary to bargraph modules are included on following pages. From the diagrams for the bargraph modules, you will notice that diode/resistor combinations are used. The usefulness of diode/resistor AND gates was explained in Chapter 5, but it is also possible to make diode/resistor OR gates, as shown in the circuit diagram below. The operation of the circuit is straightforward: if either input is HIGH, the output will be HIGH, but, if both inputs are LOW, or unconnected, the 10 kΩ pull down resistor will do what it is intended to do and the output will be LOW. In this way, the circuit obeys the OR gate truth table.

inputs A B output 10 kΩ pull down resistor 0V You can’t use diode/resistor OR gates to build a complete OR gate cascade. This is because each diode introduces a 0.7 V reduction in the input voltage, corresponding to the forward voltage of the diode. In a cascade system, you would lose 0.7 V for each stage in the cascade and very soon there would be no voltage left to drive the output. With integrated circuit OR gates this does not happen. A 4071 CMOS integrated circuit contains four OR gates and is used for most stages, but it is OK to use one or two diode/resistor gates at the end of the chain, where this saves the space and cost of another IC.

Construction Building your Circles Clock will take time. Start by building the PCB for the timing module. This can be completed and tested before any of the other modules are built. Depending on the type of enclosure you want to make, it may be helpful to mount the switches for time setting on a separate PCB. To do this, you make extra connections, using flexible stranded wire, from the main PCB to the appropriate points on the small PCB. (continues on page 11.13)

PAGE 11.4

Discovering







PAGE 11.10

Discovering














CIRCLES CLOCK: PARTS LIST Qty

Component

Rapid Electronics Order Code*

TIMING MODULE Resistors: 2 3 6 5 1 1

680 Ω (blue, grey, brown) 1 kΩ (brown, black, red) 10 kΩ (brown, black, orange) 39 kΩ (orange, white, orange) 220 kΩ (red, red, yellow) 10 MΩ (brown, black, blue)

62-0366 62-0370 62-0394 62-0408 62-0426 62-0466

Capacitors: 1 1 3 3

15 pF / 100 V low K ceramic plate 2-22 pF miniature trimmer (green) 100 nF /250 V metallised polyester 100 µF / 25 V radial electrolytic

08-0455 12-0105 10-0230 11-0250

Semiconductors: 6 1 5 1 1 1 1 2

1N 4148 signal diode 1N 5401 3A rectifier diode BC 547B silicon npn transistor (TO92C case) 4013B dual D-type bistable 4060B 14-stage binary ripple counter 4512B 8-input multiplexer 4516B 4-bit binary counter 4518B dual BCD counter

1N 4148 1N 5401 BC 547B 4013B 4060B 4512B 4516B 4518B

Miscellaneous: 1 1 1 6 1 3

watch crystal 32.768 kHz printed circuit board low profile 14-pin DIL IC socket low profile 16-pin DIL IC socket 2.5 mm DC power socket 12x12 mm miniature tactile switch

90-0105 22-0155 22-0160 20-0975 78-0630

BCD BARGRAPH, 6 OUTPUTS Resistors: 6 6

680 Ω (blue, grey, brown) 39 kΩ (orange, white, orange)

62-0366 62-0408

Capacitors: 1 1

100 nF /250 V metallised polyester 100 µF / 25 V radial electrolytic

10-0230 11-0250

Semiconductors: 2 6 1 1

1N 4148 signal diode BC 547B silicon npn transistor (TO92C case) 4071B OR gates 4514B 4-16 line decoder (HIGH output)

Electronic Clocks

1N 4148 BC 547B 4071B 4514B

PAGE 11.11


Miscellaneous: 1 1 1

printed circuit board low profile 14-pin DIL IC socket low profile 24-pin DIL IC socket

22-0155 22-0180

BCD BARGRAPH, 10 OUTPUTS Resistors: 10 10

680 Ω (blue, grey, brown) 39 kΩ (orange, white, orange)

62-0366 62-0408

Capacitors: 1 1

100 nF /250 V metallised polyester 100 µF / 25 V radial electrolytic

10-0230 11-0250

Semiconductors: 2 10 2 1

1N 4148 signal diode BC 547B silicon npn transistor (TO92C case) 4071B OR gates 4514B 4-16 line decoder (HIGH output)

1N 4148 BC 547B 4071B 4514B

Miscellaneous: 1 2 1

printed circuit board low profile 14-pin DIL IC socket low profile 24-pin DIL IC socket

22-0155 22-0180

4-BIT BINARY BARGRAPH, 12 OUTPUTS Resistors: 12 12

680 Ω (blue, grey, brown) 39 kΩ (orange, white, orange)

62-0366 62-0408

Capacitors: 1 1

100 nF /250 V metallised polyester 100 µF / 25 V radial electrolytic

10-0230 11-0250

Semiconductors: 12 3 1

BC 547B silicon npn transistor (TO92C case) 4071B OR gates 4514B 4-16 line decoder (HIGH output)

BC 547B 4071B 4514B

Miscellaneous: 1 3 1

printed circuit board low profile 14-pin DIL IC socket low profile 24-pin DIL IC socket

22-0155 22-0180

DISPLAY & GENERAL 8 mm LED red 8 mm LED green 8 mm LED yellow 6.4 mm self-adhesive PCB pillar single sided terminal pins 1/0.6 mm single core wire (links) solder 22swg opaque acrylic sheet, 3 mm or 5 mm thick for front and rear panels

PAGE 11.12

55-0400 55-0405 55-0410 33-2130 34-0610 01-0305 85-0592 -

Discovering


POWER SUPPLY 1

miniature regulated power supply/500 mA

85-1685

*Rapid Electronics and RS order codes are given for convenience for UK schools and colleges. Similar components from alternative suppliers will work equally well.

(continued from page 11.4) If you decide to solder switches to the main PCB for testing, you can add separate switches later, provided these are connected in parallel. In this case, you can make soldered connections to the copper track next to the switch terminals on the lower surface of the board. Once the timing module is working correctly, assemble the BCD to bargraph, 6 outputs PCB. Connect long leads, flexible stranded wire, to the A B C D terminal pins, and to the +12 V and 0 V terminals. Deliberate colour coding of all these wires will be very helpful later! The bargraph module can be tested independently. Connect the power supply and then connect all four A B C D inputs to 0 V. Pin 11, corresponding to output 0 should go HIGH, while all other outputs are LOW. (The 4514 pin layout is given on page 10.3.) Next connect input A to +12 V so that A B C D becomes 0 0 0 1. Output 1, pin 10, should go HIGH. Now follow the circuit through to the base resistors of the transistors which switch LEDs 0 and 1. On one side of these resistors you should be able to measure a voltage close to 12 V, while on the other side, at the base of the transistor, the voltage should be 0.7 V, indicating that the transistor is turned ON. Are both transistors ON, indicating that the OR gate cascade is generating the bargraph? Experiment with other A B C D values in the same way. If you examine the voltage at the collector of an output transistor, you will find that it is close to 0 V and does not change with changes in input. This is because the circuit is incomplete: you haven’t connected the LEDs yet. When all the PCBs you need for your clock have been built and tested, you can set about linking them together. The best strategy is to fix the individual LEDs to the front panel, each with a dot of superglue, and then add long flexible stranded leads. The general plan of these connections is shown on the next page. The PCBs are mounted on the back panel of the clock using self adhesive PCB pillars. These should be interconnected so that each PCB receives a power supply and the appropriate A B C D inputs. Finally, join the leads from the front panel to the correct points on the bargraph PCBs. (This is much more entertaining if you have ignored all advice and failed to colour code the leads.) There is a lot to be said for working systematically. As you go, adjust the lengths of the individual leads so that you can bundle those which run parallel. Use small plastic cable ties to make the wiring bundles permanent.

Electronic Clocks

PAGE 11.13




The enclosure for the prototype Circles Clock followed the plan suggested by the diagrams on page 11.3, with the front and back panels held together by M3 spacers and screws. An aluminum bracket was added to the back of the clock so that it could hang on the wall.

PAGE 11.14

Discovering


12 : IDEAS The designs for clocks developed in this book are restrained and technical. The intention has been to focus on the electronic aspects of clock design, without exploring the detail of different types of enclosure or experimenting with visual presentation. However, there is plenty of opportunity for developing clocks which look good. This Chapter gives a little more information which should help you to achieve the results you want.

Build your own 7-segment display Although you can buy a ready made 7-segment display, it might be interesting to build your own from individual LEDs, or from an arrangement of filament lamps. A brief look at a suppliers catalogue is enough to show you that LEDs come in a great variety of shapes and colours, not just the normal domed shape, but cylindrical, rectangular, triangular and square. Different shapes give different appearances:

7-segment displays made from individual LEDs It is not essential to have four LEDs in each segment of the display. Displays with as few as two LEDs per segment will still be readable:

You do need to think about how the LEDs will be connected to your clock circuit. It is more efficient to connect the LEDs in series than in parallel.

Electronic Clocks

PAGE 12.1


Each LED requires a forward voltage of around 2 V to make it illuminate. Four in series will require 4x2=8 V. To provide this voltage, you should use a power supply of 12 V, and the circuit for each segment becomes:

+12 V

12-8=4 V R 10 mA

2x4=8 V

2V 0V A current of 10 mA is sufficient to illuminate most LEDs so the value of the series resistor will be: R=

4 V = = 0.4 kΩ = 400 Ω I 10 mA

An E12 value of 390 Ω, or possibly 330 Ω, if you want the LEDs to shine a little more brightly, would be fine. The 4511 CMOS 7-segment decoder you are most likely to use will provide up to 20 mA per segment, without damage and can be used directly to drive series connected LEDs. What do you do if you want more current than this, for example, to drive a display consisting of filament lamps? This requires a transistor circuit: +12 V 6V

12 V

6V

R

100 mA 0V

12 V

0.7 V 0V

As you can see, the filament lamps are connected in series, with 12 V across them and 100 mA of current flowing through them. Assuming the transistor has a current gain, hFE =100, the base current

PAGE 12.2

Discovering


will be just 1 mA. The voltage across the base resistor is 12-0.7=11.3 V. (0.7 V is the voltage at the base of the transistor when it is turned ON.) You can calculate a value for the base resistor from: R=

11.3 V = = 11.3 kΩ I 1 mA

An E12 value of 10 kΩ is suitable. If you want more than two lamps per segment, you can connect lamps in parallel, or increase the power supply voltage: +12 V

+24 V 2 pairs of lamps in parallel

display segment

R

4 lamps in series

display segment

200 mA

R

0V

100 mA

0V

Note that you can’t drive the whole circuit from 24 V. 12 V is a sensible limit for CMOS circuits, but it is possible to have a different power supply just for the displays. It is worth pointing out that filament lamps are less reliable than LEDs. As well as requiring much more current, they are more likely to burn out and need more frequent replacement. You will need to check the current rating of the power supply. Either LEDs or filament lamps could be used to ‘backlight’ live edge acrylic sheet to give an unusual 7-segment display. Filament lamps might even be used to project a the display onto a screen. What about sound outputs or motors so that things happen every minute or hour? You can use signals from your clock circuit to control anything you want.

What is a shift register? A shift register is a circuit in which bits of information representing a binary number can be transferred from one subsystem to the next along a chain. One type of shift register consists of a chain of D-type

Electronic Clocks

PAGE 12.3


bistables. D-type bistables were introduced in Chapter 2 and are the fundamental building blocks of many counter ICs. The symbol for a D-type bistable is as follows:

DATA input

D

Q

CLOCK input _ Q S R There is a more detailed explanation in Chapter 2, but just to remind you, the action of a D-type bistable can be summarised by saying that the logic state at the D-input is transferred to the Q-output on the rising edge of the CLOCK. In a shift register, the CLOCK inputs of all the stages are connected together: PARALLEL outputs A

D

Q

B

D

Q

C

D

Q

D

D

Q

DATA input (SERIAL)

SERIAL output _ Q

_ Q

_ Q

_ Q

R

R

R

R

RESET input

CLOCK input

4-bit shift register As you can see, the Q-output of each stage is connected to the DATA, or D-input of the next. It is a 4-bit register because it consists of four D-type bistables. This is all very well, but what does a shift register do? Suppose the DATA input to the shift register is connected HIGH and the RESET input is connected briefly HIGH. This forces the A B C D outputs to go LOW, 0 0 0 0. Next, suppose a series of pulses at the CLOCK input. The first D-type has a HIGH voltage, logic 1 at its DATA input and this is transferred to the Q-output on the rising edge of the first clock pulse. None of the other outputs change because each of the other DATA inputs is LOW, logic 0. However, when the rising edge of the second clock pulse arrives, the 1 at the DATA input of the second D-type will now be transferred. As each successive clock pulse arrives, each of the A B C D outputs will go HIGH in turn.

PAGE 12.4

Discovering


The behaviour of the shift register can be summarised by a truth table showing the sequence of changes: CLOCK pulse

DATA input

0

1

0

0

0

0

1

1

1

0

0

0

2

1

1

1

0

0

3

1

1

1

1

0

4

1

1

1

1

1

output A output B

output C output D register RESET

If more than four clock pulses are delivered, the A B C D outputs remain 1 1 1 1, provided the DATA input remains HIGH. However, if the DATA input was changed to LOW, then the sequence for the next four clock pulses would be: CLOCK pulse

DATA input

0

0

1

1

1

1

1

0

0

1

1

1

2

0

0

0

1

1

3

0

0

0

0

1

4

0

0

0

0

0

output A output B

output C output D

These sequences resemble the counting sequence explored in the Circles Clock, Chapter 11. Would a clock circuit using shift registers provide an alternative to the normal chain of counters and give rise to new ways of displaying the time? The answer must be yes. Design Sheet DS 12.1 shows a prototype circuit set up to investigate shift register sequencing. The integrated circuit used is the 4015B CMOS, which contains two 4-bit shift registers, each with the same connections as the circuit diagram given above. You can make a single 8-bit register by connecting the Doutput of the first 4-bit register to the DATA input of the second, and joining the two CLOCK inputs together. The engineer who designed the 4015 had a sense of humour. The connections for the individual 4-bit registers are not located on either

Electronic Clocks

PAGE 12.5


side of the integrated circuit. Instead, as shown below, five of the pins for register 1 are on the left hand side, with the remaining two pins on the right hand side: CLOCK input (2)

1

16 +3-15 V

D output (2)

2

15 DATA input (2)

C output (1) 3

14 RESET input (2)

B output (1) 4

13 A output (2)

A output (1) 5

12 B output (2)

RESET input (1) 6

11

DATA input (1) 7

10 D output (1)

0V

8

9

C output (2) CLOCK input (1)

power supply pin 16 : +3 to +15 V pin 8 : 0 V shift register 1 pin 7 : DATA input pin 9 : CLOCK input *** pin 6 : RESET input pin 5 : A output pin 4 : B output pin 3 : C output pin 10 : D output ***

shift register 2 pin 14 : DATA input pin 1 : CLOCK input *** pin 14 : RESET input pin 13 : A output pin 12 : B output pin 11 : C output pin 2 : D output *** connections for normal operation pins 6, 14 : LOW (0 V)

Pin connections for 4015B CMOS dual 4-bit shift register Similarly, five pins for register 2 are on the right hand side, with two on the left. Unless you take this bizarre arrangement into account, circuits built using the 4015 may not do what you expect. The diagram at the top of the page 12.7 shows a design for a special type of clock used in a radio broadcast studio. The centre of the display is a conventional 7-segment display of hours and minutes, with the segments made up of individual LEDs. To help the broadcaster time introductions etc., the seconds display sweeps round the outside of the clock, giving a clear visual indication of the time remaining until the next minute. From what you have learned, you could design the electronic circuit for this clock.

PICs PICs, or Peripheral Interface Controllers, are fantastic ‘beasties’. An individual PIC is a microcontroller, almost a complete computer system, inside a standard IC package. For example, the 18-pin PIC16C84 contains an 8-bit ALU (arithmetic logic unit) and an 8-bit data bus, together with 1K x 14-bit EEPROM program memory, 36 x 8-bit SRAM registers and 64 x 8-bit EEPROM data memory, oscillator and timer subsystems and two input/output ports. The input/output ports are connected to a total of 13 I/O pins which can source or sink at least 20 mA, enough to drive LEDs directly. PICs are reduced instruction set, or RISC, microcontrollers, with just 35 single word instructions to learn. The PIC16C84 operates at speeds of up to 10 MHz and its EEPROM (electrically erasable programmable read only memory) makes it ideal for development work. To work with PICs, you need a PC with appropriate software to develop and test the programs, and a PIC programmer which allows

PAGE 12.6

Discovering






about electronics, providing a background of electronics knowledge, which is, in any case necessary for effective work with PICs. From the educational point of view, experience of hardware design isn’t just helpful as a prelude to PIC design: it’s essential.

Alarm clocks With a PIC-based solution, adding an alarm clock function involves little more than extra programming: the circuit itself will be almost unchanged. On the other hand, an alarm clock realised in hardware requires a circuit which is about three times more complicated than a simple clock. To set and store the alarm time you need the same range of counters and displays. In addition, you need to devise some way of comparing the displayed time with the stored time so that the alarm will sound at the appropriate moment. A possible approach involves 4585 CMOS integrated circuits. The 4585 is a 4-bit magnitude comparator. It is used to compare two 4-bit binary numbers and has outputs which indicate whether the first number is greater or smaller than the second, or whether the two numbers are equal.

Final thoughts DOCTRONICS hopes that you will enjoy this book and find it useful. The author would be delighted to receive comments about the style and content of the book, to help with problems and to hear about other resources which students and teachers would like to see.

Electronic Clocks

PAGE 12.9


PAGE 12.10

Discovering


RESOURCES Addresses

DOCTRONICS EDUCATIONAL PUBLISHING for DESIGN & TECHNOLOGY 6 LIMES AVENUE MILL HILL LONDON NW7 3PA Telephone: (+44) 0181 906 2287 Internet: http://www.users.dircon.co.uk/~doctron/

Email: doctron@dircon.co.uk

Rapid Electronics Ltd Heckworth Close Severalls Industrial Estate COLCHESTER CO4 4TB Telephone: 01206 751166 Fax: 01206 751188

RS Components UK PO Box 99 Corby Northants NN17 9RS

catalogue with data sheets on CD-ROM

Telephone: 01536 201201 Fax: 01536 201205 Internet: http://www.worldserver.pipex.com/rs/content.htm

crocodile clips Limited 11 Randolph Place EDINBURGH EH3 7TA SCOTLAND Telephone: (+44) 0131 226 1511 Fax: (+44) 0131 226 1522

Email: sales@crocodile-clips.com

The Institution of Electrical Engineers (IEE) Schools Education and Liaison Michael Faraday House Six Hills Way STEVENAGE, Herts SG1 2AY

‘ELECTRONICS Education’ magazine SYSTEMS FILE

Telephone: 01438 313311 Internet: http://www.iee.org.uk/

Electronic Clocks

RESOURCES 1


Books

Discovering Electronics with crocodile clips © W. D. Phillips, DOCTRONICS EDUCATIONAL PUBLISHING for DESIGN & TECHNOLOGY; 1997 ISBN 0-9530129-0-5 A Beginners Guide to CMOS Digital ICs R.A. Penfold, Bernard Babani BP333; 1993 ISBN 0-85934-333-2 Practical Electronic Timing Owen Bishop, Bernard Babani BP317; 1993 ISBN 0-85934-317-0 CMOS Cookbook, Second Edition Don Lancaster, revised Howard M. Berlin, Howard W. Sams & Company; 1977, 1988, ISBN 0-672-22459-3 Newnes Electronic Circuits Pocket Book, Volume 1 LINEAR ICs Ray Marston, Newnes/Butterworth-Heinemann; 1991 ISBN 0-7506-0132-9 Newnes Electronic Circuits Pocket Book, Volume 2 PASSIVE & DISCRETE CIRCUITS Ray Marston, Newnes/Butterworth-Heinemann; 1993 ISBN 0-7506-0857-9 Newnes Electronic Circuits Pocket Book, Volume 3 DIGITAL ICs Ray Marston, Newnes/Butterworth-Heinemann; 1996 ISBN 0-7506-3018-3 Longitude Dava Sobel, Fourth Estate, London; 1996 ISBN 1-85702-502-4

Video Quartz Watch Tim Hunkin’s The Secret Life of Machines, Channel 4 Video available from: Team Video, 105 Canalot Studios, 222 Kensal Road, LONDON W10 5BN, Tel: 0181 960 5536, Fax: 0181 960 9784

RESOURCES 2

Discovering


Constructional articles PIC Digilogue Clock John Scott Patterson, Everyday Practical Electronics, June 1997, p380-384 Digilogue Clock John Scott Patterson, Everyday Practical Electronics, October 1994, p730-734 PIC-TOCK Pendulum Clock John Becker, Everyday Practical Electronics, September 1996, p697-704 Linear Clock W.D. Phillips, Everyday Practical Electronics, May 1993, p348-354 EPE Time Machine John Becker, Everyday Practical Electronics, November 1997, p782-789

Time & clocks related Internet links

http://www.greenwich2000.com/time/index.html

http://www.ast.cam.ac.uk/RGO/

http://www.nmm.ac.uk/

The British Horological Institute

http://www.bhi.co.uk/

HOROLOGY - The Index http://www.horology.com/horology/

Electric Clocks http://www.btinternet.com/~stevethack/clocks/index.htm

Electronic Clocks

RESOURCES 3


http://www.ubr.com/clocks/index.html

http://www.bldrdoc.gov/timefreq/index.html

Time Service Department, U.S. Naval Observatory http://tycho.usno.navy.mil/time.html

National Physical Laboratory, CETM, Time and Frequency Section http://www.npl.co.uk/npl/cetm/taf/

http://www.nwrel.org/library/time.html

The British Sundial Society

http://www.sundials.co.uk/bsshome.htm

Introduction to Calendars

http://ghs1.greenheart.com/billh/

RESOURCES 4

Discovering


Other Internet links

http://www.technologyindex.com/education/index.html

Welcome to MadLab

http://www.madlab.org/

Everyday Practical Electronics Magazine http://www.epemag.wimborne.co.uk/

The Alan Turing Home Page

http://www.wadham.ox.ac.uk/~ahodges/Turing.html

The Virtual Museum of Computing http://www.comlab.ox.ac.uk/archive/other/museums/computing.html

Logic Integrated Circuits http://www.mot-sps.com/logic/

http://www.nmsi.ac.uk/

Robot Information Central http://www.robotics.com/robots.html

Electronic Clocks

RESOURCES 5


Who is he? http://www.ece.unh.edu/faculty/sidney/SD1.html

Quickroute Systems Limited (PCB design software): http://www.quickroute.co.uk/index.htm Koeksuster Publications (‘Schools Internet Primer’): Westminster School: Electronics on the Web Magazine: New Scientist:

http://www.koekie.org.uk/

http: //www.westminster.org.uk/index.html http://www.emags.com/epr/electron.htm http://www.newscientist.com/ps/home.html

Don Lancaster's The Guru's Lair:

http://www.tinaja.com

RM Internet for learning, Eduweb:

http://www.rmplc.co.uk/

Engineering Council:

http://www.engc.org.uk/

Technology Enhancement Programme (TEP): http://www.engc.org.uk/tep/index.html DATA Design & Technology Association: http://ncet.csv.warwick.ac.uk/WWW/projects/cits/dandt/data/data.html National Council for Educational Technology:

http://www.ncet.org.uk/

Scottish Council for Educational Technology:

http://www.scet.org.uk/

Design Council:

http://www.design-council.org.uk/welcome.html

The Association for Science Education (ASE): http://www.rmplc.co.uk/orgs/asehq/index.html Motorola Inc: Arizona Microchip (PIC resources) Intel: CPU Info Centre: Chip Directory: Semiconductor Web Sites: Duracell: Eveready:

http://www.mot.com/ http://www.microchip2.com/ http://www.intel.com/ http://bob.eecs.berkeley.edu/CIC/ http://www.xs4all.nl/~ganswijk/chipdir/ http://www.scruznet.com/~gcreager/welcome.htm http://www.duracellusa.com/ http://www.eveready.com/main.html

Maplin Electronics

http://www.maplin.co.uk/index000.htm

Farnell (Electronic Components):

http://www.farnell.co.uk/uk/index.html

Philips (Electronic Components):

http://www.philips.com/

RESOURCES 6

Discovering


Electronic Clocks


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.