PWM....what is this?

Robocop

Moderator, *Mammoth Killer*
Joined
Nov 13, 2003
Messages
2,594
Location
Birmingham Al.
After reading about the new LOP-SE I found many who did not care for the lower levels using PWM.....I searched trying to figure out exactly what this is and did not find much. I do gather it is a method for obtaining lower levels of output from a luxeon however do not understand how it works or why it is better or worse than other methods such as a simple resistor.

Can anyone give me a basic explanation of what PWM is and how it works and even better what are the good and bad points of using PWM for lower levels ?....Thanks
 

D MacAlpine

Newly Enlightened
Joined
Nov 10, 2005
Messages
167
Location
London (UK)
A quick reply from someone not particularly well versed in electronics;


As I understand it Pulse Width Modulation (PWM) works by sending rapid pulses of power to the light source at normal voltage/current. It produces dimming by reducing the amount of time that power is supplied.
PWM works for incandescent lamps and LEDs. Apparently it is the best way to dim an incan because it runs the lamp at spec, improving efficiency over underdriving it.
With incandescents I don't think that you would notice the pulses because of the time taken for the filament to cool. LEDs switch on and off so quickly that a flickering effect can sometimes be observed if the light is waved around rapidly (or on video recordings). This would become more pronounced the more dimming you applied.

The disadvantage is thus the flickering on an LED light.
The advantage is efficiency - if you just use a resistor it eats up some current. "Driver" boards that vary the current to the LED electronically would address these problems, possibly at the expense of increased complexity.

I hope that helps a bit. I'm sure someone more knowledgable will correct any mistakes that I've made.
 
Last edited:

Bertrik

Newly Enlightened
Joined
Aug 3, 2005
Messages
102
Location
Netherlands
The basic idea of PWM is to shape the current through the LED as a repeating waveform which is full ON for some time and full OFF for some other time. The ratio of the ON-time vs. the (ON+OFF) time determines relative brightness. There's a very good article of wikipedia about PWM:
http://en.wikipedia.org/wiki/Pulse-width_modulation

Advantages:
* Drive electronics can be more efficient

Disadvantages of PWM:
* a LED is usually more efficient at lower currents, so a LED fed with PWM of 50% duty cycle and 1.0A current is not as bright as a LED fed with 0.5A DC.
* if the PWM frequency is too low, you see a flicker
 

chevrofreak

Flashlight Enthusiast
Joined
May 10, 2004
Messages
2,543
Location
Billings, Montana, USA
Pulse Width Modulation

The LED is flashed/pulsed at a high frequency to give the illusion of dimming. Above a certain flash rate (hertz) the human eye can't see it, though many lights use a slower and more electrically efficient pulse rate that is actually somewhat visible.

The cons are that it usually isn't regulated, the output still follows the discharge curve of the cell, as well as the pulses being visible when the light or your target are moving.

The pro's are that it is inexpensive, which means a cheaper flashlight for the consumer.
 

chevrofreak

Flashlight Enthusiast
Joined
May 10, 2004
Messages
2,543
Location
Billings, Montana, USA
Well it looks like we were all replying at about the same time
tongue.gif
 

Robocop

Moderator, *Mammoth Killer*
Joined
Nov 13, 2003
Messages
2,594
Location
Birmingham Al.
So if I understand correct does a slower flash rate equal more runtime? And also I have read that it is the turning on and off of an incandescent that kills the bulb faster. If this is true would not PWM be a bad thing for an incandescent?
 

Amadeus93

Newly Enlightened
Joined
Nov 3, 2005
Messages
114
Location
Massachusetts
Has anyone documented the flash rates of different PWM-enabled flashlights? Also, xochi recently posted this about the HDS flashlights, which I don't understand:
Comparing the HDS and the LOPSE, the timing light effect of the LOPSE isn't visible with the HDS. It should be kept in mind that this is likely due, at least partly, to the fact that the pulses of the HDS rise and fall on each pulse so that the pulses 'blur' together. In terms of sophistication, the HDS is still way out there and I think that a better comparison of two lights using the PWM dimming strategy would be the LOPSE and Lioncub/Heart.
 

D MacAlpine

Newly Enlightened
Joined
Nov 10, 2005
Messages
167
Location
London (UK)
Robocop said:
So if I understand correct does a slower flash rate equal more runtime? And also I have read that it is the turning on and off of an incandescent that kills the bulb faster. If this is true would not PWM be a bad thing for an incandescent?

Yes to the first question, but I think that the pulses are kept pretty rapid and short so that you don't notice them.

