lm317 as current regulator

J

James Thompson

Jan 1, 1970
0
Clip..
If you're going to tear up a post and say four paragraphs to the extent of
saying that mains power isn't well behaved, you'd do better to quote the
context. I said that in ONE paragraph.

Whoa guys! I have not been discussing this with anyone via email, wrong
one.
And I thank everyone that is helping.

The supply in question is a basic transformer / bridge / cap, and develops
70 volt under no load. With 1 amp load it is running 59.7 volt measured for
short time across the load resistor. I am choosing to voltage regulate this
beast via a series pass transistor boosted lm317hvt regulator at the very
least. I have decided on strings of 15 led's per string with each string
having a compensating resistor. Also since I already have a board etched for
that amount.
The led's in question are 27,000 mcp with forward drop of 3.2 to 3.8 volt
and a max of 30 ma.

I now will regulate the supply voltage to 60 volt, which should hold stable
regardless of the mains +- 10 volt which may vary the dc voltage +- 5 volt.
From the 55 volt, each string of 15 will drop 52.5 volt leaving 2.5 volt to
the series resistor. 2.5 volts divided by .025 ma will make the resistor
100 ohms, and 2.5 X .025 = .0625 in watts so a 1/4 watt resistor is plenty
for this.

Now there are 64 available strings that can be filled with led's, and if all
were used it would be 64 Times .025 ma = 1.6 amp total board current demand.
That is if the supply does not sag on 1.6 amp. Like I said earlier post, it
came from an audio power amp / receiver and is a fairly big size of core
with 16 ga secondary wire.
For the present, not all strings will be used - only 56 will be filled
making the board draw at 1.4 amp.

Ok, does this look right to you guys?
 
E

ehsjr

Jan 1, 1970
0
James said:
Clip..



Whoa guys! I have not been discussing this with anyone via email, wrong
one.
And I thank everyone that is helping.

The supply in question is a basic transformer / bridge / cap, and develops
70 volt under no load. With 1 amp load it is running 59.7 volt measured for
short time across the load resistor. I am choosing to voltage regulate this
beast via a series pass transistor boosted lm317hvt regulator at the very
least. I have decided on strings of 15 led's per string with each string
having a compensating resistor. Also since I already have a board etched for
that amount.
The led's in question are 27,000 mcp with forward drop of 3.2 to 3.8 volt
and a max of 30 ma.

I now will regulate the supply voltage to 60 volt, which should hold stable
regardless of the mains +- 10 volt which may vary the dc voltage +- 5 volt.
From the 55 volt, each string of 15 will drop 52.5 volt leaving 2.5 volt to
the series resistor. 2.5 volts divided by .025 ma will make the resistor
100 ohms, and 2.5 X .025 = .0625 in watts so a 1/4 watt resistor is plenty
for this.

Now there are 64 available strings that can be filled with led's, and if all
were used it would be 64 Times .025 ma = 1.6 amp total board current demand.
That is if the supply does not sag on 1.6 amp. Like I said earlier post, it
came from an audio power amp / receiver and is a fairly big size of core
with 16 ga secondary wire.
For the present, not all strings will be used - only 56 will be filled
making the board draw at 1.4 amp.

Ok, does this look right to you guys?

No, but it's easily fixable, and it won't fry any
components as it stands.

The fix is simple, and can be added later. Just add a
120 to 12 volt, 4 amp transformer with the primaries
of both transformers in parallel and the secondaries
in series aiding. Worst case, 105 volts line voltage
*and* 16 volts sag combined, you'll still have over
58 volts input to the regulator, so it will be able
to provide a solid 55 volts out. Worst case the
other way - 130 volts line voltage and only 10 volts
sag, you'll have less than 82 volts input to the
regulator, which is only a 27 volt difference between
the input and the 55 volt output, and you are allowed
up to 37 volts.

Ed
 
E

ehsjr

Jan 1, 1970
0
Lostgallifreyan said:
If you're going to tear up a post and say four paragraphs to the extent of
saying that mains power isn't well behaved, you'd do better to quote the
context. I said that in ONE paragraph.






