PWM - What is it, How does it work and how to detect it.

Cataract

Flashlight Enthusiast
Joined
Apr 24, 2009
Messages
4,095
Location
Montreal
PWM is very often misunderstood or simply an unknown thing for most newbies and some older CPFers and I would like to offer the simplest explanation of what it is, how to detect it and why it is not such a good thing after all. I will do my best to avoid advanced explanations of what is the difference between voltage and current, as there are plenty of resources to learn about that, and it is definitely not a pre-requisite to understand what I'm about to reveal.


FIRST OFF : The basics of lighting a L.E.D.

-L.E.D stands for Light Emitting Diode. A diode is a basic component of electronics that will allow current to flow in only one direction: form positive pole (or lead) to the negative pole of your battery.

-LED's need a specific voltage to work properly. Originally, LED's could only give off a fixed amount of light because the circuits controlling them would only give a fixed amount of volts, which translated in a fixed amount of current.

-There are two ways to control –that is lessen- a LED's light output: limit the current going through the LED with sophisticated circuitry, or use PWM. Current limitation is a lot more complex and more expensive mostly because the circuit has to be designed according to the specific LED's characteristics, in accord with the type of battery being used.


PWM for Dummies

-PWM stands for Pulse Width Modulation.

-Rather than limiting or controlling the voltage or current going through your LED, the voltage is fixed. When the full DC (Direct Current) voltage is sent through the LED, it will emit the maximum of light it can (basically the same as connecting directly to a fully charged battery)

-In order to allow for lower modes, this current will be transformed in a high frequency current that can allow for less total "potential" (read current) to be sent through the LED. Let's use graphics:

