Bruce,
I thought I would take you up on your offer regarding basic electronics and a circuit I am playing with. Currently, I have a high brightness LED with an IF of 1.6 A and a step-down switching regulator that is rated at 1.5 A (see detailed specs below). My question is do I run any problems with the switching regulator if I run it at max? At some point I will be getting a LED driver for full output current but right now I am doing some testing with dimming of the LED by attaching a PWM signal; from the Arduino to the switching regulator. Here are the detailed specs:
LED10 WVF: 8 VIF: 1.6 A
Switching Regulator, Step-DownOutput Current: 1.5 A10 WInput Voltage: 4 - 24 VDCOutput Voltage: 2.5 - 18 VDC
To power the switching regulator I have a wall wart around 12 VDC and 1000mA
As I said, this is just a temporary set up while I work out the circumstances of when and how I want to dim the LED. Let me know what you think.
Thanks,
Mike
Hi Michael,Wow - I've done some work with LED's b4 & never came across any rated @ 10W! (showing my age??) Does it come with it's own heat sink?A power supply 'should' operate at it's maximum ratings... surprisingly, many won't: it's customary to derate power supplies by 25% - 50% as a 'safety margin' (against crappy designs; or not using it in the Arctic). Be advised that most power supplies will provide a 'surge' current (typically 125% - 150% of maximum continuous rating), so steady state running of the power supply in current limit is dangerous (overheating).To answer your question: I would expect the power supply (& wall wart) to accomplish their maximum ratings, but would also expect each to get (very) hot. The heat would be the thing to cause a failure, so I would recommend fan(s) to cool the power supplies & LED.Keep an eye on temperatures all around & abort if maximum temperature is exceeded!(If it's too hot to hold your finger on it, that's about 70 deg. C)Good Luck & Have Fun!- Fred
I don't know anything about switching regulators. Can they produce more current than they consume? (since "wall wart" goes to 1A).
YES:Power = Pby law of conservation of energy:Pout = Pin * (efficiency ~= 1 {.8 to .9, but always less than 1 so Pout < Pin})(or Pout = Pin - Plosses)Vout*Iout ~= Vin*Iinso, if Vin >> Vout then Iin < Iout
So why does is high-brightness LED rated at VF 8, IF 1.6, but 10W (8*1.6=12.8W)?? never seen anything like 10W LED - I'd bet u can't get near 10W! (or not long) it would melt!probably the peak current is 1.6A; the real limitation would be device temperature! (maybe 2W; ice bath)
And does an LED turn on exponentially like regular diodes? yes Meaning that you can't just stick 8V from an unlimited power supply on it? not long Or does the light emitting part make them more linear, or ??? yes - crappy diode
What happens when you try to draw more than the rated current from a switching regulator? overheat & or burn out Are most regulators current protected? should be - most lab ps's would be expected; but many special purpose (cheap) ps's are not If the regulator is rated at 1.5A, can he just stick the regulator straight on the LED and let the voltage fall where it may? in theory, yes. but many ps's provide 'surge' overcurrent in excess of continuous rating & / or many ps's will overheat in current limit Or would that have to be a special current limiting option on the regulator? ultimately u gotta test it 2 c...
The little 3 pin regulators aren't switching regulators, right? yes, although there exist mini switching regulator IC's... So they have Iin == Iout and just dissipate the difference in V (*I) as heat? yes Which is going to limit them to low power applications? yes: linear = low power & clean; switcher = hi power & noisy
And then if I want more power I either need something fancier, like a switching regulator, or a big heat sink. yes & fans I remember Dad having some power supplies with big heat sinks and those big diamond shaped power transistors TO-3 (now use TO-247) back in the day... But I don't think those went much more than an amp or two. But variable voltage, so just a transformer down to Vmax, and then dissipate the rest down to Vout? Isn't that essentially what the 3 pin regulators are doing (you provide the transformer, rectifier diodes and beer can cap)? yes, but can't get so much heat out of 3-pin (TO-220) - 3-pin's come with variable output...
It's shocking to me how often heat management is neglected in designs (exploding batteries; all flavors of failures...)
So, it seems that regulating current in the LED by using voltage controlled power supply is awkward! It'd be nicer getting a DC/DC converter that had a knob to adjust current output & directly regulate the brightness by regulating the LED current; but, the ucontroller doesn't have fingers to be able to automatically adjust this knob... So, cleanest solution (no hot series resistors & self compensates for temperature & input voltage fluctuations) would be to build your own current controlled regulator using the PWM output. See "LED.jpg" in files area. where: D is fast recovery R is ~ 0.1 ohm to sense current (may amplify Is to fit A/D converter) Q is rated > 24V
L is sized for ~ 10% current ripple Steady State: look @ L: Von*Ton = Voff*Toff ('on' & 'off' refer to Qon & Qoff) (12V - Vled)*Ton = (Vled + Vd)*Toff
Set base counter PWM to Ton Set Iref to desired brightness Measure Ipk just b4 PWM switches off Ierr = Iref - Ipk new counter PWM = base + Ierr (*k)
You now have instantaneous control over current (hence brightness) in LED. I'd recommend a temperature probe directly on the LED tied into another A/D input so you don't burn it out... Disclaimer: I've never actually did it this way, but it would be neat if it worked! Potential problems: 1) A/D conversion of 'moving target'
2) stability (this would be easiest possible, but may not be brain dead - start with small k {shift}) 3) CPU must compute next PWM counter during off time (speed) - may have to slow switch rate? (higher switch rate = smaller L)
----- Original Message -----From: Bruce FrederiksenSent: Sunday, July 12, 2009 9:03 AMSubject: Re: Ask the EE: power supplies and high brightness LEDs
Fred^2 wrote:So, it seems that regulating current in the LED by using voltage controlled power supply is awkward! It'd be nicer getting a DC/DC converter that had a knob to adjust current output & directly regulate the brightness by regulating the LED current; but, the ucontroller doesn't have fingers to be able to automatically adjust this knob... So, cleanest solution (no hot series resistors & self compensates for temperature & input voltage fluctuations) would be to build your own current controlled regulator using the PWM output. See "LED.jpg" in files area. where: D is fast recovery R is ~ 0.1 ohm to sense current (may amplify Is to fit A/D converter) Q is rated > 24VQ > 24V is just standard rule of thumb 2x fudge factor? (I only see 12V on Q)??
yes: 12V + Vd + 12V ringing;over rating Q (V, I, & P) will make circuit robust (note that there are different classes of transistors - you want a 'switching' transistor; not an 'amplifier', 'signal', 'RF', etc. It should be easy to find a cheap switching FET 30-50V; <0.10 ohm; TO-220 {I've got handfulls of D560's that should work OK up to ~5A @ 5Vgs; but will current limit @ ~10A without more gate voltage?}).If anything 'bad' happens, Q will normally be the first to blow, but if Q is over rated combined with a power limited source (wart), the circuit should be (reasonably) bulletproof.
L is sized for ~ 10% current ripple Steady State: look @ L: Von*Ton = Voff*Toff ('on' & 'off' refer to Qon & Qoff) (12V - Vled)*Ton = (Vled + Vd)*ToffTon/Toff ~independent of Iref, except for slight(?) change in Vled vs I.
& Vin & Vr & Vq & Vd & temperature & gremlins & ... = reason to use feedbackIdeally, duty cycle is independant of current.
Set base counter PWM to Ton Set Iref to desired brightness Measure Ipk just b4 PWM switches off Ierr = Iref - Ipk new counter PWM = base + Ierr (*k)
seems like a couple of options here.
1. I think you're thinking base is variable. I.e., last line is: new counter PWM = base = base + Ierr (*k). Then have to worry(?) about stability. Always worry about stability... this would integrate Ierr
2. But you could hold base constant at Ton (since Ton is ~independent of I). Then k is L/(12V-Vled) to correct I in one cycle. No stability problem, right? It just self corrects periodically for error in calculated Ton.
stability problem if you overcorrect in one cycle, so correction should be to 50%-80% of error in one cycle.error can be made vanishingly small by integrating Ierr ie:new counter timer = base + 0.5 * Ierr + 0.25 * sum(Ierr)Note: * 0.5 = shift right 1 bit; * 0.25 = shift right 2 bitsThere may be issues with integrator wind-up; more CPU timeis it necessary? how well can the eye distinguish brightness?
I bet that clever selection of R will set k to 1. (based on slope of Is = dI/dt)
You now have instantaneous control over current (hence brightness) in LED. I'd recommend a temperature probe directly on the LED tied into another A/D input so you don't burn it out... Disclaimer: I've never actually did it this way, but it would be neat if it worked! Potential problems: 1) A/D conversion of 'moving target'Atmega ADC has automatic sample and hold on input, so this shouldn't be a problem.
so it's doable !!
2) stability (this would be easiest possible, but may not be brain dead - start with small k {shift}) 3) CPU must compute next PWM counter during off time (speed) - may have to slow switch rate? (higher switch rate = smaller L)Couldn't you use fast PWM rate with slow CPU by sampling every Nth cycle, (taking N cycles to compute new PWM)? (The ADC time (100uSec) probably dominates compute time).
VERY unorthodox (probably for a reason). Generally one wants iron-clad control over current pulses. This design is unusual in that it just observers current for correction on next pulse - assuming that conditions remain constant. It could be argued if conditions are constant for 1 cycle, then they are likely to be for 2 cycles, BUT more assumptions allow more errors! Cycle skipping MIGHT work - try it!I would have much less problem moving the sample point from the end of Is to the middle of Is (as measured from the end - hence assuming constant current slope), but in any case the switching period should be > 100uSec (painfully slow => big L).
Final questions:
1. The initial spike on I graph is diode recovery?
yes + Q turn-on current + charging capacitance in L
2. Imax on led is just Wart's Imax (no current amplification)?
Imax (traditionally) occurs when Q is continuously on: so Iled = Iwartmax.(the power limit foldback in the wart will interfere with this)NOTE:1) at less than Imax, Iled > Iwart , so wart will run coolerWhy? Assume the current (I) in L is constant (we choose an infinite inductor)during Ton, Iwart = Iled = Iduring Toff, Iwart = 0; while Iled = I (through D)Total Iled = (Ton*I + Toff*I)/period = ITotal Iwart = (Ton*I + Toff*0)/period = I*Ton/(Ton + Toff) = I*DutyCycle2) you don't need Iwartmax to run the LED at it's maximum rating!Homework: you can verify this by deriving duty cycle from Steady State [above] & apply to Iwart [in 1)].3) Pwart - Plosses = Pled (P = power) {alternate verification}there's about 1W of losses in R + D + Q + L, so 12W - 1W = 11W available to LED (92%)4) in linear solution, there's 12-8 = 4W losses, so 12W - 4W = 8W in LED (67%)5) losses in switching solution are independant of Vled as in different (test) LED (new Vled just changes duty cycle)
----- Original Message -----From: Bruce FrederiksenSent: Sunday, July 12, 2009 9:03 AMSubject: Re: Ask the EE: power supplies and high brightness LEDs
2. Imax on led is just Wart's Imax (no current amplification)?
Imax (traditionally) occurs when Q is continuously on: so Iled = Iwartmax.(the power limit foldback in the wart will interfere with this)NOTE:1) at less than Imax, Iled > Iwart , so wart will run coolerWhy? Assume the current (I) in L is constant (we choose an infinite inductor)during Ton, Iwart = Iled = Iduring Toff, Iwart = 0; while Iled = I (through D)Total Iled = (Ton*I + Toff*I)/period = ITotal Iwart = (Ton*I + Toff*0)/period = I*Ton/(Ton + Toff) = I*DutyCycle2) you don't need Iwartmax to run the LED at it's maximum rating!Homework: you can verify this by deriving duty cycle from Steady State [above] & apply to Iwart [in 1)].3) Pwart - Plosses = Pled (P = power) {alternate verification}there's about 1W of losses in R + D + Q + L, so 12W - 1W = 11W available to LED (92%)4) in linear solution, there's 12-8 = 4W losses, so 12W - 4W = 8W in LED (67%)5) losses in switching solution are independant of Vled as in different (test) LED (new Vled just changes duty cycle)
The rating of the wart is 1 amp (rms). Let's all agree NOT to try to pull more than the rating out of the wart!When you do go past the rating, as pointed out earlier, the wart voltage will start to collapse (foldback) & failure is imminent ...
Your item 1), "during Ton" line says Iwart = Iled, thus Iled can't be > Iwartmax.
Requiring the wart to provide the 'peaks' would be too severe. Even if the wart was capable of the 'peak', it would not respond fast enough to match the switching speed of Q.That's what C is for - it averages the current out of the wart & provides 'peaks' (above 1 amp) to LED.
But this is max peak, while Iwartmax in item 1) "Total Iwart" and item 2) is max continuous.
Wart provides small ripple current into C. (infinite C -> ripple goes to 0) (this is (part of) the noise in switchers)item 1) applies for average wart current <= 1 amp. (heating of the wart would be in spec)
And this is how the "cheating" is done.
NO CHEATING is done! this is all real.
Meaning that Iledmax is limited to Iwartmaxpeak in your solution (so long as item 1) "Total Iwart" does not exceed Iwartmaxcontinuous).
The 'peaks' come from C. (you could add an inductor in series with wart to emphisize the smoothing of C)
But Iledmax is limited to Iwartmaxcontinuous in linear solution.
yes! which would be 1 amp... (the magic of switching regulators)
Am I on the right track?
hope so...