Maker Pro
Maker Pro

LM317 Adjustable Regulator Question

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.
 
M

MFudalla

Thanks Art but that will ultimately double the number of 595's I'd need.
Also, this is a totally discrete serial application (no microcontroller)
which will ultimately have 60-70 bicolor LED's.
 
M

mike

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.
I once had an engineer who had a saying, "a circuit should be as simple
as possible, but no simpler."
I think yours is simpler.
Gotta have a pulldown that can supply ALL the led current.
Stick in a resistor that can sink 70x+ the led current.
And heat sink the lm317.
I'd also be concerned whether you can reliably turn on both
sides with only 5V.
If you're building one that has to sorta work, you're close.
If you want something reliable and repeatable, a new topology
would be in order.
 
J

Jasen Betts

Fig. 1

LED
-----. .--|<--.
| | |
Q|---+--+-->|--+--.
HC595 | | |
| | |\ |
| '--| >o--R1--'
| |/

hi / lo / tri-state = red / green / off

Neat!
 
M

MFudalla

All great ideas and I hope to try some of them soon limited only by what I
have in the 30+ year stockpile I have.

Art, in your last post you mentioned Vin-Vout of 5V. I actually have 12
volts into each regulator.

I had one other idea in addition to those you all provided. I'm thinking
about getting rid of the 2.5 volt regulator. I'd keep one 317 set at 2.5 for
Vcc of the 595. I'll add a 337 negative regulator set at -2.5 to supply Gnd
on the 595. So the 595 is now running off a split supply but essentially
sees 5 volts. I'll run my other gates off this same supply. The outputs from
the 595 are to one side of the bicolor leds as before but now the other side
of the LED's goes to the center tap of the power supply transformer. This
should provide good regulation for both polarities and give consistent
brightness no matter how many greens or reds are lit.

Sorry if this is carrying on too long. I really enjoy all the expertise here
though.
 
M

mike

So, splain me how it works to turn off the leds?
What's in that little triangle between Q and R1?

The upside is that you can probably add a cap
and have tristate = yellow.
 
M

mike

I think it's an inverter. Nice idea but not for 60-70 leds.

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.
 
M

MFudalla

Thanks Jamie but I need something in the area of 70 * 8ma. = .5-1A. Nice
device though. The datasheet doesn't offer a suggestion for increasing
current capability.
 
M

mike

Thanks Jamie but I need something in the area of 70 * 8ma. = .5-1A. Nice
device though. The datasheet doesn't offer a suggestion for increasing
current capability.

You mean, like, splitting the load and using more than one????
 
M

MFudalla

Off wasn't a requirement. Bicolor LED's - either on in one direction = red,
on in the other direction = green.
 
M

MFudalla

No, more like adding pass transistors like increasing the current capability
of a 7805 regulator.
 
M

mike

Off wasn't a requirement. Bicolor LED's - either on in one direction = red,
on in the other direction = green.

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.
 
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.

Tristate the inverter => output is high-Z = no current in LED.

Please don't top-post.
 
J

Jamie

George said:
I was thinking about this on the drive home. (slow day?)
If you don't like the resistor, you can flip the circuit over.
The 317 sources 2.5 volts and let the IC go low to turn the led on.
(Assuming the IC can sink the LED current.)

George H.



317 output goes here
o------o
| |o
.-. |
| | |
1k | | |
'-' |
| |
| |
1N914 V |
- |
| |
| |
1N914 V o
- |
| |/
o--o-| 2N2222
| |>
| |
o o
.-. |
| | |
10k | | |
'-' |
o o
| |o
o--o---o
|
o
===
GND


That is ~ 2.5 volt clamp.. It'll kick in as a sink when needed!

Yes, It works and I know I am weird.!

Jamie
 
M

MFudalla

Jamie said:
317 output goes here
o------o
| |o
.-. |
| | |
1k | | |
'-' |
| |
| |
1N914 V |
- |
| |
| |
1N914 V o
- |
| |/
o--o-| 2N2222
| |>
| |
o o
.-. |
| | |
10k | | |
'-' |
o o
| |o
o--o---o
|
o
===
GND


That is ~ 2.5 volt clamp.. It'll kick in as a sink when needed!

Yes, It works and I know I am weird.!

Jamie
This I should be able to try tomorrow.
 
J

josephkk

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.
Art

Yabbut, opamps that will sink or source 1 A or so are not all that cheap.
then again neither are 595s.

?-)
 
P

P E Schoen

"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
 
Top