Eye Candy 3

Blinking LEDs

OK, you've swapped your case power LED for a blue, but so has everybody else. Add a bit more pizzazz by making it flash on & off. But this is no ordinary on–off–on–off flasher. It gives a "heart-beat" effect, blip-blip, pause, blip-blip, pause...  heart-beat

Frequency trace

The control chip is a CMOS 4060B, a 14-stage frequency-divider with built-in oscillator. The led is connected between one output (a) and another (b) running at 1/4 the frequency of the first, shown opposite on the wave-trace diagram.

It will only light when the output connected to its anode is switched on (high), and the output connected to the cathode is switched off (low). Both outputs high, or both low, or anode low and cathode high, and no current flows through the LED, so no light.


Blinker circuit

Resistor R1 and capacitor C1 determine the oscillator frequency F, by the formula

F=1 / (2.2 x R x C)

Using a 390k resistor and 22n capacitor gives about 50Hz.

The output from pin #7 is F/16, that from pin#4 is F/64, giving the 4:1 ratio for a double-blink roughly every second.

The diode in inverse-parallel with the LED protects it from excessive reverse voltage, resistor R3 limits LED current to a safe level. 560R gives a LED current of about 15mA with a blue.

Capacitor C2 removes any noise on the power lines, and the other resistor R2 adds stability to the oscillator.


Construction


blinker layout
Parts List
IC1 CMOS 4060B
R1 390k
R2 1M (not critical, 2-10x R1 advised)
R3 560R
C1 22n ceramic
C2 100n ceramic
D1 1N4148 or any small rectifier diode.
LED1 To suit
Misc Stripboard, 16-pin DIL socket, male Molex.

Construction Guide – Component side view

 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1           U1#1 (br)   U1#16   C2       12V
2           U1#2 (br)   U1#15            
3           U1#3 (br)   U1#14            
4       R3   U1#4 (br)   U1#13 (br)   R1 C1 R2  
5 LED(a)   D1(c) R3 (br) U1#5 (br)   U1#12 j2 C2       0V
6           U1#6 (br)   U1#11         R2  
7 LED(c)   D1(a)     U1#7 (br)   U1#10     R1      
8       j1   U1#8 (br)   U1#9       C1    
9       j1           j2          

The blinker can be made up on a piece of stripboard 9 rows x 13-15 columns. Make sure the diode and the led are in inverse-parallel.

If you fancy, you can swap the diode for a second led, again in inverse-parallel with the first. It will blink to the same pattern, but time-shifted – work it out from the wave-traces.

CMOS chips are static-sensitive, don't handle when you've been stroking the cat. A 16-pin DIL socket is advised to prevent heat damage in soldering. Power connections go to a 4-pin male molex to plug into a psu fitting.

blinker

The stripboard layout shows the LED mounted on the circuit board, but for a case LED fit some longer wires between the board and LED.

I got the idea for this from Starship Modeler – Lighting Effects with LEDs but be aware, his simpler circuit has no LED reverse-voltage or over-current protection. With a 9v battery supply it does work (though it may not work for very long) but with 12v I'd expect a dead LED or a burnt-out 4060 pdq. Boo-Hoo



optoboost

The 4060B can only supply a few mA, just enough to light a single LED. I've been asked a few times how to blink several LEDs in parallel. The simplest way is to use an optoisolator as go-between. The optoisolator's LED is connected in place of LED1, and its photo-transistor when 'on' switches a more powerful external transistor boosting the current to the required level.

blinker

For the optoisolator I suggest the cheap and common 4N25; for the NPN transistor Q1 a 2N3904 will carry up to 200mA or for up to 800mA a 2N2222A is a good choice.

The 4N25 comes in a 6-pin DIL package, pin-out shown right (top view).