Need help understanding the effect of PWM duty cycle on LED datasheet ratings  - Page 1
Forum section: electronics / beginners

author: doublec4
author_rank: Regular Contributor
timestamp: January 28, 2021, 07:16:44 am
content: Hi all,So I started this thread about some efficiency improvements on some LED light units I was using:https://www.eevblog.com/forum/beginners/looking-for-some-project-guidance-on-driving-leds-efficiently-please/I would like to take a crack at designing some small signal lights and this, of course, involves driving them. In order to do that I need to understand the LED datasheets. I figured a new thread would be warranted so that it is more concise for the specific questions I am asking here.I've been looking around for some very bright, high efficacy colored LEDs since I am trying to make these as bright as possible while also reasonable efficient in a small form factor. In that thread I linked to, I was using the Whelen Mini Ion SAE Class 1 compliant light as my benchmark... whether or not I succeed in meeting it's specs is one thing, but hopefully I can make a cheaper light panel as those are ~$80 - $100 CDN per unit.So my questions are as follows. I was on the Nichia website and found this LED here that I will use as my example:http://www.nichia.co.jp/specification/products/led_spec/NFSW172CT-E(5462D)aswxbxexswx.pdfIt has a typical? test? rating of If = 150mA , Vf = 3.0V, lm flux = 70lmSome of the charts (and the absolute max ratings) show it can be run at 250mA @ 100% duty cyle (I would imagine with some heat sinking...) Another graph shows that "relative luminous flux" is 1.5 @ 250mA. Is relative luminous flux relative to the test conditions of 70lm @ 150mA? So theoretically if the LED was run @ 250mA the luminous flux would be 1.5*70 ?Next question involves the PWM and duty cycle and how that affects these ratings. For example... if I drive the LED @ 50% duty cycle @ 150mA I would expect a 50% duty cycle to produce less brightness... so if I go back to the relative luminous flux graph... is this intensity vs forward current "instantaneous?" My understanding is that a 50% duty cycle would reduce theaveragecurrent by... 50%... then my brightness would decrease accordingly. Or can I interpret the graph in the same manner where I can say it holds true for average intensity vs average forward current? I can't imagine that if my duty cycle is 50% despite having a If of 150mA I can still expect 70lm...Somewhat related to the question above... how does the Vf play into the duty cycle? Vf changes with If... so if I were to be designing the circuit knowing that I have a 12V battery as my source which cuts off around 9.3V and I put 3 of these LEDs in series my total Vf would be ~9V if I ran these at 150mA through a constant current driver. But again, if my duty cycle is 50% then does somehow affect my choice to put 3 of them in series? My limited understanding would be that myaverageVf would be lower due to the 50% duty cycle, but it will not have a bearing on my choice to put 3 in series because total Vf during the on portion of the PWM is still 9V and during the off portion the circuit is open, no current flows, and therefore no heat is being generated. It's not like my linear regulator would be taking off the total voltage as heat because no current is flowing.Please let me know if my interpretation is correct or needs some correctingThank you!EDIT to add that if anyone has any suggestions on high efficacy colored LED components I would appreciate that as well. I'm scouring many manufacturer websites to try and find offerings from the same series of LEDs that cover white, and amber, and red (the colors I would need for my project)

author: gnuarm
author_rank: Super Contributor
timestamp: January 28, 2021, 08:49:09 am
content: Quote from: doublec4 on January 28, 2021, 07:16:44 amThe graph of relative luminous flux vs. current is 1.0 at 150 mA, so I would say that is a fair assumption.The key takeaway is that at 250 mA the current goes up by 67% and the brightness goes up only 50%.I think someone else mentioned that the tests are normally done on short pulses to avoid heating effects. The next graph of luminous flux vs. temperature shows how quickly the efficacy drops off as the temperature rises. When run in continuous mode the temperature rises a lot at higher currents. Remember that there is a resistance component to the power dissipation which creates heat according to the square of the current!QuoteYes, they measure these values with short pulses.QuoteBy using a duty cycle at the same current the brightness varies with the duty cycle pretty much. There is some effect when you get to very short pulses, but you won't be using that. When the LED is turned off it doesn't know how long it will be off, so the brightness is only related to how much light is emitted when it is on vs. how long the cycle time is... as long as it's fast enough you can't see it. I can see car tail lights blinking when I move my eyes quickly or turn my head. Cadillacs are the worst.QuoteYes, I think that is right. Lots of words, it's late, hard to understand.These LED drivers are often switchers. I think you wanted to improve on the efficiency of the circuit, so use a switcher. If you can add LEDs, you can use more LEDs at a higher total voltage and let the switcher boost the voltage. Then you don't care what the minimum or maximum battery voltage is because it will always be boosted. This sort of chip can be fed a voltage to control the current. Then you get the ultimate in efficiency as the LEDs are dimmed, but that is a small effect.Quote

