Maker Pro
Maker Pro

LM317 Adjustable Regulator Question

J

Jasen Betts

Well, the symbol is for an inverter.
So, if it's an inverter, please 'splain the voltages on the input
and output when the led is off.

inverters basically behave like an op-amp with the non-inverting
input connected somewhere between the defined logic levels
(the inverting input is the inverter input)


in --+----[bi-color-led]--.
| |
| |\ |
`-|-\ |
2-3V-+- | \_______________|
| | /
`---|+/
|/

The negative feedback will put the inverting input close enough to
the output that very little current flows through the LED.
 
M

MFudalla

"Artemus" wrote in message
Ah! This changes things. Yes, the 317 will not sink current and
is the problem. You need something which both sinks and
sources current.
Like an opamp.

Here's a simple circuit that may need to be tweaked, but can source and sink
up to one amp or so:

=========================================================
Version 4
SHEET 1 1020 680
WIRE 128 32 -64 32
WIRE 256 32 128 32
WIRE 256 64 256 32
WIRE 128 112 0 112
WIRE 192 112 128 112
WIRE -64 128 -64 32
WIRE 0 144 0 112
WIRE 256 176 256 160
WIRE 320 176 256 176
WIRE 480 176 400 176
WIRE 256 192 256 176
WIRE 480 192 480 176
WIRE 0 240 0 224
WIRE 128 240 0 240
WIRE 192 240 128 240
WIRE -64 320 -64 208
WIRE 128 320 -64 320
WIRE 256 320 256 288
WIRE 256 320 128 320
WIRE 480 320 480 272
WIRE 480 320 256 320
FLAG -64 320 0
SYMBOL npn 192 64 R0
WINDOW 0 44 29 Left 2
WINDOW 3 37 67 Left 2
SYMATTR InstName Q1
SYMATTR Value 2N3019
SYMBOL pnp 192 288 M180
WINDOW 0 44 66 Left 2
WINDOW 3 32 37 Left 2
SYMATTR InstName Q2
SYMATTR Value D45H11
SYMBOL res 112 16 R0
SYMATTR InstName R1
SYMATTR Value 25
SYMBOL res 112 224 R0
SYMATTR InstName R2
SYMATTR Value 25
SYMBOL voltage -64 112 R0
WINDOW 3 -5 56 Left 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value 5
SYMBOL voltage 480 176 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V2
SYMATTR Value PULSE(0 5 100u 40n 40n 100m 200m 20)
SYMBOL res 304 192 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R3
SYMATTR Value 2
SYMBOL res -16 128 R0
SYMATTR InstName R4
SYMATTR Value 50
SYMBOL diode 112 112 R0
WINDOW 3 33 39 Left 2
SYMATTR InstName D1
SYMATTR Value 1N4148
SYMBOL diode 112 176 R0
WINDOW 3 35 26 Left 2
SYMATTR InstName D2
SYMATTR Value 1N4148
TEXT -98 344 Left 2 !.tran 500m startup

How do I decode this? :)
 
M

MFudalla

mike said:
My bad. I extrapolated from "Outputs are tri-state."

If off is not required, your problem just got simpler.
Put a resistor in series with each led and tie the other
end to a square wave 0-5V. All your voltage tolerance
and current matching/limit problems just went away.
If your red/green leds aren't the same brightness, you can tweak
the duty factor to make it so.

I like this too!
 
M

MFudalla

This I should be able to try tomorrow.

Tried this but didn't really like the result. I had to add an extra
1N914/1N4148 to keep it from clamping too early. With only 2, both
regulators heated up in a hurry but it did clamp the heck out of my 2.5 volt
regulator. With 3, still heating but a little slower. Also lost some of the
clamping. This seems like a brute force type solution wasting power
unnecessarily. I think I'll try the square wave idea next...
 
M

mike

Well, the symbol is for an inverter.
So, if it's an inverter, please 'splain the voltages on the input
and output when the led is off.

inverters basically behave like an op-amp with the non-inverting
input connected somewhere between the defined logic levels
(the inverting input is the inverter input)


in --+----[bi-color-led]--.
| |
| |\ |
`-|-\ |
2-3V-+- | \_______________|
| | /
`---|+/
|/