Yes, IF the initial supply isn't well behaved, as in regulated to start with. I
said this. You chose to omit that from your quote, but that doesn't make it
unsaid.


That means a linear,




Now I get it. :) You're heading me off at the pass, you've offered a private
solution and you would rather tear my posts up than let them challenge your
efforts, it seems. As I've also mentioned in my posts switching regulators for
efficiency and 40-LED chains at high voltage I can see why it might look like
competition to you. :) Incidentally, if you also concede that making longer
strings for higher voltages is good, why did you say only a few sentences ago
that my suggestion of making the LED's drop most of the voltage was a bad idea?






Yes, yes, I DID mention that the mains supply WOULD would vary far more than
the 0.5V he'd allowed across his limiting resistor, but you chose to cut that
out of your quote before proceeding to administer your professorial thrashing.






Ah, so you did quote it. :) Hell, you even agree. >:) So why bother with those
4 paragraphs of mathematically inclined invective? It's easier to cut to the
chase. It's easier to advise someone if you keep it short, that way they're
less likely to miss context. Still, my post was short and you still missed it
till now, but I did try...

I bypassed responding to the rest of your note - there's
nothing on topic that would be helpful to others. But
the misinformation below is so completely wrong and
dangerous to the poor LM317 that response is required.
CURRENT REGULATOR! I guessed someone would see my loose phrasing and make a
more serious mistake, but I didn't expect it to be someone who posted like a
maths professor. Look at the data sheet. The LM317 can be configged as a
current regulator, even though it is a voltage regulator. And as such it does
NOT see a high voltage. It doesn't care about the voltage, all it sees is
current (actually, the small voltage across a resistor), and the high voltage
is mostly dropped across LED's, hence the increased efficiency. And yes, for
the record, the LM317 itself IS limited to 37V, and if you actually read my
posts you'll know that I also know this. You'd also know by now, even from this
quote of my post, that I was insisting on regulation in an ideal solution.

That is complete and utter rubbish.

The 300 volt transformer you proposed will yield
~424 volts DC, applied to Vin of the LM317.
The LED string is 40 LEDs in series each with a 3.5V drop
for a total drop of 140 volts, and is connected to the
junction of the adj pin and the 50 ohm resistor.
The 50 ohm resistor, connected from Vout to Adj, has a 1.25
volt drop and sets the current to .025 mA. The LM317 sees
Vin to Vout, which will be 282.75 volts (424-1.25- 140)

I assume you can read an ascii schematic:
(View in fixed font)

< 282.75V >
----- <1.25V>
+424V -----Vin|LM317|Vout--[50R]--+
----- |
Adj |
| | <- 140 volt ->
+----------------+---[LedString]---+
|
0v -------------------------------------------------+

Do you understand it now?

Ed
 
L

Lostgallifreyan

Jan 1, 1970
0
ehsjr said:
The 300 volt transformer you proposed will yield
~424 volts DC, applied to Vin of the LM317.
The LED string is 40 LEDs in series each with a 3.5V drop
for a total drop of 140 volts, and is connected to the
junction of the adj pin and the 50 ohm resistor.
The 50 ohm resistor, connected from Vout to Adj, has a 1.25
volt drop and sets the current to .025 mA. The LM317 sees
Vin to Vout, which will be 282.75 volts (424-1.25- 140)

I assume you can read an ascii schematic:
(View in fixed font)

< 282.75V >
----- <1.25V>
+424V -----Vin|LM317|Vout--[50R]--+
----- |
Adj |
| | <- 140 volt ->
+----------------+---[LedString]---+
|
0v -------------------------------------------------+

Do you understand it now?


Yes. I was wrong. I could put it down to a thirty hour session on other
problems, but it doesn't mattaer. Wrong is wrong.
 
E

Eric Smith

Jan 1, 1970
0
James Thompson said:
If the specs say it can handle 1.5 amp with a differential of 37 volts,

The spec doesn't say that.

It says it can handle 1.5A. It says it can handle 37V. It doesn't say
that it can do both at the same time.