Direct Current (basically, the constant voltage a normal battery will give off. I ignore the normal discharge curve for this example and let's imagine our battery has unlimited charge):

12e_146ead_1b25e52_oJ.jpg.thumb


With such an input, it is obvious that our LED will emit a fixed amount of light. Now, if we introduce PWM:

12f_146eac_4fbe8cf6_oJ.jpg.thumb


As you can see, we have now changed our constant voltage input for a square wave. In this graphic, our voltage is on half the time and off half the time. The technical term here would be that we have a 50% duty cycle (50% of the time on.) With such an input on our LED, the amount of light given off appears diminished by 50%. The reason I say it appears, is because it gives off its maximum amount of light, but only 50% of the time, so our eyes perceive only half the amount of light (more on this in the next section).

I we wanted an even lower perceived light output, let's say 25% of the maximum, we would use a PWM input that would look like this:

130_146eab_dc7ffa_oJ.jpg.thumb

(Disclaimer: I'm stuck using Paint to draw these graphics, so it might not be 100% up to scale)

In this graphic, you can see that the voltage is on only 25% of the time, in technical terms we have a 25% duty cycle, but the voltage is still switched on at the same intervals as in the previous graphic. This basically means that we have a fixed frequency (number of times we switch the power on and off per second).

So, Pulse Width Modulation simply means that we control our light with pulses and we vary (modulate) the width of these pulses to control the amount of perceived light to less than the maximum amount the LED can give off.

How Come I Perceive Less Light And No Blinking Or Strobing??

Your eyes are a little like tiny cameras that take about 24 pictures per second. Your brain takes those images and assembles them into what we perceive as the continuous movie of our lives. If the PWM frequency was less than 24 times per second (or only slightly more), we would perceive it as a strobe, but if the light from a PWM controlled LED is switched fast enough – way more than 24 times per second – our eyes will perceive it as continuous... but there's an IF here:
Let's see through graphics what would be the main difference between a lower frequency and higher frequency PWM

LOWER FREQUENCY PWM:


12f_146eac_4fbe8cf6_oJ.jpg.thumb


HIGHER FREQUENCY PWM:

131_146eaa_3c62842_oJ.jpg.thumb



In both these graphics, the power is on half the time (50% duty cycle), but in the second graphic, the power is switched more often.

HOW DO I PERCEIVE PWM CONTROLLED LIGHTS??? HOW DOES IT AFFECT ME???

The lower frequency PWM will be more perceivable to the eyes as a fast strobe effect – remember what it looks like to dance in a club when the only lighting around are strobes? Well, imagine that strobe is even faster, to the point that motion is almost continuous...

With any frequency of PWM, if you sit still and stare at a fixed spot on the white wall across from you while pointing your favourite PWM controlled flashlight at it, you will never know the difference. With a PWM frequency that is too low for your perception (and this frequency is very likely to vary from one person to the next) you will definitely perceive a form of strobe effect; if you wave your hand fast enough in front of the light, it might look something like this:

132_146ea9_d3698b59_oJ.jpg.thumb


Count how many thumbs I appear to have. Try waving your hand in front of your camera with normal lighting and I promise you will not see repeated edges like on this photograph.

This effect can be seen with anything that moves in relation to your eyes, but that movement has to be fast enough in relation to the PWM frequency and your own perception for you to be able to perceive it. Some people see it more, some people see it less.

If you find out your favourite reading light has bad PWM effect when waving your hand in front of it, but never use it for anything else, it might still be very useful to you. If, on the other hand, whenever you read by flashlight you get a headache, it might be worth trying another light just to see if there is any relation. I know PWM can affect me in some ways and I'll get to that later (of course, it doesn't mean everyone is affected, but some applications are definitely more critical than others)


How Can I Detect PWM On Higher Frequency Lights?

AAhhhh.... I only ask this question because I found a very nice answer to this one that doesn't involve taking your light apart or expensive electronic equipment. Waving your hand in front of, let's say a Quark Mini, will not show any signs of PWM... but the Mini's ARE PWM controlled! The frequency used is simply high enough that you will not (or not likely) perceive it when using the light. So how was I able to tell that without even opening it up?

This kinda brings me to a very old stupid joke that I will botch on purpose here: Normal people cool down by waving their hand in front of their face... Niewfies wave their face in front of their hands. Well... turns out this is pretty much the best way of detecting PWM on a flashlight (WAIT! There's a twist to this... don't risk blinding yourself or getting a neck injury before reading the rest!) Rather than waving your hand in front of your light, wave your light in front of your face. NOW, PWM will be easiest to detect on you light's lowest mode (remember about duty cycle? Lower duty cycle = more space between pulses.) Second, you don't need to send the lights directly into your eyes... just hold it so you can see the light on the side of the reflector as such:

133_146ea8_afd1c9b9_oJ.jpg.thumb


Turn the lights down if necessary, so you can see the light clearly enough and now wave it sideways like this:

134_146ea7_da949891_oJ.jpg.thumb


This is a picture of a constant current light. Any of your lights on maximum current should look exactly like that.

Here's a picture of bad PWM:

135_146ea6_198b9f1_oJ.jpg.thumb

(Note: please respect your articulation's limits... if you can't see it, it might not be there)

Notice how we can see individual and separate spots of the same light's business end? And I wasn't moving very fast at all... In this case, just waving your hand or fingers in front of it will reveal the PWM even with a certain amount of ambient light.

Here is what "good" PWM looks like:

136_146ea5_d16b89d1_oJ.jpg.thumb


Let's zoom-in on that picture:

137_146ea4_add3c831_oJ.jpg.thumb


This type of high frequency PWM is very hard to detect and is very unlikely to affect you under any circumstances; It can only be detected efficiently using this precise method and a camera also helps if you can catch your hand in just the right time.



What Are The Other Uses For PWM?

PWM is mainly used to control electric motors (like hybrid cars), but mostly step-motors like the ones in your hard-drive.

Tons of newer cars have LED's for daylights and rear position lights. As we all know the very same rear position lights are often also used as brake lights, so these lights need to be dimmed to differentiate from when a driver applies the brakes. Some manufacturers –perhaps most?- use PWM to achieve this, but some of them use a very (or failry) low frequency of PWM that actually affects some people, like me. I believe there is a more and more urgent need to sensitise manufacturers as the effects can be very uncomfortable for the eyes of some people. Just as an example, when I drive at night behind some models of Cadillacs or Volvo's, I either slow down drastically to let them out of my sight or pass them as fast as reasonable (sometimes over the local speed tolerance) because it tires my eyes badly.


WHY PWM?

Using PWM to control a light's output is simply cheaper, because so many existing Integrated Circuits sold off-the-shelves can do it and all that's left for the manufacturer is to add a small circuit that controls the Duty Cycle or frequency. There is very little measuring, calculating, tweaking and experimenting needed from the manufacturer's engineering department, so money is saved on manufacturing, parts AND research.


Conclusion

Well, there you go. Feel free to ask questions and I'll answer to the best of my ability. Also, feel free to share your take on PWM, whether you're a beginner or an expert on the subject. This could also be a good place to list light that are controlled by PWM and how much it shows and affects usage.
 
Last edited:

CarpentryHero

Flashlight Enthusiast
Joined
Jul 4, 2010
Messages
3,094
Location
Edmonton
LoL that was a great description. Most Newfie jokes come from newfoundland, it's there second largest export. (there largest export being hard workers to Ft Mcmurry Alberta) ;)

I misspelled as seen below ⇓ 
 
Last edited:

Cataract

Flashlight Enthusiast
Joined
Apr 24, 2009
Messages
4,095
Location
Montreal
LoL that was a great description. Most Newfie jokes come from newfandland, it's there second largest export. (there largest export being hard workers to FtMcmurry Alberta) ;)

Kinda ironic with such a similar name...
 
Last edited:

tre

Flashlight Enthusiast
Joined
May 3, 2010
Messages
1,222
Location
Northern IL USA
Nice job explaining PWM. There have been a lot of PWM related threads recently and a lot of people thinking it is all bad. I have no problem with it if the frequency is high enough. My Zebralight SC51w has very slow and noticable PWM on the lowest mode. Oddly my other Zebralights have no such "slow PWM" on their lowest modes. Anyway, my point is that now people should understand PWM, and realize that it is not a problem (if it is fast enough).
 

Flying Turtle

Flashaholic
Joined
Jan 28, 2003
Messages
6,508
Location
Apex, NC
Nice work, Cataract. I'm sure this has helped a lot of folks. I'm only bothered a bit by PWM, but I'm glad to see it less and less.

Geoff
 

Cataract

Flashlight Enthusiast
Joined
Apr 24, 2009
Messages
4,095
Location
Montreal
We're cool. I have edited my initial post as well, as my comments were slightly skewed because of your comment.

Good summary on PWM. And thanks.

Well, you did make me realize it wasn't the best way to put it...
Thanks for correcting you post as well.
 

uplite

Enlightened
Joined
Aug 7, 2009
Messages
307
Great idea for a thread.

I'll add a few practical implications for flashlight buyers:

1) PWM controlled lights can be made cheaper and smaller than current-controlled (CC) lights, because the circuit is cheaper and smaller. This is why many of the little AAA-powered lights use PWM.

