Maker Pro
Maker Pro

simple buck switcher for LED drive from 9v?

W

Walter Harley

I was recently playing with the Roman Black SMPS circuit that someone
mentioned here. Very cool, a switching regulator with two ordinary
transistors and just a handful of components.

I would like to build something similarly simple, small, and inexpensive, to
drop a 9v battery (range 6v to 9.5v) down to efficiently power a red LED at
about 10mA. I'm looking for current rather than voltage regulation (that
is, I don't want a 2.1v regulator, I want a 10mA regulator), but the current
to the LED doesn't need to be DC.

I've searched a bit for circuits, to no avail so far. I'm still not very
comfortable designing switch-mode things, so although I'm going to try, I
don't have high hopes. Can anyone point me to a circuit that does something
like what I want?

Thanks,
-walter
 
W

Winfield Hill

Walter Harley wrote...
I was recently playing with the Roman Black SMPS circuit that someone
mentioned here. Very cool, a switching regulator with two ordinary
transistors and just a handful of components.

I would like to build something similarly simple, small, and inexpensive,
to drop a 9v battery (range 6v to 9.5v) down to efficiently power a red
LED at about 10mA. I'm looking for current rather than voltage regulation
(that is, I don't want a 2.1v regulator, I want a 10mA regulator), but the
current to the LED doesn't need to be DC.

I've searched a bit for circuits, to no avail so far. I'm still not very
comfortable designing switch-mode things, so although I'm going to try, I
don't have high hopes. Can anyone point me to a circuit that does
something like what I want?

--------------------------- corrected post ----------------------------

Seems a common enough task, but it's more rewarding to design a circuit
that's just right, than to copy somebody else's general-purpose design.
First you want a buck regulator in which the bucking inductor is large
enough to operate at a nearly constant current. Most buck-regulator ICs
are meant for voltage regulation and typically provide a 1.25V feedback
pin. They can be easily used for current regulation if the feedback pin
monitors the voltage across a current-sensing resistor, but for a single
red LED load dropping about 1.6V, an additional 1.25V measurement drop
wastes an unacceptable amount of power. Try this efficient LED switcher
circuit I designed that can regulate at the 250mV current-sense level.
_________________________________________________________
| |
| Win's efficient constant-current LED regulator |
| +5 - 9V |
| o--+---+--- E C ------------------+--- L1 --, |
| | | B | | |
| | R6 | Q4 .---+-- | --------+ |
| | | | | | | | |
| | '------+ R4 | | _|_ |
| | | | R3 | D1 _\_/_ |
| R5 R8 Q2 | | ,---, | |
| | | E | /_\ | LED |
| +--------- | -----+--- B | | | |
| | | | C | | | |
| | C C | | | | |
| '- R7 -- B B ---+---+-- | -- R2 --+ |
| E E | | |
| Q3 | | Q1 | | |
| o-------------+------+--------------+--- R1 --' |
| Battery Return |
|________________________________________________________|

My design includes a few subtle concepts, such as Q2's hysteresis effect,
and using the constant LED voltage for biasing. So see if you can figure
out how it works and derive the part values. :>) Note, if Q3 and Q4 are
n- and p-type mosfets (preferred), then R7 and R8 can be eliminated.

Thanks,
- Win

whill_at_picovolt-dot-com
 
F

Fred Bloggs

Winfield said:
Walter Harley wrote...



--------------------------- corrected post ----------------------------

Seems a common enough task, but it's more rewarding to design a circuit
that's just right, than to copy somebody else's general-purpose design.
First you want a buck regulator in which the bucking inductor is large
enough to operate at a nearly constant current. Most buck-regulator ICs
are meant for voltage regulation and typically provide a 1.25V feedback
pin. They can be easily used for current regulation if the feedback pin
monitors the voltage across a current-sensing resistor, but for a single
red LED load dropping about 1.6V, an additional 1.25V measurement drop
wastes an unacceptable amount of power. Try this efficient LED switcher
circuit I designed that can regulate at the 250mV current-sense level.
_________________________________________________________
| |
| Win's efficient constant-current LED regulator |
| +5 - 9V |
| o--+---+--- E C ------------------+--- L1 --, |
| | | B | | |
| | R6 | Q4 .---+-- | --------+ |
| | | | | | | | |
| | '------+ R4 | | _|_ |
| | | | R3 | D1 _\_/_ |
| R5 R8 Q2 | | ,---, | |
| | | E | /_\ | LED |
| +--------- | -----+--- B | | | |
| | | | C | | | |
| | C C | | | | |
| '- R7 -- B B ---+---+-- | -- R2 --+ |
| E E | | |
| Q3 | | Q1 | | |
| o-------------+------+--------------+--- R1 --' |
| Battery Return |
|________________________________________________________|

