Sunday, 25 October 2009

Multiple LED pulsing via a 555 timer

UPDATE - The bug in the last schematic has been corrected. R2 had been incorrectly connected to Pin 7 and GND instead of Pin 7 and Pin 2.

I noticed awhile back that there were a few people in a few forums asking for simple ways to make LEDs pulse. During the summer I designed a circuit that pulsed a number of LEDs as part of a fancy dress costume. I was told that it looked great :-) Anyway, here is the circuit. It uses a single 555 timer in astable configuration to create a square wave. On the high part of the wave it triggers one LED, on the low part it triggers the other LED. The big capacitors cause the fading by charging and discharging the square wave into something more analog than digital.

Note: This is Version 3 of this circuit. A lot of people sent me messages saying that they were having a few issues building the circuit. There were a few problems with the previous schematics. The first was that the line connecting pin 2 and 6 could of been misinterpreted as also connecting to pin 7. I've now colour coded that line and put junction indicators (black dots) to show when two wires should be connected together. I recently realised that while making this correction I accidently connected R2 to GND instead of Pin 2. This is now fixed.
The other error was that the dotted line part had the led connected to ground after the capacitor instead of before it. As necro_nemisis pointed out this meant that LED1 was on a direct path from 5V to ground. I dread to think of all the dead leds that drawing mistake was responsible for!

Sorry it takes me so long to do corrections...

The effect is quite nice and you can add more capacitors in series to get several LEDs to light up in a chain. Here's a video where I had 4 sets of LEDs running from one 555 timer (shown at the end).



In addition, here's a photograph of how I wire up the 555 timer IC on some stripboard (with the strips running vertically from top to bottom). The only cut tracks are under the 555 chip. Note there is a red cable hidden from view behind the left capacitor which connects the other red cables together. I would only use this picture as a reference for the IC wiring, rather than the caps, as it is hard to see which track the capacitors are connected to.

30 comments:

Anonymous said...

cool circuit, but the schematic shows c1 as a 10uf non-polarized cap(very odd value), when in fact your breadboard shows you using what looks like a polarized cap.

just fyi.

Chadd

Ad said...

Hey good call, it is an electrolytic cap. 10uf is the correct value though.

Will change the schematic when I get a chance.

Brandon said...

Is there a way you can put a Pot in instead of a resistor to adjust the rate of pulsating, on the fly?

Brandon said...

Also one more question, as I am a circuit noob (but i have some experience) what size LED's were you using in line with the 1K capacitors?

does the 555 just send the 6V output to the capacitor and then the LED? so could i just use an LED voltage calculator to figure out what resistors i need if i wanted a 9V power source to power a certain mAh LED, would the capacitor size stay the same?

Adam (Ad) Spiers said...

Brandon, You can certainly put a pot in the place of a resistor (i.e R2), in fact here's a circuit where someone has already done it http://www.electronic-circuits-diagrams.com/oscillatorsimages/oscillatorsckt1.shtml

Bear in mind that the frequency is determined by R1, R2 and C1 though http://en.wikipedia.org/wiki/555_timer_IC#Astable_mode

I just used standard leds, I can't remember the specs but if you look on ebay for Leds then these are the ones that everyone will try and sell you. For 9V just up the resistors a bit. The capacitors will saturate faster with the greater voltage which will mean the fading will be faster than with 6V but you could probably just adjust your R2 to compensate.

Drewscruis said...

what exactaly is R1? it sais 8k2 is that 8.2k? or 8k?

Drewscruis said...
This comment has been removed by the author.
Adam (Ad) Spiers said...

@Drewscruis

1K = 1000 Ohm
so 8K2 = 8.2*1000 = 8200 Ohm
and 8K2 = 8.2 KOhm

But if you only have a 8K then stick that in and see what happens. It will just make your PWM time different to mine.

Drewscruis said...

What if I want to run 4 led's with a forward voltage of 3.0-3.6v. doing the math for 6v it comes out to 1.5v per led, is this enough to drive them or should I up the powersupply to 12v, and what would I need to change in the circut?

Ad Spiers said...

@Drewscruis

If I were you I would just try it with 6V. On my video I'm running 6-12 leds with 6V, no problems.

Drewscruis said...

I've built this as per your schematic and it just doesn't run, the odd thing is I get 6v on 1 led and 1.9v at the otherand it doesn't fade between either the voltage holds steady.

Ad Spiers said...

@Drewscruis

Sounds like your oscillator isn't oscillating (i.e. it's staying in the high part of the square wave). Make sure your 555 chip (still?) works. If you've changed the resistor values you might have made the period too long.
The circuit should work, about 1000people have viewed it so far (I assume quite a few build it) without complaints. Check every connection and maybe look at the veriboard version on the video.

nathan said...

