Best practices using 555/4017 & many LEDs

  • Thread starter Thread starter Freddythunder
  • Start date Start date
  • Tags Tags
    Leds
Click For Summary
The discussion focuses on building a realistic lightbar for a fake police car using multiple LEDs, specifically red, blue, and yellow lights. The user seeks advice on using 555 timers and 4017 decade counters to control the LEDs, with a preference for transistors over relays for better reliability and efficiency. The conversation highlights the importance of ensuring that transistors can handle the required current for multiple LEDs, as well as considerations for LED brightness and viewing angles. Suggestions include using driver modules to simplify the design and achieve the desired lighting effects. Overall, the user is encouraged to explore various configurations to optimize their project within budget constraints.
  • #31
Important: the 2222 has a lower gain, so change R1 to 3.9kΩ (Always check initial operation: no components should get hot, not even warm to the touch.)

You might find it useful to construct just one circuit for testing purposes, and power all three colours from it simultaneously so you can photograph them together and, if necessary, set each to a more-suitable brightness.

So, using that basic circuit, instead of the 10 yellow LEDs, you could have:
one string of 4 yellows in series with a 220Ω, plus
a string of 4 reds in series with 220Ω, plus
a string of 2 blues in series with 390Ω, plus
another string of 2 blues in series with 390Ω

This would give 4 of each colour, and give you the opportunity to modify the resistor values to determine best luminosity for camera work. Don't forget that when the car's voltage varies these LEDs will change brightness a bit, too. https://www.physicsforums.com/images/icons/icon6.gif
 
Last edited by a moderator:
Engineering news on Phys.org
  • #32
Well went to an electronics parts place in Mesa today in hopes of finding the 547s. The 2222 are 2 bucks each at the radio shack so no thanks. I'm ordered 50 547Cs for $6, should be here in a few days.

I'm planning on doing the first circuit on a breadboard with the multiple colors to test like you suggested (good thinking!) and the solder together my sections of 10 LEDs each.

I'm going to use a 555 to turn the blocks on and off to test from pin 3. I think that's right. I'll alk to you in a few days.

Btw, found new job, start Monday.. All very exciting.
 
  • #33
Freddythunder said:
Btw, found new job, start Monday.. All very exciting.
Great. That's fast work!
 
  • #34
I actually got really lucky. Got 2 job offers after one week of looking. I'm a PHP developer and there were a ton of postings, but then this week - nothing out there. I'm thanking God above for the opportunities & the timing.

Anyway, while I wait impatiently for my transistors to come in, I came across another question. I was going to post a new thread, but figured I'd ask you first. I know that at Walgreens, they sell these balls that have a little flasher toy inside of them, when the ball gets knocked around, a blue & red led blink just like the police flasher thing. Years ago when I was a bartender, there were a few promotions where the booze company would give out these novelty ice cubes that had a blinking led inside of them, but it would blink like 1-2-3 pause 1-2-3 pause - much like I want my project to do. Being a kid inside, I've torn a toy or two apart like this to find a very small circuit board with some black plastic shell over any electronics.

My question is, is there some more simple way to do what I'm trying to do - or do you think that these toys have some sort of 555/4017 inside of them that make them do the same thing I'm trying to do? Is there some sort of other chip out there that is manufactured just to blink.

Or, maybe it's two 555 timers, one set to blink fast and another slow and the one 555 triggers the next 555 so you get that blinking, then pause, then blinking, then pause. Hmm. Maybe I'll play with that while I wait for my transistors.

Just a random thought I had.
 
  • #35
Using 4017 is by far the simplest method, in principle, for what you are doing, because the sequences are locked together and controlled by a single clock. To speed up or slow down the rate of blinking you'll just adjust one 555 and there are no timing issues. However, it also follows that you can't independently control things, so in that sense your options are limited. If you wanted 3 successive blinks, you'd need to use two 4017's with this timing method.

I thought you said you had already built the basic 555 + 4017 circuit? How much did the 4017 cost?