My design includes a few subtle concepts, such as Q2's hysteresis effect,
and using the constant LED voltage for biasing. So see if you can figure
out how it works and derive the part values. :>) Note, if Q3 and Q4 are
n- and p-type mosfets (preferred), then R7 and R8 can be eliminated.

Thanks,
- Win

whill_at_picovolt-dot-com

Then there's the famous Czech 1MHz switcher for ultimate brightness:

Please view in a fixed-width font such as Courier.


+---------+------------------------+---+
| | | |
| | | '---
| e | / \'
| \| 47p | --- SD
| |--+-------||----+ ) |
----- /| | | ) ---
--- c | | ) / \ ~~
| | / | ) --- LED
| | 100k | | |
| | / +-----+---+
| | \ |
| | | c
| | | |/
| +----------------------|
| / | |\
| 150 | e
| / | |
| \ | |
+---------+----+-------------------+
 
W

Winfield Hill

Fred Bloggs wrote...
Then there's the famous Czech 1MHz switcher for ultimate brightness:

+---------+------------------------+---+
| | | |
| | | '---
| e | / \'
| \| 47p | --- SD
| |--+-------||----+ ) |
----- /| | | ) ---
--- c | | ) / \ ~~
| | / | ) --- LED
| | 100k | | |
| | / +-----+---+
| | \ |
| | | c
| | | |/
| +----------------------|
| / | |\
| 150 | e
| / | |
| \ | |
+---------+----+-------------------+

Awkk! Saturated inductors, awwkk!

Thanks,
- Win

whill_at_picovolt-dot-com
 
J

Jim Yanik

I was recently playing with the Roman Black SMPS circuit that someone
mentioned here. Very cool, a switching regulator with two ordinary
transistors and just a handful of components.

I would like to build something similarly simple, small, and
inexpensive, to drop a 9v battery (range 6v to 9.5v) down to
efficiently power a red LED at about 10mA. I'm looking for current
rather than voltage regulation (that is, I don't want a 2.1v
regulator, I want a 10mA regulator), but the current to the LED
doesn't need to be DC.

I've searched a bit for circuits, to no avail so far. I'm still not
very comfortable designing switch-mode things, so although I'm going
to try, I don't have high hopes. Can anyone point me to a circuit
that does something like what I want?

Thanks,
-walter

Linear Technology has some ICs that will do this. I've used the LT1932,and
it's rated up to 10 volts,and only uses 6 TINY components to drive up to 10
LEDs ,current-regulated,not voltage regulated. I built a dime-sized PCB for
a LED flashlight using this IC.
Their web site has .pdf files you can download free.

You can probably Google search for more ICs,or search each IC
manufacturer's sites individually.(like Motorola,National,for a few
examples.)
 
I

Ian Stirling

Walter Harley said:
I was recently playing with the Roman Black SMPS circuit that someone
mentioned here. Very cool, a switching regulator with two ordinary
transistors and just a handful of components.

I would like to build something similarly simple, small, and inexpensive, to
drop a 9v battery (range 6v to 9.5v) down to efficiently power a red LED at
about 10mA. I'm looking for current rather than voltage regulation (that
is, I don't want a 2.1v regulator, I want a 10mA regulator), but the current
to the LED doesn't need to be DC.

I'd tend towards the switch-mode chips designed for this.
There are many tiny SOT23 devices from several vendors
http://www.maxim-ic.com/ for example that will do this.
Yes, they might have a few hundred transistors, but they may only require
an inductor and a couple of passives.

I do wonder if there are some undiscovered relatively simple circuits
out there.
It would be interesting to simulate all possible interconnections of
(say) 10 components, and see which ones produce a regulated switching
supply.
 
W

Walter Harley

Jim Yanik said:
Linear Technology has some ICs that will do this. I've used the LT1932,and
it's rated up to 10 volts,and only uses 6 TINY components to drive up to 10
LEDs ,current-regulated,not voltage regulated.

