Safety Lights Project

The project files in Absorb Electronics provide guided examples of project development. You can follow the process of electronics design and learn how to design your own projects. Practical work on prototype board is an integral part of the design process.

The brief for this project 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 in this project file 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.

Initial specification
A specification is a technical description of the device, listing its important features.

You, as designer, will ask questions:
What size and weight are acceptable for this application?
What voltage and type of battery should be used?
Are LEDs the best flashing device available?
How many LEDs are needed?
What subsystems are needed in this circuit?
What is the correct flashing rate for maximum visibility?
Can anything be done to increase battery life?
     How can flashing and non-flashing modes be included?

Answering questions like these helps to define the problem and will give you a much clearer idea of what you need to investigate with circuits in prototype form.

Initial consideration suggests some answers:
The device should be small and light, and easily attached to a cycle helmet or clothing.
A 9 V, PP3 alkaline manganese battery will be used.
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.
Three ultrabright LEDs will be used.
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 to 20 mA and 'blow' much less frequently.
An astable subsystem is needed.
     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.

About LEDs
A typical
An LED, or light-emitting diode, is illuminated when current passes through it in the forward bias direction.
, or light-emitting diode, is shown in Fig.1 together with its
A circuit is a closed conducting path.

Figure 1.   LED connections.
Display as fullscreen

From a practical point of view, there are several things about LEDs you need to know:
An LED must be connected the right way round in the circuit.
The maximum current flowing through the LED must be limited – usually to
10–20 mA.
     An LED can be irreversibly damaged by connecting it the wrong way round.

Select the alternatives which best complete each sentence.

  • It is easy to work out which way round to connect the LED. The positive connection, or , is indicated by the leg, while the negative connection, or , is the leg. The cathode is also indicated by a on the body of the component.
  • Click here to mark the question

The brightness of LEDs is often measured in millicandelas,
The light intensity produced by LEDs is often measured in millicandelas, or mcd. The bigger the number, the brighter the light.
. The candela is the SI unit for luminous intensity. A standard 5 mm red LED provides a light output of 80 mcd when the
Current I is a flow of charged particles, usually electrons.
flowing is 10 mA. A typical ultrabright LED provides 1000
The light intensity produced by LEDs is often measured in millicandelas, or mcd. The bigger the number, the brighter the light.
. More expensive types provide 4500 mcd – this is a very bright light.

Limiting current
How do you limit the current flowing through an LED? The answer is that you need to connect a
A resistor is an electronic component with a particular resistance values. Resistors limit current.
Components are connected in series when they are joined end to end in a circuit, so that the same current flows through each.
with the LED:

Figure 2.   Limiting current through an LED.
Display as fullscreen

How is the value of this resistor calculated?
To do this, you need to know the voltage V across the resistor and the current I flowing through it.
A 5 mm ultrabright LED has a typical forward voltage VF = 1.85 V, or 2.5 V maximum.
A ultrabright LED gives a light output of 1000 millicandelas, mcd, at 20 mA. The maximum current is 30 mA.
Allowing for a 2 V drop across the LED, the voltage across the resistor will be 9 − 2 = 7 V. 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
The E12 series includes the values: 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82. Resistors are available in multiples of 10 of these values, e.g. 1.5 Ω, 15 Ω, 150 Ω, 1.5 kΩ and so on.
The E24 series includes the values: 10, 11, 12, 13, 15, 16, 18, 20, 22, 24, 27, 30, 33, 36, 39, 43, 47, 51, 56, 62, 68, 75, 82, 91. Resistors are available in multiples of 10 of these values, e.g. 4.3 Ω, 43 Ω, 430 Ω, 4.3 kΩ and so on.
ranges. You can find out about these ranges from the unit Resistors. 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 colour code converter program from the 'Tools' menu.

What is the colour code for a 390 Ω resistor?
  • First digit colour
    Second digit colour
    Multiplier colour
  • Click here to mark the question

Most of the resistors you use will have an additional gold-coloured
Tolerance describes manufacturing accuracy. If a component is manufactured to a tolerance of ±5%, this means that its actual value is guaranteed to be within 5% of its marked, or nominal value.
band indicating a manufacturing accuracy of ±5 per cent.

Now build the prototype circuit shown below. Follow the circuit by thinking about the pattern of connection formed by the metal channels inside the
prototype board
Prototype board is used for building temporary circuits. Connections are made by pushing components and wire links into the holes in the prototype board.
prototype board
. Your ultrabright LED should shine very brightly and it is interesting to compare this with the brightness of a standard LED by swapping them over on the prototype board.

