What is the best method to dim my LED bulb?

Thread Starter

organic.parfait

Joined Oct 12, 2023
6
I think the 555 circuit is a lot simpler and cheaper. Try that first and see if it does what you want.
Hey just wanted to say thanks, I’ve used a module with a 555 chip and the dimming is working perfectly. Next step is to filter the supply because it’s a bit noisy for sure. Would I put the capacitor across the battery terminals, or across the output terminals on the tp4056 board?
 

BobTPH

Joined Jun 5, 2013
11,615
PWM, (Pulse Width Modulation) is simple if you ignore the resistors
Okay. Let’s take an ideal LED with a forward voltage of 3.0V at 100mA. We apply 3.0V and it draws 100 mA, using 300 mW of power.

Now let’s dim it at 50% duty cycle. I now uses 300 mW half the time and 0 the other half. So the average power is 150 mW.

Now, instead, let’s dim it instead by inserting a resistor that cuts the current to 50 mA. The power is now 50 mA x 3.0V = 150 mW.

Intuitively, this seems wrong, but the math is irrefutable. Use a higher voltage and a resistor and the math is no different.

In an actual LED, the efficiency goes down with higher current, so, in terms of light output, the lower current version puts out more light than the full current 50% PWM one at the same power, so it is actually more efficient to use the resistor.
 

MisterBill2

Joined Jan 23, 2018
27,998
The math described in post #22 would be correct IF the target was generating heat. But if the intended output, LIGHT, is measured then the efficiency changes. Recall that efficiency= 100 x (useful power out)/ ( Total power in.)
Using 100 x total power out/total power in) would always yield 100% efficiency, which we know is incorrect.
 

BobTPH

Joined Jun 5, 2013
11,615
Did you read my last paragraph? An LED puts out LESS light per unit of current as the current goes up. So an LED at 100mA puts out less than twice the light as it does at 50mA.
 

MisterBill2

Joined Jan 23, 2018
27,998
Did you read my last paragraph? An LED puts out LESS light per unit of current as the current goes up. So an LED at 100mA puts out less than twice the light as it does at 50mA.
I was not addressing that aspect at all. I WAS commenting on the claim of no change in efficiency when a resistor is used for dimming. That was to refute the assertion that there was no difference in efficiency between PWM dimming and resistor dimming. The curve for some LED varieties has an even greater tendency to flatten out at higher current values, which is quite reasonable, considering the physics of the light emitting process.
 

BobTPH

Joined Jun 5, 2013
11,615
I was not addressing that aspect at all. I WAS commenting on the claim of no change in efficiency when a resistor is used for dimming. That was to refute the assertion that there was no difference in efficienc
You have done nothing to refute it. All you have done is claimed that half current produces less light output than 50% PWM. But you give us nothing to support that assertion. I have given evidence that it is actually the opposite.
 

MrAl

Joined Jun 17, 2014
13,764
Did you read my last paragraph? An LED puts out LESS light per unit of current as the current goes up. So an LED at 100mA puts out less than twice the light as it does at 50mA.
Hello there,

That's not quite right. It could be true i guess for one particular LED, but in general it is not quite that bad.
For example, in the plot you show we see 100 percent at about 350ma, while at 700ma we see about 175 percent which is about 7/8 of twice, not really twice as 200 percent would be twice.
 

MrAl

Joined Jun 17, 2014
13,764
I was showing that efficiency of an LED system must compare power in with light out, rather then with heat output.
Hi,

The efficacy is really what it sounds like you are talking about, but that's the same as what was being explained.

For an experiment, take a 20ma white LED and use a resistor to get it to 10ma. Take an identical LED and use the same value resistor to get 10ma.
Shine them both at a good white ceiling or wall, verify they are the same brightness. You could use a white candle as a light meter to do this which is better.
Now, take the second LED and using a resistor of 1/2 the value of the previous resistors and PWM at 50 percent duty cycle, verify that the average current is 10ma, then shine the first LED with just the resistor and the PWM LED at the same ceiling (or better, use a white candle as a comparative light meter) and the PWM LED will be a bit dimmer than the LED with just the resistor.
The average current in both will be the same, but the brightness of the PWM LED will be slightly dimmer. That's because the efficacy becomes lower with higher current.
There may be times when it is hard to tell though by eye.
 

dendad

Joined Feb 20, 2016
4,641
I reckon an easy way to look at it is work out the dissipation of the series resistor for various power levels and if it goes over maybe 1 watt, (pick your number) the use PWM, otherwise series resistors would be ok.
Most times if I want variable LED brightness, I would use PWM anyway.
 

MrAl

Joined Jun 17, 2014
13,764
I reckon an easy way to look at it is work out the dissipation of the series resistor for various power levels and if it goes over maybe 1 watt, (pick your number) the use PWM, otherwise series resistors would be ok.
Most times if I want variable LED brightness, I would use PWM anyway.
Hi,

Yes, regardless of the slight dimming or not, it's usually better to use PWM if you really need to dim the LED because otherwise it would require a variable power resistor. They do make them though, with a variable tap you can slide to the resistance value you need.
 

BobTPH

Joined Jun 5, 2013
11,615
Hello there,

That's not quite right. It could be true i guess for one particular LED, but in general it is not quite that bad.
For example, in the plot you show we see 100 percent at about 350ma, while at 700ma we see about 175 percent which is about 7/8 of twice, not really twice as 200 percent would be twice.
What is not right? I am sure every LED is different, I just picked the first such graph I found. Maybe it is typical, maybe not. But the trend is always downward, lower efficiency at higher current.
 
Last edited:

BobTPH

Joined Jun 5, 2013
11,615
Now, take the second LED and using a resistor of 1/2 the value of the previous resistors and PWM at 50 percent duty cycle, verify that the average current is 10ma
It will not. Cutting the resistor in half will not double the current unless the Vf of the LED is 0V.
 

k1ng 1337

Joined Sep 11, 2020
1,038
To settle this debate, how does the beginner hobbyist determine relative brightness of an LED?

As for the voltage and current through an LED, I wrote a program able to sample current though a shunt resistor in response to a rising supply voltage. I use the Python library Matplotlib to graph the transfer characteristics. This is great but does not answer the question.. how do I correlate the I-V response to brightness?
 

dendad

Joined Feb 20, 2016
4,641
I actually think the relative brightness is pretty irrelevant. I am not concerned with it in an LED that is fading up and down. It seems to me this thread has got of onto a tangent.
 

k1ng 1337

Joined Sep 11, 2020
1,038
I actually think the relative brightness is pretty irrelevant. I am not concerned with it in an LED that is fading up and down. It seems to me this thread has got of onto a tangent.
I agree this thread has seen better days but I think relative brightness is the quantity of interest for the hobbyist. Why do you say it is irrelevant?
 

dendad

Joined Feb 20, 2016
4,641
Irrelevant just for this original question. I for one have never needed to worry about it. Maybe it would be of importance if you were trying to make some sort of instrumentation, but to just vary the brightness of an LED for indicator, or for some illumination, it does not matter much. You are only talking about a few % difference and most times that would not be detectable by eye anyway. The thread starter has not commented for some time so I think his original question had been answered.
 
Top