LEDs, 555s, Flashers, and Light Chasers

Audioguru

Joined Dec 20, 2007
11,248
Actually, a 4017 is rated at 6.8ma
The CD4017 is a Cmos logic IC. Its output current depends on its supply voltage. None of your circuits have a supply voltage.

Texas Instruments show typical and minimum output currents in their datasheets for all their Cmos logic ICs. With a 10V supply a CD4017 can supply typically 18.5mA into a 2V red LED or 17mA into a 3.5V blue or white LED. Where did only 6.8mA come from?

EDIT:
On one page you show a 9V battery and say it drops to 7.5V. I agree that the typical output of a CD4017 into a 3.5V blue or white LED is only 6.8mA when the supply is 7.5V.
 
Last edited:

Thread Starter

Wendy

Joined Mar 24, 2008
23,408
Yeah, I know, I'm now a member of the free energy crowd. I also didn't show the other 3 LM339's comparators, must have chopped them out with a Dremel. :p

We were talking the maximum drive specs for the 4017, not the LEDs. I really thought you'd pick up on that, it was obvious enough.
 

SgtWookie

Joined Jul 17, 2007
22,230
You can push 4017's fairly hard if you're not worried about the logic levels of the outputs, or about visits from the CMOS cruelty cops. :eek: ;)

If you ARE concerned about the output logic levels, better to keep the loading pretty light. 10k Ohms max/1mA max are nice even numbers to work with, and they'll usually keep you trouble free.
 

Thread Starter

Wendy

Joined Mar 24, 2008
23,408
And there is a chance the specific component you're using will just die if you exceed the specs. Not likely, but possible. This is why there are specs, to maximize component lifespan.
 

SgtWookie

Joined Jul 17, 2007
22,230
Hey Bill,

Going back to fig. 11.4 on page 2 - since there won't be more than one LED on at a time, you really only need one current limiting resistor for all 25 of the LEDs, providing they all have the same Vf @ current ratings.

Additionally, if ULN2804's are used, they'll eliminate all but one transistor and it's corresponding base resistor.

Like this:


It would sure cut down on the number of components.

[eta]
Yeah, I know - I used the reference designator U2 three times, but I'm not changing it now ! :)
 

Attachments

Last edited by a moderator:

Audioguru

Joined Dec 20, 2007
11,248
I just noticed that Talking (Colin) has been banned. His website <snip> now has 10 pages of Spot The Mistakes and they are hillarious. Have a look.
 
Last edited by a moderator:

Thread Starter

Wendy

Joined Mar 24, 2008
23,408
Yeah, hillarious. I'm in there, he took an example for the LED bargraph and put it out of context.

Thought the Darlington was overkill (it was, but why does it matter for a test board?), and couldn't wrap his head around the whole concept of LEDs can be individually controlled via resistors in parallel.
 

Thread Starter

Wendy

Joined Mar 24, 2008
23,408
Hey Bill,

Going back to fig. 11.4 on page 2 - since there won't be more than one LED on at a time, you really only need one current limiting resistor for all 25 of the LEDs, providing they all have the same Vf @ current ratings.

Additionally, if ULN2804's are used, they'll eliminate all but one transistor and it's corresponding base resistor.

Like this:


It would sure cut down on the number of components.

[eta]
Yeah, I know - I used the reference designator U2 three times, but I'm not changing it now ! :)
Same reply as the last one...

There is a problem with the idea though, it assumes all the diodes (quantity and colors) are the same. We have enough trouble getting people new to electronics used to the idea that a resistor is required (What if I regulate voltage, or I want to get the parts count down).

The idea was persued somewhat with the current regulator earlier in the article, the one without the transistor drivers.
 

mxabeles

Joined Apr 25, 2009
266
hey great post bill.
so I have updated a 4017 x 3 circuit i've been meaning to etch in light of this article. I believe the diode gates are correct, but I would like some confirmation on that. Also, I had a resistor in series with every single collector - cathode and changed that to only 1 68ohm from anode to 5volts.
To let you know, every single led is same color/manufacturer. Uni-color high brightness white LED from Jameco, fV @ 3.8 and current 20mA.
Best,
M
ps. wookie, remembering your advice on supply matching pins, I made an effort to use vcc and gnd. Using vss and vdd for 4017 though created an issue where the 4017 chips were isolated from 5v+ gnd in the circuit ! If there is an alternative let me know, but I felt forced to ignore ERC and connect the invoked pins to vcc and gnd.
 

