That's why he created a 40-LED night light to make sure he could see and be seen on his bike. Bill set up a 555 timer IC to generate a continuous on/off timing cycle to alternatively flash two groups of 20 LEDs. His night light operates on four AA batteries, which will keep the road ahead nice and bright, even on the darkiest and chilliest of British nights. You can even extend battery life with a second circuit Bill put together that uses a short duty cycle to flash a single set of 30 LEDs.
This Gadget Freak was sourced from our sister publication, Design News.
Circuit Description:
Two circuits described here are examples of using the 555 timer IC to flash groups of red LEDs that might be used as a bicycle tail light. The first example (Fig1
), alternately flashes 2 groups of 20 LEDs (40 total) and operates with four AA batteries. The second example, (Fig2
) extends the battery life by using a short duty cycle to flash a single group of 30 LEDs.
The 555 Timer
The 555 timer IC, introduced in 1971, has survived through the years as a standard part for a variety of timing applications. It can be configured to generate a continuous on/off timing cycle, or used to generate a single timing interval initiated from a push button switch, or other external source. There are eight connections for the 555 timer as follows:
Pin 1 (Ground) - Negative power supply connection.
Pin 2 (Trigger) - This pin is an input which causes the output to go high and begin the timing cycle. The cycle begins when the trigger input moves from a voltage above 2/3 of the supply voltage to a voltage below 1/3 of the supply.
Pin 3 (Output) - The output pin moves to a high level near the supply voltage when the cycle begins, and returns to ground level when the cycle ends.
Pin 4 (Reset) - A low logic level on this pin resets the timer and returns the output to a low state. It is normally connected to the + supply line if not used to reset the timer.
Pin 5 (Control) - This pin allows altering the trigger and threshold voltages from the preset 1/3 and 2/3 values with an external voltage. It is normally left unconnected or bypassed to ground with a small capacitor.
Pin 6 (Threshold) - This pin is used to reset the output to a low level at the end of the timing cycle. Reset occurs when the voltage on this pin moves from a voltage below 1/3 of the supply to a voltage above 2/3 of the supply. The action is level sensitive and can take whatever time required to move from the low point to the high.
Pin 7 (Discharge) - This pin is an open collector output which is in phase with the main output on pin 3 and has similar current sinking capability. It is normally used to discharge the timing capacitor at the end of the timing cycle.
Pin 8 (+V) - This is the positive supply voltage terminal of the timer. Supply voltage can range from +4.5 volts (minimum) to +16 volts (maximum).
Circuit Operation (Fig 1):
The first example (Fig 1) alternately flashes two groups of 20 LEDs where the timer output is continuously switching high and low at a rate and duty cycle determined by the values of the two resistors R1,R2 and the capacitor (C).
The trigger and threshold inputs (pins 2 and 6) are connected together so as they move up or down, the output will switch to a positive state when the inputs are below 1/3 of the supply, and a negative state when the inputs are above 2/3 of the supply voltage.
The time the output at pin 3 will be in a positive state (T1) can be worked out from the formula
Likewise, the time the output at pin 3 will be low near ground (T2) can be worked out from the formula
The time intervals can be easily adjusted by altering the value of the resistor R2. Increasing R2 will extend the time, and reducing the value will speed up the activity. Note that R2 should be many times greater than R1 for the time intervals to be reasonably equal.
The 555 output is limited to around 50mA (source), so that only a few LEDs can be directly connected without overloading the device. The example in Fig 1 uses additional transistors to increase the available current to around 300mA, or more.
Transistor Q1 is connected to the timer output through a 220 ohm resistor so the base current will be about 18mA, and the available collector current to drive the first group of 20 LEDs (on the left) should be 300mA or more.
Transistor Q2 is connected in a similar manner and is used to invert the timer output so the second group of LEDs will be off while the first group is on, and visa versa. The output from Q2's collector is used to drive the third transistor Q3 which controls the 2nd group of 20 LEDs (on the right).
In operation, when the timer output (pin 3) moves positive, Q1 will be on and light the left group of LEDs. At the same time Q2 will also be on and will short the base of Q3 to ground which will turn off Q3 so that the second group of LEDs will be off. When the timer output moves negative to ground, Q1 and Q2 will turn off allowing Q3 to turn on, lighting the second group of LEDs. The timing diagram in the lower section of the drawing (Fig 1) illustrates the activity at various circuit points.
Circuit Operation (Fig 2):
The circuit in Figure 2 extends the battery life by flashing the LEDs for a short period during each cycle so they remain off most of the time. The previous example (fig 1) continuously lights 20 LEDs which draw a continuous battery current of around 200mA, so the AA battery life may be only 4 or 5 hours. The circuit in fig 2 flashes 30 LEDs all at the same time with a approximate 10% duty cycle which extends the battery life to possibly 80 hours or more.
To obtain a short duty cycle (short on time relative to off time) a diode is added in parallel with R2, which allows the capacitor to charge through R1 alone, and not the combination of R1 and R2, as in the previous circuit. The capacitor discharge time will be the same through R2. This yields a relatively short flash time for the LEDs and minimal battery drain. The timing diagram in the lower section of the drawing (Fig 2) illustrates the activity.
In this case, the LED on time will be about (.693 * R1 * C), or a little longer than 33mS, since the diode drop is not included, and the off time will be about (.693 * R2 * C), or 490mS. This yields a duty cycle of around 7 per cent. Using 15 pairs of LEDs (30 total) at 20mA per pair, the peak load will be about 300mA for 7 per cent of the time, or an average load of around 20mA. A typical alkaline AA battery with a capacity of 1800mAH (before voltage falls below 1.1) should last about 1800/20 or 90 hours. A web reference for the battery data is available.
Construction Ideas:
For experimental purposes, you may want to assemble the circuit using a solderless breadboard such as Allied 237-0015. The board is arranged in rows labeled A-J, and columns numbered 1 to 65. Each group of five holes in the same column are the same connection, so that holes A1, B1,C1,D1 and E1 are all connected together. Likewise holes F1,G1,H1,I1 and J1 are all the same connection. The outer rows along the length of the board are also connected together and are normally used for power supply connections.
However, there is a break in the mid section of the outer rows, so a short jumper wire connecting the mid section of the outer rows should be installed to connect the entire outer row together. If you have a DMM, use the low ohms range and probe the various holes to get familiar with the board layout.
Installing the Components:
Orientate the 555 timer so the nook or punch mark on one edge is near column 30 and the opposite edge is near column 33. Install the timer on the breadboard so the pins straddle the center section of the board and pin 1 of the IC is occupying hole F30 and pin 8 is in hole E30. The pins are numbered counter clockwise, so pin 4 will be occupying F33 and pin 5 will be in E33.
Refer to the circuit schematic, and install the resistors R1,R2 and the 4.7uF capacitor so they connect to the appropriate pins of the timer. Connect the timer pins 8 and 4 to the outer row which will be used for the + battery connection. Connect pin 1 to the opposite outer row to be used as the negative battery connection. Connect the negative side of the capacitor to the same row as used for pin 1, and one side of R1 to the positive battery row.
At this point, you can test the circuit by adding a single LED in series with a 220 resistor between pin 3 of the timer and the outer negative battery row. Connect a 6 volt battery between the positive and negative battery rows and the LED should flash at about 3 times per second. Note the LEDs are polarized and will only work one way. If your test LED fails to flash, try reversing the LED connections.
If all is working right, install a 220 ohm resistor from pin 3 of the timer to the base of the transistor Q1 and connect the emitter of Q1 to the negative battery row. Then move the test LED and resistor so they connect between the collector of Q1 and the positive row. Apply power and verify the LED flashes. If all is correct, add a second LED in series with the first and use a 120 ohm resistor to verify the first pair of LEDs flash. If all is good at this point, add additional pairs of LEDs and 120 ohm resistors in parallel with the first pair to complete the first group of 20.
Assembly on a PC board or Perfboard:
When satisfied with the operation, you might want to mount the parts on a permanent PC board or perfboard. The PC board will have copper plated holes so you can solder all the leads of the components and use jumper wires to connect various parts of the circuit. The perfboard will just be a fiberglass board with holes without copper pads. Assembly on a perfboard will require using bare copper wire to connect the component leads on the back side.
| Quantity | RS Part # | Part description |
| 1 | 534-3469 | LM555CN Timer |
| 3 | 299-654 | 2N 4401 NPN Transistor |
| 40 | 2508 6203 71 | Red LED |
| 2 | 2508 3955 70 | 220 ohm resistor |
| 20 | 2509 6724 21 | 120 ohm resistor |
| 2 | 2509 4768 13 | 2.2K resistor |
| 1 | 2508 3763 77 | 47K resistor |
| 4 | 737 0520 | AA Alkaline battery |
Perfboard
4.7iF capacitor
For other car and bike related gadget ideas, look at Cruising: Gadget Freaks for your car.

Comments (3)
While not wishing to decry an excellent idea, I understand that the Law states that the primary illumination for a push bike be a premanently on, and not flashing. May I suggest that anyone wishing to use this idea use it as additional lighting to get around this detail!!
Posted by Peter Dawson | August 7, 2007 8:12 PM
Posted on August 7, 2007 20:12
In response to the comment left by Peter, did you read the details in the article? Due to our persistence of vision, you will not be aware that the LEDs are flashing, and the outputs of the two circuits will appear as constant light.
Posted by DocPaul | August 8, 2007 9:18 AM
Posted on August 8, 2007 09:18
Just to let you know,the stupid law regarding no flashing lights on bikes was changed a few months ago.
Not that myself and most of my club mates ever listend,as a flashing light is a whole lot more visable than a solid light!
Posted by lee whitelaw | August 13, 2007 2:02 AM
Posted on August 13, 2007 02:02