Where did you personally use or see LM317 applied to?

Thread Starter

q12x

Joined Sep 25, 2015
1,692
Where did you personally use or see LM317 applied to? in what circuits?
Have you ever used or seen it in other ccts?
Give me all the examples you can think of. Also specify the Load type in it's Vout. What you were driving with it?
I don't need the books or the internet examples, because Ive seen them. I need your experience with them and your history.
Thank you.
 

MrChips

Joined Oct 2, 2009
30,817
I use LM317 to charge batteries. Input is 15-18VDC adapter. Battery type is 12V SLAB.
Resistance values in the circuit might be different from the ones shown.

LM317 battery charger.jpg
 

dl324

Joined Mar 30, 2015
16,927
LM317 is my go-to linear regulator. I have hundreds of them in my stock. I have few dozen 7805, 7812, LM340, 78L05, but LM317 is more flexible.
  1. I use 2 LM317 when I replace the power section of PCB Willem programmers and their variants (PCB3.5, PCB4, PCB5, etc).
  2. I convinced Willem (of Willem EPROM Programmer fame) to use 2 LM317 on his 4.0, 4.1, and 4.5 programmers.
  3. I used LM317 as a switching regulator, just to see if it worked. I had seen the concept used with fixed voltage regulators and wanted to try it with LM317. Incidentally, I tried to simulate this circuit in LTspice before breadboarding and LTspice was *very* picky about component values that would work. In reality, every simulation that failed worked when I breadboarded.
  4. I used LM317 for an SLA battery charger. It made it easy to switch between charge and float voltages.
  5. I used LM317 for a dual tracking power supply I worked on with a member. I think he started out trying to use LM317 and LM337, but the voltages didn't track. We used it as a learning exercise for him to learn how to use an opamp to implement the negative supply by using common circuit building blocks. https://forum.allaboutcircuits.com/threads/building-a-15-0-15-dc-psu.173208/
  6. I have a circuit in mind to use to test current capacity of unknown transformer secondaries. The usual method is to use power resistors and increase load until the secondary voltage drops 10%. Using an LM317 with a fixed resistor value would let me test transformers without needing a bunch of different power resistor values.
  7. I got a homemade experimenter board from a member and he used 2 LM317 and 16340 batteries for built-in power supplies. I added jacks so adapters could be used and I replaced the 10 turn pots with single turn and put a range selector on one of the supplies.
  8. homemadeExperimenter.jpg


Keep in mind that LM317 isn't guaranteed to regulate with a load current of less than 10mA. For that reason, many will use a 100-120 ohm resistor to set the current. I've used lower values when there's another load on the output (like a power indicator LED). I had one LM317 that wouldn't regulate with a 10mA load (my SLA battery charger). It's the only one that was out of spec WRT the minimum load and nothing I could do about it.
 

dl324

Joined Mar 30, 2015
16,927
Very nice answers ! Thanks.
This is an example of how not to design power supplies used on PCB3 Willem programmer, and variants:
1704834433511.png
They often used a molded inductor for the switching regulator and this one used a signal diode, instead of a Schottky, for the flyback diode.

Then for the VCC section, they used a rectifier diode on the output of the 7805 and put 2 in the ground path of the regulator to boost the voltage above 5V. The latter is more okay than the former. Since LM317 is designed for a stable current out of the adjust terminal, it's a better solution than using diodes.
 

SamR

