|1. Buy the Safety Lights construction kit||More updated pages...|
|2. Brief : identifying a need|
|3. Specification||Discovering Digital Electronics|
|4. About LEDs||1 : Beginnings|
|5. Limiting current||2 : Logic gates|
|6. Making measurements||3 : Astables|
|7. Measuring current|
|8. Introducing astables||555 timer|
|9. Developing the Safety Lights||Biscuit Tin Alarm Project|
|10. Building your Safety Lights|
|11. Packaging the product|
This is an excellent construction kit for beginners. The circuit uses the 555 timer integrated circuit. You can learn a lot by testing parts of the circuit on prototype board and following the explanation of how the final circuit was developed.
Buy using PayPal™
price: £ 3.20 + P&P
|DOCTRONICS Safety Lights construction kit||
USD, Euro accepted..
DOCTRONICS accepts official orders from UK educational establishments. Email firstname.lastname@example.org for details of quantity pricing.
Click if you want to build the circuit now.
The brief is to design and build a safety light device suitable for use by pedestrians and cyclists.
It is easy to buy LED safety lights and these have become popular, particularly with cyclists. At the moment, UK road safety regulations, BS 6102-3, mean that most LED lights can be used only in addition to a BS approved cycle light. If they are attached to a bicycle, they must be used in non-flashing mode. Flashing operation is permitted if the lights are worn attached to a helmet, or to clothing, increasing visibility and promoting safety by attracting the attention of other road users.
The circuits described help you to explore some of the issues involved in the electronic design of safety lights. Although it is difficult to compete with commercial products in terms of size and price without access to equivalent manufacturing facilities, you can make a useful and effective device.
A specification is a technical description of the device, listing its important features. You, as designer, will ask questions:
Answering questions like these helps to define the problem and you will have a much clearer idea of what you need to investigate with circuits in prototype form. Initial consideration suggests some answers:
Commercial devices usually use two AA, or two AAA, cells giving a 3 V power supply. This limits the choice of components for the electronic circuit (most integrated circuits require at least 5 V). AA battery holders are more expensive than a simple battery clip. Since a PP3 battery is comparable in size to two AA cells, it is a more convenient power supply in this context.
LEDs are the correct choice because they use much less current and are more reliable than filament lamps. LEDs give significantly more light output at 10-20 mA and blow much less frequently.
You will find out more about subsystems as your electronics knowledge develops. An ASTABLE produces pulses. You will need to experiment to find out the appropriate flashing frequency. Ways of keeping the current needed by the device to a minimum should be considered throughout the development of the device.
A typical LED, or light emitting diode, is shown in the diagram together with its circuit symbol:
|Standard and superbright LEDs|
Superbright, or ultrabright LEDs are similar but usually have a clear outer casing. They can be much brighter than standard LEDs.
From a practical point of view, there are several things about LEDs you need to know:
It is easy to work out which way round to connect the LED. The positive connection, or anode, a, is indicated by the longer leg, while the negative connection, or cathode, k, is the shorter leg. The cathode is also indicated by a 'flat' on the body of the component.
How do you limit the current flowing through an LED? The answer is that you need to connect a resistor in series with the LED.
|Limiting current through an LED|
How is the value of this resistor calculated? To do this, you need to know V, the voltage across the resistor, and I, the current flowing through it.
A 5 mm superbright LED has a typical forward voltage, VF = 1.85 V, or 2.5 V maximum, and gives at least 1000 mcd light output at 20 mA. (mcd=millicandelas; the candela is the SI unit of light intensity.) The maximum current is 30 mA.
Allowing for a 2 V drop across the LED, this leaves 9-2=7 V across the resistor. The current through the LED should be 20 mA. Because the resistor is in series, the current through it is the same.
This is an Ohm’s equation formula. Note that, if you enter the current value in mA, the answer comes in kΩ: 0.35 kΩ = 350 Ω.
You probably know that resistors are manufactured in ‘preferred’ values according to E12 and E24 ranges. You can find out about these ranges from Chapter 2 of Design Electronics. From a practical point of view, you need to choose a suitable resistor value to use in your circuit. The closest E12 resistor values are 330 Ω and 390 Ω. To keep the current well within the 30 mA maximum, you are going to use 390 Ω.
Resistor values are indicated by a colour code. To identify resistor values use the DOCTRONICS colour code converter program. With practice, it is easy to read the colour code. The colours for 390 Ω are orange, white, brown.
Most of the resistors you use will have an additional gold-coloured tolerance band indicating a manufacturing accuracy of ±5%.
Your superbright LED should shine very brightly and it is interesting to compare the brightness of a standard LED in the same circuit by swapping them over on the prototype board.
Clicking the button under the diagram moves you on to the next prototype board layout on this page. Clicking opens the drawing in a new window which you can maximise to fill the screen: you can see exactly where to put the wire links.
The diagrams below show how measurements of current, voltage and resistance are made. To measure current, the circuit must be broken and the ammeter connected in series. To avoid changing the behaviour of the circuit, an ammeter must have a very low resistance.
Voltmeters are connected in parallel and must have a high resistance. Voltage measurements are the easiest to make and often the most useful.
To measure the resistance of a component, it must be removed from the circuit altogether and connected to the ohmmeter as shown. The ohmmeter contains its own power supply.
All of these measurements can be made with a multimeter:
|Using a multimeter as a voltmeter|
The BLACK lead of the multimeter is always connected to the COM socket. The RED lead is connected to the VΩmA socket. Use 4 mm leads and push crocodile clips onto the ends of the leads as indicated.
As you can see, the central knob of the meter has been rotated to 20 V. This means that 20 V is the largest voltage which can be measured. Most of the circuits you are likely to investigate will have power supplies from 5-12 V, so this setting is the one you will use most frequently.
|Measuring the forward voltage of an LED|
The measurement you are making is called the forward voltage of the LED. This is expected to be in the range 1.6-2.0 V.
Write down the value you measure for the forward voltage. Try replacing the LED with other super bright LEDs. Is the forward voltage always the same?
How long will the batteries last? If you buy safety lights you want to know. The answer depends on how much current is needed to make the LEDs illuminate. To measure this current, you need to connect your multimeter differently:
|Measuring current through an LED|
The red lead from the battery or power supply is pulled out of the prototype board, breaking the circuit. The multimeter is connected in series and switched to the 200 mA ammeter range. Check the circuit diagram given earlier to confirm that you understand how the ammeter has been connected into the circuit.
It is very easy to 'blow' the fuse inside the multimeter when it is being used to measure current. If this happens, the display will become erratic and the LED will not light. Replace the fuse and check your connections carefully.
|Inside your multimeter
To replace the fuse, undo the two screws on the back of the meter and carefully remove the back.
The fuse is located at the bottom of the PCB, just above the battery and can be levered out using a small screwdriver. The replacement must be a quick blow type rated 250 V, 250 mA.
The black blob at the top of the PCB is the integrated circuit which controls the multimeter. You can see lots of surface mount resistors and other components. For accurate measurement, many of the resistors are high precision types.
Above the meter sockets is a component labelled PTC. This is a positive temperature coefficient thermistor used as part of a circuit protecting the meter from damage.
When your circuit is working correctly, the LED is illuminated. Write down your measured current value. How does this value compare with the expected value, 20 mA? Since you are using a 390 Ω resistor in place of the calculated value 350 Ω, the actual current value is probably a bit less, around 18 mA.
|How much current for 2 LEDs in parallel?|
|How much current for 3 LEDs in parallel?|
Write down the values you measure for these circuits. You will notice that the current increases as each new LED is added. Three LEDs in parallel requires three times as much current as one LED.
|How much current for 2 LEDs in series?|
|How much current for 3 LEDs in series?|
Write down your values for the current flowing in each of these circuits.
As another LED is added in series, the current becomes less because the resistance in the circuit has increased. Each LED has its own forward voltage so the voltage across the 390 Ω series resistor is no longer 7 V. In fact, with 3 LEDs in series, the voltage across the resistor is now expected to be just 3 V, 9 V minus 2 V for each of the LEDs.
This means that you need to recalculate the value of the series resistor. You still want about 20 mA to flow, so the calculation becomes:
This time, there is no need to substitute a similar preferred value because 150 Ω is available in the E12 range. Change your circuit once more, swapping 150 Ω for the existing 390 Ω. How much current is flowing now?
Astables produce pulses. There are lots of different circuits you could use to build an astable. To build your first astable, you are going to use a 555 timer integrated circuit. This is cheap and easily available. As you can see from the diagram below, the 555 is a small plastic package with 8 legs, or pins. This is called a dil package, short for dual in line, because there are two rows of pins.
|555 timer integrated circuit|
The integrated circuit, or 'beastie', has a definite head end indicated by a notch, or sometimes by a dot. The numbering of the pins starts at the top left corner and goes in sequence down the left hand side and then up on the right hand side.
You can use the 555 effectively without understanding the function of each pin in detail.
The circuit most people use to make a 555 astable is shown below. Note that the pin numbers in the circuit diagram do not follow the same tidy sequence round the integrated circuit. This rearrangement is necessary to make the circuit diagram read from left to right:
|555 astable circuit|
The frequency, or repetition rate, of the astable is measured in pulses per second, or hertz, Hz, and is determined by the values of the timing components, resistors R1 and R2, and capacitor C.
The design formula for the frequency, f, of the pulses is:
The time taken to complete a single pulse is called the period, t, given by:
This is just the inverse of the frequency formula. In other words:
In particular, you can make use of the 555 component selector program to help you choose the correct component values for your application:
You might be curious about the 47 μF decoupling capacitor. Its function is to remove voltage spikes and interference from the power supply rails. The 555 is a 'noisy' integrated circuit which often produces spikes at the beginning and end of each pulse. With the decoupling capacitor, the 555 produces clean square pulses.
Clicking opens a small window showing the pin layout for the 555, so that you can remind yourself which pin is which. The pins window remains open and can be brought to the front from the task bar at the bottom of the screen, unless you choose to close it.
A flashing rate of 1 Hz is too slow for an effective warning device.
It is easy to modify your circuit to make the flashing rate variable. Remove the 68 kΩ resistor and replace it with a 100 kΩ linear potentiometer. The connecting wires must be soldered to the potentiometer terminals to give a proper connection:
|Selecting a flashing rate|
Used in this way, the potentiometer gives you a variable resistance which you can change by rotating the spindle. Adjust the flashing rate for maximum visibility.
The 'best' flashing rate for a warning effect is a matter of opinion, but most people choose rates between 5 Hz and 10 Hz.
When you have chosen a suitable flashing rate, carefully remove the potentiometer wires from the prototype board and measure the resistance between them. This involves rotating the central knob on your multimeter to a resistance range. Try settings of 200k or 20k.
When the meter leads are kept apart, the display reads:
If you touch the crocodile clips together the display changes to:
Do this to check that the meter is operating and to confirm that the internal fuse is undamaged.
Now connect the crocodile clips to the ends of the connecting wires from the potentiometer and write down the resistance measurement. Select a similar resistor value from the E12 range and insert this in the prototype circuit. Is the flashing rate correct?
You might notice that something else about the behaviour of the super bright LED has changed. As the flashing rate increases, the duty cycle changes too. The HIGH time becomes longer than the LOW time. During each cycle, the LED is ON for more than half the time and OFF for less than half the time. This happens because the timing capacitor C is filled up through resistors R1 and R2, but empties only through R2.
To make the safety lights battery last longer, it would be better if the HIGH time could be made shorter than the LOW time. Adding a diode to the 555 astable circuit makes this possible:
|Extended duty cycle astable|
With the diode, the design formulae become:
The capacitor fills only through R1 and empties only through R2 so that the HIGH and LOW times can be controlled independently.
Add a 10 kΩ resistor to your prototype board in place of the potentiometer. This gives a flashing rate of around 7 Hz, with nearly equal ON and OFF times. Next add a 1N 4148 diode in parallel with the 10 kΩ, as shown in the diagram:
|Adding a diode|
The diode changes things. The ON time is now just a tenth of the OFF time, while the flashing rate increases to 13 Hz.
Further investigation of prototype circuits leads to the development of the final circuit diagram for the safety lights:
|Safety Lights final circuit|
The LEDs are illuminated for about a third of the time during each cycle. The resistor in series with the LEDs is reduced in value to 47 Ω to make the LEDs flash more brightly.
Using large value timing resistors with a small value timing capacitor helps to reduce the power supply current. For this application, the 10 nF capacitor from pin 5 is not needed.
Modify your existing circuit to give this result and check all your connections carefully before connecting the power supply.
Set your multimeter to work as an ammeter as explained earlier and connect this in series with the power supply. How much current is flowing? The ammeter reading will be changing. When the LEDs are ON, the current increases. Between the flashes, the current is less.
A PP3 alkaline battery has a useful life of about 300 milliamp hours, mAh. This means that it can provide a current of 1 mA for 300 hours, or 10 mA for 30 hours and so on.
Try to estimate the average current taken by the safety lights. From this you can work out how long the battery should last. You can test the battery life directly by connecting a fresh battery and leaving the circuit flashing away until the battery becomes flat. Your circuit should keep flashing for at least 20 hours.
To build a permanent circuit, you need a printed circuit board. It is possible to design and make your own printed circuit boards but, for your first few projects, it is much easier to use a ready made professionally produced PCB. When you have the PCB, gather together the components you need and follow the instructions to assemble the safety lights circuit.
Buy using PayPal™ price: £ 3.20 + P&P
|DOCTRONICS Safety Lights construction kit|
|1||0.25 W carbon film resistor 220 kΩ(red, red, yellow)|
|1||0.25 W carbon film resistor 470 kΩ (yellow, violet, yellow)|
|1||0.25 W carbon film resistor 47 Ω (yellow, violet, black)|
|1||22 μF 25 V radial electrolytic|
|1||220 nF miniature polyester|
|1||1N 4148 silicon signal diode|
|3||5 mm superbright LED (1000 mcd)|
|1||NE555 timer integrated circuit|
|1||8-pin low profile DIL socket|
|1||latching action 2-pole subminiature PCB switch|
|1||heavy duty PP3 battery clip|
|1||DOCTRONICS safety lights printed circuit board|
Check the parts carefully to identify them. Before you start construction think about the components which are polarised. These components include the 22 μF electrolytic capacitor, the 1N 4148 diode and the LEDs. Each of these components has separate positive and negative terminals. How can you tell which leg is which?
Click to open a PDF file with the circuit diagram and PCB layout of the Safety Lights which you can print out to help you with construction. If you want to make your own PCB, use a laser printer to print the file onto acetate sheet without scaling and make the PCB using the photo etch process.
The plain side of the printed circuit board is the top and all the components are pushed through from this side. The copper track side is the bottom where you solder the legs of the components in place.
|Safety precautions: wear safety spectacles, keep the soldering iron in its stand to reduce the risk of burns, use rosin free solder.|
Your project is not complete until you have designed and built a box. The photograph shows different types of acrylic cases developed for prototype versions of the Safety Lights circuit:
The cylindrical case was made from 40 mm diameter clear acrylic tube, cut to 90 mm length. The end caps were machined to size from 5 mm acrylic sheet. The circular shapes were drawn using TechSoft 2D Design. This is an excellent computer-aided drawing or CAD program designed for use in schools. 2D Design can be linked directly with computer controlled machine tools including the Roland CAMM-2.
From 2D Design, the tool path and depth of cut are set so that the CAMM-2 cuts a stepped rebate on each end cap allowing it to fit tightly inside the tube. A different tool path defines the outline of the end caps and the hole for the switch.
If you have access to CAD/CAM facilities, this method of manufacture is straightforward and reliable. There will be some trial and error in cutting the parts but, once the drawings and tool paths are correct, you make as many boxes as you want.
The rectangular case was made from 3 mm acrylic sheet. Each section was heated in an oven to make it pliable and then bent into shape around a former. Two different formers are needed, one for the base of the case and one for the top.
The links below allow you to download documents in Adobe Acrobat ©, PDF, format. In the unlikely event that you don't already have Acrobat Reader, you can download the latest version direct from Adobe:
555 data sheet (NXP, 2003)
555 data sheet (ST Microelectronics, 2008)