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

jhc37013

Flashlight Enthusiast
Joined
Feb 17, 2009
Messages
3,268
Location
Tennessee
I think that is the most informative PWM thread I've yet to see and I learned a couple new things thanks to the graphs and descriptions. Thanks. :)
 

tolkaze

Enlightened
Joined
Aug 26, 2009
Messages
569
Location
Muswellbrook
I'm glad you mentioned 2 of my pet peeves, reading with PWM and cars and trucks with PWM controlled tail lights. I tend to get motion sick if do either of these. I love the low level of the zebralights for reading in bed when I don't want to disturb anyone, but PWM makes your eyes jump from word to word and the page stutters somewhat. I have to use the slightly higher level which IS current controlled to eliminate this.
Makes me think that zebralight either has 1 full power mode, 2 high frequency PWM modes and 3 low freq PWM modes, or if they have 3 current controlled modes and then a PWM driver to lower each of those modes in turn (more likely). Either way, reading is a pain on the lower of any of the modes and perfectly fine on the others.
Driving behind cars with those lights makes me sea sick... yechh surely if they are using multiple LED's (5mm for example) they could have 3 or 4 for running lights which are diffused through the plastic, then when you put on the breaks it lights up another 10 or so, also diffused. PWM seems like it ISN'T the easier option in this case.
 

Cataract

Flashlight Enthusiast
Joined
Apr 24, 2009
Messages
4,095
Location
Montreal
I made this video many years ago, you can see a clear visual explanation of PWM: http://www.youtube.com/watch?v=QI5JAt7vjNY


Pablo

Nice! I didn't even suspect a camera would show it this nicely!

I'm glad you mentioned 2 of my pet peeves, reading with PWM and cars and trucks with PWM controlled tail lights. I tend to get motion sick if do either of these. I love the low level of the zebralights for reading in bed when I don't want to disturb anyone, but PWM makes your eyes jump from word to word and the page stutters somewhat. I have to use the slightly higher level which IS current controlled to eliminate this.
Makes me think that zebralight either has 1 full power mode, 2 high frequency PWM modes and 3 low freq PWM modes, or if they have 3 current controlled modes and then a PWM driver to lower each of those modes in turn (more likely). Either way, reading is a pain on the lower of any of the modes and perfectly fine on the others.
Driving behind cars with those lights makes me sea sick... yechh surely if they are using multiple LED's (5mm for example) they could have 3 or 4 for running lights which are diffused through the plastic, then when you put on the breaks it lights up another 10 or so, also diffused. PWM seems like it ISN'T the easier option in this case.

I don't have too much of a problem reading with a PWM controlled light, but whenever I see a Caddy or Volvo at night, I either have to slam the brakes or pass them like crazy, otherwise I go cross-eyed and risk an accident. Those are real bad PWM lights that tire my eyes really bad. I think the government should step in and impose some form of regulation on those.
 

Cataract

Flashlight Enthusiast
Joined
Apr 24, 2009
Messages
4,095
Location
Montreal
Have to mention this one brought up by Hexbright:
The higher the PWM frequency the higher the switching losses.

In other words, a high enough frequency that would be basically impossible to perceive would have a cost in battery life.
 
Last edited:

EngrPaul

Flashlight Enthusiast
Joined
Sep 28, 2006
Messages
3,678
Location
PA
You can measure the frequency of PWM if your multimeter has a "Hz" model and you have a solar cell.

If you need a cheap solar cell, get a $1 solar calculator from Wal*Mart and rip into it.

Just connect the 2 solar cell wires and aim the flashlight at it.

You can also try using an LED. I found red usually works pretty well. But the solar cell works better.
 

Richub

Enlightened
Joined
Jun 6, 2011
Messages
371
Location
Eindhoven, the Netherlands
One of the torches with a bad PWM is the Olight M30 triton.

I bought one 2 years ago, only to shove it in a closet within a few months... On turbo it's simply amazing, but the sub-100 mhz PWM is damned annoying (and even nauseating) when I use the light on medium or low setting.