author: rs20
author_rank: Super Contributor
timestamp: January 28, 2021, 09:07:53 am
content: Here's how you model this:No-one cares what's going on when the LED is in the 'off' stage of its PWM cycle. It's off. 0 W in, 0 lm out.Is gnuarm has already pointed out, while it's in the 'on' stage, it might as well have been on forever (unless you pick an unreasonably high switching frequency). In particular, saying things like "I have 250mA at 50% duty cycle so that's an average current of 125mA so I'll read 125mA off the datasheet" would be completely wrong.Finally, if the PWM duty cycle is, let's say, 40%, then the average consumption of the LED is 0.4 * P(on), and the average/apparent brightness in 0.4 * B(on).You'll notice that the Forward Current vs Relative Luminous Flux graph (which goes exactly through 1.0 @ 150mA so that's how you know it's relative to 150mA btw) isn't perfectly straight. If you apply the principles above, you'll therefore see the using PWM is slightly less efficient that delivering the same power as a smooth DC supply.One catch, while what I've said above is true for the LED power consumption itself, you have to take into account the circuitry driving the LEDs as well (losses in linear regulator, switching regulators etc) to really optimize things properly. For example, in some very particular circumstances, a linear regulator might be more efficient than some switchers.The other thing is that you're adding up the voltages in these datasheets like they're precise and guaranteed. I have to point out the range of forward voltages at 25 degrees C (2.80 to 3.25 volts) and the Ambient Temperature vs Forward Voltage graph. If you were to directly apply a fixed DC voltage to the LED, it'll draw a certain amount of current, get hotter, forward voltage drops, current increases, gets hotter, forward voltage drops, ..........., LED burns out. I'm pretty sure even PWM isn't really an adequate solution to this problem.Finally, don't guess about thermals. The Thermal Resistance figures are there in the datasheet, you can use those to inform how hard you can drive the LEDs.

author: doublec4
author_rank: Regular Contributor
timestamp: January 28, 2021, 03:09:23 pm
content: Quote from: gnuarm on January 28, 2021, 08:49:09 amSo perhaps a silly question, but that graph shows relative luminous flux vs ambient temperature. I was sort of expecting to see some wording like "junction temperature"... The LEDs will produce heat as you said and it will be dissipated to the board + air around it. I imagine most of the heat would go to the board... So is this ambient temperate graph referring to the general environment (aka PCB) around the LED?QuoteHm okay, I think I am on the same page then. Lower duty cycle = lower brightness because the on time is lower. For the very short period of time where the LED is on it is still making 70lm but if measured over a 1 second total time, it may only be making 70lm for 0.5s total. Therefore my eyes would still see it as less bright than 70lm output at 100% duty cycle.QuoteI don't blame you. Sometimes I go down these rabbit holes late at night and the next day my posts look like the ramblings of a mad man.Thanks for your help!

