Maker Pro
Maker Pro

Digital LM317 Control

J

Jay Davis

Jan 1, 1970
0
I'm trying to build a circuit that digitally controls a LM317 using a
(0-5V) DAC. I'm kind of confused about the math here - I can't see how
to change the range of the LM317 to anything other than a 5V range. I
can see how to vary it from say 5 to 10, or from 17 to 22, but I can't
see how to do more than a 5V swing. Right now, I was designing the
circuit like this:

1K 240
DAC OUT--/\/\/\--ADJ--/\/\/\---VOUT


I know that the LM317 creates a 1.2V reference across the 240 ohm
resistor, for a current of 5ma. So then I figure that (VOUT -
DACOUT)=5ma(1k) = range of only +/- 5V. Can someone set me straight here?
 
U

UncleWobbly

Jan 1, 1970
0
Why not just generate whjatever voltage you want from the DAC and feed it
into an emitter follower circuit using a power transistor (dont' forget to
account for the base voltage drop)
 
J

Jay Davis

Jan 1, 1970
0
UncleWobbly said:
Why not just generate whjatever voltage you want from the DAC and feed it
into an emitter follower circuit using a power transistor (dont' forget to
account for the base voltage drop)

How will this allow me to regulate over a full 1.2 to 30V range?
 
T

The Al Bundy

Jan 1, 1970
0
Jay Davis said:
UncleWobbly wrote:

How will this allow me to regulate over a full 1.2 to 30V range?

Something better and easier: use an opampl like the OPA549.
http://focus.ti.com/docs/prod/folders/print/opa549.html

You can make a voltage and current controlled powersupply with this opamp
and 2 DAC's.
And if you are handy enough you can even order some samples from TI.. :)

Just some idea.

Al
 
R

Robert C Monsen

Jan 1, 1970
0
Jay Davis said:
I'm trying to build a circuit that digitally controls a LM317 using a
(0-5V) DAC. I'm kind of confused about the math here - I can't see how
to change the range of the LM317 to anything other than a 5V range. I
can see how to vary it from say 5 to 10, or from 17 to 22, but I can't
see how to do more than a 5V swing. Right now, I was designing the
circuit like this:

1K 240
DAC OUT--/\/\/\--ADJ--/\/\/\---VOUT


I know that the LM317 creates a 1.2V reference across the 240 ohm
resistor, for a current of 5ma. So then I figure that (VOUT -
DACOUT)=5ma(1k) = range of only +/- 5V. Can someone set me straight here?

R1 R2
Vin---\/\/\---Vadj---\/\/\----Vout

Vout = 1.25*(240 + R2)/240 + Vin

In order to do a larger swing, you need a way to scale the output of
your DAC. One easy way would be an opamp circuit like this:
.----------.
IN | | OUT
--------------------| LM317 |----------------
| |
| ADJ |
'----------'
|\ |
+----|-\ |
.------. | | >------+-------'
| DAC +---|----|+/ |
| | | |/ .-. R1+R2
'------' | | |R1 OUT = 1.25 + DAC * -----
| | | R2
| '-'
| |
+--------------+
|
.-.
| |R2
| |
'-'
|
|
===
GND
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

Obviously, IN must be larger than OUT by at least 3V. Accuracy is
related to the tolarances of R1 and R2.

Regards,
Bob Monsen
 
J

Jay Davis

Jan 1, 1970
0
Robert said:
R1 R2
Vin---\/\/\---Vadj---\/\/\----Vout

Vout = 1.25*(240 + R2)/240 + Vin

In order to do a larger swing, you need a way to scale the output of
your DAC. One easy way would be an opamp circuit like this:

Ah, thanks! That's what I was trying to do :)
 
J

John Larkin

Jan 1, 1970
0
In order to do a larger swing, you need a way to scale the output of
your DAC. One easy way would be an opamp circuit like this:
.----------.
IN | | OUT
--------------------| LM317 |----------------
| |
| ADJ |
'----------'
|\ |
+----|-\ |
.------. | | >------+-------'
| DAC +---|----|+/ |
| | | |/ .-. R1+R2
'------' | | |R1 OUT = 1.25 + DAC * -----
| | | R2
| '-'
| |
+--------------+
|
.-.
| |R2
| |
'-'
|
|
===
GND
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

Obviously, IN must be larger than OUT by at least 3V. Accuracy is
related to the tolarances of R1 and R2.

Regards,
Bob Monsen

Use an LM1117 for lower dropout differential. Nice part.

And, as Win has pointed out, you can usually power the opamp off the
regulator output!

John
 
J

Jay Davis

Jan 1, 1970
0
John said:
And, as Win has pointed out, you can usually power the opamp off the
regulator output!

Yeah, I just realized this. Obviously I can't power the opamp off of a
5v supply and expect the circuit to be able to do the full 1.2 to 30V -
no wonder I couldn't get it to make sense in my head.
 
Top