Hey, that's pretty nice - I didn't find that in my earlier searches, I only
found things that went up to 5v or so, or that wanted to produce much more
current than an LED needs. Maybe I was excluding SMT devices before? Hmm.

I think I'll analyze and build Win's circuit so that I learn something about
the problem, and then I'll use the LT1932 for my actual device :)
 
W

Winfield Hill

Walter Harley wrote...
Jim Yanik wrote...

Hey, that's pretty nice - I didn't find that in my earlier searches, I only
found things that went up to 5v or so, or that wanted to produce much more
current than an LED needs. Maybe I was excluding SMT devices before? Hmm.

I think I'll analyze and build Win's circuit so that I learn something about
the problem, and then I'll use the LT1932 for my actual device :)

The LT1932 is a boost (step-up) converter only (note the switch to ground
_after_ the inductor, as opposed to a switch from the supply _before_ the
inductor). It's well suited for driving one or more _white_ LEDs (Vf = 3V)
from one cell, etc., but won't work efficiently (if at all) for one red LED
from a "high" voltage like 5 to 9 volts. Other than that, it certainly is
a pretty cool little chip!

Thanks,
- Win

whill_at_picovolt-dot-com
 
J

Jeff

Winfield Hill said:
Walter Harley wrote...

The LT1932 is a boost (step-up) converter only (note the switch to ground
_after_ the inductor, as opposed to a switch from the supply _before_ the
inductor). It's well suited for driving one or more _white_ LEDs (Vf = 3V)
from one cell, etc., but won't work efficiently (if at all) for one red LED
from a "high" voltage like 5 to 9 volts. Other than that, it certainly is
a pretty cool little chip!

Zetex has a few pretty cool *little* chips like that also.
 
W

Walter Harley

Winfield Hill said:
The LT1932 is a boost (step-up) converter only (note the switch to ground
_after_ the inductor, as opposed to a switch from the supply _before_ the
inductor). It's well suited for driving one or more _white_ LEDs (Vf = 3V)
from one cell, etc., but won't work efficiently (if at all) for one red LED
from a "high" voltage like 5 to 9 volts. Other than that, it certainly is
a pretty cool little chip!

Ah, maybe that's why I rejected it or didn't find it last time I went
looking.

Speaking here as a newbie to SMPS design, one of the things that makes it a
challenge is that there are so many little variations. Posters here often
get advised to "check www.maxim-ic.com" or some such; but for me, that's of
limited value because of information overload.

I can look at an opamp-based amplifier circuit and immediately see the
topography and understand what it's doing and how to think about it; and I
know enough about opamp parameters to know how to think about selecting a
particular device for a particular task. At this point it's hard to
remember *not* being able to see the forest for the trees.

But I'm not that way yet with SMPS circuits or devices. I'm just beginning
to be able to see things like where the switch is relative to the inductor,
or think in terms of buck vs. boost, or look for the presence of a current
sense resistor; and so I miss what is, I'm sure, obvious to someone more
experienced. It's an interesting perceptual challenge.

Win, in briefly looking over your circuit this morning before coming in to
work, I was confused about three things:

1) why should Q3 be an FET? It's not handling current; I wouldn't think
this circuit was switching so fast that frequency limits were a concern; and
it shouldn't need much current gain. Only reason I could think of was so
that Q1 can turn it off faster (because it doesn't have to saturate).

2) Am I right that Q2 is a PNP, and its job is to let more of the LED's bias
voltage flow (through R4) to Q1's base, so that Q3 stays turned off for
longer? (The hysteresis you mention.)

3) Hey, waitasec, there are NO CAPACITORS AT ALL in that circuit. Gee. I
guess that's because there's no need to smooth the current flow through the
LED.

Thanks,
-walter
 
Y

Yzordderex

Snip....

Walter,

Why not go ahead and DESIGN a circuit. Use a 555, or another basic
building block of a circuit like comparators or op-amps, or a pair of
small signal mosfets, or a chip with some gates. Object is to come up
with a current source - which in most cases would imply an inductor.

If you're up for a challenge:

I would think a dual op-amp, an inductor, and a half-dozen resistors
and capacitors should get the job done.

Now go do it and don't come back here till it's done.

Yzordderrex
 
W

Winfield Hill

Walter Harley wrote...
Win, in briefly looking over your circuit this morning before coming in
to work, I was confused about three things:

1) why should Q3 be an FET? It's not handling current; I wouldn't think
this circuit was switching so fast that frequency limits were a concern;
and it shouldn't need much current gain. Only reason I could think of was
so that Q1 can turn it off faster (because it doesn't have to saturate).

Using a mosfet for Q3 allows one to eliminate the base resistor. :>)

_________________________________________________________
| |
| Win's efficient constant-current LED regulator |
| +5 - 9V |
| o--+---+--- E C ------------------+--- L1 --, |
| | | B | | |
| | R6 | Q4 .---+-- | --------+ |
| | | | | | | | |
| | '------+ R4 | | _|_ |
| | | | R3 | D1 _\_/_ |
| R5 R8 Q2 | | ,---, | |
| | | E | /_\ | LED |
| +--------- | -----+--- B | | | |
| | | | C | | | |
| | C C | | | | |
| '- R7 -- B B ---+---+-- | -- R2 --+ |
| E E | | |
| Q3 | | Q1 | | |
| o-------------+------+--------------+--- R1 --' |
| Battery Return |
|________________________________________________________|
2) Am I right that Q2 is a PNP, and its job is to let more of the LED's
bias voltage flow (through R4) to Q1's base, so that Q3 stays turned off
for longer? (The hysteresis you mention.)

Yes, very good, Q2 is a pnp, and when Q1's collector is on it causes an
extra current through R2 that changes the Q1 base-switching threshold by
R2/R3 times the red LED's voltage, e.g., 1.6 volts.
3) Hey, waitasec, there are NO CAPACITORS AT ALL in that circuit. Gee.
I guess that's because there's no need to smooth the current flow through
the LED.

Right, the inductor nicely performs the current smoothing. The formula
says dI/dt = V/L; the current is constant unless the voltage across the
inductor changes, such as when the Q4 switch opens and the inductor flies
down to -0.3V, turning on the Schottky diode. That's when the current
begins to decline... After dropping by a small hysteresis voltage set
as described above, Q1 is turned on again. Do you see what R3 is for?

Thanks,
- Win

whill_at_picovolt-dot-com
 
W

Walter Harley

Yzordderex said:
Walter,

Why not go ahead and DESIGN a circuit.

:) Well, I think I already answered that question, in my initial post. To
answer it more fully: because I'm very unfamiliar with the premises and
ideas behind switch-mode regulators; and I know that there are many dead end
alleys to be explored, and many wrong turns to be taken. It would be fun
and fascinating, and I would learn a lot, eventually. But I have only a few
hours a week to spend on electronics, and I've got a project that needs to
be completed, and this LED circuit is just a small piece of it. So I can't
really afford to invent this circuit from first principles, unfortunately.

A more snippish answer might be "because good engineering consists in part
of knowing what solutions already exist, rather than reinventing them." Of
course, that would be a more convincing answer if I was actually capable of
designing the thing myself in a reasonable time, which I'm not yet.

I deeply appreciate the help that people on this group have given me as I
learn the various technologies I've asked about. I try to return the favor
by answering others' even simpler questions when I can.
 
W

Walter Harley

Clifford Heath said:
Startup bias for Q1?

Yes; because otherwise you can't get the low 250mV sense voltage that Win
mentioned. You'd need at least 700mV (to turn on Q1).
 
M

Michael

Winfield Hill said:
Walter Harley wrote...

Using a mosfet for Q3 allows one to eliminate the base resistor. :>)

_________________________________________________________
| |
| Win's efficient constant-current LED regulator |
| +5 - 9V |
| o--+---+--- E C ------------------+--- L1 --, |
| | | B | | |
| | R6 | Q4 .---+-- | --------+ |
| | | | | | | | |
| | '------+ R4 | | _|_ |
| | | | R3 | D1 _\_/_ |
| R5 R8 Q2 | | ,---, | |
| | | E | /_\ | LED |
| +--------- | -----+--- B | | | |
| | | | C | | | |
| | C C | | | | |
| '- R7 -- B B ---+---+-- | -- R2 --+ |
| E E | | |
| Q3 | | Q1 | | |
| o-------------+------+--------------+--- R1 --' |
| Battery Return |
|________________________________________________________|


Yes, very good, Q2 is a pnp, and when Q1's collector is on it causes an
extra current through R2 that changes the Q1 base-switching threshold by
R2/R3 times the red LED's voltage, e.g., 1.6 volts.