author: doublec4
author_rank: Regular Contributor
timestamp: January 28, 2021, 03:47:56 pm
content: Quote from: rs20 on January 28, 2021, 09:07:53 amCan you expand on this a little more and why it would be less efficient? If I was driving the LED at 150mA @ 50% duty cycle I would expect a lower brightness (50% less bright? Not sure if the relationship is linear and how it is perceived by the human eye, etc...). But I am also using a lower average current over time and therefore less of my battery? I know you said it is wrong to look at the average current and apply it to the datasheet but that's not what I would be doing. I would still be looking at the properties of the LED driven at 150mA on the datasheet, since as you say it has no idea how long it has been on/off for... but from the perspective of perceived brightness vs taxation on my battery, my efficiency with PWM would be the same as long as my drive current remains the same? Or am I looking at this wrong?QuoteThis is another rabbit hole I will have to go down once I find some LEDs that I think are suitable... and then decide which architecture to drive them.QuoteSo I see the min/max forward voltage near the top of the datasheet... but that nearly 0.5V range is all at 25 degrees C ?? I thought those numbers corresponded to the ambient temperature vs forward voltage graph? So it would work as you described with a fixed dc voltage, the temperature would rise and forward voltage drops, current increases, temperature increases, aka thermal runaway and the LED dies. I thought a fixed current LED driver was the solution to this problem? When I've been mentioning PWM, I didn't mean from a fixed voltage source, I meant from a fixed current LED driver. I'm guessing it works by pulsing the (fixed) current to the LED string to produce varying brightness at a specific current.QuoteI see that figure and also now see the max junction temperature. On page 16 it shows two equations to calculate the junction temperature. One is based on the thermal resistance (Rjthetas) listed at the top of the datasheet and the other one uses Rjtheta ambient. The one with Rjthetas also has Ts in the equation ... soldering temperature. Another possibly stupid question... but is this the actual temperature by which this device is soldered in the board assembly process? So the device is not damaged? Then the Rjtheta ambient equation would be used in the actual usage application? In that case, the unknown variable would be the thermal resistance from junction to ambient. This would seem dependent on the board layout, presence of a heat sink, etc. So without doing a full blown thermal simulation is there some "general good practice" to follow to prevent overheating? Or is this a complication math/simulation or design iteration problem?

author: ve7xen
author_rank: Super Contributor
timestamp: January 28, 2021, 07:36:47 pm
content: Quote from: doublec4 on January 28, 2021, 03:47:56 pmThe light output will be quite linear with duty cycle, but perceptually quite non-linear (see gamma correction).If you drive the LED at 150mA at 100% or 50% duty cycle, you can expect (maybe slightly more than, due to reduced heating) half the brightness and half the average current.The point is that to achieve the same brightness at 50% duty cycle, you need nominally double the on current to make up for being on half the time. Because the LED is less efficient at higher currents, it will actually require more than that to reach the same brightness.Or conversely, and maybe more relevantly, if instead of PWM you reduced the current, because the LED is more efficient at lower currents, you could achieve the same 50% brightness with a lower average current than with PWM. This is why PWM is less efficient than current control - but it is much easier to implement, and if you're not driving the LEDs hard, may not be very significant.QuoteDatasheet is unclear on this. I think it is probably at a fixed 25C across the specified current, but normally I would expect both temperature and test current to be given.QuoteAs far as why they give information on Ts, especially because it is related to device power dissipation, I don't know. This seems weird to me.There are definitely rules of thumb (and online calculators) for thermal resistance of PCB tracks and of PCB area to ambient. If you use a heatsink, its datasheet should give its own thermal resistance. It's a matter of adding up all the thermal resistances between your 'heat dump' (ambient air, usually) and the junction, then apply the known power dissipation across it, and you will discover the Tj.TI has an app note on thermal design that might be enlightening:https://www.ti.com/lit/an/snva419c/snva419c.pdfAnd Dave did a video on heatsink design that covers the basics:

author: doublec4
author_rank: Regular Contributor
timestamp: January 28, 2021, 08:14:15 pm
content: Quote from: ve7xen on January 28, 2021, 07:36:47 pmOkay so I see what you're saying about our eyes not perceiving the brightness in a linear fashion using PWM. I looked up gamma correction and came across this article on the adafruit website:https://learn.adafruit.com/led-tricks-gamma-correction?view=allAlthough they seem to be saying the opposite? If you were to drive the LED with a halfway value (50% duty cycle and I'm assuming the same current) it would actually appear brighter than 50%. And they implement their non-linear gamma correction table in their code to account for this. So what would appear 50% brighter would actually be an even lower PWM value... they also state that, "Aside from aesthetics, an unexpected benefit of gamma correction is that battery-operated projects tend to run longer, because of the lower intermediate brightnesses."This sort of seems at odds with saying PWM decreases efficiency? Or maybe I am not connecting the dots correctly...QuoteI will check out the video and link! Thank you, you've been a big help in a few of the threads I've posted. Let me know if there is a way to "buy you a coffee /beer" some kind of online donation thing you accept!