2) CC lights give more consistent output from light to light, because LED output is very closely correlated to current. PWM circuits use a fixed voltage. Since an LED's voltage-current response varies from batch to batch and even within the same batch, different LEDs will produce different amounts of light at that same voltage.

3) CC lights are more efficient than PWM, because LED efficiency increases at lower drive levels. A PWM light switches the emitter on and off at a single high (less efficient) drive level.

4) PWM lights are less susceptible to tint-shift at low output levels, because (as just mentioned) they are actually using a high drive level at all times (just switched on & off very quickly). This is why CC lights tend to shift towards green at low output levels. Especially with the new larger die emitters like XPG and XML.

5) Higher frequency PWM is harder to see, but is also less efficient than low frequency, due to switching losses in the circuit. This is not really an issue because if you care about efficiency, you'd use a CC circuit in the first place, but worth mentioning.

In brief:

If you care mostly about efficiency, ultra-long "moonlight mode" runtimes, and consistent output levels, then a fully current-controlled light is best.

If you care more about tint than moon-mode runtime, then the ideal design uses CC for high/medium modes, and PWM for the lowest modes.

-Jeff
 

shane45_1911

Enlightened
Joined
Apr 28, 2009
Messages
594
Location
Ontario, Canada
OK, how does one know if they are buying a light with PWM if they do not have access to an oscilloscope? I have never seen any Mfg. specs that indicate their light is (or isn't) PWM driven.
 

Cataract

Flashlight Enthusiast
Joined
Apr 24, 2009
Messages
4,095
Location
Montreal
OK, how does one know if they are buying a light with PWM if they do not have access to an oscilloscope? I have never seen any Mfg. specs that indicate their light is (or isn't) PWM driven.

Very few manufacturers will mention driving their light through PWM. That's one of the reasons I always do heavy research on CPF before buying most of my lights. If you want to know if a light in your possession is PWM driven, take a look at the last two pictures in my first post. Very easy to check for yourself - you don't need a camera, just a little observation and as little ambiant light as possible.
 

tre

Flashlight Enthusiast
Joined
May 3, 2010
Messages
1,222
Location
Northern IL USA
3) CC lights are more efficient than PWM, because LED efficiency increases at lower drive levels. A PWM light switches the emitter on and off at a single high (less efficient) drive level.

You make a lot of good and valid points. I'm not saying you are wrong at all but how do you think Zebralight has such massive efficiency when using PWM? The SC51 which uses PWM is more efficient than a quark AA which is CC
 

mhphoto

Newly Enlightened
Joined
Aug 24, 2010
Messages
112
Excellent explanation and demonstration!

I've noticed that all of my 4Sevens current controlled lights have some "dithering" (or so I've heard it called) that appears similar to low frequency PWM on one or more of the lower levels. Do you have an explanation for that, because it's a bit annoying to me. Seems like current controlled lights on fresh primaries shouldn't have any trouble not blinking. :sick2:
 