Right, the inductor nicely performs the current smoothing. The formula
says dI/dt = V/L; the current is constant unless the voltage across the
inductor changes, such as when the Q4 switch opens and the inductor flies
down to -0.3V, turning on the Schottky diode. That's when the current
begins to decline... After dropping by a small hysteresis voltage set
as described above, Q1 is turned on again. Do you see what R3 is for?

Thanks,
- Win

whill_at_picovolt-dot-com

R3 is to lift the base of Q1 slightly so you only need to drop less
than .6V accross R1, the circuit would work without it but would be
less effecient.
It's a nice circuit, I like it.
 
M

Michael

Winfield Hill said:
_________________________________________________________
| |
| Win's efficient constant-current LED regulator |
| +5 - 9V |
| o--+---+--- E C ------------------+--- L1 --, |
| | | B | | |
| | R6 | Q4 .---+-- | --------+ |
| | | | | | | | |
| | '------+ R4 | | _|_ |
| | | | R3 | D1 _\_/_ |
| R5 R8 Q2 | | ,---, | |
| | | E | /_\ | LED |
| +--------- | -----+--- B | | | |
| | | | C | | | |
| | C C | | | | |
| '- R7 -- B B ---+---+-- | -- R2 --+ |
| E E | | |
| Q3 | | Q1 | | |
| o-------------+------+--------------+--- R1 --' |
| Battery Return |
|________________________________________________________|

Would it be possible to leave out Q2+R4 and create a little
hysteresis with a high value resistor from the collector of Q3 to the
base of Q1?
 
Winfield Hill said:
Walter Harley wrote...

Using a mosfet for Q3 allows one to eliminate the base resistor. :>)

_________________________________________________________
| |
| Win's efficient constant-current LED regulator |
| +5 - 9V |
| o--+---+--- E C ------------------+--- L1 --, |
| | | B | | |
| | R6 | Q4 .---+-- | --------+ |
| | | | | | | | |
| | '------+ R4 | | _|_ |
| | | | R3 | D1 _\_/_ |
| R5 R8 Q2 | | ,---, | |
| | | E | /_\ | LED |
| +--------- | -----+--- B | | | |
| | | | C | | | |
| | C C | | | | |
| '- R7 -- B B ---+---+-- | -- R2 --+ |
| E E | | |
| Q3 | | Q1 | | |
| o-------------+------+--------------+--- R1 --' |
| Battery Return |
|________________________________________________________|
<snip>

.. Do you see what R3 is for?
Thanks,
- Win

whill_at_picovolt-dot-com

Instinctively it looks like a "keep pulling down when the LED is no
longer forward biassed thing"...

1) If Q4 is off...

2) ...then L1 dumps its energy via D1 and the LED until it is
exhausted...

3) During this time, Q1 is on... holding Q2 hard on... holding Q1 hard
on (while Q2's emitter is high at LED == on level)...

4) ...So the deadly embrace of Q1 and Q2 is due to this LED_on_level.

5) This level is being drained via Q2's E-B (while > 0.6V) and Q1's
C-E ("short circuit" (while Q1's E-B > 0.6V)).

6) The whole lot should be capable of dropping under is own weight
until the two 0.6V E-B voltages mostly overlap provided there is a
return_path_to_Q2's_E.

7) This return_path_to_Q2's_E must disappear when the LED bias < 2V...

8) ...so Q2's E will hang there in space gently dropping via leakages
only. so R3 is needed to provide that return path?

Robin
 
W

Winfield Hill

Michael wrote...
Winfield Hill wrote ...

Would it be possible to leave out Q2+R4 and create a little
hysteresis with a high value resistor from the collector of Q3
to the base of Q1?

Yes of course, but the amount of hysteresis (and thus the operating
frequency) would be dependant on the battery voltage. By developing
the hysteresis from the relatively-fixed LED voltage the converter's
properties (frequency and current) are nearly invariant with battery
voltage. In this case that's what we get by adding one transistor.

Thanks,
- Win

whill_at_picovolt-dot-com
 
W

Winfield Hill

[email protected] wrote...
<snip>

. Do you see what R3 is for?

Instinctively it looks like a "keep pulling down when the LED
is no longer forward biassed thing"...

1) If Q4 is off...

2) ...then L1 dumps its energy via D1 and the LED until it is
exhausted...

Not until it's exhausted, the inductor current drops a little,
given by the amount of hysteresis, see my answer to Michael.

Thanks,
- Win

whill_at_picovolt-dot-com
 
Top