There's a spec for maximum junction temperature, and a spec for thermal
resistance of the package. Given those specs, the ambient temperature,
the thermal resistance of the heat sink, and the airflow, you can
determine the maximum power dissipation that can be handled without
exceeding the maximum junction temperature.
 
I

ian field

Jan 1, 1970
0
Eric Smith said:
The spec doesn't say that.

It says it can handle 1.5A. It says it can handle 37V. It doesn't say
that it can do both at the same time.

There's a spec for maximum junction temperature, and a spec for thermal
resistance of the package. Given those specs, the ambient temperature,
the thermal resistance of the heat sink, and the airflow, you can
determine the maximum power dissipation that can be handled without
exceeding the maximum junction temperature.

Does this chip include overtemp shutdown?
 
F

Franc Zabkar

Jan 1, 1970
0
When using the lm317t voltage regulator with a 1.2 ohm 5 watt resistor for 1
amp limiting, my question is: Is the input limit on the ic still limited to
about 40 volts?
What I am doing is, I have a supply voltage of 60 volt dc and I want to
limit the current draw to 1 amp for an led board I made. the leds will be a
series link of 12 with 40 of these in parallel. By limiting the current
available to this panel, it should put the voltage of each led at 3.33 volt.
White leds here.
Would the lm317t work in current reg mode since it will only see 20 volt
across it.
Or should I first pre-regulate the 60 volt down to say about 42 volt?

If you settle for the series resistor solution, then you don't even
need to rectify the supply. You could just wire the LEDs as strings of
anti-parallel pairs with a limiting resistor (or capacitor).


|--|>|--| |--|>|--|
+--| |--- / ---| |--- R ---+
| |--|<|--| |--|<|--| |
| |
AC o--| +-- C --o AC
| |
| |--|>|--| |--|>|--| |
+--| |--- / ---| |--- R ---+
|--|<|--| |--|<|--|

I suggest you take a look inside an LED night light. Maybe they do it
this way ???

Otherwise, if you insist on a DC approach, then why not opt for a
cheap 3-terminal current regulator for each 25mA string of LEDs? You
could even make a current regulator out of a transistor and a red LED.
There would be no need for a heatsink, or at least not a big one.

- Franc Zabkar
 
J

James Thompson

Jan 1, 1970
0
Franc Zabkar said:
If you settle for the series resistor solution, then you don't even
need to rectify the supply. You could just wire the LEDs as strings of
anti-parallel pairs with a limiting resistor (or capacitor).


|--|>|--| |--|>|--|
+--| |--- / ---| |--- R ---+
| |--|<|--| |--|<|--| |
| |
AC o--| +-- C --o AC
| |
| |--|>|--| |--|>|--| |
+--| |--- / ---| |--- R ---+
|--|<|--| |--|<|--|

I suggest you take a look inside an LED night light. Maybe they do it
this way ???

Otherwise, if you insist on a DC approach, then why not opt for a
cheap 3-terminal current regulator for each 25mA string of LEDs? You
could even make a current regulator out of a transistor and a red LED.
There would be no need for a heatsink, or at least not a big one.

Thank you frank. I believe you hit at the heart of the matter. What you
said about using a regulator per series string is along the lines of my
original thinking. Especially that the led's are sensitive to current
changes.

Ok here it is as best I can come up with now, help me if I make a mistake.

32 led's each dropping 3.5 volt and drawing 25 ma = 112 volt. Now 32 rows
each drawing 25 ma = 800 ma.

Now for the supply end and isolation from mains, 2 identical 120 to 18 volt
transformers, 18 volt winding together for isolation. To the 120 out of
second transformer is a bridge rectifier with Capacitor. This would develope
about 160 volt dc +/- a few volts.
From this dc, can the lm317 handle the regulation being 48 volt difference
of 160 and 112, and would this be a workable solution?
I could sellect a 120 to 18, then a 120 to 24 volt transformer for the
isolation part to drop some volts on the ac side. As long as each
transfomer handles at least 1 amp. Thanks again. JT
 
E

ehsjr

Jan 1, 1970
0
James said:
Thank you frank. I believe you hit at the heart of the matter. What you
said about using a regulator per series string is along the lines of my
original thinking. Especially that the led's are sensitive to current
changes.