author: ve7xen
author_rank: Super Contributor
timestamp: January 28, 2021, 08:27:42 pm
content: Quote from: doublec4 on January 28, 2021, 08:14:15 pmWe're probably both guilty of conflating terminology here but there are two separate aspects at play.Gamma correction is aboutperceptualbrightness. A light that is giving off 50% of the luminous flux of a reference will perceptually seem almost as bright, even though it's only half the light. This is nonlinear and based on the eye/brain, not the physics of the LED or PWM. It sits kind of on the side of the discussion here, because it really just modifies what the setpoints are, but doesn't change the discussion of efficiency (e.g. the gamma curve may tell you that if you want a '50% brightness', you actually only want 25% of the light output, so you set your PWM or current limit to 25%).This is separate from the question of how much light the LED actually creates and its electrical->optical efficiency, which is entirely separate and mostly what we've been discussing here. At lower currents, the LED produces more light for a given amount of power. PWM will always have a higher on current than if you regulated at the average current directly, and since the LED is less efficient with higher current, this makes PWM less efficient (ignoring the efficiency of the rest of the circuit like the constant current driver). All else being equal, with the same average current, PWM will produce less light.QuoteDistracting me from $DAYJOB is sufficient, cheers

author: doublec4
author_rank: Regular Contributor
timestamp: January 28, 2021, 09:43:06 pm
content: Quote from: ve7xen on January 28, 2021, 08:27:42 pmOkay after reading it back about 10 times I think I was just looking at it backwards.Using some arbitrary numbers, if I had an LED with test conditions If = 150mA, Vf = 3.0V, lm = 70lmThen the Adafruit site was saying that a 50% duty cycle, given the same current (150mA), the LED will be perceived at brightness greater than 50% brightness (>70lm). Therefore, to achieve perceived 50% brightness you would drop to maybe 25% duty cycle (37.5mA average current) and now it's perceived 50% as bright (35lm perceived). But for example, if for whatever reason I was using a 50% duty cycle and wanted the 70lm perceived brightness, I would actually have to drive the LED at 350mA. Therefore, my average current is now 175mA because of the decreasing efficacy at higher currents.Obviously these are just made up numbers but I guess this does depend on the region of the forward current vs luminous intensity that you are working within? If you are already working the LED in the upper regions then any additional current is not going to yield linear gains in brightness.I think that's the gist of it anyways. I'll stick to a constant current drive, no PWM. Lots to wrap my head around.

author: rs20
author_rank: Super Contributor
timestamp: January 29, 2021, 06:42:07 am
content: While the thing about human perception of light being non-linear is all very true (and becomes very important when you want to make a graphical display with multiple LEDs, or drive LED strips with sRGB numbers from a computer), it's really irrelevant to this discussion of LED efficiency once you've decided how many lumens you want. Yes, if you look at a prototype and think "hmm, I don't need it to bethatbright, maybe 'half' as bright would be good" then sure, you would need to reduce the current in the LEDs by much more than half in order to get it perceptually looking "half" as bright. BUT, for anygivenoutput of lumens, this perceptual stuff is completely irrelevant to the PWM vs constant current questions in this thread. (Not to mention the few LEDs being driven hard vs many LEDs being driven gently questions in the other thread.) Especially given that you have fixed lumen targets from those SAE class things, you shouldn't be worrying about perceptual stuff, the SAE folks have already contended with all that and set the lumen target for you.To humans, 70lm at 50% PWM looks exactly like 35lm at 100% PWM and 140lm at 25% PWM, that is one of the few seemingly intuitive assumptions that is actually true. (Unless I'm wrong somehow).Quote from: doublec4 on January 28, 2021, 03:47:56 pmHere's the graphs, with 300mA @ 50% PWM marked inred(the red point is halfway along the red line because it's half the luminosity and half the average current as 300mA), and 150mA continuous ingreen.What you can see is that the green point produces a higher luminous flux, at the same average current, and with a lower forward voltage drop (and, since P=I*V, lower power consumption as well, although if you're using a linear regulator and not sneaking an extra LED in the chain thanks to the lower voltage drop, it'd be the same power.) In short, higher luminous flux for lower power is a win-win (for continuous current over PWM).If the voltage vs current graph were perfectly vertical and the current vs luminous flux graph were perfectly straight (as are our first-order assumptions of how LEDs work), then none of this would be true, continuous current and PWM would give identical average flux for identical average power. But because the graphs aren't straight lines, we see the advantages of continuous current emerge. Slight, but real.