As for incandescents, take a look at this for a much better explanation than I can give.
 

tebore

Flashlight Enthusiast
Joined
May 10, 2006
Messages
2,141
Location
Toronto, Ontario. CAN.
PWM controlled LEDs are more prone to flicker than a incan because Incans have a period of time where the filament is still hot enough to provide light while 0 current is being provided. However LEDs have extremely fast (relatively) "on/off" times, because they don't need to heat up and cool down to generate light.

PWM control is way better than using a resistor because the power you don't need going to the LED isn't wasted as heat it (in ultra simplified terms) it just isn't provided.

In the simpliest terms a PWM is a really fast on off swtich that allows you to control current.
 

Don_Redondo

Newly Enlightened
Joined
Aug 24, 2005
Messages
48
It's true that LEDs generally switch faster than incandescent bulbs but in most, if not all, white LEDs, the light is coming from a secondary phosphor source and there is some persistence in the phosphor emission that would be similar to the cooling off period of an incandescent filament. With so much development going into faster or less persistent phosphors for applications like high refresh computer monitors, I wonder if the LED manufacturers are just taking what's new and not considering applications that could benefit from other phosphor types. A slow, or more persistent, phosphor could significantly minimize the PWM flashing effect. Just a thought. I wonder if anyone's done any analysis on different white LEDs to determine which ones might be better for PWM dimming.
 

Bertrik

Newly Enlightened
Joined
Aug 3, 2005
Messages
102
Location
Netherlands
I have limited practical experience with PWM but I think that a slower flash rate will not give a much higher runtime. There may be a slight effect due to switching losses, but at several kHz or so I cannot imagine that the switching loss already plays a significant role (some switching power supplies go up into the MHz range!). The most important factor that determines the runtime is the duty cycle, e.g. a light at 25% duty cycle should have an approximate 4 times longer runtime than a light at 100% duty cycle.
 

Kram

Newly Enlightened
Joined
Jan 21, 2003
Messages
86
Location
Texas
Just to weigh in on this, most of the "flickering" people complain about is only visible when the source (i.e., the light) is moving relative to the observer. Then you can see that the LED is on part of the time and off at other times. The PWM method can be a much more efficient way to control an LED's apparent intensity than a resistor. Most of the PWM schemes now in use operate at frequencies that are not that terribly high above the threshold of your eye's persistence.

Interestingly, most of the circuits used for single cell lights boost the voltage by building up a magnetic field in a coil and a charge in a capacitor and then discharging it through the LED. But if you use an oscilloscope to look at the voltage, it is actually a train of pulses. Generally, though, the frequency using this method is much higher than that normally associated with PWM control, so you can't really see it no matter how fast you move the light.

Mark
 

NewBie

*Retired*
Joined
Feb 18, 2004
Messages
4,944
Location
Oregon- United States of America
D MacAlpine said:
PWM works for incandescent lamps and LEDs. Apparently it is the best way to dim an incan because it runs the lamp at spec, improving efficiency over underdriving it.

PWM is the worst possible way to get efficiency out of the LED.

Actual measurements:

bw1140_2.png



Improvement in LED efficiency by dimming using constant current vs. PWM:

bw1140_3.png



If you'd like the numbers:

bw1140v.png




Kram said:
Just to weigh in on this, most of the "flickering" people complain about is only visible when the source (i.e., the light) is moving relative to the observer. Then you can see that the LED is on part of the time and off at other times. The PWM method can be a much more efficient way to control an LED's apparent intensity than a resistor. Most of the PWM schemes now in use operate at frequencies that are not that terribly high above the threshold of your eye's persistence.

Interestingly, most of the circuits used for single cell lights boost the voltage by building up a magnetic field in a coil and a charge in a capacitor and then discharging it through the LED. But if you use an oscilloscope to look at the voltage, it is actually a train of pulses. Generally, though, the frequency using this method is much higher than that normally associated with PWM control, so you can't really see it no matter how fast you move the light.

Mark


On your first point, my eyes are faster than a lot of folks, and when I am hiking at night, many of the PWM lights actually bother me.

On your second point, that is a falacy, and is very wrong. Some companies use too small of a capacitor, and there is ripple in the waveform, but it doesn't actually turn off. There is a design I saw where they skipped the capacitor entirely, and it isn't a regulated supply anymore, but more of a modified PWM.

An example is the MagLite LED. Zero volts is the black line at the bottom of the screen, and every solid line going up the screen is 0.5 Volts. As you can see, there is ripple in the waveform, but it doesn't actually shut off:
mag2cled.jpg


