# Help me clear my confusion: LED PWM vs variable resistor

#### robotDR

Joined Mar 17, 2020
54
Is one more efficient than the other?

If I have 27V at the top of the string of 9 LED with Vf of 2.7V (Vf total is 24.3) and a 41 ohm resistor:

27V-24.3V = 2.7V across the resistor

2.7V across a 41 ohm resistor is ~0.06585A

0.06585 * 0.06585 * 41 = 0.1778 W dissipated power

If I want half the brightness, I can double the resistor to 82 ohm

2.7V across a 82 ohm resistor is ~0.03292A

0.03292 * 0.03292 * 82 = 0.0888W dissipated power

0.0888W/0.1778W = 50% so at half brightness, there is half the dissipated power.

If I were to pwm this instead of using a variable resistor, how would it be more efficient?

#### MrSalts

Joined Apr 2, 2020
1,832
The variable resistor lowers the power to the LED by generating heat. The variable resistor simply wastes energy. Amps through the resistor x voltage dropped by the resistor.

PWM simply turns off for some time and on for some time to create an LED that looks less bright. Nothing gets hot, no wasted power.

• robotDR

#### dl324

Joined Mar 30, 2015
14,689
If I were to pwm this instead of using a variable resistor, how would it be more efficient?
I don't think it's simply a matter of efficiency.

The light output from an LED isn't linear with current. Using PWM would give you more control over brightness. If you PWM with a duty cycle of 50%, you will get half the brightness of a LED that's on constantly; at the same current. Whether the human eye would register it at half brightness is another matter because the eye responds to light logarithmically.

• robotDR

#### Jon Chandler

Joined Jun 12, 2008
252
Whether the human eye would register it at half brightness is another matter because the eye responds to light logarithmically.
I did some experiments on this recently. Comparing 100% on to 50% PWM, there was no visible change in intensity. Going down to 10%, the LED looked about half as bright.

• robotDR

#### robotDR

Joined Mar 17, 2020
54
The variable resistor lowers the power to the LED by generating heat. The variable resistor simply wastes energy. Amps through the resistor x voltage dropped by the resistor.

PWM simply turns off for some time and on for some time to create an LED that looks less bright. Nothing gets hot, no wasted power.
Ok so half the current through the 41 ohm resistor would be 0.033 * 0.033 * 41 = 0.045W dissipated as opposed to the 0.088W disipated by using a 2x resistance.

Is that right? Because you still need a resistor even with PWM to limit against the max current of your devices.

#### MrSalts

Joined Apr 2, 2020
1,832
Whether the human eye would register it at half brightness is another matter because the eye responds to light logarithmically.
Your claim means ln(apparent intensity) would a straight line when plotted against luminous intensity. Not even close. Not a straight line when on a log/log scale.

#### MrSalts

Joined Apr 2, 2020
1,832
Ok so half the current through the 41 ohm resistor would be 0.033 * 0.033 * 41 = 0.045W dissipated as opposed to the 0.088W disipated by using a 2x resistance.

Is that right? Because you still need a resistor even with PWM to limit against the max current of your devices.
What is the goal of your project? And what answer do you want? There isn't a completely wrong answer, there are just answers that optimize different goals.

#### crutschow

Joined Mar 14, 2008
30,103
PWM simply turns off for some time and on for some time to create an LED that looks less bright. Nothing gets hot, no wasted power.
Unless you use an inductor to limit the current with PWM, you still need a resistor to limit the current, so there is no difference in efficiency between changing the resistor value and changing the PWM duty-cycle for the same average current.
For example, 10mA through 100Ω at 100% duty cycle generates the same power as 20mA through 50Ω at a 50% duty-cycle.

#### robotDR

Joined Mar 17, 2020
54
Unless you use an inductor to limit the current with PWM, you still need a resistor to limit the current, so there is no difference in efficiency between changing the resistor value and changing the PWM duty-cycle for the same average current.
For example, 10mA through 100Ω at 100% duty cycle generates the same power as 20mA through 50Ω at a 50% duty-cycle.
But what if my fixed resistor is 41 ohm. at full current 0.066A, that is 0.178W dissipated power.
Halving the current with 2x resistor 82ohm at 0.033A that is 0.089W dissipated power