If I knew then what I know now about PWM, I wouldn't have bought that M30 at all.

My Fenix LD01 uses PWM on the lower settings, but at a very high frequency. This kind of PWM isn't bothering me at all. It's only noticable when waving the torch quickly in front of my face. ;)
 

mhphoto

Newly Enlightened
Joined
Aug 24, 2010
Messages
112
Found another horrible PWM light: Mini Maglite LED. It's baaad.
 

anylau

Newly Enlightened
Joined
Sep 30, 2010
Messages
60
SO now i understand what PWM means... actually I use my table fan to detect PWM drive (back then i dint know it's call PWM.. i just tot is somesort of hz controlling drive..)
.. Another light using PWM is my LED Lenser M7 on the low adjustable mode.... :(
 

DevL

Newly Enlightened
Joined
Dec 23, 2003
Messages
62
I have 2 H51w headlamps, have seen low frequency PWM stutter before, and cannot notice it in either of my lights, which I recently purchased. Its a total non issue.
 

Cataract

Flashlight Enthusiast
Joined
Apr 24, 2009
Messages
4,095
Location
Montreal
I wrote to Zebra not long ago, concerning the two PWM driven modes on their lights (only 2 of the secondary modes use PWM, the rest are current driven) and they said they're using a 3-4Khz frequency on the newer models, so it should be very hard to detect and it is very unlikely that anyone will notice anything while using the light. The older revision does use a lower frequency PWM and some people have reported avoiding those modes.
 

archer6817j

Enlightened
Joined
Aug 9, 2010
Messages
830
Location
Mountain View, CA
Reviving this thread :) So in terms of implementation...what's the difference between "good" and "bad" PWM? If it's just a matter of frequency, wouldn't all lights be "good" at high power and "bad" at low power? Obviously I don't know that much about the ins 'n outs so that's why I'm asking :)

I'm looking into drive options for my lights and I can't seem to figure out what exactly separate good from bad.
 

tam17

Enlightened
Joined
Jun 9, 2011
Messages
737
Great thrad indeed.

...what's the difference between "good" and "bad" PWM? If it's just a matter of frequency, wouldn't all lights be "good" at high power and "bad" at low power? Obviously I don't know that much about the ins 'n outs so that's why I'm asking :)

I'm looking into drive options for my lights and I can't seem to figure out what exactly separate good from bad.

From the end user's point of view, "good" PWM is the one that doesn't bother you, and the "bad" one is... well, the opposite:).

Apart from Cataract's informative opening post, Uplite stated some practical implications of PWM and CC for flashlight buyers.

Cheers,

Tam
 
Last edited:

GaAslamp

Enlightened
Joined
Aug 5, 2011
Messages
361
Reviving this thread :) So in terms of implementation...what's the difference between "good" and "bad" PWM?

I gather that it's frequency. In visual terms, the higher the switching frequency, the less visible the strobing effect will be, and that's good. On the other hand, higher frequency is less efficient, so obviously a happy medium must be found if you're going to use PWM at all--just high enough to avoid being detected during normal use.

If it's just a matter of frequency, wouldn't all lights be "good" at high power and "bad" at low power?

Not in the way you're thinking because it's not frequency that determines the overall lighting level but the pulse width or duty cycle--basically how long the emitter is switched on, proportionally, during each cycle, regardless of the frequency. It should be noted that a 100% duty cycle means that the emitter is always lit, so it's always going to look good regardless of frequency, and that for a given level of visual quality higher frequencies are necessary for lower power modes because the emitter spends so much time unlit contiguously, given the low duty cycle.

Obviously I don't know that much about the ins 'n outs so that's why I'm asking :)

That's alright because I thought I understood this stuff pretty well, but am now kind of confused myself after reading this thread. :ohgeez:

This might get slightly technical ;), but what's bugging me is that PWM and CC (current-controlled using buck, boost, or buck-boost converters) are being described as two fundamentally different things, while I've always viewed them as being sort of the same thing, only with CC being filtered using inductors and capacitors. They both have digital switches that operate at a certain frequency and they both operate on the basis of duty cycle (like switching power supplies)--the difference is that CC "smooths" the on-off pulsing down to a set of more steady intermediate voltages which results in a corresponding set of fairly constant intermediate currents to feed the emitter.

While I grant that the effects are fundamentally different once the outputs of these circuits (PWM and CC) reach the emitter, I still think they're basically the same thing--CC being a more refined form of PWM, in a way--which is evidenced by the "flickering" or "dithering" that people have been noticing on the Moonlight mode of Quarks, which is really, at least according to my understanding, just some electrical ripple from imperfect filtering (it's tough to do well with such a low duty cycle). That's right, unless there is a major problem with my understanding, the "flickering" is basically the underlying PWM leaking past the filtering, so to speak. That's probably why nobody else uses CC for such low-power modes--what's the point if it's going to flicker anyway and change the tint of the beam in addition? There's an efficiency gain at the emitter, yes, but some loss as well from the additional circuitry. That's probably why ZebraLight, for example, uses PWM for their comparably low modes, despite the fact that they use CC for most every other mode, and interestingly enough they're getting just as much overall system efficiency in those super-low modes.

Anyway, I wonder now if the foregoing is just plain wrong because I don't understand this stuff like I thought I did, but it still makes sense to me. :shrug:

I'm looking into drive options for my lights and I can't seem to figure out what exactly separate good from bad.

Generally CC is better because it's almost always more efficient (at the cost of higher price and more circuitry), but PWM can be made to work practically as well (or it could be quite bad in some cases). It's just one factor, and to properly evaluate different flashlights you'll need to read reviews (some of which on this forum contain rather sophisticated and comprehensive performance testing :rock: ) and anecdotal accounts of real-world usage.
 

archer6817j

Enlightened
Joined
Aug 9, 2010
Messages
830
Location
Mountain View, CA
So frequency is the time between pulses and the duty cycle is the time the LED is on during each pulse?

In that case, to minimize dithering in low modes, the frequency should be high and the duty cycle should be low? ... with the caveat that high frequency is less efficient. What is the range of efficiency we are talking about as it would affect total battery life? I realize it's "less" efficient on paper but I'm wondering what the actual real world result is :)
 

AFKAN

Newly Enlightened
Joined
Jul 21, 2011
Messages
39
Location
UK
Got to say a cracking thread :D

I too have noticed a few cars using pretty poor PWM on their rear lights :(

I can see it so badly I pretty much want to puke after a short time :(
 

precisionworks

Flashaholic
Joined
Apr 19, 2007
Messages
6,623
Location
Benton Illinois
Nice writeup Cataract :thumbsup:

Almost all newer industrial motor controls (frequency drives) use either PWM, or they use a more sophisticated logic device known as "frequency vectoring". PWM drives are sometimes called Volts/Hz as the higher the volts, the higher the freq - full voltage is seen only at one set freq, and voltage drops as freq drops.

Vector drives monitor motor shaft position (to determine if the shaft is lagging behind where it should be) and boost the output freq as needed. Flashlights are not quite as difficult to control as a 3-phase motor, but continuing development of the microprocessor makes a flashlight vector drive a possibility - in the future.
 

GaAslamp

Enlightened
Joined
Aug 5, 2011
Messages
361
So frequency is the time between pulses

Technically it's the inverse, expressed in pulses or cycles per second (Hz), but you have the right idea.

and the duty cycle is the time the LED is on during each pulse?

That's right, and it's in proportion to the duration of each pulse (the inverse of the frequency).

In that case, to minimize dithering in low modes, the frequency should be high and the duty cycle should be low? ...

You got it.

with the caveat that high frequency is less efficient. What is the range of efficiency we are talking about as it would affect total battery life? I realize it's "less" efficient on paper but I'm wondering what the actual real world result is :)

I do, too. ;)
 
Top