Attachments

Last edited:

Thread Starter

Wendy

Joined Mar 24, 2008
23,408
Other than the new section, Special Effects (which are works in progress) the article is correct.

The multiple 4017 has been tested by Fenaris, who build a pretty neat Darlek sweeper. It was what gave me the idea for the special effects section. When I get that finished I'll add it to my blog.

LED prop project for a Dr Who double

He's done some pretty decent work on converting a laminator to a toner transfer for PCB making.

Project: Converting a hot roller laminator for toner transfer.

Here is a search I did on his name, he likes making props for his friends.

http://forum.allaboutcircuits.com/search.php?searchid=2678992

I like his work.
 

mxabeles

Joined Apr 25, 2009
266
thanks bill. So, just to understand you, my schematic is correct?
Thanks...I can't open attachments for some reason so I can't view the screenshots the prop guy posted :(
Best,
M
 

Thread Starter

Wendy

Joined Mar 24, 2008
23,408
Yep, AG caught my early mistake, so it is currently correct.

I like using diodes circuits for simple gates, they fit in tight spaces better.
 

mxabeles

Joined Apr 25, 2009
266
same thinking here, esp. cause using quad AND IC forces me to also have 4 pulldown resistors on the unused inputs. Secondly since I etch only single sided boards, the diodes could be used as jumpers. Saves space and components.
Best,
M
just realized I was missing 100k resistor from clck of 4017 to gnd. This is acting as pullup resistor, correct?
Thanks,
M
 

Audioguru

Joined Dec 20, 2007
11,248
Why are you throwing away most of your 12V supply in a 5V regulator?
The 555 doesn't need only 5V. Old fashioned TTL logic ICs used 5V.
The CD4017 doesn't even work good with a supply of only 5V. Its max is 18V to 22V.
Both ICs work fine from 12V without a voltage regulator. Then you might not need the ULN2803 LED driver because with a supply of 12V the CD4017 has plenty of output current (about 20mA).
 

SgtWookie

Joined Jul 17, 2007
22,230
Why are you throwing away most of your 12V supply in a 5V regulator?
Could you please be a little more kind?

Agreed, it is a waste of power. However, suggesting appropriate alternatives will make this a positive experience for Max, rather than making it seem like a beat-down session.

If you would like a beat-down session, I'm sure it could be cheerfully arranged.

The 555 doesn't need only 5V. Old fashioned TTL logic ICs used 5V.
The CD4017 doesn't even work good with a supply of only 5V. Its max is 18V to 22V.
Sorry, it's 16v to 18v, depending on the specifics in the datasheet. I have yet to see a 555 timer rated for 22v. If you find one, it would be interesting to know about.

Both ICs work fine from 12V without a voltage regulator. Then you might not need the ULN2803 LED driver because with a supply of 12V the CD4017 has plenty of output current (about 20mA).
This is only partially true.

You're only going to get 20mA from a 4000 series IC if you have nearly a dead short on the output with maximum supply voltage. Expect more like 16mA driving an LED with no current limiting resistor - which is really not good practice.

If you try to use a 4000 series CMOS output both as a direct LED driver AND a logic output, the circuit will fail to operate correctly; as the load of the LED current will cause the output to be clamped below or above (depending on the situation) a proper logic level.

The point of the posts that Bill and I made was for the viewer to decide what approach to use that would keep the devices within their ratings, and to be reliable.

A highly integrated approach is desirable, for a low parts count and reliability. However, a reasonable maximum load for a 4000 series CMOS output is 3.9k Ohms in order for it to be able to reach valid logic levels at low speeds. If higher speeds are desired, 10k or more should be used.

Max,
Your 555 timer won't oscillate, as you have the connections bollixed up.
You might use the ICM7555 model in the Maxim libraries for an easier-to-use model.

What version of Cadsoft's Eagle do you have installed? If 4.16R2, I can help you clean it up. If anything later, you are on your own. I have a registered version, and don't feel like emptying my wallet to help people for free.

If you install an earlier version, you won't be able to read schematics created by a later version. However, your schematics really need a lot of help.

The LED.lbr has models that would make much more sense than using wirepads for the LED connections.

Rather than using V+/GND to keep the 555 happy (which has displayed pins) use the VDD/VSS supply connectors to keep the 4017's happy. Go ahead and connect Vdd/Vss respectively to the 555's V+/GND connections.

Connect the ULN2803's GND connection to VSS.

If your supply is a regulated 12v, you shouldn't use a 5v regulator. You can use an LM317 as a current regulator instead. A 62 Ohm resistor from the OUT terminal to the ADJ terminal makes a good constant current source or sink; much better than using a resistor.

If sourcing 12v, connect the 12v to IN, and connect the ADJ terminal to the circuit.

If sinking current, connect IN to the current source and ADJ to the power return (often ground in low voltage DC circuits only)

Using an LM317 as a current regulator requires a minimum "overhead" of 3v more than the required voltage of the device that the current is being sourced to/sunk from. For example, if you had LEDs rated for 3.8v@20mA, you would need >= (3.8v + 3v) = 6.8v or more to power the circuit.
 

mxabeles

Joined Apr 25, 2009
266
alor of info here. thanks.
only thing is that i checked the 555 circuit in the schematic and it is the astable circuit i have been using for a long time now without issue. strange.

yes, i see now looking over the voltage ratings for the chips that a voltage regulator isn't necessary. but guess what, i already ordered a lot of 68 ohm resistors offline !

is there an ignore feature on this forum so i don't have to deal with daffy duck? :)

last i'm trying to decipher this :
"A 62 Ohm resistor from the OUT terminal to the ADJ terminal makes a good constant current source or sink; much better than using a resistor. " much better than using a 7805 did u mean? and is 12v supply bad for 7805 because of wasted power or something else?

thanks,
m
 
Last edited:

Thread Starter

Wendy

Joined Mar 24, 2008
23,408
This design will cover the entire range of power supply voltages, but it's negative is that it produces a very narrow pulse as show.



Unfortunately, as Wookie pointed out, the 555 Hysteretic Oscillator doesn't handle low power supply voltages very well due to the Vcc drop on the output.

I've started a Cookbook that is in it's infancy, if I ever have the time to work on all my projects I'll probably drop dead.

My Cookbook
 

SgtWookie

Joined Jul 17, 2007
22,230
alor of info here. thanks.
only thing is that i checked the 555 circuit in the schematic and it is the astable circuit i have been using for a long time now without issue. strange.
I don't see how it would work properly.

yes, i see now looking over the voltage ratings for the chips that a voltage regulator isn't necessary. but guess what, i already ordered a lot of 68 ohm resistors offline !
Gee, what were you going to use all of those for?

is there an ignore feature on this forum so i don't have to deal with daffy duck? :)
Click on "User CP" near the top of the page. Then click "Edit ignore list". Add member names who you no longer want to see responses from.

last i'm trying to decipher this :
"A 62 Ohm resistor from the OUT terminal to the ADJ terminal makes a good constant current source or sink; much better than using a resistor. " much better than using a 7805 did u mean? and is 12v supply bad for 7805 because of wasted power or something else?
With 12v in and 5v out, you are dropping 7v across the regulator. That means 7/12 of the power is being dissipated in the regulator, and 5/12 of the power in the load. Not very efficient.

Also, the output of standard 555 timers usually doesn't go above Vcc-1.3v, even under a light load. When used on 5v, the highest it'll go is 3.7v - that's not very much.

I wrote about using an LM317 as a current regulator instead of a voltage regulator. That could be used in place of the R1 on your schematic. Wire 12v to the IN terminal, a 62 Ohm resistor (68 would be OK, too) from OUT to ADJ, and then connect ADJ to the anode-side LED supply bus. A 68 Ohm resistor would give you roughly 18.4mA current. Since only one LED will be lit at a time, it works out quite well. An added bonus is that you could use LEDs of any color, as the Vf of the LED doesn't matter as much, as the LM317 provides active current regulation.
 
Top