While cooling your heels, you could turn to the task of figuring out how many input diodes you'll need for each of the 9 yellow blocks. This means you have to work out what combination of outputs from the 4017 is needed for each yellow block to turn it on and hold it on. Maybe start with the timing diagram here: http://electronics.stackexchange.co...-multiple-connections-in-this-traffic-light-c

You'll also need to search for the full 4017 pin-out.

You might re-consider the 2222's. If you use 547's throughout you will have to construct at least 5 blocks to do what a single 2N2222 can. The 2N2222's are rated for more current, so one 2N2222 can drive half of the blues together with half of the reds (providing my hunch is right that you'll settle on less than 20mA drive for each LED). You'd need just two 2222's, all the rest can be 547s.
 
  • #36
I thought you said you had already built the basic 555 + 4017 circuit? How much did the 4017 cost?

On my iPad and I can't use the nifty quote feature... So I made a circuit about 2 years ago using a 555 & 4017 that sequentially turned on and off 10 single LEDs. I took a video of it, but I don't know where it could be. I bought the 4017 at fry's electronics, actually bought a backup still in the package. Brand new NTE4017B for $1.69. Also have a 4013 CMOS flip flop. No idea what that does butive kept it save and static free for years.

As for the 2222s they were too expensive so I never bought them. I was thinking of making circuit boards for each segment of lights like your schematic so each segment would be 2 transistors, the LEDs and resistors. Then I'll just have three wires on each for power and the signal from the respective 4017 output pin. Right?

I made a blinking circuit with a 555 and a potentiometer to adjust. I ran pin 3 to your circuit of led array. I'm thinking it's working as it should because it did not fry the 555.
http://m.youtube.com/watch?v=w8EhJIqXOYI

The only thing I see that looks off is the array of 10 LEDs seems to ramp up instead of just turn on. I slow it down in the video so you can see it. This may make a difference with the red and blue because of how fast they're going to blink; they wouldn't be on long enough to get bright.

This may be the issue too. I had to use 66k resistors instead of 68k and 4.7k instead of the 5.6k. Other than that I don't have the understanding to know where to start to look for the issue. The led off the 555 does not do it. Thanks!

[EDIT!]
I turned up the pot so they blink really quickly - there's no difference, they are as bright as the sun still when they blink fast. Proof positive is I cannot see the screen right now due to black dots left in my vision from 11 rapid fire yellow LEDs shooting the back of my retinas. So I don't think that issue is an issue anymore.
[/EDIT!]
 
Last edited:
  • #37
Freddythunder said:
I was thinking of making circuit boards for each segment of lights like your schematic so each segment would be 2 transistors, the LEDs and resistors. Then I'll just have three wires on each for power and the signal from the respective 4017 output pin. Right?
That should work okay.
I made a blinking circuit with a 555 and a potentiometer to adjust. I ran pin 3 to your circuit of led array. I'm thinking it's working as it should because it did not fry the 555.
That's progress. :smile: Did you put your finger on the transistors, to feel their temperature? The component most at risk is the transistor driving the LEDs.
The only thing I see that looks off is the array of 10 LEDs seems to ramp up instead of just turn on.
I see what you're saying. It looks like you are driving 5 strings of LEDs? In the schematic, I showed only 3, as 3 is the maximum I'm comfortable with for the BC547. So remove all but one string of LEDs and see how it behaves with just one string. What value of resistor are you using for each pair of LEDs? Did you measure the supply voltage?

Have you confirmed that the brightness will be sufficient if you use a string of 4 LEDs and a 220Ω resistor?

Also remove that single LED and the resistor feeding it. Does that improve things? Between what two points do you have that LED connected?

After all this, if the LEDs continue to exhibit steps in brightness, connect a large electrolytic between +12v and ground right at the circuit board. At least 2000μF and note any improvement.
 
  • #38
Did you mention something about your circuit running the LEDs at 20ma? Aren't they rated for 30? I tried your resistor like you said and they are bright enough. I got a circuit board and cut it to pieces and have started making my arrays. I cut the pieces to narrow and don't want to crowd everything so I'm going to put the transistors on a separate smaller board between each two segments. it's good though. I want it to be real low profile.

I had to sand down the edges of these LEDs so they would fit next to each other but that's why God gave me a dremel.

