This is a design for a rear bicycle light that automatically switches on and off according to ambient lighting conditions. The red LEDs flash with a 50 % duty cycle to save energy; you can modify the circuit to light the LEDs continuously if local laws require it. The circuit can of course also be used as a safety light by pedestrians.
The author bought a commercially-available rear bicycle light and replaced the printed circuit board inside with his own design: the circuit is shown here. Space was rather tight, and so surface-mount devices were used in the construction of the prototype. Leaded devices would, of course, work just as well, and the 10 µF SMD film capacitors can be replaced by electrolytic.
The five high brightness red LEDs shown to the right of the circuit diagram were already present in the original unit, on their own circuit board along with their series resistors. This part of the unit was re-used. This explains the variation in the value of the series resistors, which can be changed according to the brightness desired and the characteristics of the LEDs used. The original light also included a green LED (D6), which we do not use in this design. The circuit has two sensors: a vibration switch (S1) in a TO18-like package (for example, RS Components order code 455-3671) and an LDR (R5, a standard type with a resistance when illuminated of around 250 Ω and a dark resistance of at least 10 MΩ). When the bicycle is moved the vibration switch will open and close its contact, generating pulses at the base of Darlington T1 via C1, causing it to turn on. C2 is thus charged and the input to gate IC1.A (pin 1) goes Low. If it is sufficiently dark the voltage produced by the voltage divider formed by R4 and LDR R5 will be greater than 0.6 V, causing transistor T2 to conduct and C3 to charge. When C3 is charged a Low level will appear at the second input (pin 2) to gate IC1.A.
If both inputs are at logic zero the output of the NOR gate will go high, causing FET T3 to conduct. As a result power is supplied to the astable multivibrator comprising R9, R10, R11, C4, C5, T4 and T5, and the LEDs will flash at 5 Hz. They will continue to flash for as long as pulses continue to be supplied by the vibration sensor S1 and as long as it remains sufficiently dark.
If the vibration sensor stops providing pulses (because the bicycle is stationary) C2 will no longer be charged and will gradually discharge over a period of 25 seconds or so through parallel resistor R3. The output of the gate will go low and T3 will block; hence after the expiry of the 25 second delay the LEDs will go out. If the bicycle is moving and S1 is delivering pulses, but the LDR is illuminated (perhaps by passing cars or by street lighting) the LEDs will continue to operate for about 70 seconds, with C3 keeping its input to the gate low.
The circuit is designed to run on 3 V (two AAA cells). The quiescent current consumption is less than 2 µA and the batteries should last for over 300 hours of operation.
In practice, the vibration sensor was found to be so sensitive that it delivers pulses even when the cyclist is waiting at a traffic light, and so the LEDs continue to flash. The LEDs only go out when the bicycle is perfectly still. The ambient light threshold can be set by adjusting R4 to suit the characteristics of the LDR.
To modify the circuit so that the light is steady rather than flashing, remove T4, T5, C4, C5, R9, R10 and R11 and connect the cathodes of LEDs D1 to D5 directly to the drain of FET T3.