Require help with LEDs and some PCB design

Thread Starter

William A Rose

Joined Feb 5, 2022
45
Because PWM is the best way to control LEDs brightness. Any other way isn’t linear nor predictable.
Sorry. That was clear as mud. I have a chart showing LEDs of different colors and their respective Forward Voltages. DC has no wavelength or frequency. That is why I don't understand what you said. If you need 3.3 volts from a 5 volt source, then the appropriate resistor makes that happen. Shame the wasted energy is dissipated as heat. Ah well. Nothing is free.:)
 

Ya’akov

Joined Jan 27, 2019
10,259
Sorry. That was clear as mud. I have a chart showing LEDs of different colors and their respective Forward Voltages. DC has no wavelength or frequency. That is why I don't understand what you said. If you need 3.3 volts from a 5 volt source, then the appropriate resistor makes that happen. Shame the wasted energy is dissipated as heat. Ah well. Nothing is free.:)
LEDs are non-linear with respect to current so if you use a variable resistor to dim an LED it will not follow a linear curve as the resistance changes. PWM is a way to make linear changes in brightness, among other things.
 
Last edited:

djsfantasi

Joined Apr 11, 2010
9,237
Sorry. That was clear as mud. I have a chart showing LEDs of different colors and their respective Forward Voltages. DC has no wavelength or frequency. That is why I don't understand what you said. If you need 3.3 volts from a 5 volt source, then the appropriate resistor makes that happen. Shame the wasted energy is dissipated as heat. Ah well. Nothing is free.:)
If PWM supplies 5VDC half the time and no voltage the other half, the LED is only on half the time. Do this fast enough and the eye doesn’t see the LED turn off. It sees a dim LED. That’s the concept behind PWM.
 

MisterBill2

Joined Jan 23, 2018
27,679
This might upset some folks. Sorry. I liked it.

View attachment 260140

And this:

View attachment 260141

This is just missing the diodes in the Timer circuit. Are they really necessary? And that AND gate in the cascaded 4017 circuit.....is it necessary? Why?

Thanks for any and all replies.
Thwe and gates are needed because the 4017 is a ring counter so that one output is always active. Soto do a count of more than ten with only one output on, some extra logic is required.
 

dl324

Joined Mar 30, 2015
18,376
I don't know what you mean by push/pull.
It means that there's an active pull-up and an active pull-down. Contrast that with an open collector/drain device where there's only an active pull-down device. How close they pull to the rails depends on the load. Loading the outputs of the CD4017 beyond what's characterized in the datasheet is not recommended. The last circuit you referenced is in the not recommended category.
Don't the Pot and the Cap regulate the pulse time?
Yes, but with a fixed capacitance, the pot only allows you to vary on time. Off time is fixed at
\( t_{off} = 0.693R_3C_1 = 3.9ms \)
That's the first I have looked at the innards of the 4017. Cool!
You should get in the habit of reading datasheets so you can determine whether a device is appropriate for your requirements. I've seen more crap on YouTube than ones that are done by someone who actually knows what they're doing. I avoid the ones that take forever to make a point because they're probably just trying to monetize my time.

The one from the manufacturer of your devices would be best as there can be some slight differences even though the devices are supposedly interchangeable.
 

Attachments

dl324

Joined Mar 30, 2015
18,376
Sorry. That was clear as mud.
The light output from an LED isn't linear with respect to current. To get something like linear brightness control, you drive the LED with a fixed current and change the ratio of its on to off time. That's called Pulse Width Modulation. The frequency of the rectangular wave stays constant, and you vary the duty cycle (on time vs pulse width).

That's what the first timer circuit you posted was designed to do. By having the two diodes, you can vary on and off time independently. The second circuit lets you change on time, but not off time.
 

Thread Starter

William A Rose

Joined Feb 5, 2022
45
LEDs are non-linear with respect to current so if you use a variable resistor to dim an LED it will not follow a linear curve as the resistance changes. PWM is a way to make linear changes in brightness, among other things.
Oh. Hmm. I was going to use a Pot to determine the value of resistor I need to achieve the goal - somewhere around maybe 80% and 100% intensity. I was just going to go with what looked good instead of relying on the math to calculate the resistor value. I will have to rethink this.
 

MrSalts

Joined Apr 2, 2020
2,767
Who started this rumor?

Any other way isn’t linear nor predictable.
LEDs are non-linear with respect to current so if you use a variable resistor to dim an LED it will not follow a linear curve as the resistance changes.
The light output from an LED isn't linear with respect to current
If you look it up from a quality LED supplier, you'll see something like this. I guess ya'll will have to define "linear" for me (or non-linear). I've never found an LED with a crooked line in the flux vs amp graph...
Every LED manufacturer I've spoken with says to control the current with a constant current smps to control the brightness. PWM of a high current Draw string if .LEDs is easy will generate lots of EMI emissions. Much better to make a 300kHz smps and keep the signals in the housing instead of making a long antenna of LED strips.

