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

tbx8192

Newly Enlightened
Joined
May 5, 2014
Messages
21
Very good topic. So CC is always better than PWM.
Is there a list of flashlight that uses PWM?
 

Bullzeyebill

Flashaholic
Joined
Feb 21, 2003
Messages
12,164
Location
CA
PWM is used in conjunction with a CC driver for dimming in many lights. Some PWM/CC lights do not show a strobe effect, they are so fast. The dimming modes are still CC. Maybe this has been brought up in a previous posting in this thread.

Bill
 

bkpdle

Newly Enlightened
Joined
Sep 15, 2014
Messages
42
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).

I was wondering about the Zebralights. Are all their lights PWM? It seems every AA light I look into operates on PWM. I assume HDS Systems lights are not PWM (please correct me if I'm wrong), and SureFire is not, but all these run on 123A. All the AA lights I find myself taking a liking to use PWM.
 

KeepingItLight

Flashlight Enthusiast
Joined
May 25, 2015
Messages
1,823
Location
California
I was wondering about the Zebralights. Are all their lights PWM? It seems every AA light I look into operates on PWM.

One way to answer this question is to check whether there has been a review. Flashlight reviewer Selfbuilt always comments on PWM, either to say he found it or he did not. Zebralight is a brand Selfbuilt frequently reviews. In his review of the Zebralight SC5, a 1xAA flashlight, here is what he said:

PWM/Strobe

As with my other Zebralight lights, I don't see any signs of pulse width modulation (PWM) on any the lower output modes. The light appears to be fully current controlled at all levels. :)

I believe it has been several years now since a new Zebralight model used PWM.
 

scs

Flashlight Enthusiast
Joined
Feb 9, 2015
Messages
1,803
PWM is used in conjunction with a CC driver for dimming in many lights. Some PWM/CC lights do not show a strobe effect, they are so fast. The dimming modes are still CC. Maybe this has been brought up in a previous posting in this thread.

Bill

Thanks for mentioning this. I have not seen it brought up. I was only recently informed that CC and PWM are not exclusive, that, as you mentioned, some CC drivers use PWM for the lower output levels. It seems that if there's no PWM then the driver is CC, but it's not always the case the other way around.
 

Hondo

Flashlight Enthusiast
Joined
Oct 26, 2005
Messages
1,544
Location
SE Michigan
Here is what my cob-web ridden brain recalls:

Zebralight: The older models do use visible PWM on SOME modes, like L1 might be CC, and L2 PWM. Later models seem either all CC or so high frequency PWM as not to be noticeable.

HDS: The original HDS lights (B42, U60) did have visible PWM on lower modes. Now you can't see it, but I think Henry uses a special voodoo mix of high frequency PWM and current control on lower modes to help control the tint shifting you can get with pure CC at low currents.
 

Cataract

Flashlight Enthusiast
Joined
Apr 24, 2009
Messages
4,095
Location
Montreal
Zebralight made a move to 100% current regulation a couple of yeas ago. If they had a model that used PWM regulation, they would certainly mention it AND the frequency used, as they did for their later PWM driven models.
 

jon_slider

Flashlight Enthusiast
Joined
Mar 31, 2015
Messages
5,172
to help control the tint shifting you can get with pure CC at low currents

I agree tint shift avoidance is a feature of PWM. That advantage may dim below 3 lumens, and may be moot on a low CRI LED:

https://en.wikipedia.org/wiki/Mesopic_vision
"Mesopic light levels range from luminances of approximately 0.001 to 3 lumens"

"Humans see differently at different light levels. This is because under high light levels typical during the day (photopic vision), the eye uses cones to process light. Under very low light levels, corresponding to moonless nights without electric lighting (scotopic vision), the eye uses rods to process light. At many night-time levels, a combination of both cones and rods supports vision. Photopic vision has excellent color discrimination ability, whereas colors are indiscriminable under scotopic vision. Mesopic vision falls between these two extremes. In most night-time environments, there is enough ambient light at night to prevent true scotopic vision."


here is a tangent link about low light levels and color vision:
Foreground light, pupil constriction, color temp and color spectrum.
"A fairly recent development, i.e. < 10 years ago, has shown that pupil/iris response/opening is actually tied to melanopsin sensitive ganglion nerve cells which are a newly discovered third set of sensors within the eye. They are also primarily responsible for circadian rhythm."
 
Last edited:

Cataract

Flashlight Enthusiast
Joined
Apr 24, 2009
Messages
4,095
Location
Montreal
Thanks
Good Explanation.

Looks like my PWM Test was wrong after all. to be honest, my reviews were wrong also.
I'll fix my way to test PWM now

Why do you say your test was wrong? Did you find that some of your lights actually have PWM that you had not detected before?
 

BugoutBoys

Enlightened
Joined
Oct 22, 2015
Messages
511
Location
Colorado
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.

Probably the best explanation I have seen!
 

jon_slider

Flashlight Enthusiast
Joined
Mar 31, 2015
Messages
5,172
Some Examples of PWM

I just received a Copper Tool Clickie and a Maratac Rev 3 latest stock. It appears the latest Maratac does not use PWM like the Rev 3 earlier run did.

IMG_9890.JPG


My iPhone sees the PWM much more obviously than my naked eye. Both lights are on Medium in this next photo:
IMG_9900.JPG


Neither light has PWM on high:
IMG_9897.JPG


When I wave the lights, the PWM is more obvious to my naked eye, than to the camera.
IMG_9898.JPG


You may also notice that on Medium the Maratac tint is not as white as the Tool. I think thats the result of the difference between PWM lighting the LED in pulses at full power, hence full brightness, and the apparently Current Controlled latest Maratac, experiencing some tint shift towards a slightly warmer tint. Both LEDs are XP-G2.

PS, it can be very difficult (for me) to determine if a light uses PWM or not just from reading specification pages, for example:
"
Digitally regulated output maintains constant brightness"
That is the spec for the Lumintop, which as Ive shown, Does Use PWM. The words digitally regulated is unclear, as it could mean Pulse width modulation (thats digital), but it could also mean current regulation (also digital but used to refer to non PWM circuits). The hint is the term constant brightness, which is in fact what PWM accomplishes by pulsing at full power, the brightness of the LED is constant, and does not dim as it does with current regulation. Note the word regulation has also been used in both PWM and Constant Current specs, adding to my confusion. For example Fenix, which makes non PWM lights, specifies "regulated current".

So I leave you with a couple of terms to consider, regarding how the circuits produce the lower modes..
PWM = Constant Color… (led flashes on and off at full power)
Non PWM = Constant Current (led stays on constantly, at less than full power)
 
Last edited:

Cataract

Flashlight Enthusiast
Joined
Apr 24, 2009
Messages
4,095
Location
Montreal
Nice Pics and observations jon_slider, exccept one small detail

[...]The hint is the term constant brightness, which is in fact what PWM accomplishes by pulsing at full power (1), the brightness of the LED is constant, and does not dim as it does with current regulation. Note the word regulation has also been used in both PWM and Constant Current specs, adding to my confusion(2). For example Fenix, which makes non PWM lights, specifies "regulated current".

So I leave you with a couple of terms to consider, regarding how the circuits produce the lower modes..
PWM = Constant Color… (led flashes on and off at full power)
Non PWM = Constant Current (led stays on constantly, at less than full power)

(1) I believe what manufacturers mean by "constant brightness" is that the output of each mode will be the exact same as intended for as long as the battery has enough power to sustain it rather than letting output sag with a battery that is getting weaker. Both PWM and constant current circuits can achieve this.

(2) Somewhat of a legal matter term IMO: "Regulated" or "Regulation" only mean that the output (brightness) is being regulated, which could or could not mean the same as "constant brightness" and does not necessarily refer to the means by which this is achieved (PWM, CC or other). The word "Regulated" does not exclude cases where the output is not all that constant and dims as the battery is getting weaker, like some cheaper imported lights. Even in this case, it is not a lie, the output IS regulated to less than maximum output, just not with a constant brightness.

The Predator has an option to use this type of regulation where the output sags over time, which can extend the effective runtime by quite a bit. It is also sometimes preferable to see your light slowly dim rather than suddenly die as you step over the edge of something... That only happens on the lowest mode of course, but I've had it happen to me once and it wasn't exactly fun.
 

Timothybil

Flashlight Enthusiast
Joined
Nov 9, 2007
Messages
3,662
Location
The great state of Misery (Missouri)
Ran across something interesting tonight. I was trying to scan a Walmart qcode with my AT&T android scanner app, and was using my EA11 in low mode to add a little light. I knew the EA11 used PWM, but it was really interesting to see interference bars running across the scan display as I was trying to scan the code. Apparently the PWM off period was wide enough, and the rear camera on my Nexus 7 sensitive enough to register the light differences of the PWN on and off phases.
 

jon_slider

Flashlight Enthusiast
Joined
Mar 31, 2015
Messages
5,172
Nice Pics and observations jon_slider, exccept one small detail

(1)..."constant brightness"… Both PWM and constant current circuits can achieve this.

(2) ..."Regulation" only mean that the output (brightness) is being regulated, which could or could not mean the same as "constant brightness" and does not necessarily refer to the means by which this is achieved (PWM, CC or other)….

Thanks for illuminating my confusion

Current Controlled, sometimes means No PWM
Regulated, sometimes means No PWM

but regardless what words manufacturers use to add to my confusion, I can spot PWM by waving the light

I can also spot the new No PWM circuit in the latest Copper and Titanium Maratac aaa lights, and the latest Lumintop aaa Tool, both copper and Aluminum, by the ring in the new reflector...

On left, previous model Lumintop Tool, and Maratac used PWM. Note the new ringed LED reflector on right
IMG_9913.JPG
 

Cataract

Flashlight Enthusiast
Joined
Apr 24, 2009
Messages
4,095
Location
Montreal
Ran across something interesting tonight. I was trying to scan a Walmart qcode with my AT&T android scanner app, and was using my EA11 in low mode to add a little light. I knew the EA11 used PWM, but it was really interesting to see interference bars running across the scan display as I was trying to scan the code. Apparently the PWM off period was wide enough, and the rear camera on my Nexus 7 sensitive enough to register the light differences of the PWN on and off phases.


Barcode + PWM... good one! You should have taken a picture with the barcode both horizontal and vertical just for fun :D
 

Cataract

Flashlight Enthusiast
Joined
Apr 24, 2009
Messages
4,095
Location
Montreal
Thanks for illuminating my confusion

Current Controlled, sometimes means No PWM
Regulated, sometimes means No PWM

but regardless what words manufacturers use to add to my confusion, I can spot PWM by waving the light

I can also spot the new No PWM circuit in the latest Copper and Titanium Maratac aaa lights, and the latest Lumintop aaa Tool, both copper and Aluminum, by the ring in the new reflector...

On left, previous model Lumintop Tool, and Maratac used PWM. Note the new ringed LED reflector on right
IMG_9913.JPG


Glad I can help :)