Huh i dont understand the configuration of your IC

It seems you have it coming from pin 4, but the output of the 555 is pin 3?

Anonymous said...

Can you add the pin numbers on the 555? Also, are you sure that C2 is the correct way around?

I managed to get something like this working with a 4700uf C2 the other way around. Using 1000uf caps didn't seem to make much difference but then I used slightly different resistors. I'd still like a slower fade/unfade though - and ideas how could I get this?

Hesit8 said...

please... update the schematics... :( with Pin numbers... i don't understand anything...

Ad Spiers said...

Ok guys I'll have a look at it this weekend, been too busy for the last few months...

Ad Spiers said...

Right, just had a look at the schematic and it all seems fine except C1 being an electrolytic cap.

@Heist: To get the numbers just count the lines (bottom left is pin 1), I've done the cicuit diagram to match the pin out on a generic 555.

@nathan, pin 3 is the output of the IC but I'm using it to switch between two leds, one of which is connected to +V (pin 4) the other of which is connected to GND. When pin 3 is low the led on pin4 is able to light as the +V has somewhere to go (it's a neat trick). Effectively I'm using the square wave from pin 3 as an automated toggle switch.

@Anon: Different resistors for a slower duty cycle and BIG FAT CAPS B-)

Matt Thorn said...

I would like to do something like this, but with high-power LEDs. Specifically, I'd like to use a LedEngin 10-Watt RGB (LZ4-00MC10) or RGBS (LZ4-00MA10), and have the Red and Blue chips turn on and off alternately. I'd also like to use two 3.7-Volt Li-Ion batteries, or possibly even three or four. I'm not much of an electronics wizard, but I think I could accomplish this by adding high current gain transistors (say, BD241 or BD242?) to your circuit. I'm also thinking of using a 5V voltage regulator to get the LEDs enough power without frying the 555. Am I barking up the wrong tree? If not, how could I accomplish this? Many thanks in advance for any advice you can offer.

Ad Spiers said...

@Matt, Thats an interesting question and it could work depending on the placement of your transistors and caps. Not sure what your electronics knowledge is like but if transistors basically work as binary switches to higher loads. So you could use the 555 to switch your leds on alternately but that would only give you on/off. I guess the caps would go on the collector and emitter, problem is that because of the binary switching you may only get fading ON on one led and fading OFF on the other.

I'd love to experiment with this but I'm working to a bunch of deadlines at the moment.

With such high power you may want to consider variable duty cycle PWM if the caps don't work out. The PWM from your source will switch the transistors at no problem.

Let me know how you get on, sorry can't be more help right now.

Matt Thorn said...

Thanks so much for the prompt response. Actually, I want to do it without the fade, so it works for me (hopefully). I'll give it a try and get back to you if anything comes of it. Thanks again.

MichaƂ said...

Hi, I've tried to make that circuit but it doesnt work for me. There LED is just not working, looking like the electricity is not goig from + to -..
Tell me, please. Does the red and black lines on your schematic connect or they shouldn't? I made it all so the lines does not connect. Is that wrong?

necro_nemesis said...

I built the circuit too and quickly realized the schematic has LED 1 in a direct path for 6V. Looking at the schematic the way I read it; 6V comes down from the top, is jumpered around the 555, proceeds directly to LED 1 which goes straight to ground. LED 2 oscillates correctly but LED 1 simply comes and on proceeds to overheat at 6V. Please verify the way I am interpreting dotted line portion of the schematic. Thanks for the post.

Ad Spiers said...

Okay guys I finally got round to updating the diagram. It only took me since December!!!

Michael and Necro_nemisis, you guys were right, I'd drawn the circuit with LED1 connected after C3 when it should of been conencted afterwards! Really sorry everyone.

I've also colour coded the lines now so there should be less chance of misinterpreting the diagram. IC pin numbers have also been added.

Happy building everyone and sorry for the sloppy job first time round.

Anthony said...

Love the schematic!! What is the watt rating for the resistors? (1w, 1/4w, .5w) Also what is the voltage rating on the capacitors?

Thanks

skn said...

hey bro this circuit is not working, led's continuously stable, no blinking

lily mitchell said...

What effect would changing the value of c1 to a higher or lower value have?

Thorsten said...

This is fantastic!

Ad Spiers said...

Lily,

Yes, it is the capacitors that create the fade effect by slowly charging up. 'Larger' caps will take longer to charge so will lead to slower fades.
Don't be scared to experiment with this circuit, it's quite difficult to break anything and all the components cost pennies. Breaking stuff through experimentation is one way to learn.
...and sorry for the slow reply, I hadn't checked this blog for awhile.

Rashmi Pal said...


The blog very nice and very informative.
Open ad posting

Rashmi Pal said...

very usable post.
Open ad posting