Figure 3.   Illuminating an LED.
Display as fullscreen
Making measurements
Fig.4 shows how measurements of current,
Potential difference, or voltage V is a measure of the difference in energy between two points in a circuit. Charges gain energy in the battery and lose energy as they flow round the rest of the circuit.
, and
Resistance R limits current flow.
are made.

Figure 4.   Measuring current, voltage, and resistance.
Display as fullscreen

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.

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.

To measure the voltage across a component, a voltmeter is connected in parallel.
     To avoid changing the circuit, a voltmeter must have a high resistance. Voltage measurements are the easiest to make and often the most useful.

All of these measurements can be made with a
A multimeter can be set up to work as a voltmeter, as an ammeter, or as an ohmmeter. These functions are selected by rotating the central control knob to the appropriate position.
. The diagram below shows a
switched range
The central control knob of a switched range multimeter has different positions for each measurement range.
switched range
A multimeter can be set up to work as a voltmeter, as an ammeter, or as an ohmmeter. These functions are selected by rotating the central control knob to the appropriate position.
set up as a
A voltmeter measures the voltage, or difference in energy, between two points in a circuit. Voltmeters are connected in parallel and must have a high resistance.

Figure 5.   Using a multimeter as a voltmeter.
Display as fullscreen

Connections to the meter are made using 4 mm leads. Crocodile clips can be pushed onto the plugs at the ends of the leads. Clipping the lead to a link wire allows you to make measurements from the prototype board, while at the same time leaving your hands free to make adjustments to the circuit or to write down the voltage recorded:

Figure 6.   4 mm connecting leads.
Display as fullscreen

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.

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 to 12 V, so this setting is the one you will use most frequently.

Now you are ready to measure the voltage across the LED:

Figure 7.   Measuring the voltage across an LED.
Display as fullscreen

The measurement you are making is called the forward voltage of the LED. This is expected to be in the range 1.8–2.0 V.

Write down, or enter your measured value for the
forward voltage
The forward voltage is the voltage across a diode or LED when it is conducting current in the forward bias direction.
forward voltage

Forward voltage of LED   / V

Try replacing the LED with other ultrabright LEDs. Is the forward voltage always the same?
  • Click here to mark the question
Measuring current
How long will the batteries last? If you were buying safety lights, this is something you would 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:
Figure 8.   Measuring the current flowing through an LED.
Display as fullscreen

The red lead from the
A battery consists of two or more cells. The cells may be connected in series or in parallel.
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
An ammeter measures current. Ammeters are connected in series in a circuit and must have a low resistance.
range. Check the circuit diagram given earlier, Fig.4, to confirm that you understand how the ammeter has been connected into the circuit.

It is very easy to 'blow' the
A fuse is included in a circuit as a safety device that isolates the circuit if excess current flows. One type of fuse consists of a fine wire which heats up and melts, breaking the circuit if too much current flows.
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.

When your circuit is working correctly, the LED is illuminated.

Write down or enter your measured current value:

Measured current (single LED) / mA

How does this value compare with the expected value, 20 mA?
  • Click here to mark the question

Because 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.

Modify your circuit to investigate the current required with 2 LEDs in
Components are connected in parallel when they are joined side by side in a circuit, so that they provide alternative pathways for current flow.
and then with 3 LEDs in parallel:

Figure 9.   Measuring current with 2 LEDs in parallel.
Display as fullscreen

How much current is required by 2 LEDs connected in parallel?

Measured current (2 LEDs in parallel) / mA

Figure 10.   Measuring current with 3 LEDs in parallel.
Display as fullscreen

How much current is required by 3 LEDs connected in parallel?

Measured current (3 LEDs in parallel) / mA

You will notice that the current increases as each new LED is added to the circuit. Three LEDs in parallel require three times as much current as one LED.

Modify your circuit once more. Don't change the meter connections. You don't need to rebuild the circuit from scratch, just rearrange the wire links:

Figure 11.   Measuring current with 2 LEDs in series.
Display as fullscreen

How much current is required by 2 LEDs connected in series?

Measured current (2 LEDs in series) / mA

Figure 12.   Measuring current with 3 LEDs in series.
Display as fullscreen

How much current is required by 3 LEDs connected in series?

Measured current (3 LEDs in series) / mA

The current is 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, the voltage drops 2 V across each of the three LEDs, so the voltage across the resistor is now expected to be just 9 − (2 + 2 + 2) = 3 V.
     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?

Measured current (3 LEDs, 150 Ω resistor) / mA

Select the alternatives which best complete each sentence.

  • All these investigations lead to an important conclusion. To illuminate three LEDs in requires up to from the power supply, whereas illuminating the same three LEDs connected in requires just .
  • Click here to mark the question

If the LEDs in the safety light circuit are connected in series, the battery will last three times as long!

Confirm the behaviour of these circuits from the simulation, Fig.13.