Joined Mar 19, 2019
5,048
I've built about a dozen DC power supplies from filament transformers with full bridge rectifiers and smoothing caps. All use the LM317 and most have a trimmer pot for voltage adjustment. A couple of them provide up to both + and - ~20VDC for powering op amps.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,692
A friend of mine give me for free his broken beard trimmer. It was not working at all, whatsoever. So for scrapping components. But I decided to find the problem and use it myself. It was it's accumulator the main issue, because it leaked and also rusted some adiacent metal contacts. I throw away that accumulator and decided to transform this device into one with a wire. I already find a 5V 2A SMPS.
The entire device only has (left) a motor inside and a switch. Thats it.
1704834438759.png
I measured the motor with my variable PSU, and as on the label on the motor, I got:
1.5V (as it was when running from the accumulator)
320mA with NO LOAD
1A LOADED
Ok, so I know what Im dealing with so far, right?
I jumped into a LM317 Voltage Regulator, hoping that will run the LOADED motor.
But, LM317 got so hot I got quite panicked ! It also stopped up to 700mA I think, and didnt wanted to go up to 1A as the motor was required from my tests. I believe LM317 is having internally some overheat protection cct and thats why it didnt got higher in amperage. I put a radiator on it but not much difference.
The next step, I put 2xLM317 in parallel with a common Vout but the amperage didnt rise too high either, although the heat was a bit less than with only 1.
Then I started to get information from all the LM317 datasheet that I could put my hands on. And I gathered quite some ccts. In the end I used this one:
1704834568981.png1704834550633.png
The 2 transistors on the top, theoretically should Add the extra current to the LOAD in the Vo, next to the 47uF. I build it and it didnt work. LM317 was still getting hot but not the 2 tr on the top as it should be from the description from the theory in the datasheet.
I am perplexed !
Now, I simplified the cct, leaving only the PNP BD682 in the cct, and I managed to make it warm quite a bit, but the Amperage didnt rise far enough and only around 500mA.
1704834604339.png
How is looking now:
1704834631758.png
What Im doing wrong?
Im afraid Im not understanding correctly LM317 what they are used for ???? I am pushing them too far? Are they too limited?
I dont know.... In my head, this motor driver should have worked....
Also, I know (after discussing this problem with another friend) that the dissipated power over the LM317 (and/or PNP) is 2.45W where the LM317 alone can support 2.5W @25dgrC.

P=(Vin-Vout)Iout (Iout or ILoad)
The voltage drop over LM317 is 5V-1.5V=3.5V.
the maximum Amperage the circuit was running was 700mA and LM317 was getting hot.
So the Power disipated over LM317 is
P=(5-1.5)V*0.7A= 3.5V*0.7A= 2.45W


my LM317T (what I have) << this is data from its datasheet, to ease searching, I collected it here as a convenience.
Input Voltage : 2-40V
OUTPUT CURRENT Maximum Load Current 1.5A
OUTPUT VOLTAGES adjustable 1.2 to 37V range.
Power: 2.5W @25dgrC (from a graphic) and 3.5W @0dgrC
Power Dissipation: Internally limited
 

crutschow

Joined Mar 14, 2008
34,454
Below is the LTspice sim of MrChips circuit in Post #2:
A small battery is emulated by the large capacitor CBattery, starting at the discharged voltage of 11V.
The value of Rs determines the charging current.

1704838082399.png
 

Thread Starter

q12x

Joined Sep 25, 2015
1,692
1- I use 2 LM317 when I replace the power section of PCB Willem programmers and their variants (PCB3.5, PCB4, PCB5, etc).
2- I convinced Willem (of Willem EPROM Programmer fame) to use 2 LM317 on his 4.0, 4.1, and 4.5 programmers.
3- I used LM317 as a switching regulator, just to see if it worked. I had seen the concept used with fixed voltage regulators and wanted to try it with LM317. Incidentally, I tried to simulate this circuit in LTspice before breadboarding and LTspice was *very* picky about component values that would work. In reality, every simulation that failed worked when I breadboarded.
4- I used LM317 for an SLA battery charger. It made it easy to switch between charge and float voltages.
5- I used LM317 for a dual tracking power supply I worked on with a member. I think he started out trying to use LM317 and LM337, but the voltages didn't track. We used it as a learning exercise for him to learn how to use an opamp to implement the negative supply by using common circuit building blocks. https://forum.allaboutcircuits.com/threads/building-a-15-0-15-dc-psu.173208/
6- I have a circuit in mind to use to test current capacity of unknown transformer secondaries. The usual method is to use power resistors and increase load until the secondary voltage drops 10%. Using an LM317 with a fixed resistor value would let me test transformers without needing a bunch of different power resistor values.
7- I got a homemade experimenter board from a member and he used 2 LM317 and 16340 batteries for built-in power supplies. I added jacks so adapters could be used and I replaced the 10 turn pots with single turn and put a range selector on one of the supplies.
To be clear, the current (or the Power) was very small in all your examples, correct?
Now, I will IMAGINE what those currents and Power might have been, and you correct me on what you think it might have been. Im throwing my best guess !!!
1&2 = probably the load required=5V@100mA then power dissipated over LM317=Load Power and it was 500mA ?
3 = ?
4= 15V @ 10mA; P=1.5W and starting to get hot probably?
5= ?
6= ? probably maximum will be the limit of 2.5W of LM317? Not to over power it, probably?
7= ?
Again, these are my guesses, and I believe you used as small power dissipation as possible, comparative with my experiment where I push the power disipation way too high. Am I correct in my assumptions?
 