I've got the actual light output waveform somewhere but I can't find it at the moment.

Other switchers have adequate capacitance, and have 0.002 Volts of ripple, and 0.05 Volts that are narrow spikes when it switches. As I recall, the voltage at the time was 4 volts, and the current was 1 Amp. The amount of DC ripple works out to 0.05% if you ignore the narrow spikes, and even the narrow spikes are only 1% of the voltage.

ripplew.jpg



.
Bertrik said:
I have limited practical experience with PWM but I think that a slower flash rate will not give a much higher runtime. There may be a slight effect due to switching losses, but at several kHz or so I cannot imagine that the switching loss already plays a significant role (some switching power supplies go up into the MHz range!). The most important factor that determines the runtime is the duty cycle, e.g. a light at 25% duty cycle should have an approximate 4 times longer runtime than a light at 100% duty cycle.

If a switching supply is designed well, to keep it's losses under 5% (and 2% is practical), there is another factor that plays a big role.

Batteries have resistance in them, and losses occur due to the resistance in the cell.

This is a Current^2 * Resistance loss factor.

With a PWM, you are hitting the battery with the full load current. Which a switcher, you are reducing the load current on the cell, especially if an adequate capacitor is used at the input of the switcher. This capacitor, and the inductor cause a lower continous load current on the battery.

This reduces the losses in the battery by a Current^2 factor. There is an old post I did back in 2004 here, where I covered this in more detail, and it adds up.


So, you have a reduction of losses in the LED, which can be up to 228% more efficient than PWM at 2% PWM duty cycles, as compared to a constant current power supply (such as a linear or switcher).

Add on to that, the reduction of losses in the battery, due to using a switching power supply, and your gain can be very substantial.

Furthermore, folks often forget that a Luxeon has roughly 700pf of die (the part that makes the light) capacitance, combined with the ESD diode that is under the die. When just using PWM only, there are losses at the time the PWM "switch" is thrown, which amount to 50% of the power required to charge up that 700pf capacitor.

The loss here, is about the same loss on the gate drive, to drive the upper and lower MOSFETs in a switching power supply, example part:
http://www.fairchildsemi.com/ds/FD/FDN335N.pdf
 
Last edited:

cave dave

Flashlight Enthusiast
Joined
Aug 15, 2001
Messages
3,764
Location
VA
Not all PWM is equal.

Below is a photo of two lights moving across the frame.
The top is L0PSE on low and the bottom is HDS EDC on 2.5 lumens setting.
4bxsnpt.jpg


The HDS does use PWM but as you can see it is not noticable.

Not everbody seems to percieve PWM the same way. I can detect the PWM of the L0P anytime anything moves. If I move just my eyes or head where I am looking I can see the PWM in the light. If something in the field of view moves I can see the PWM on that too. The only time I can't detect the PWM is if I am white wall hunting and just staring at the beam, but anytime I am actually using the light its noticable in both the low and med setting. Perhaps I am weird. I was once at a coworkers desk and asked her how she could stand her monitor strobing like that. She had no idea what I was talking about. (On the other hand she does suffer from migranes, I don't but would if I had to use her monitor)
 

Oracle

Newly Enlightened
Joined
May 17, 2006
Messages
68
"Good" PWM should be at least 10-50kHz. You won't see any flicker with good PWM. If something at 50kHz is moving 60mph, it will flash every 0.5mm (about 1/50th on an inch). Obviously even slower moving and the flashes will be closer together.

I use PWM on LEDs all the time in various projects and never see flicker.
 

rgbphil

Enlightened
Joined
Feb 3, 2005
Messages
210
Location
Sydney, Australia
Nice description on PWM v efficiency there Newbie.

Probably for torches, it would be best to diddle with the current limiter cct to improve battery life.

However for other LED apps, it should be noted the wonderful linear graph that the PWM method of brightness control gives.

For colour mixing apps, having a linear response makes life a lot simpler as you don't need to compensate a non linear response computationaly, as well as having to calibrate for difference current/brightness responses of different LEDs.

EG for the same LED, a 50% PWM gives about half brightness.....nice and simple. However a 50% current limiter gives about 66% brightness (hence the efficiency results). If you wanted 50% brightness you'd need to know exactly how that particular LED responds and dial up that current.

Phil

PS: Given the level of your technical responses....perhaps a name change from Newbie to 'Oldbie'.....or maybe 'Obe Wan'??
 
Top