Click on the figure below to interact with the model.

 Figure 13.  Illuminating LEDs in series and parallel.

Introducing astables
Astables produce pulses. There are lots of different circuits you could use to build an
An astable is a subsystem which generates pulses.
. 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 Fig.14 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.

Figure 14.   555 timer integrated circuit.
Display as fullscreen

The integrated circuit 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 in Fig.15 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.

Figure 15.   555 timer astable circuit.
Display as fullscreen

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 , given by:

This is just the inverse of the frequency formula. In other words:


It is useful to start by building the 555 astable in its simplest form, using components which will give a visible flashing rate:

Figure 16.   555 timer astable circuit.
Display as fullscreen

You might be curious about the 47 μF decoupling capacitor. The function of the decoupling capacitor 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.

Developing the safety light
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
A potentiometer is a resistor with two end terminals and an additional movable contact, called the slider. The resistance between the slider and the end terminals changes as the slider is moved along the resistive track.
. The connecting wires must be soldered to the potentiometer terminals to give a proper connection.

Figure 17.   Adjusting the astable frequency.
Display as fullscreen

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 200 kΩ or 20 kΩ.

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:

Measured resistance / kΩ

Select a similar resistor value from the E12 range and insert this in the prototype circuit. Is the flashing rate the same as with the potentiometer?

You might notice that something else about the behaviour of the ultrabright 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 light 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:

Figure 18.   Short duty cycle 555 timer astable.
Display as fullscreen

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.

Further investigation of prototype circuits leads to the development of the final circuit diagram for the safety lights:

Figure 19.   Safety lights final circuit diagram.
Display as fullscreen

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 even more brightly.

Fig.20 shows this circuit in simulation form. Operate the switch to see the circuit in action.

Click on the figure below to interact with the model.

 Figure 20.  Safety lights simulation.

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.

Here is the completed prototype board layout for the safety light circuit:

Figure 21.   Safety lights final circuit.
Display as fullscreen Display related PCB layout

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?

Estimated current (final circuit) / mA

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.

Printed circuit board
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.

Check the parts carefully to identify them.
Before you start construction, think about which components are polarized.
These components include the 22 μF electrolytic capacitor, the 1N4148 diode, and the LEDs.
     Each of these components has separate positive and negative terminals. How can you tell which leg is which?

Before you start soldering, study the diagram of the printed circuit board:

Figure 22.   Safety lights printed circuit board.
Display as fullscreen Display related PCB layout

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.

  • Start by locating the socket for the integrated circuit. Can you see the small notch which indicates the head end of the socket? Fit the socket so that this notch is at the top and then solder it in place. Take care not to solder any of the legs together.

  • Identify each of the resistors by its colour code and fit them in the board. Bend the legs of the resistor at right angles and pull gently from the underside of the board with pliers until the resistor is close to the board. Solder each leg before cutting off surplus wire with clippers. Resistors are not polarized and can be fitted either way round. Don't confuse the 470 kΩ and 47 Ω resistors!

  • Find the 1N4148 diode. Diodes allow current to flow in one direction, so it will matter which way round the diode goes. Look for the black stripe and insert the diode. Solder.

  • Solder in the 220 nF capacitor (non-polarized).

  • The longer leg of the 22 μF capacitor is its positive terminal and the stripe on the body of the component indicates the negative terminal. Check the polarity and bend the component flat to the board before soldering.

  • The longer leg of an ultrabright LED shows its anode, a, or positive terminal. A 'flat' on the body indicates the cathode, k, or negative terminal. Check the polarity of the LEDs carefully before soldering.

  • Complete the assembly by locating and soldering the switch, the link wire, and the battery clip. The red wire from the battery clip is the positive connection. To provide strain relief, each wire from the battery clip goes up through the larger hole in the printed circuit board and down through the small hole before being soldered in place.

  • Resist the temptation to connect a battery to find out whether your circuit works. It won't until the integrated circuit has been fitted into its socket. Before you do this, check all your soldering for possible short circuits (solder bridges joining tracks) and/or dry joints (where the solder has not made a proper connection).

  • Identify the notch which indicates the head end of the 555 and fit this at the top of the socket. Check everything again before connecting the battery and switching on.

  • Your circuit will work when everything is fitted in the correct place and there are no short circuits or dry joints.

Packaging the product
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:

Figure 23.   Safety light cases.
Display as fullscreen

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 can 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 step-through animation below summarizes the prototype boards constructed in this unit.

Figure 24.   In search of an automatic porch light.
Display as fullscreen

Parts list:
Quantity Item
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 capacitor
1 220 nF miniature polyester capacitor
1 1N4148 silicon signal diode
3 5 mm ultrabright LEDs (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 safety lights printed circuit board

Well done!
Try again!