The negative feedback will put the inverting input close enough to
the output that very little current flows through the LED.
OK
The KEY word in your explanation is "basically".
In that sense, it's true. If you use an op-amp in a stable
configuration with a resistor across the leds, it will work.
But in the real world, with an actual digital logic gate,
actual behavior may not comply with your desires.
You're more likely to get yellow as the system oscillates.
But it may be too dim to see. Depends on the strays.

It's become a moot point as the OP stated OFF is not required.
The input will always be high or low. Digital gate works fine
in that mode.
 
J

josephkk

"Artemus" wrote in message

Here's a simple circuit that may need to be tweaked, but can source and sink
up to one amp or so:

=========================================================
Version 4
SHEET 1 1020 680
WIRE 128 32 -64 32
WIRE 256 32 128 32
WIRE 256 64 256 32
WIRE 128 112 0 112
WIRE 192 112 128 112
WIRE -64 128 -64 32
WIRE 0 144 0 112
WIRE 256 176 256 160
WIRE 320 176 256 176
WIRE 480 176 400 176
WIRE 256 192 256 176
WIRE 480 192 480 176
WIRE 0 240 0 224
WIRE 128 240 0 240
WIRE 192 240 128 240
WIRE -64 320 -64 208
WIRE 128 320 -64 320
WIRE 256 320 256 288
WIRE 256 320 128 320
WIRE 480 320 480 272
WIRE 480 320 256 320
FLAG -64 320 0
SYMBOL npn 192 64 R0
WINDOW 0 44 29 Left 2
WINDOW 3 37 67 Left 2
SYMATTR InstName Q1
SYMATTR Value 2N3019
SYMBOL pnp 192 288 M180
WINDOW 0 44 66 Left 2
WINDOW 3 32 37 Left 2
SYMATTR InstName Q2
SYMATTR Value D45H11
SYMBOL res 112 16 R0
SYMATTR InstName R1
SYMATTR Value 25
SYMBOL res 112 224 R0
SYMATTR InstName R2
SYMATTR Value 25
SYMBOL voltage -64 112 R0
WINDOW 3 -5 56 Left 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value 5
SYMBOL voltage 480 176 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V2
SYMATTR Value PULSE(0 5 100u 40n 40n 100m 200m 20)
SYMBOL res 304 192 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R3
SYMATTR Value 2
SYMBOL res -16 128 R0
SYMATTR InstName R4
SYMATTR Value 50
SYMBOL diode 112 112 R0
WINDOW 3 33 39 Left 2
SYMATTR InstName D1
SYMATTR Value 1N4148
SYMBOL diode 112 176 R0
WINDOW 3 35 26 Left 2
SYMATTR InstName D2
SYMATTR Value 1N4148
TEXT -98 344 Left 2 !.tran 500m startup

How do I decode this? :)

LTSpice files are lingua franca around here.

This (only the portion starting with "Version 4" and ending with
"startup") should be saved as a .asc file and loaded into LTSpice.

?-)
 
J

josephkk

Well, the symbol is for an inverter.
So, if it's an inverter, please 'splain the voltages on the input
and output when the led is off.

inverters basically behave like an op-amp with the non-inverting
input connected somewhere between the defined logic levels
(the inverting input is the inverter input)


in --+----[bi-color-led]--.
| |
| |\ |
`-|-\ |
2-3V-+- | \_______________|
| | /
`---|+/
|/

The negative feedback will put the inverting input close enough to
the output that very little current flows through the LED.

OK. But it may oscillate instead and produce yellow.

?-)
 
T

Tim Williams

14 components? Blahh, try something like this...

.. +5V
.. o
.. | TC4421,
.. '1G04 | etc.
.. |\ |\ 20uH
.. +---| >O---+------| >O-----+---)))---+----o 2.5V
.. | |/ | |/ | |
.. \ \ | | === 10uF
.. / 10k / 10k _|_ | |
.. \ \ GND | _|_
.. | | | GND
.. +----------+-------||------+
.. Ct

Size Ct and the inductor so the operating frequency is high (100-300kHz) and
the current ripple is small (a few 100mA tops).

A CD4047 instead of the gate-and-three-resistors oscillator arguably has one
fewer component, but the oscillator is SO-14. This is smaller. You could
also use a TimerBlox, but then your cost triples...

Tim