crutschow

Joined Mar 14, 2008
34,454
P=(Vin-Vout)Iout (Iout or ILoad)
The voltage drop over LM317 is 5V-1.5V=3.5V.
the maximum Amperage the circuit was running was 700mA and LM317 was getting hot.
So the Power disipated over LM317 is
P=(5-1.5)V*0.7A= 3.5V*0.7A= 2.45W
That is correct.
Not surprising it go hot.
The maximum power an LM317 in a TO-220 case can dissipate is about 1W in free air at 25°C.
Above that it will start to limit the current so the internal temperature doesn't go higher.

So above 1W dissipation, you need to mount the LM317 on a heat-sink.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,692
I used LM317 as a switching regulator...
"
Switching Regulator
The switching regulator employs an active switch as its control element, which is used to chop
the input voltage at a varying duty cycle based on the regulator's load requirements.

"
This is how I interpret this image:
Screenshot_2.jpg
But in reality... how to actually build such a circuit, is beyond my ears.
My guess for the external components in the image: the diode as protection from negative spike voltages I guess , inductor as part of the chopping mechanism perhaps?, capacitor for filtering the incoming Vout + inductor fluctuations and 2 resistors used as a voltage divider on the ADJust pin, All of these may be the Switching Regulator basic circuit?!? Hmmm... I dont know.
But is my best guess.
Or the MOSFET is drive from an external PWM cct, made with a 555? Is how I see it.
And all this LM317 cct in the image is reacting to that pulsed chopped input voltage from the mosfet?
 
Last edited:

ElectricSpidey

Joined Dec 2, 2017
2,781
Mostly over the years I have used the LM317, LM117 LM338 etc. as a basis for variable power supplies.

But my last usage in a project was as a digital voltage control in my thunderstorm project where it is used to control the brightness of the lightning flashes as the storm approaches and recedes.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,692
The maximum power an LM317 in a TO-220 case can dissipate is about 1W in free air at 25°C.
Show me your source of your statement please.
Because I searched in multiple datasheets and I couldnt find this specific information freely disclosed.
In a way it makes sense what you present !!! And I believe you.
But take a look on my "discovery":
[the graph is for package TO-263 (smd) , and not TO-220 (TrHole) - which should be better than TO-263...]
Screenshot_3.jpg1704839993709.png

Here is an idea... I just realized... that maybe... TO-220 (TrHole) package --might be-- more lower Wattage (1W as you say) than this TO-263 (smd) package that I found specified in the datasheet ? Hmmm.....
LM317 - National Semiconductor 2004 at page 9 if you want to check it yourself.
 
Last edited:

crutschow

Joined Mar 14, 2008
34,454
the graph is for package TO-263 (smd)
That 35W/°C value of thermal resistance is likely including the dissipation provided by it being soldered to a PCB.
Show me your source of your statement please.
This from Wikipedia indicates a value twice that for a free-air TO-220:

"When a TO-220 package is used without a heatsink, the package acts as its own heatsink, and the heatsink-to-ambient thermal resistance in air for a TO-220 package is approximately 70 °C/W."