Last edited:

Cataract

Flashlight Enthusiast
Joined
Apr 24, 2009
Messages
4,095
Location
Montreal
Excellent explanation and demonstration!

I've noticed that all of my 4Sevens current controlled lights have some "dithering" (or so I've heard it called) that appears similar to low frequency PWM on one or more of the lower levels. Do you have an explanation for that, because it's a bit annoying to me. Seems like current controlled lights on fresh primaries shouldn't have any trouble not blinking. :sick2:

Do you mean some sort of a flicker? if that's the case, dirty threads and low batteries are the most common suspects. You shouldn't notice any strobe effect on current controlled lights.
Don't forget that Quark mini's are PWM driven, but it's a very high frequency that's very hard to notice. In fact that is what I used in the last two pictures.
 

Cataract

Flashlight Enthusiast
Joined
Apr 24, 2009
Messages
4,095
Location
Montreal
BTW, thanks for all the compliments guys, and thanks for all the extra info, uplite.

If anyone wants to add to this, I might regroup all the info in the original post so newbies can get everything out in one reading in the future.
 

mhphoto

Newly Enlightened
Joined
Aug 24, 2010
Messages
112
Do you mean some sort of a flicker? if that's the case, dirty threads and low batteries are the most common suspects. You shouldn't notice any strobe effect on current controlled lights.
Don't forget that Quark mini's are PWM driven, but it's a very high frequency that's very hard to notice. In fact that is what I used in the last two pictures.

No, it's definitely not dirty threads or low batteries (although I've documented that my S2 Turbo, which exhibits the blinking symptoms on the third level, also starts exhibiting it on the second brightness level when the batteries get low. With fresh batteries the second level is constant). There's a thread on it somewhere but I can't find it. I'll try to dig up a picture.
 

mhphoto

Newly Enlightened
Joined
Aug 24, 2010
Messages
112
Here's a picture I took of a 123² Tactical (R2) before I sent it back because the flickering was so bad.

e831b91f.jpg


On the left is "moonlight mode", middle is "low", and on the right is "medium". "High" and "max" showed no flickering.

After I got so fed up with the flickering I sent it back and got the S2 123² Turbo, which as I said, flickers on the "medium" level. My 123² Tactical warm white flickers on "low" and "medium", and my RGB neutral flickers on "moonlight".

I have a Mini AA and its PWM is much higher frequency than the flickering coming out of the Quarks.

From what I remember about the thread that discussed this issue, the flickering is not so much a sharp "on and off" cycle, but rather an "on and fade" cycle.
 

Cataract

Flashlight Enthusiast
Joined
Apr 24, 2009
Messages
4,095
Location
Montreal
Nice picture! that's almost art, but what is shown here is definitely PWM. I have never seen such bad PWM on any of my 4sevens lights, but there are people who could say a lot more about 4sevens and the use of PWM.
 

afdk

Newly Enlightened
Joined
Oct 19, 2009
Messages
181
Location
California
:huh: PWM can be easily seen by pointing your light at your shower head, with water running of course! The water may look like separate drops depending on the PWM frequency. My Pelican 9410 does use PWM for the lower mode, but it is of sufficient frequency that it's only noticeable in the way described.

Try this with your lights, let me know what you see.
 
Top