https://cdn.samsung.com/led/file/resource/2020/03/Data_Sheet_LM561B_Plus_CRI90_Rev.4.0.pdf
Upper left...
80D30CF4-64C0-4F51-8A96-28BC43ECEBB7.png
 
Last edited:

Thread Starter

William A Rose

Joined Feb 5, 2022
45
I have this. I'll build my circuits to test them on it. Will this be sufficient to take measurements that can be trusted?
If PWM supplies 5VDC half the time and no voltage the other half, the LED is only on half the time. Do this fast enough and the eye doesn’t see the LED turn off. It sees a dim LED. That’s the concept behind PWM.
I have this. I am going to build my circuits to test them on it. Do you suppose I will be able to take trustworthy measurements?
16443701766478857358604321991882.jpg
 

Thread Starter

William A Rose

Joined Feb 5, 2022
45
It means that there's an active pull-up and an active pull-down. Contrast that with an open collector/drain device where there's only an active pull-down device. How close they pull to the rails depends on the load. Loading the outputs of the CD4017 beyond what's characterized in the datasheet is not recommended. The last circuit you referenced is in the not recommended category.
Yes, but with a fixed capacitance, the pot only allows you to vary on time. Off time is fixed at
\( t_{off} = 0.693R_3C_1 = 3.9ms \)
You should get in the habit of reading datasheets so you can determine whether a device is appropriate for your requirements. I've seen more crap on YouTube than ones that are done by someone who actually knows what they're doing. I avoid the ones that take forever to make a point because they're probably just trying to monetize my time.

The one from the manufacturer of your devices would be best as there can be some slight differences even though the devices are supposedly interchangeable.
I have purchased a bunch of 4017s, 4081s, and 555s. From China. I am sure they are a TI knockoff - Hong Kong Fooey brand. The TI emblem is printed on them. I sure hope I haven't bought a bunch of junk. We'll see, eventually. The LEDs work. I have tested all of the white 10mm LEDs. I have a thousand each of the 5mm red, white and blue. I also have 1000 green 5mm straw hat LEDs. I do not recall any datasheets being offered. Hmmm.
 

djsfantasi

Joined Apr 11, 2010
9,237
Who started this rumor?





If you look it up from a quality LED supplier, you'll see something like this. I guess ya'll will have to define "linear" for me (or non-linear). I've never found an LED with a crooked line in the flux vs amp graph...
Every LED manufacturer I've spoken with says to control the current with a constant current smps to control the brightness. PWM of a high current Draw string if .LEDs is easy will generate lots of EMI emissions. Much better to make a 300kHz smps and keep the signals in the housing instead of making a long antenna of LED strips.

https://cdn.samsung.com/led/file/resource/2020/03/Data_Sheet_LM561B_Plus_CRI90_Rev.4.0.pdf
Upper left...
View attachment 260171
Did you handpick that LED just to make a point? It’s not always true. I randomly picked out an LED on Digikey, and the relative intensity vs forward current graph looks quite different.
DA5B2AA8-A852-4187-8580-1EC4986BBD4D.jpeg
 

MrSalts

Joined Apr 2, 2020
2,767
Did you handpick that LED just to make a point? It’s not always true. I randomly picked out an LED on Digikey, and the relative intensity vs forward current graph looks quite different.
View attachment 260173
No, I just picked LEDs from credible LED manufacturers like Cree, Samsung and Lumiled. Look again. Did you work hard to find the Famous LED producer "American Opto Plus LED Corp"? Really?
Previous post was Samsung.

Here is:
Cree...
https://cree-led.com/media/documents/data-sheet-JSeries-2835-3v.pdf
99A42CF0-1076-4FBB-987A-C57AE92E28EC.jpeg


Osram...
https://media.digikey.com/pdf/Data Sheets/Osram PDFs/GW_P9LR35.EM_V1.0_1-8-19.pdf

C437CC41-36CE-4488-AF36-C7CD844BE6DD.jpeg

Broadcom...
https://docs.broadcom.com/doc/ASMW-FWG0-Nxxx6-DS

ECE75C58-4E27-4AE7-87CE-5F90D84BC985.jpeg
 

dl324

Joined Mar 30, 2015
18,376
I have purchased a bunch of 4017s, 4081s, and 555s. From China. I am sure they are a TI knockoff - Hong Kong Fooey brand. The TI emblem is printed on them.
With so much counterfeiting going on, I buy very few loose semiconductors that ship from China.

