Week 4 : Tough stuff
|A problem solved|
|It's not 10, it's 8½ . . .||Wiring your switch|
|Calculations||Printed circuit board|
|Rotary switch||What have you learned?|
|Back to Games timer|
So far, you have investigated circuits for the three main sections of the games timer, namely:
|astable (pulse generator)||week 1|
|counter and display||week 2|
|'beep' 'beep' circuit||week 3|
Now it is time to work out how to join these sections together to give the complete circuit of the games timer, and also to calculate component values.
When the games timer is RESET, two things must happen. The 4017 counter must go back to zero and the 4060 astable/divider must go back to zero. (If we left the 4060 running, it would not be synchronised with the 4017 and erratic times would result.)
A careful study of what happens when the RESET is released and everything starts to work, reveals an interesting pattern:
What the diagram shows is that the total timed period of the system is 8.5 times the period of the 4060 output pulses.
It doesn't take as many as 10 pulses from the 4060 to illuminate the 10 display LEDs in the correct sequence. This is because:
|The 4017 is rising edge triggered. As a result, LED number 0 goes OFF and LED number 1 goes ON when the first rising edge is received from the 4060. As you can see, this occurs when the time elapsed is equal to half the period of the 4060 pulses.|
|The 'beeps' should start immediately the final LED is illuminated, so LED number 9 doesn't count as part of the timed period|
Work through this explanation again if you are unsure about why the total timed period is equal to 8.5 times the period of the 4060 pulses, rather than 10 times the period of these pulses.
Consider a total timed period of 60 seconds. What should be the period of the 4060 pulses?
Remember that the 4060 divides its initial frequency by 214 = 16 384. So . . what should be the period of the pulses from the initial astable part of the 4060?
These calculations show that for a 60 second timed periods, the initial astable should have a frequency of 2321 Hz, or approximately 2.3 kHz.
From the 4060 data sheet, as outlined in week 1, you get the design formula:
To get further than this, you need to choose a value either for RT or for CT . You also need to remember that the design formula works with fundamental measurement units, that is with the SI units for resistance and capacitance. However, you can use other combinations of compatible measurement units:
|resistance : RT||capacitance : CT||frequency : fosc|
In this case, it is convenient to use kW, µF and kHz.
Substituting fosc = 2.321 kHz :
Resistors are available at low cost in a wide range of values. Usually, any resistor from 1 W to 10 MW costs the same. The range of capacitor values is more restricted and larger value capacitors cost more. When you select components for a resistor/capacitor combination, it often makes sense to choose the capacitor first and to start by choosing a relatively small value.
Suppose you choose a value:
This resistor value is neither too big or too small. The nearest E12/E24 value is 18 kW.
You need to think clearly to follow through these calculations. What you end up with are resistor and capacitor values which allow the games timer to count through a reasonably accurate timed period of 1 minute. These magic numbers are:
Once you have established the RT and CT values you need for a timed period of 1 minute, it is much easier to work out the values you need for the other timed periods, 30 seconds, 2 minutes and 3 minutes:
total timed period
|9.1 kW||10 nF||30 seconds|
|18 kW||10 nF||60 seconds||1 minutes|
|36 kW||10 nF||2 minutes|
|56 kW||10 nF||3 minutes|
As you can see, for the timed periods specified in the games timer brief, CT is always the same (10 nF), while RT must be varied.
To change RT and therefore the total timed period, you are going to use a rotary switch:
To understand how to use a rotary switch, you need to know a bit more about how switches are described. The diagram below shows four common types of switches:
In an SPST, or single pole single throw switch, there is a single input connection, called a pole, and a single output connection, called a throw. An SPST switch is a straightforward ON/OFF switch which can be used to make or break a single connection.
In an SPDT, or single pole double throw switch, there are two output connections, allowing the input signal to be directed along either of two routes.
In a DPST switch, the two input connections, or poles, are ganged together, so that they switch simultaneously, either both ON, or both OFF. Simultaneous action, or 'ganging' is indicated by the dotted line linking the two parts of the switch.
Similarly in a DPDT switch, the two poles switch together.
In a rotary switch, the output connections are usually called ways, instead of throws. The construction of the switch provides a total of 12 ways, but there may be 1, 2, 3 or 4 poles:
In the simplest form of rotary switch, a single input pole can be switched to any one of 12 output terminals, or ways. This is a 1-pole 12-way switch.
Alternatively, the rotary switch can be constructed with 2 poles, allowing each pole to be switched to any one of 6 ways. Note that the two poles are ganged. If pole A is switched from output 1 to output 2, pole B switches simultaneously from output 6 to output 7, and so on. This is a 2-pole 6-way switch and is the kind of switch you are going to use in the games timer circuit.
3-pole 4-way and 4-pole 3-way switches are also available. You can work out their functions from the diagrams.
The complete circuit for the games timer is:
Although the diagram looks complicated, you should be able to identify the important sections of the circuit. Look first for the 2-pole 6-way rotary switch. Pole A is used to select the appropriate value for RT . Only one of the timing resistors can be in the circuit. For example, if the switch is operated so that the 18 kW resistor is selected, the timed interval will be 1 minute.
The second pole of the rotary switch, pole B, is used as an ON/OFF switch for the circuit. The ways numbered 8, 9, 10 and 11 are joined together, so that the power supply will be connected to the circuit for any of these switch positions. In other words, it doesn't matter which timed period you select 30 seconds, 1 minute, 2 minutes, or 3 minutes, the power supply will remain connected.
Turning the switch so that pole A is connected to way 1 simultaneously connects pole B to way 7. In this position, the power supply is disconnected and the circuit is OFF.
There is one unused switch position. This could be used as a second OFF position, but there is way of altering the behaviour of the rotary switch so that you can't turn the spindle into the final position. You will find out how to do this in a later section of this practical.
Next, locate the tilt switch in the circuit diagram. This is part of a voltage divider (potential divider) circuit which RESETs both the 4060 and the 4017 when the tilt switch contacts are bridged.
You will recognise the 4060B integrated circuit as an essential part of the astable/divider subsytem, and the 4017B as part of the counter & display subsystem. The 'bleep' 'bleep' subsystem uses the Schmitt trigger NAND gates of the 4093B.
Looking carefully at the circuit, you can see that the final LED in the display is driven by a transistor switch circuit. Why has this been done? The answer is that when an individual output of the 4017 drives an LED directly, it is supplying close to its maximum current, with the result that the output voltage falls. When the LED is shining brightly, the voltage at the 4017 output may be reduced by 2-3 volts. (You can use a voltmeter to investigate this effect.)
For the LEDs connected to outputs 0-8, this reduction in voltage is not important because the output signals are not connected to anything else. However, output 9 connects to the ENABLE input of the 4017, as well as driving its own LED. In prototype circuits where output 9 was used to drive the LED directly, it was sometimes noticed that the output voltage was too low to work correctly as an ENABLE signal, so that the count did not stop when the final LED was reached but continued, starting at the beginning of the sequence once more.
Driving the final LED using a transistor eliminates this problem altogether because the 4017 output just needs to provide the base current for the transistor, so that the output voltage remains HIGH when it should be HIGH.
You couldn't find out about this problem without building the circuit in prototype form.
Look at the base of your rotary switch:
The first things to observe are the two terminals in the middle of the switch. These are the poles of the switch. The 12 terminals round the outside of the switch make up the two groups of 6 ways. If the arrangement of terminals on your switch is different, then you are not looking at a 2-pole 6-way switch.
You can start the construction of the final games timer by wiring up the switch. It is important to use flexible stranded wire and to colour code your connections, as indicated. (Although single core wire is a little easier to solder, it breaks off very easily and it is much more difficult to attach the switch to the printed circuit board.)
Look for the raised letters and numbers which identify the poles and ways of the switch before you start:
To make these connections correctly, you must STRIP, TWIST and TIN the stranded connecting wires. Cut the tinned end to a sensible length and bend it round the terminal with pliers before soldering. Keep the soldering iron in contact with the terminal for a few moments to avoid a 'dry' joint. Each of the wires should be 10-15 cm in length.
Take time and care to get these connections right. Once you have completed your switch, keep it somewhere safe while you work on the printed circuit board.
The diagrams below show the top view of the printed circuit board, with all the components in place, and the corresponding track view. As usual, the tracks are visualised looking through the board as if it were transparent. (When you look at the underside of the pcb, what you see is a mirror image of this pattern.)
Up to previous stage
Begin construction by soldering in the sockets for the integrated circuits. Next, solder in the resistors, checking carefully that these are the correct value. To confirm the colour code, use the DOCTRONICS colour code convertor.
Add the link wires followed by the other components, checking the polarity of the polarised capacitors and the LEDs. Take care to get the BC547B transistors the right way round. You don't need to solder in the wires next to the timing resistors: these are the wires from your rotary switch and you will be able to connect them later.
When you think you have finished, check your printed circuit board carefully against the diagram to make sure that all the components are in the right places. Look at the soldered joints on the underside of the board and re-solder any which look less than perfect. You need to re-heat the joint and to apply a little fresh solder. Likewise, check for solder blobs which bridge tracks which should not be joined. (Note that some pins of the integrated circuits should be joined.)
This week you have learned something about calculating component values. This involves using the appropriate design formula, obtained from the manufacturer's data sheet. The design formula works with fundamental measurement units, but it is often more convenient to work with compatible measurement units of resistance, capacitance, frequency and time.
Using the design formula, you calculated the correct RT and CT values to give the games timer a timed period of 1 minute. It was easy to select component values for the other timed periods.
You found out about switches, and about rotary switches in particular. A 2-pole 6-way rotary switch is used in the games timer circuit.
You were able to identify the main subsytems of the games timer from the completed circuit diagram.
Following the diagrams given, you have constructed a correctly-wired rotary switch and a printed circuit board, with all the soldered components and links.
In the next session, you will find out how to connect the power supply and the rotary switch to the printed circuit board. You will be able to test the completed circuit to confirm that it functions. Finally, details are given to allow you to make an acrylic enclosure for the games timer.
|Up||Back to Games timer|