Current Controlled usually means no PWM, but there are exceptions.

Nice Cu lights BTW... the Maratac has a slightly beefier look in this pic along with the ringed reflector.
 

Timothybil

Flashlight Enthusiast
Joined
Nov 9, 2007
Messages
3,662
Location
The great state of Misery (Missouri)
Barcode + PWM... good one! You should have taken a picture with the barcode both horizontal and vertical just for fun :D
I would, except I was scanning a QCode, which is that little square with the tiny blocks all over it in some weird pattern. I'll try it on a bar code one of these days.

BTW, the light/dark bars pattern was across the entire screen, which included the desktop behind the receipt being scanned.
 

Cataract

Flashlight Enthusiast
Joined
Apr 24, 2009
Messages
4,095
Location
Montreal
I would, except I was scanning a QCode, which is that little square with the tiny blocks all over it in some weird pattern. I'll try it on a bar code one of these days.

BTW, the light/dark bars pattern was across the entire screen, which included the desktop behind the receipt being scanned.

A QR code is a 2D barcode (don't mind the fussiness, I used to work in the barcode business). Doesn't matter the type of barcode or what you are aiming at; if the brightest source of light in the focus area of the camera is PWM driven, I suspect it will manifest all over the picture. The one thing is that CCD pixels are scanned horizontally, that is why we always see the interference as horizontal bars on digital pictures. It is all a question of how fast the pixels are converted to data and how fast your light "blinks".
 
Top