You can look for the giveaways that the product is counterfeit. The top, bottom, and sides of the package should have the same color and texture because they're molded. Look closely at the markings and logo, particularly the logo. It helps if you have an authentic part to compare with. Look at the shoulders of the leads. If there's any pitting, that's a sign that they've been sandblasted (that's how they remove existing markings from the package). They may also try to freshen the leads by dipping them in solder.

If your parts are all TI, I can post pictures. I know I have TI CD4017 and NE555 from reputable sources. I don't recall if I have any TI CD4081; when I bought most my stock in the 70's and 80's, RCA and Motorola were more common than TI.
 

MisterBill2

Joined Jan 23, 2018
27,679
Looking at those curves in post #74 the very first thing I see is that they are for a totally different class of LED. The standard LEDs driven by a 4017 at just a few Ma versus others that work well at 60 Ma and can live with 300Ma.
And as far as linearity goes, keep in mind that they ARE DIODES, which by definition are non-linear.
And even those high power devices emit a detectable amount of light at low currents. Not a USEFUL amount, but a small amount. And as soon as you get to making a few flash brighter, the connections go back to parallel and suddenly the wiring becomes more like a fat rope than anything else. so one possible partial fix is running the array from a 15 or even 4 volt supply and using series strings of 5 or 8 LEDs in series to flash. And then, with the series resistor in the negative side of the string, the bright blink can be provided by a conveniently connected NPN transistor momentarily bypassing the series resistor. The added benefit is that the flag pixels get bigger and will look better. And the number of wires, resistors, and controllers will become more reasonable. Also, the flashing will get much simpler and the drivers more reasonable.
 

BobaMosfet

Joined Jul 1, 2009
2,211
Hi folks. I just joined. Got an auto-message from an Admin called jrap. I replied. One day I'll figure out how this site works. I am the novice of novices. I know a whole lot of little stuff. Enough to probably toast any component I touch. Ah well. My ambitions are not broad. I just want to mess around with LEDs and do some PCB design (if I can ever learn one of the three programs I found), some designing of LED circuits and some soldering. Fun stuff. Keeps an old man busy barring any heart aggravation. That is a long story. Hey, I'm still alive. God sustains me. He has to be. I'd have checked out 15 years ago if He were not looking out for me. Eight heart attacks (arguably) and still ticking. :)

Thanks for having me and probably for putting up with me in the future. There is so much I don't know about this stuff. It seems to be an expensive hobby. I have only toasted one red 5mm LED and one Trimpot. The little blue ones made by Bourn. 3362P is the number molded into it.

Y'all take care.
Title: Understanding Basic Electronics, 1st Ed.
Publisher: The American Radio Relay League
ISBN: 0-87259-398-3
 

dl324

Joined Mar 30, 2015
18,376
I have purchased a bunch of 4017s, 4081s, and 555s. From China. I am sure they are a TI knockoff - Hong Kong Fooey brand. The TI emblem is printed on them.
1644514254431.png
The 555 was purchased about 40 years ago. If it was a more recent purchase, I'd be concerned about the quality of the lettering in the location.

Note that the 'i' in the logo is sometimes the shape of a boy.

I have this. I am going to build my circuits to test them on it. Do you suppose I will be able to take trustworthy measurements?
Power distribution would be neater if you used some solid #22 wires, cut them to length, and laid them flat on the boards. You could also change the arrangement of the boards to 3x2 instead of 6x1 so you might have the option of having shorter wires to connect between boards.

Are you certain that the power rails on the boards are split in the middle? I have some boards like yours that have continuous power rails and some that don't. If they are split, a small staple shaped piece of #22 wire, or component lead, would make neater jumpers.
 
Last edited:

Thread Starter

William A Rose

Joined Feb 5, 2022
45
View attachment 260314
The 555 was purchased about 40 years ago. If it was a more recent purchase, I'd be concerned about the quality of the lettering in the location.

Note that the 'i' in the logo is sometimes the shape of a boy.

Power distribution would be neater if you used some solid #22 wires, cut them to length, and laid them flat on the boards. You could also change the arrangement of the boards to 3x2 instead of 6x1 so you might have the option of having shorter wires to connect between boards.

Are you certain that the power rails on the boards are split in the middle? I have some boards like yours that have continuous power rails and some that don't. If they are split, a small staple shaped piece of #22 wire, or component lead, would make neater jumpers.
I have some 20 AWG wires coming. I am not sure what the gauge of those wires that I do have is. I ordered solid 20 AWG - not stranded.

The power rails are split, hence the need for the jumpers. I peeled the backing off to see how those boards "tick".

I may very well change the orientation of the boards. Thanks for that suggestion. It hadn't crossed my mind.

Best regards,

Bill
 
Top