Ok here it is as best I can come up with now, help me if I make a mistake.

32 led's each dropping 3.5 volt and drawing 25 ma = 112 volt. Now 32 rows
each drawing 25 ma = 800 ma.

Now for the supply end and isolation from mains, 2 identical 120 to 18 volt
transformers, 18 volt winding together for isolation. To the 120 out of
second transformer is a bridge rectifier with Capacitor. This would develope
about 160 volt dc +/- a few volts.
From this dc, can the lm317 handle the regulation being 48 volt difference
of 160 and 112, and would this be a workable solution?

No. However, your solution below with the 18 and 24
volt transformers will work, but with much beefier
transformers. See that response below.

The LM317 has *MAXIMUM* of 40 volts difference Vin to Vout.
The LM317HV has a *MAXIMUM* of 60 volts difference.
Your 48 volt figure is wrong, and does not consider
worst case.

At 120 v AC, you won't get 160 volts, you'll get ~ 167 at
the cap. (1.414 * (120-2)) = 166.852. Your design range
will be 145.6 to 181 volts input to the regulator. Your
maximum difference is 181-112 or 69 volts - you *must*
reduce the difference, even if you use the higher
voltage LM317HV.

I could sellect a 120 to 18, then a 120 to 24 volt transformer for the
isolation part to drop some volts on the ac side. As long as each
transfomer handles at least 1 amp. Thanks again. JT

That will work with 34 strings of 30 LEDs per string.
The maximum Vin-Vout, worst case, will be 20 volts,
and the minimum will be 3.5, so the LM317s will get
enough overhead at the minimum, and Vin-Vout won't be
exceeded at the maximum.

The problem here is the 1 amp transformer rating. That's
1 amp (and it needs to be higher than 1 amp) that is being
pulled from the *primary* of the 24 to 120 v transformer.
Transformers are usually rated at secondary amps. That means
your 24 volt transformer needs to be rated more than 5 amps
secondary current - and so does your 18 volt transformer.
To convince yourself of this, remember that power in = power
out (ignoring inefficiency). You have 1020 LEDs using 3.5*.025
watts each, or 89.25 watts with another 12.75 watts in the
34 LM317's for 102 watts total, not including inefficiency.
To get 102 watts out, you need to put 102 watts in, which
means the 24 volt side must run at 4.25 amps at a minimum.
It gets a lot worse when you figure in loss in the
transformer, and peak current draw.

Frankly, this solution is not very good. While it will
protect the LED's and ensure no fluctuation in the
light output due to line voltage variation, you'll need
beefy, expensive transformers, and 34 LM317's .

Ed
 
J

James Thompson

Jan 1, 1970
0
Snip..
No. However, your solution below with the 18 and 24
volt transformers will work, but with much beefier
transformers. See that response below.

The LM317 has *MAXIMUM* of 40 volts difference Vin to Vout.
The LM317HV has a *MAXIMUM* of 60 volts difference.
Your 48 volt figure is wrong, and does not consider
worst case.

At 120 v AC, you won't get 160 volts, you'll get ~ 167 at
the cap. (1.414 * (120-2)) = 166.852. Your design range
will be 145.6 to 181 volts input to the regulator. Your
maximum difference is 181-112 or 69 volts - you *must*
reduce the difference, even if you use the higher
voltage LM317HV.



That will work with 34 strings of 30 LEDs per string.
The maximum Vin-Vout, worst case, will be 20 volts,
and the minimum will be 3.5, so the LM317s will get
enough overhead at the minimum, and Vin-Vout won't be
exceeded at the maximum.

The problem here is the 1 amp transformer rating. That's
1 amp (and it needs to be higher than 1 amp) that is being
pulled from the *primary* of the 24 to 120 v transformer.
Transformers are usually rated at secondary amps. That means
your 24 volt transformer needs to be rated more than 5 amps
secondary current - and so does your 18 volt transformer.
To convince yourself of this, remember that power in = power
out (ignoring inefficiency). You have 1020 LEDs using 3.5*.025
watts each, or 89.25 watts with another 12.75 watts in the
34 LM317's for 102 watts total, not including inefficiency.
To get 102 watts out, you need to put 102 watts in, which
means the 24 volt side must run at 4.25 amps at a minimum.
It gets a lot worse when you figure in loss in the
transformer, and peak current draw.