--
Deep Friar: a very philosophical monk.
Website: http://webpages.charter.net/dawill/tmoranwms

Wonder if anyone here can offer some insight on this issue. Googling
didn't
turn up much.

I have some 2 lead bicolor LED's that I'm controlling from the outputs of
an
74HC595 shift register. Outputs are tri-state. I'm using one LM317 set up
for 5 volts out as the supply to the 595. A second LM317 is set up for
2.5
volts out and was supposed to act as a voltage reference for the other
side
of the LED's. Everything works great with shift register outputs at "0"
or
"low" - the 2.5 volt LM317 is sourcing and the LED's appear as load and
everything's good. With shift register outputs at "1" or "high" the 2.5
volt
output is being pulled up to close to 3 volts. I'm thinking this is a
sinking scenario for the LM317 which is not how it was intended to
operate
or was designed for.

I thought I had a pretty simple circuit until I noticed this issue. Any
comments would be appreciated.

This will work much better- slight problem with placement of Rcs in the
first one:

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

.
.
.
. LM317
. -------
. 5V>--+-------+-[Rcs]-+-------+---|I O|----+---+->2.5V
. | | | | | A | | |
. | | [R1] --- ------- [100] |
. | >| | --- | | |
. | PN3906 |-----+ 0.1u| +--------' |
. | /| | | | |
. | | [R2] | [100] |
. | | | | | |
. | | | | | |
. GND>--|-------| ------+-------+-------+--------+---|-->
. | | | | | |
. | | [Rc] | --- |
. | | | | 100u--- |
. | | Cc --- | +| |
. | | --- | '---+
. | | | | |
. '-[100]-+-------+-------|---------+----[100]-+
. | | |
. | ------- |
. | | A | |
. '-----|I O|------+
. -------
. LM337
.
.
.
.
.
 
P

P E Schoen

"MFudalla" wrote in message
I like this too!

The only problem is getting something that generates a square wave that can
source and sink 1 amp. But you can use a MOSFET gate driver. They are only
about $1-$2.

Paul
 
J

John S

LTSpice files are lingua franca around here.

This (only the portion starting with "Version 4" and ending with
"startup") should be saved as a .asc file and loaded into LTSpice.

....should be saved as a text file with .asc as the file extension...

Just for clarification. I apologize for the intrusion.
 
P

P E Schoen

wrote in message

They are non-stock, and only provide 25 mA per gate. You need six of them to
get about 1 amp. So at $0.53 each that's $3, and a lot of board space. Here
is a circuit using four transistors and four resistors, that provides a
solid square wave with 1.8A peak into the LEDs, simulated by a 2 ohm
resistor.

Here is the simulation with schematic and waveforms:
http://www.enginuitysystems.com/pix/Square_Wave_Power.png

You can download the ASC file from:
http://www.enginuitysystems.com/pix/Square_Wave_Power.asc

This is much more efficient than a linear source/sink voltage regulator,
which would draw 2.5 watts at 1 amp. Of course the LED resistors are another
source of wasted power, but a PWM circuit is not really practical unless
efficiency is critical.

Paul
 
M

MFudalla

wrote in message

They are non-stock, and only provide 25 mA per gate. You need six of them to
get about 1 amp. So at $0.53 each that's $3, and a lot of board space. Here
is a circuit using four transistors and four resistors, that provides a
solid square wave with 1.8A peak into the LEDs, simulated by a 2 ohm
resistor.

Here is the simulation with schematic and waveforms:
http://www.enginuitysystems.com/pix/Square_Wave_Power.png

You can download the ASC file from:
http://www.enginuitysystems.com/pix/Square_Wave_Power.asc

This is much more efficient than a linear source/sink voltage regulator,
which would draw 2.5 watts at 1 amp. Of course the LED resistors are another
source of wasted power, but a PWM circuit is not really practical unless
efficiency is critical.

Paul

Nice. Something else to try. Thanks Paul and everyone else for this spirited
discussion.

Mike
 
J

josephkk

...should be saved as a text file with .asc as the file extension...

Just for clarification. I apologize for the intrusion.

It is correct and a contribution. No harm, no foul. BTW thanks.

?-)
 
P

P E Schoen

wrote in message
What does "Stock:1,287 Can Ship Immediately" mean?