http://twitter.com/freddythunder/status/238136953231536130/photo/1

So my next steps are to finish making the arrays and the the transistor boards then the 4017 circuit. I'm doing the red and blue first then the yellow second.
 
  • #39
Freddythunder said:
Did you mention something about your circuit running the LEDs at 20ma? Aren't they rated for 30?
Nominally 20mA, but rising a bit if the car voltage is higher than 12v. If you want electronic devices to give reliable service, you don't push them to their absolute limit.

After passing through the LEDs, the current then goes through the BC547. The BC547 does not have a very high current rating. 3 strings of nominally 20mA is what I planned for.

Can I assume the LED switching is now behaving perfectly? Which of the changes you made fixed that stepping up in brightness?

What company manufactured your 555? What is the full component number on it?

[strike]"Firefox can't establish a connection to the server at twitter.com."[/strike] EDIT: I had twitter blacklisted. https://www.physicsforums.com/images/icons/icon11.gif
 
Last edited by a moderator:
  • #40
Since you are constructing this now, I'll summarize things:

One pair of 547's will drive 3 strings of LEDs with each string made up of:
(i) 4 RED or YELLOW LEDs and a 220Ω ½ watt, or
(ii) 2 BLUE LEDs and a 390Ω ½ watt

So each pair of 547's will comfortably switch 12 REDS but only 6 BLUES.

You haven't yet confirmed that 390Ω with 2 BLUES gives an optimal brightness for your needs. Maybe it is still too bright, or perhaps not bright enough?
 
  • #41
Whoof, new jobs got me busy!

I have started constructing the LEDs to boards, but hadn't connected anything together yet. But what you said above confuses me so I'm going to have to reaffirm things with you. I don't want the LEDs to burn out so I want to make sure that I'm doing this right.

So, with the above, are you saying that each pair of transistors will light 12 red or yellow LEDs but only 6 Blue LEDs?? Is 10 Blue LEDs too much current for them? Can I use the 2222's for the blue ones? I'm going to need 10 LEDs on each section no matter the color so they are physically the same size.

I did try 4 blue LEDs with 100Ω and I think I did 2 with the 390Ω. I could not tell the different in brightness, both configurations were really bright. As for filming, in my more previous tests, I just ran 12V through 2 blue LEDs with a 270Ω resister and they looked blue to the eye, but almost white on camera. That LED calculator thing told me that I can run 14V at 20mA with 4 blue LEDs and a 68Ω and 2 blue LEDs with a 390Ω. Can I do that with a different circuit?
 
  • #42
Freddythunder said:
Whoof, new jobs got me busy!
Good. :approve:
I don't want the LEDs to burn out so I want to make sure that I'm doing this right.
The LEDs aren't at much risk, it's the low-power BC547's that are being pushed hard.
So, with the above, are you saying that each pair of transistors will light 12 red or yellow LEDs but only 6 Blue LEDs??
Yes, if you use the blues with 390Ω.
Is 10 Blue LEDs too much current for them?
Yes. But if the camera is happy with the blues when you change to using 560Ω resistors, then you can safely power 10 blues, arranged in 5 strings each with 560Ω. Try that and see.
Can I use the 2222's for the blue ones? I'm going to need 10 LEDs on each section no matter the color so they are physically the same size.
As I pointed out previously, the 2222 has a higher current rating, and a single 2222 could switch half of the blues plus half of the reds all together, a total of 40 if I'm not mistaken, which is ultimately what needs to be done, isn't it? Your call.