Back to 41 ohm but halving the current with 50% duty cycle, that is 0.033A and 0.0446W dissipated power.

#### robotDR

Joined Mar 17, 2020
54
What is the goal of your project? And what answer do you want? There isn't a completely wrong answer, there are just answers that optimize different goals.
I want to spec out running time of pwm led vs variable resistor. Currently there is a pot to dim the LED and I want to figure out if running time will be different with PWM (by a significant amount and if so, how much).

I guess I'm discovering also that brightness might not be a linear scale with duty cycle which would change my approach.

#### MrSalts

Joined Apr 2, 2020
1,832
I did some experiments on this recently. Comparing 100% on to 50% PWM, there was no visible change in intensity. Going down to 10%, the LED looked about half as bright.
We're you looking at the LEDs or looking at a surface the LEDs were illuminating.

#### crutschow

Joined Mar 14, 2008
30,103
Back to 41 ohm but halving the current with 50% duty cycle, that is 0.033A and 0.0446W dissipated power.
Not correct, since you can't average the current when calculating power in a resistance (since power is proportional to the square of the current).

The resistors dissipates 0.178W power when on and zero power when off.
That gives 0.178W / 2 = .089W average power for a 50% duty cycle, the same as the 82Ω resistor at 100% duty cycle.

• robotDR

#### robotDR

Joined Mar 17, 2020
54
Not correct, since you can't average the current when calculating power in a resistance (since power is proportional to the square of the current).

The resistors dissipates 0.178W power when on and zero power when off.
That gives 0.178W / 2 = .089W average power for a 50% duty cycle, the same as the 82Ω resistor at 100% duty cycle.
Ok great point.

So is it more efficient at all? and if so, is it because brightness vs duty cycle is not linear meaning you may have 65% brightness at 50% duty cycle?

#### crutschow

Joined Mar 14, 2008
30,103
So is it more efficient at all? and if so, is it because brightness vs duty cycle is not linear meaning you may have 65% brightness at 50% duty cycle?
You'd have to look at the LED light output versus current specification to see.

• robotDR

#### robotDR

Joined Mar 17, 2020
54
You'd have to look at the LED light output versus current specification to see.
Ok thank you for your time.

#### crutschow

Joined Mar 14, 2008
30,103
As an addendum to your question, the LED output versus current is usually quite linear at low currents and drops off slightly at higher currents so, based upon that, a PWM signal would not give more output at the same average current as a DC current, and may output a little less.

• robotDR

#### MrAl

Joined Jun 17, 2014
9,158
The variable resistor lowers the power to the LED by generating heat. The variable resistor simply wastes energy. Amps through the resistor x voltage dropped by the resistor.

PWM simply turns off for some time and on for some time to create an LED that looks less bright. Nothing gets hot, no wasted power.
Hi there,

Actually the only time you can increase efficiency is when you have a 'true' power conversion. PWM does not my itself achieve this goal. That means that if you use a resistor to dim the LED or you use PWM (alone) to dim the LED, the same power is wasted. This seems counterintuitive but intuition hardly ever rules the day.

I'll elaborate in my next post.

#### MrAl

Joined Jun 17, 2014
9,158
Is one more efficient than the other?

If I have 27V at the top of the string of 9 LED with Vf of 2.7V (Vf total is 24.3) and a 41 ohm resistor:

27V-24.3V = 2.7V across the resistor

2.7V across a 41 ohm resistor is ~0.06585A

0.06585 * 0.06585 * 41 = 0.1778 W dissipated power

If I want half the brightness, I can double the resistor to 82 ohm

2.7V across a 82 ohm resistor is ~0.03292A

0.03292 * 0.03292 * 82 = 0.0888W dissipated power

0.0888W/0.1778W = 50% so at half brightness, there is half the dissipated power.

If I were to pwm this instead of using a variable resistor, how would it be more efficient?
Hello there,

The short story is "NO".

PWM alone does not increase efficiency. To increase efficiency you need a true power conversion. There are a couple ways to look at this.