OopS! My bad. I read the "on order" quantity.
How the heck do you do that with transistor ratings of 600mA absolute
maximum collector current?

Those were just models that were conveniently in the LTSpice list. I could
have used the 2N3055. But the best parts would be Darlingtons like:
http://www.mouser.com/ProductDetail...=vLkC5FC1VN91bqLGf9vXUcx5Ew0ZZAnIa8NcWoUXRYI=
and
http://www.mouser.com/ProductDetail...=vLkC5FC1VN8fzVva3yE2SyoEkAq7vjS9UcfdGdsSM7o=
http://www.onsemi.com/pub_link/Collateral/2N6035-D.PDF

But it's still probably better to use a MOSFET gate driver like this 1.5A
device, in a tiny SOT236 package, for $0.59/1:
http://www.diodes.com/datasheets/ZXGD3003E6.pdf
http://www.mouser.com/ProductDetail...=vRcuMSi6Zy6TuWyzxxxwJz3BjAzkASmBlPz3ci7cxTQ=

Paul
 
M

mike

On 6/21/2012 5:50 PM, [email protected] wrote:
snip
You can't rail them, and the peak current is now doubled from 560mA to 1.12A due to 50% duty (worst case).
You're saying that you can't design an emitter follower that can
dissipate 0.6W average?


You don't need to email me your posts. I know how to find the newsgroup.
 
M

mike

Don't know if design is the word for it- the problem is the slop in output voltage magnitude is a substantial percentage of the total you want to deliver to the LEDs, and he's already working with fairly small current limiting resistors.

Well, you've got 4V to work with. The original design had 2.5V. I don't
know the Vf of the leds in use, but that looks like a substantial
improvement
in volts across the resistor. I estimate we've gone from
"maybe works if you tweak it just right" to "throw it together and it
works". If I were gonna build 10,000/month, I'd sure want to do some more
thinking about it.
 
M

MFudalla

Wonder if anyone here can offer some insight on this issue. Googling
didn't
turn up much.

I have some 2 lead bicolor LED's that I'm controlling from the outputs of
an
74HC595 shift register. Outputs are tri-state. I'm using one LM317 set up
for 5 volts out as the supply to the 595. A second LM317 is set up for
2.5
volts out and was supposed to act as a voltage reference for the other
side
of the LED's. Everything works great with shift register outputs at "0"
or
"low" - the 2.5 volt LM317 is sourcing and the LED's appear as load and
everything's good. With shift register outputs at "1" or "high" the 2.5
volt
output is being pulled up to close to 3 volts. I'm thinking this is a
sinking scenario for the LM317 which is not how it was intended to
operate
or was designed for.

I thought I had a pretty simple circuit until I noticed this issue. Any
comments would be appreciated.

This will work much better- slight problem with placement of Rcs in the
first one:

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

.
.
.
. LM317
. -------
. 5V>--+-------+-[Rcs]-+-------+---|I O|----+---+->2.5V
. | | | | | A | | |
. | | [R1] --- ------- [100] |
. | >| | --- | | |
. | PN3906 |-----+ 0.1u| +--------' |
. | /| | | | |
. | | [R2] | [100] |
. | | | | | |
. | | | | | |
. GND>--|-------| ------+-------+-------+--------+---|-->
. | | | | | |
. | | [Rc] | --- |
. | | | | 100u--- |
. | | Cc --- | +| |
. | | --- | '---+
. | | | | |
. '-[100]-+-------+-------|---------+----[100]-+
. | | |
. | ------- |
. | | A | |
. '-----|I O|------+
. -------
. LM337
.
.
.
.
.
What is the Rc and Rcs? I have some 337's on order and will be trying this
along with some of the other ideas suggested.

Mike
 
J

Jamie

The LED current drive was originally 8mA per, but now with the 50% duty cycle, that load is now double, so you're looking at over 1.1A peak source/sink (70 LEDs). That's getting up there for a driver that can't be saturated.




You can't rail them, and the peak current is now doubled from 560mA to 1.12A due to 50% duty (worst case).
I have no idea what it is that concerns you about the output of that
timer not reaching the rail? If you need a rail signal in the high
state, you simply put a pull up R from the Vcc to the output. This is of
course, if you don't need a heavy drive.

Jamie
 
Top