led dimmer circuit

Jun 04, 2006 26 Replies

It's partly to overcome non-linearity caused by the led's forward voltage.

Graham

With just resistors, the LED will abruptly extinguish when the voltage goes down to a low enough level, but just before that point it may not be very well dimmed.

With a PWM the delivered voltage amplitude is constant, but the time it is on becomes shorter and shorter causing it to appear dimming.

Don

Actually, it is a very basic question. LEDs are current operated devices, and quite non-linear. PWM dimming is the way to go.

Service to my country? Been there, Done that, and I\'ve got my DD214 to prove it. Member of DAV #85. Michael A. Terrell Central Florida

So, use a SERIES RHEOSTAT (not a potentiometer) to regulate the CURRENT. LINEARLY with resistance.

Be sure to leave a small fixed resistance in series.

Many thanks, Don Lancaster voice phone: (928)428-4073 Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552 rss: http://www.tinaja.com/whtnu.xml email: don@tinaja.com Please visit my GURU\'s LAIR web site at http://www.tinaja.com

For those interested in one hobbyist design walkthrough, I've redrawn this with an additional resistor, some labels added, no resistor values to start, and some commentary.

Q1, R1, and R2 form a current source, with the current set by Q1's Vbe across R1. (Q1's Ic through R2 allows voltage compliance for the node at Q2's base.) This current source drives a current through R3 and R4 and thereby sets the linearly adjustable voltage to the base of Q2, which is operating as an emitter follower.

Q2's emitter voltage sets the current through R5 and therefore also through the LED. Q2's collector current also supplies the drive current needed by Q3 to supply the LED's (and R5's) current. But as this collector current will only be a tiny fraction of Q3's collector current, it doesn't materially affect the LED current, which is primary current path for R5's current.

R6 acts as a passive pull-up for Q2's collector.

R7, I believe, is present as a simple passive path partly because of the non-linear active response of any diode and its capacitance, which may cause oscillation in such a circuit at lower current settings. But I may be wrong about that, so it would be nice to hear about the exact thinking. In any case, I believe it should be set so as to account for only a tenth or twentieth of the LED current.

I added R4 to provide a small voltage at Q2's base even when R3 is completely at the 0-ohm end of its sweep. I added it to make the point that, without it, Q2 will pinch off its emitter voltage and shut down the LED current _before_ R3 reaches that end of its range, -- leaving a small part of its sweep "dead". It's not in any way important, though. Mostly, I'm just using it to make that behavior manifest.

Before calculating values, one might have considered just doing it this way:

But then the base current drive required for Q2 would have siphoned off substantially more current and this would then have required that the Q1 current source be much "stiffer" to keep the Q2 base drive impact at the same relatively small proportion. It also would then affect the range of values allowed for the R3 potentiometer (and almost certainly excluded the possibility of a 10k pot, which is common.) The slightly more complex drive stage suggested requires only a very modest current drive by allowing a third transistor handle sourcing the current into the LED and requiring Q2 to only have to supply its base current drive.

Returning to the very slightly modified topology I presented, the design approach might be like this, the inputs being:

(A) LED maximum current = 20mA (B) LED voltage at this current = 4V (typical for white) (C) Expected betas of Q2 and Q3 of, say, >= 50. (This is likely true, if they will be operating outside their saturated regions.)

If Q3 is to operate outside of saturation, then Q3's Vce >= 1V (or so.) With VLED at 4V, this means there is 5V from the supply to Q2's emitter. Allowing at least a few volts of control across R5, this suggests a supply of at least 8V or so. 9V is just fine. This confirms Fred's choice of a 9V rail, I think. A higher voltage would be used, though, if several LEDs are to be used in series.

So,

(D) Supply voltage is 9V.

The Q1 current source needs to supply substantially more current (very much greater than) than Q2's base requires. Assuming this should be about 50 times more (let's say) and assuming that Q2 and Q3 can be relied upon for beta's of 50 each, this means that the current source should supply (LED current / 50 / 50) * 50 or about 400uA. Different assumptions could be used, but this represents a reasonable choice, I think. So,

(E) Q1 current source should roughly target 400uA.

Q1 could operate with its minimum Ic designed to be close to zero, but doing so would mean that it's Vbe would vary substantially over its compliance range as more Ic becomes required and then represents, say, orders of magnitude change. (Vbe would vary 60mV/decade of Ic, 18mV per doubling.) To keep this variability within say 18mV or so, the minimum Ic should be about one half of the targeted 400uA, or about

200uA.

With 5V used up by Q3's minimum Vce of 1V plus the LED's required 4V, this leaves about 4V or so at Q2's emitter. To allow a little room for error margin, assume about 3.6V and let Q3's Vce have a little more. This means that Q2's base will be about 4.25V, or so, when the LED is at 20mA. Since Q1's Vbe will be close to 0.65V itself, this means that R2 will have (9V-4.25V-0.65V) or about 4.1V across it. Given that it will also have to carry the 400uA for the current source plus another 200uA of Q1's Ic current, just established, the value of R2 should be 4.1V/(400uA+200uA) or about 6800 ohms. Luckily, this is a standard value so use it.

(F) R2 = 6800 ohms.