The first and simplest comes from sampling theory. When you have a PWM switch in series with a resistor with value R, the average resistance is
Requivalent=R/D. This average resistor value (Requiv) dissipates power the same as a regular fixed resistor (but of course it is all in the fixed resistor)
where D is the duty cycle expressed as a fraction (50 percent duty cycle is 0.50).
So a few quick examples with R=100 Ohms...
D=0.75, Requiv=100/0.75=133.3333 Ohms
D=0.50, Requiv=100/0.50=200 Ohms
D=0.20, Requiv=100/0.20=500 Ohms
What this means is that if you use a 100 Ohm resistor in series and then add a 400 Ohm resistor in series and the current is 0.02 amps, then the power in the two resistors is 200 milliwatts. If you use a 100 Ohm resistor in series and then add a switch with duty cycle 20 percent, then the equivalent resistance is 500 Ohms so if you have the same 20ma current the power is still 200mw.

The second explanation is based on the power in the 100 Ohm resistor, because that is really where all the power is dissipated when using PWM.
If you have a resistor with value 100 Ohms in order to reduce the average current you have to use PWM if you want to use another resistor.
Now if we wanted to cut the current to 1/2 of the max value, we need to cut the current by 1/2 also. If we PWM at 50 percent then the switch is on for only 1/2 of the total time period. When the max current is 20ma to get 10ma we have to turn teh switch on for 1/2 the time, but during that time the current will be 20ma not 10ma. so the 100 Ohm resistor will see 20ma through it for 1/2 the time.
20ma through 100 Ohms when constantly 'on' causes a power dissipation of 200mw as before, but because it is only really on for 1/2 the time that power is cut to 100mw.
Comparing with 100 Ohms in series with another 100 Ohms resistor, we see we have 200 Ohms with 10ma, and that power is still 200mw.

So in both cases we see the same power dissipated.

CAVEATS
The secondary effects play a part in this too. The efficiency of the LED drops as the current is increased and it does not matter how long the LED is turned on for the efficiency still drops with increased current. This means that if we run the switch at 50 percent duty cycle we will see 2 times the current during the 'on' time than we would see with a second resistor in series. This means the brightness is not quite 1/2 of full brightness as it would be with a second resistor. The difference is usually small though, except maybe with low duty cycles where we could see a 10 percent decrease in brightness over a second resistors solution. Still, 10 percent difference is usually hard to detect unless you have a reference lamp you can compare it to, so the decrease probably isnt significant except maybe in special scientific experiments that need a particular brightness level.

OTHER SOLUTIONS
The ultimate solution is to incorporate true power conversion.
In the above we see that the 'on' current is twice what the average current is for a 50 percent duty cycle, and that reduced the current. But that only reduced the current alone not the voltage.
In true power conversion both the current and the voltage would be reduced, thus the actual power dissipated is reduced. With a 100 percent efficient true power converter we would not see 200mw dissipation we would only see 100mw, and what is more is that the LED would be operated at a higher efficiency than the PWM solution alone.
There is a secondary effect here too though. That is, converters are never 100 percent efficient, so if we loose 10 percent there then we would see roughly 110mw rather than 100ma dissipation.
To get true power conversion you need to have an energy storage element in the circuit that stores energy during the 'off' times. This usually means an inductor would be incorporated into the circuit.

So that's almost the whole story. There are also other effects but they are usually not too significant until you get into femtosecond pulsing or something like that.

FINAL THOUGHT
One advantage PWM alone has over a potentiometer is that you dont need a potentiometer that has to handle the full power when dimming. If you need manual adjustment with a pot then you can use a lower power rated pot. This can make a huge difference in the cost.
Also, you can use other means to control the PWM such as with a microcontroller. This is very common these days.

Last edited:
• robotDR

Joined May 26, 2022
14
I always thought that if in terms of efficiency and if ever both methods have the same current draw, at least "all the energy" is being used to the load while the other, potentiometer, is wasting some of the energy through heat generated, if transforming electricity to heat is undesirable to your design, that is.

#### crutschow

Joined Mar 14, 2008
30,103
I always thought that if in terms of efficiency and if ever both methods have the same current draw, at least "all the energy" is being used to the load while the other, potentiometer, is wasting some of the energy through heat generated,
As explained in the previous posts, both methods have the same efficiency (same amount energy to the load and same amount of wasted energy) unless an inductor is used with the PWM method.