I half expect that with your blue LEDs the camera will always perceive intense white dots with a bluish halo whatever the current. To film a proper blue you may have to buy LEDs encapsulated in blue-coloured or cloudy plastic, not the clear stuff. (But I'm not certain of this, it needs to be tested.)

A wild thought: maybe a frosted dome on the LED would diffuse the light better? Have you enough blues that you could sacrifice one or two to an experiment? Use fine sandpaper to evenly roughen one LEDs hemispherical cap and turn it into a uniformly matt surface and see what the camera thinks of that alongside an unmodified sample for comparison. Also could try a smear of white toothpaste over the end of a LED to diffuse the light into a less intense but larger spot. (If it works well, go looking for some cloudy plastic to glue onto your blue LEDS.)
 
  • #43
I will test the blues with the higher resistance, uh, resistors right now to see how bright they are. Otherwise, I will buy some 2222's online, I still need to buy more LEDs. I will sand down one of the blues and see what happens. I actually have to sand down the sides for them to fit side by side on the circuit boards so I already have some fine sandpaper with my current-hobby kit.

I don't think the toothpaste would work because I plan to enclose this whole thing in plastic & plexiglass. Plus I live in Phoenix so the toothpaste would probably just melt off. You'd be surprised what melts out here... In October...

So with the 2222's could I have one 2222 for the 40 blue and 40 red ones that all blink together and another one of them to alternately blink the other 80 red and blue ones? I'd eat the $6 I spend on the (50) 547s if I only have to wire up 4 transistors for the whole red/blue side! That'd be great! Yes that's what I want to do. Then I can have all the components on one board and run two wires to each segment. Yep.

Thanks
 
Last edited:
  • #44
The toothpaste was an improvised test! If it showed promise you could use a dab of white primer.

So you have returned to using 80 red and 80 blue? https://www.physicsforums.com/showpost.php?p=4032050&postcount=21

Let me know how the blues with lower current go. If 80 proves too many for a 2222, we can probably use a BD139. I'll have another look at the figures ...

You have tried filming the reds and yellows with the resistor values I offered earlier, so are certain they don't need to have drive current reduced?
 
  • #45
Ahh! Test toothpaste, that makes more sense. I still have yet to shave one down with sandpaper but I wanted to let you know, NO I'm not at 80 LEDs. I have no idea why I cannot keep that straight in my head. It's 80 total, 8 segments of 10 because they proved bright enough on the test - so it's half of the LEDs in that animation I made.

On that note, one 2222 would run 20 red and 20 blue, then another 2222 would run the other 20 red and 20 blue. Whew. Sorry about that.
 
  • #46
Don't get the 2222, it will get too hot. You'll need the higher-power BD139.
 
  • #47
Change of plans! [2 months later] I think that I will instead be using 556 for each 'panel' of LEDs (going through the darlington transistors). I figured out (after scouring the interwebs for the schematic) a way to get the blinking effect that I want by having two astable multivibrators one quick one slow and the slow one turns the quick one on and off. That way all the panels will be blinking independently which is probably better anyhow.

Plus I'm thinking as things break, they will be easier and cheaper to fix down the line. I remember my dad telling me that 555's are pretty sturdy and pretty hard to blow up.

Let me know what you think, can I use a 556 to make the blinking, take the output of the second multivibrator and run it through two of these 547 transistors I now have a bunch of and run 10 LEDs per circuit?

 
Last edited by a moderator:
  • #48
Welcome back! I wondered about the sudden disappearance.
Freddythunder said:
Change of plans! [2 months later] I think that I will instead be using 556 for each 'panel' of LEDs (going through the darlington transistors). I figured out (after scouring the interwebs for the schematic) a way to get the blinking effect that I want by having two astable multivibrators one quick one slow and the slow one turns the quick one on and off. That way all the panels will be blinking independently which is probably better anyhow.
The blinking function can be achieved using 555s, yes. But how do you propose to have the yellow blocks light up sequentially?
Plus I'm thinking as things break, they will be easier and cheaper to fix down the line. I remember my dad telling me that 555's are pretty sturdy and pretty hard to blow up.
Any electronic component can be destroyed by abuse or misuse. 4017's and diodes are not expensive.
 
  • #49
Thank you, it's good to be back! I will still have to build the yellow blocks with the 4017 but need the red and blue first to start filming. My step dad has THE car to use in the film project but won't have it forever so I have to step up my timeline.

You are correct about the parts being cheap however, I don't like how the 4017 are static sensitive and how the whole thing could die from a shock from a finger. Plus I think knowing me and my building style I would like to have them in modules (each block of LEDs) so I can make extras for other parts of the car and have backup segments on film day. If that light ar doesn't work when filming then there's no point to filming.

Price wise the 556 is .40 so it'll keep cheap anyway. My step dad suggested I build the lightbar into a four foot fluorescent light fixture so I'm at the point of building. I think I trust the 556 more too.
 
  • #50
I've combined the 556 circuit with the led and 547 transistors array you suggested and let it run for a while. All seems good so I'm going to start building. Wish me luck.

 
Last edited by a moderator:
  • #51
You've got them working in the right fashion, well done. You are using a pair of 555s for that, undoubtedly. Can you slow the fast blink rate down a bit?

This is how I pictured you'd need to go: It looks like you'll use a pair of 556's to drive the blinking arrays. One astable operating at a rate of ƒ cycles per second can connect to the RESET of a second astable operating at 3ƒ cycles per second. While the low rate astable output is HIGH the faster astable can produce its output and this is used to drive half of the LEDs.

The output of the ƒ cps astable can, in addition, drive a third 555 connected as a logic inverter (going to pins 2 & 6) and the output of this goes to the RESET of another 3ƒ astable. It's the output of this astable which drives the remaining half of the LEDs.

Allowing a single astable to alternate the drive between half of the LEDs and the remainder will give a better synchronized appearance.

I think you are able to drive 10 reds with a pair of small signal transistors, but how many blues did I eventually settle on? (The arrangement is not a Darlington pair, it's just a two stage amplifier.)
 
  • #52
Without going back into the thread, I think you said 6 blues, but each segment is 10 no matter the color. Will this 2 547s be enough for 10 blues? I hope so because I ordered 50. Although that was only $5.

You are correct about using the other side of the first 555 astable to click on a third 555 and it would be more synchronized. I may approach that later but I think I'm going to start with a 556 for each 10 LEDs. I still have the whole other side to build later. It's getting to the point where I'm spending too much money on this one prop. I still have a whole movie to budget. And a car to buy! oh my! I'm thinking of just doing the 8 segments of blue and red and have them blink randomly. I've seen police cars that are totally random and perfectly synchronized so I think I can still sell the effect if they are random.

Besides. I love the idea of only having ONE segment, circuit and all breaking on film day and having one or two backups built that I can swap out with a screwdriver and quick connect to power. Probably a few more bucks that way but I think it'll pay off in the long run.
 
  • #53
I scanned over the threads 4 pages - and know this is relatively late. But ideally for that quantity you should use a LED Driver - they actually flash the LED at high power faster then your eye can detect - the allows the LED to run a normal power (average) and the eye picks up the higher brightness.
Example - If you are looking at a cars LED taillights - and waive your hand in front of them you will see the strobe effect from this.
 
  • #54
Thanks windadct, but the end result is to have the rate slow enough that It doesn't look solid at all. I'm adding in potentiometers so I'll be able to slow that rate down actually. But I appreciate the input!
 
  • #55
Freddythunder said:
Without going back into the thread, I think you said 6 blues, but each segment is 10 no matter the color. Will this 2 547s be enough for 10 blues? I hope so because I ordered 50. Although that was only $5.
It's the level of current that is the important factor. If you increase that series resistor then you can use more parallel strings of two blues, although reducing their brightness in the process. At one stage you said they were too bright for the camera, so this is okay. (I tried to get you to determine the lowest satisfactory current for the blues, but you still haven't.) Are you using 5 parallel strings of two blues each with a 390Ω series resistor? You should increase that to 470Ω to avoid tempting fate.

For the circuit values I gave, this was how I summarized it: https://www.physicsforums.com/showpost.php?p=4044769&postcount=40
I may approach that later but I think I'm going to start with a 556 for each 10 LEDs.
So you'll use how many 556's? A dozen or more? That will be eye-catching, to say the least! Reminds me of the time late one Christmas Eve when I strolled down to the corner to have a sticky beak at a colourful Christmas tree decoration that seemed to be lighting up the street, only to discover it was the lights on a police car! (No, I hadn't been celebrating ...)
 
  • #56
Hi! I used that led calculator I mentioned a few times and then upped the resistance a touch. If they are too bright for the camera I can always adjust the camera or fix it in post. Sorry for not getting the lowest current like you asked. I should have but I need to get this project completed! It's driving me nuts! I made the array 4, 4, and 2 with resistors 47, 47, and 330 ohm respectively. Then I have a different array for reds which I tested the yellows in the same configuration; you saw that video. Here's the blues:



New issue. I made the actual circuit board and the timer is working, but the transistors are not. Is there a pretty good chance of getting bum transistors? I've Quadruple checked everything even looked at voltage readings and it just seems the second transistor is dead. Could I have killed it with the soldering iron? It was a terrible pain in the butt soldering on those pad per perf boards. I'm going to get a quote for printed boards and see if I can afford it.

I'm planning on using a 556 for each segment of lights. I'll have 8 to start in the overheads which I found a 4' by 10" clear fluorescent light fixture lens that will work absolutely perfectly and will probably spread out the light more too. As time progresses I'll have a few more chunks of LEDs on the pushbar and back window and I can use this same circuit over and over! I've added a 500k ohm trimmer on the first 555 so I can adjust the on off rate per segment.

And you were celebrating! Sticky beak is wine!
Blue lights are still going! Even my wife likes it! She said she's proud of me :)
 
Last edited by a moderator:
  • #57
Hey I really still appreciate the help. I don't think I would have made it this far without help! Btw
 
  • #58
Freddythunder said:
I made the array 4, 4, and 2 with resistors 47, 47, and 330 ohm respectively.
You put 4 blues in series? Using 12 volts? I'm surprised you got them to light, though it means you have almost no control over the current in them. I didn't want to have even 3 in series, because the constraints are so tight when using those small signal transistors for the switching. The blues have a higher voltage across them, and 47Ω gives next to no control over the current. Excessive current is likely to damage the LEDs.
New issue. I made the actual circuit board and the timer is working, but the transistors are not. Is there a pretty good chance of getting bum transistors? I've Quadruple checked everything even looked at voltage readings and it just seems the second transistor is dead. Could I have killed it with the soldering iron?
No, not with the soldering iron. You most likely killed it with far too much current. Good job it was destroyed now, otherwise it would have happened at a more inconvenient time, e.g., when you are running it off the car's electrical system. Failure is inevitable when you overload that small transistor by making haphazard changes. If you hope to have reliable operation, you have to follow a calculated design.

Since you are driving the LEDs with the high current 555, we don't now need to be so frugal with drive current as when using a low output current 4017. I'll take another look at operating 10 blues using one pair of transistors.
Blue lights are still going! Even my wife likes it! She said she's proud of me :)
I'm confused. You say the transistor isn't switching, yet you say the LEDs are still flashing?

I'll take a look at some changes to allow 10 blues.
 
Last edited:
  • #59
To operate 10 blue LEDs, I suggest that you refer back to the schematic here[/color] and make the following changes:

change R1 to 2.7kΩ
change R2 to 47kΩ

and operate 3 strings of 3 blue LEDs in series with 220Ω ½W
in parallel with a single blue LED in series with 560Ω ½W

If the 560Ω gets noticably warm, replace it with a 560Ω 1W (or, equivalently, a 220Ω ½W in series with a 330Ω ½W).

Fingers crossed!
 
  • #60
NascentOxygen said:
you have to follow a calculated design.
I thought I did by following the calculator...

NascentOxygen said:
I'm confused. You say the transistor isn't switching, yet you say the LEDs are still flashing?
Sorry for the confusion; I have two identical circuits, one on the breadboard that was running the blue LEDs, and the one on the little circuit board that had never lit up anything. I ran a single LED to the 556 to check it's operation and it was working, but nothing was going through the transistors. So I don't think I burnt it out. I will try the new resistor values you suggest. Thanks.
 

Similar threads

  • · Replies 49 ·
2
Replies
49
Views
4K
  • · Replies 10 ·
Replies
10
Views
8K
Replies
16
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
Replies
17
Views
4K
  • · Replies 10 ·
Replies
10
Views
5K
  • · Replies 4 ·
Replies
4
Views
21K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
2
Views
3K