That would indicate a maximum of about 1.4W for a 25°C and a 125°C junction temperature.
But for good reliability the device should be operated below its maximum temperature, and to allow for a higher ambient, I would not run it much above 1W.
 

dl324

Joined Mar 30, 2015
16,927
Again, these are my guesses, and I believe you used as small power dissipation as possible, comparative with my experiment where I push the power disipation way too high. Am I correct in my assumptions?
None of the applications required a heat sink.

For high current and/or high dissipation, you use an external pass transistor. Applications are given in the datasheet.

Most datasheets don't show you how to set up a proper current division so you can operate the regulator near its maximum current under maximum load conditions. That way the regulator can protect itself and the external pass transistor (if they're mounted on the same heat sink). From National Semiconductor Voltage Regulator Handbook:
1704843487996.png1704843502452.png
 

dl324

Joined Mar 30, 2015
16,927
My guess for the external components in the image: the diode as protection from negative spike voltages I guess , inductor as part of the chopping mechanism perhaps?, capacitor for filtering the incoming Vout + inductor fluctuations and 2 resistors used as a voltage divider on the ADJust pin, All of these may be the Switching Regulator basic circuit?!? Hmmm... I dont know.
The diode allows current to continue flowing in the inductor when the control transistor switches off (hence the term switching regulator).

The National Semiconductor datasheet had an example:
1704843716946.png
But I designed my own.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,692
That would indicate a maximum of about 1.4W for a 25°C and a 125°C junction temperature.
Ok I got your idea, so if over 1W, needs heatsink - got it - and I didnt knew it ! Even if your source has a very dubious explanation, it doesn't matter, I believe you. Because it is fitting with the results Im getting on my table !
But the mystery is not solved.
Im getting back to:
P=(Vin-Vout)Iout (Iout or ILoad)
The voltage drop over LM317 is 5V-1.5V=3.5V.
the maximum Amperage the circuit was running was 700mA and LM317 was getting hot.
So the Power disipated over LM317 is
P=(5-1.5)V*0.7A= 3.5V*0.7A= 2.45W

This means, that 2.45W can be disipated if Im using 3xLM317 in paralel ? Will be (a bit less than) 1W per each LM317 should drive the motor fine, without any heatsink and probably they should stay warm but not hot, right? Tell me if Im wrong !
3xLM317 in paralel = 2.45W/3= 0.8W per each LM317 (like I said, a bit less).
 

dl324

Joined Mar 30, 2015
16,927
The 2 transistors on the top, theoretically should Add the extra current to the LOAD in the Vo, next to the 47uF. I build it and it didnt work. LM317 was still getting hot but not the 2 tr on the top as it should be from the description from the theory in the datasheet.
I am perplexed !
If you have a power PNP transistor, you don't need to use that PNP/NPN combination.

What was the load current? Did you use the resistor values in the schematic?

Using the explicit current division method is better.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,692
If you have a power PNP transistor, you don't need to use that PNP/NPN combination.
Thats exactly why I took out the NPN and I leave (in the final cct on breadboard image) only the PNP.
I had mentioned it in the drawing that I used BD681 (NPN) and BD682 (PNP) - (and I have plenty of them).
1704844588061.png
What was the load current?
- The LOAD current is the motor current and was 1A at 1.5V = 1.5W only on the motor, when I test it directly connected to the variable PSU - I read the Amp on its screen.
Did you use the resistor values in the schematic?
- Originally I didnt and I managed to make HOT the BD682 (PNP) after inserting that 22R in the beginning ! And after that, I put every value exactly as in the diagram. Originally I was sloppy, but then I auto-correct myself after a few more experiments.
If I remember correctly, without the 22R in the begining, the LM317 got hot and BD682 (PNP) remained cold !
I used a 1/4W 22R.
1704845063188.png
And the amperage on my PSU got lower to 500mA with this combination. So it got worse.
Im staying and thinking maybe LM317 is limiting also the current somehow? Hmmmm....
 
Top