Frankly, this solution is not very good. While it will
protect the LED's and ensure no fluctuation in the
light output due to line voltage variation, you'll need
beefy, expensive transformers, and 34 LM317's .

Ed

Thank you ed, you are a genuine help here!
I have adjusted the the led count to 40 per so the led drop will be 140
volt.
With the remainder on the lm317 and under the 37 volt i/o maximum.
Would you suggest not using transformers for isolation as like you said
considering the wattage ( 1280 led = 40 per string X 32 rows )( .0875 watt
per led X 1280 = 112 watt + about 16 watt (.5 per lm317) on the 32 lm317 =
128 watt. So what you are saying on the transformers are they must handle
that power + overhead, and to get that power the volt/amp rating will need
be for a 24 volt out transformer 5.5 amp minumum. I see now that they would
be expensive to do with transformers. What is your best, would you suggest
on configuring this. If you want to help via email, send to the hotmail (
jamesthompson2002(not this)@hotmail.com ). Thank you.
 
E

ehsjr

Jan 1, 1970
0
James said:
Snip..




Thank you ed, you are a genuine help here!
I have adjusted the the led count to 40 per so the led drop will be 140
volt.
With the remainder on the lm317 and under the 37 volt i/o maximum.
Would you suggest not using transformers for isolation as like you said
considering the wattage ( 1280 led = 40 per string X 32 rows )( .0875 watt
per led X 1280 = 112 watt + about 16 watt (.5 per lm317) on the 32 lm317 =
128 watt. So what you are saying on the transformers are they must handle
that power + overhead, and to get that power the volt/amp rating will need
be for a 24 volt out transformer 5.5 amp minumum. I see now that they would
be expensive to do with transformers. What is your best, would you suggest
on configuring this. If you want to help via email, send to the hotmail (
jamesthompson2002(not this)@hotmail.com ). Thank you.

It's even worse than the numbers above show.
The transformer supplies current through diodes to
the capacitor and to the load. The total power
consumed must be provided by the transformer, but
the diode and the charge on the capacitor prevents
the transformer from supplying power for some portion
of the cycle. Consider:
+---Load---+
| |
xformer A--->|---B---+---cap----+---gnd

When the xformer output at A is more positive than B,
the diode conducts and sends current into the load AND
the cap. So more current is needed than just the
current that the load draws.

When the voltage at A is below the voltage at B, the
load draws current from the cap. The transformer can't
provide current, because the diode blocks it. The
transformer will provide current once again when
the voltage at A is higher than the voltage at B.
The net effect is that the current is drawn in spurts,
and the peak current exceeds the current that the leds
will use.

Regarding the "best" configuration: "best" is a
subjective term. Lowest cost? Least amount of work?
Highest reliability? Least flicker? Most stable
brightness? Safest?

If you don't mind investing a lot of work, the best
solution in my opinion is a 10 dollar power supply
and 341 strings of 3 LEDs each with a resistor in
series with each string. The last led can be handled
alone, with a different resistor. This solution is
safe, cheap etc etc - the downside is a lot of work,
and to a minor degree, differences in current through
the LEDs. The power supply is cat# 15625PS for $9.95 at
http://www.mpja.com/

It will provide 12 volts at 10 amps (plus other voltages
we don't care about). Three LEDs at 3.5 volts will need
a dropping resistor: R = (12-(3*3.5))/I
For example, say you want 25 mA: R = 1.5/.025 or 60
ohms. You could use a 59 ohm or a 60.4 ohm - they are
standard values, and are available for 2 cents each in
lots of 200 from Mouser. The single LED will need a
425 ohm resistor - you could use a 422 or a 430.

To turn the power supply on, connect a switch from
the green wire to any black wire. +12 volts is
available on the yellow wire.

Ed
 
Top