LM317 upper and lower

Thread Starter

Rob1959

Joined Oct 30, 2023
6
I am using the classic adjustable voltage regulator circuit from the lm317 datasheet, The input voltage is 15 volts. I need to modify the circuit so that at the lowest potentiometer setting the output is 5 volts, and at the highest potentiometer setting the output is 12 volts. Does anyone know how to do this?
 

dl324

Joined Mar 30, 2015
16,693
How close to 5V and 12V does it need to be? IIRC, the dropout voltage can be up to 3V, so, depending on current, 12V might not be possible.
 

WBahn

Joined Mar 31, 2012
29,867
One way is to figure out the resistance you need for 12 V and the resistance you need for 5 V and choose a potentiometer that is equal to the difference between the two and a fixed resistor that is equal to the remainder.
 

MrChips

Joined Oct 2, 2009
30,494
This is your basic LM317 adjustable voltage output circuit.

1700528088541.png

Put fix resistors (or adjustable trimmers) on both sides of R1 to set the upper and lower limits on the combined value of R1.
 

crutschow

Joined Mar 14, 2008
34,050
If you don't need more than 800mA, the similar LM1117 low drop-out regulator would be less marginal for a 12V output with a 15V input.
 

Thread Starter

Rob1959

Joined Oct 30, 2023
6
How close to 5V and 12V does it need to be? IIRC, the dropout voltage can be up to 3V, so, depending on current, 12V might not be possible.
Thanks for responding. I would like it to be pretty close, say within half a volt. The most important factor is not to drop below the 5 volt limit or exceed the 12 volt limit. The power source is a single 18650 connected to a tp4056 charge module. The output of the tp4056 module goes into a dc-dc converter module that is currently set to 15 volts. The output from there goes into the lm317 circuit. The current requirement is less than 500 mA.
 

WBahn

Joined Mar 31, 2012
29,867
Thanks for responding. I would like it to be pretty close, say within half a volt. The most important factor is not to drop below the 5 volt limit or exceed the 12 volt limit. The power source is a single 18650 connected to a tp4056 charge module. The output of the tp4056 module goes into a dc-dc converter module that is currently set to 15 volts. The output from there goes into the lm317 circuit. The current requirement is less than 500 mA.
Within half a voltage of 5 V is between 4.5 V and 5.5 V. But you are saying that it's important not to drop below 5 V. So does that mean that you want the lower limit to be between 5 V and 5.5 V?

If so, then I'd recommend choosing resistors that nominally give you 5.2 V to 11.8 V and then determine the tolerances you need to be sure that you go no lower than 5.1 V and no higher than 11.9 V. That gives you at least a bit of margin.
 

crutschow

Joined Mar 14, 2008
34,050
E.g. running under Wine:
I prefer running under Bourbon. ;)

Note that for the minimum 10mA operating current of the LM317, the resistance between the output and the ADJ pin should never be greater than 120Ω to insure that it stays in regulation with no external load.
 

joeyd999

Joined Jun 6, 2011
5,171
Note that for the minimum 10mA operating current of the LM317, the resistance between the output and the ADJ pin should never be greater than 120Ω to insure that it stays in regulation with no external load.
That's one way of doing it. Another is to add a dummy load resistor on the output (I've always preferred to minimize the power dissipated by a trim pot).

In the old days -- when I'd actually consider using something like an LM317 -- there was usually always a load attached of at least 10mA, eliminating the need to carefully control the current in the adjustment network.

Regardless, I was just showing an example of how I'd use my calculator to compute optimal values for range and setability. The input pot value can be changed and the fixed resistors will be quickly recalculated.
 

Audioguru again

Joined Oct 21, 2019
6,613
The circuit schematic in post #4 shows a 240 ohms resistor and is from circuitstoday.com (on the other side of the world) but it shows an LM317 which is wrong. The datasheet shows on its page 1 a more expensive LM117 using a 240 ohms resistor. The LM317 calculates using a 120 ohms resistor.
 
Top