Also, R1 will be 0.65V/400uA or 1625 ohms. A lower standard value is okay:

(G) R1 = 1500 ohms.

Now, it is appropriate to consider R3. Assuming R4 will only have a few tenths of a volt across it, R3 will have the rest or about 4V. Given a current source of 400uA or so, this suggests a potentiometer value of 4V/400uA or 10k. Not bad. Looks like a 10k pot is a good choice under the circumstances and luckily widely available. Use it.

(H) R3 = 10k potentiometer

R3 can be a linear potentiometer for linear control of the current or else a logarithmic potentiometer if apparent brightness due to our eye's log response is appropriate.

As R3's resistance nears zero, Q2's base will go to zero volts if R4 weren't present. Before that, Q2's emitter will be driven to ground and the LED current will halt. So if some of the wiper range of R3 is to be recovered for light control (say 10% of it), then R4 might be set to take up perhaps 0.2V or so at 400uA. This means 0.2V/400uA or

500 ohms. A 470 would do.

(I) R4 = 470 ohms.

So with 400uA driven through (10k + 470), Q2's base should be able to reach almost 4.2V. The emitter voltage will likely be able to get close to the 3.6V mentioned before -- perhaps 3.55V. This means that R5 can be set, assuming the LED current and a small portion more for R7. Let's say R7 will have 1mA when the LED is operating at 20mA:

(J) R7 = 4V / 1mA = 4k... use 3.9k ohms.

Then, R5 will have 20mA from the LED, 1mA from R7, and about 1/50th of

21mA (sum of LED + R7) for Q3's base drive arriving at R5 via Q2's collector/emitter path. That's a total of 21mA+21mA/50 or about 21.4mA. So figure R5:

(K) R5 = 3.55V/21.4mA = 166 ohms... use 150 to reach over 20mA.

Selecting a slightly lower value for R5, than calculated, means that the actual control range will reach closer to 23mA (the 3.55V estimate divided by the 150 ohm value.) But that's just fine, probably.

What's left is R6. In this case, pulling up at about one tenth of the required Q3 base drive is probably okay. Since Q3's base drive is about 1/50th of the 21mA, this means about 1/500th of 21mA. The Vbe of Q3 will be about 0.7V, so this suggests 0.7V/(21mA/500) or 16.6k. I think anything from 10k to 22k would be a reasonable choice.

(L) R6 = 10k ohms.

That's it. Substituting, we have:

Not much different.

Just to re-iterate, the reason I think that R7 is used in Fred's circuit is because I've tried to wire up simple constant current circuits and drive a diode at tiny currents with oscillation resulting. Worked just fine with various resistors, but oscillated with a diode and the current control set low. My guess is that this is the reason for including it. But I'd like to see the reasoning and calculations exposed, if anyone wants to add that. I'd learn from it.

Jon

Whew- that's way more thinking than I put into it. My approach was to first enable the circuit to run off a 9V battery with end-of-life defined as ~7V at 20mA maximum LED current, and use a 10K pot to make a VCCS. The most common VCCS samples the current as the voltage developed across an emitter resistor and the main error sources arise from the base current and series Vbe. The 10K pot requirement pretty much dictates a high impedance input which in turn dictates current multiplication either using a Darlington or complementary emitter follower. The complementary follower puts at least one Vbe error source inside the feedback loop, in addition to mitigating base current error, so it is the better choice of the two. The next step is to settle on the order of the emitter current sampling voltage which should be large enough to adequately swamp the Vbe variation due to a 20:1 CE current variation and reasonable estimates of temperature variation, and small enough for circuit operation down to 7V. So allowing for total Vbe variation of 100mV and 5% as more than adequate linearity, an emitter voltage of ~2V is a good choice, and this allows for a minimum of

7V-(2V+3.5V)=1.5V for Q3 Vce. So right off, you can pick R5=100R for ~2V at 20mA. This then defines the maximum Q2 base voltage of 2V+0.65=2.65V for something like 2.7V across the 10K rheostat, or 270uA, throw in an extra 10uA for Q2 Ib. So allowing for Q1 Vbe of 0.65V, R1=0.65V/(280uA)=2.2K. Then R2 is roughly evaluated as worst case keep-alive current for Q1, which occurs at Q1 Vb of ~2.8V and 7V power supply. At R2=10K, you have (7-2.8-0.65)=350uA through it, making for 350uA-280uA=70uA for Q1 Ic, this is adequate. Maximum Q1 current drain becomes (9V-0.7V)/10K=830uA when supply is 9V and R3 is adjusted to zero- this is fine. The ~60mV variation in Q1 Vbe makes more 60mV/2.2K=30uA x 10K=300mV and /100R for 3mA nonlinearity in output current throughout the adjustment range which is again adequate for the application. R7 is included to linearize the LED characteristic and buy some headroom for Q2 startup by allowing both Q2/Q3 to be well into conduction by the time the LED cutin voltage is reached.

Thanks for exposing some of your own thinking. Very helpful.

I have actually designed and used the part of this exact configuration from the emitter follower base to the load, beforehand, using a different driver for the base voltage. Separately, I've used that particular current source method (inverted) as part of a current mirror.

Jon

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required