EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: NightMoth on December 10, 2025, 07:20:20 am

Title: [SOLVED] Current limiter based on LM317: maximum output current?
Post by: NightMoth on December 10, 2025, 07:20:20 am
Hello all

I'm trying to make 625mA current limiter (for 9V input) using LM317 as per its datasheet, section "8.3.3 Precision Current-Limiter Circuit".
https://www.ti.com/lit/ds/symlink/lm317.pdf (https://www.ti.com/lit/ds/symlink/lm317.pdf)
But maximum I got is about 200mA.

Here is schematic:
(https://www.eevblog.com/forum/beginners/current-limiter-based-on-lm317-maximum-output-current/?action=dlattach;attach=2714967;image)

Here is setup:
(https://www.eevblog.com/forum/beginners/current-limiter-based-on-lm317-maximum-output-current/?action=dlattach;attach=2714975;image)

According to the datasheet, output current I_limit = 1.2...1.25/R1, so substituting R1 = 1 Ohm should give me 1.25A limit, 2 Ohm - 625mA limit, ... etc.
But it looks like maximum achivable output current is ~200mA.

I tried different values for R1(2R, 5.1R, 10R, to 51R) and RLoad (From 2R to 1k) but output current never exceeded 200mA (first 10-20 seconds it can be 250mA, but then drops).
Details is in attached schematic.

According to my calculations, for 9V inpt and 625mA output, temperature should not exceed 106C (calculations below).
But it looks like temperature doues not effect output current in my case: output current is 200mA before LM317 gets hot. First 10-20 seconds current can be up to 250mA but then drops to 200mA.
but chip gets hot in about 70 seconds after power-on.

Heat calculations (not sure is it corrct):
For 0.625mA output current I expect maximum power dissipation for LM317T as Pd = 3V(headroom)*0.625mA = 1.875W
Also there is formula in datasheet for max alowable Pd:
Pd = (TJ(max) - TA)/RthJA
Calculated Pd = 1.875W
TJ(max) = 150C
RthJA(TO-220) = 23.5C/W
=>max ambient temperature TA = 106C

I tried three different LM317T chips (however from same batch/same vendor).

Here is my questions:

-Does anyone know what is maximum output current for this current limiter based on LM317T?
-Is it 200mA as in my experiments?
-if yes - is it possible to somhow deduct this value from datasheet?
-if no - where I am wrong?
Title: Re: Current limiter based on LM317: maximum output current?
Post by: Ian.M on December 10, 2025, 08:36:50 am
A genuine ST LM317T, as per its datasheet (https://www.st.com/resource/en/datasheet/lm217.pdf) is good for a minimum Imax of 1.5 A if adequately heatsinked and running at a low enough input to output differential not to exceed the package power dissipation limits.  Transiently, I would expect it to be capable of about 2.2 A before it self-limits.  However if you are using an off-brand far east 'LM317' clone, it may not even be good for 500 mA!

Breadboard contact resistance is likely to be your main issue as it adds to the effective value of your current sensor resistor, though the initial drop from 250 mA to 200 mA suggests the die may be getting too hot.    Is the LM317 quickly getting too hot to comfortably touch?  if so you've got inadequate heatsinking, if not it may be a fake LM317, or the contact resistance may be going up a lot as the contacts heat up.

Title: Re: Current limiter based on LM317: maximum output current?
Post by: magic on December 10, 2025, 09:18:00 am
This circuit should work in theory. At 200mA voltage drop is only 400mV across R1 so X1 is supposed to increase its output current until OUT-ADJ becomes 1.25V.

Possible reasons why it isn't happening:
- fake chip as suggested above
- overheating: to calculate actual power dissipation you must multiply Iload · (Vin - Vout) instead of assuming Vin - Vout = 3V
- dropout: verify with a DMM that for both regulators, Vi - Vout ≥ 3V.

I think I would start with trying larger heatsinks, particularly on the chip which has more Vin - Vout, which is probably X1.

Also, pull out a DMM and check voltages on all pins of all devices to get a full picture of what's happening and which part is behaving not as expected.
Title: Re: Current limiter based on LM317: maximum output current?
Post by: PGPG on December 10, 2025, 10:59:57 am
With 1W TO220 gets so hot that I can't touch it. You are trying to dissipate in it close to 0.625*9=5.6W.
Title: Re: Current limiter based on LM317: maximum output current?
Post by: NightMoth on December 10, 2025, 11:20:10 am
Hello all, thanks for replies

Is the LM317 quickly getting too hot to comfortably touch?

With 1W TO220 gets so hot that I can't touch it. You are trying to dissipate in it close to 0.625*9=5.6W.

With small heatsink as on my second picture, chip gets realy hot in about 70 seconds after powered-on. First minute it is warm, but I can touch it without any problem.

I'll try to re-assemble and re-test this circuit with larger heatsinks, maybe on perfboard and maybe with chip from another vendor and then post an update here.

Title: Re: Current limiter based on LM317: maximum output current?
Post by: Gyro on December 10, 2025, 11:31:54 am
Are you trying to product a 9V output PSU with current limiting, or a current source?  If you want a 9V PSU, you should put the LM317 before the LM7809, otherwise your output voltage will be reduced by the input-output differential of the LM317 (regardless of current limit) and the voltage drop across R1. This applies even if you just want a current source with a maximum output of 9V.


Edit: I just noticed that you are using a 12.6V wall adapter. Looking at the datasheets, depending on output current, the LM7809 has a minimum input-output differential (drop-out voltage) of around 2V, and the LM317 around 2.5V, in addition, you have a series diode. This adds up to around 5V, taking this away from 12.6V gives 7.6V. If you are approaching current limit, R1 will be dropping nearly 1.25V. So your maximum output voltage may be aproaching 6V at that stage, without reaching your current limit.
Title: Re: Current limiter based on LM317: maximum output current?
Post by: PGPG on December 10, 2025, 12:22:42 pm
I'll try to re-assemble and re-test this circuit with larger heatsinks, maybe on perfboard and maybe with chip from another vendor and then post an update here.

For each case you have doubts write in your post (additionally to what you write already) measured voltages before and after 7809.
Title: Re: Current limiter based on LM317: maximum output current?
Post by: NightMoth on December 10, 2025, 01:43:43 pm
Are you trying to product a 9V output PSU with current limiting, or a current source?  If you want a 9V PSU, you should put the LM317 before the LM7809, otherwise your output voltage will be reduced by the input-output differential of the LM317 (regardless of current limit) and the voltage drop across R1. This applies even if you just want a current source with a maximum output of 9V.


Edit: I just noticed that you are using a 12.6V wall adapter. Looking at the datasheets, depending on output current, the LM7809 has a minimum input-output differential (drop-out voltage) of around 2V, and the LM317 around 2.5V, in addition, you have a series diode. This adds up to around 5V, taking this away from 12.6V gives 7.6V. If you are approaching current limit, R1 will be dropping nearly 1.25V. So your maximum output voltage may be aproaching 6V at that stage, without reaching your current limit.

Yes, I'm aware of all these voltage drops. I expected that after LM7809 9V regulator, voltage drop can be up to 3V LM317's headroom plus 1.25V drop across R1. So in worst case, output voltage available for load can be as low as 9V - (3V + 1.25V) = 4.75V. But for 2 Ohm R_Load it 4.75V should be enough to get 625mA?

And yes, you are right, actually I want psu with current limiting, thanks for idea to place LM317 before voltage regulator, I'll try.
Title: Re: Current limiter based on LM317: maximum output current?
Post by: magic on December 10, 2025, 02:17:39 pm
This is quite similar to a PSU I once made, which only used one LM317 regulator plus a TL431. The advantage is better dropout voltage, you should actually be able to get 9V at full load from a 12V source, which seems unlikely with two regulators in series.

Potential risk is that I have never tested this circuit with higher current limit and with output capacitors, so I can't guarantee that it would be stable under all conditions.
edit: I think it's likely to oscillate with some capacitors, due to the 10Ω resistor forming an RC filter.

Pic and schematic attached. You can ignore the LED.
Title: Re: Current limiter based on LM317: maximum output current?
Post by: macboy on December 10, 2025, 03:49:41 pm
... I expected that after LM7809 9V regulator, voltage drop can be up to 3V LM317's headroom plus 1.25V drop across R1. So in worst case, output voltage available for load can be as low as 9V - (3V + 1.25V) = 4.75V. But for 2 Ohm R_Load it 4.75V should be enough to get 625mA?
You can't assume 3V across the 317. The villages must add up. If the input is 9V, then the 9V must appear somewhere. Across R1 is 1.25V, and across R-load (assuming 2 ohm) is also 1.25V. so the 317 will have 9-1.25-1.25 = 6.5 V. Then the power dissipation will be 6.5 * 0.625 or a little over 4W. If the load is a short instead of 2 ohms, then power dissipation in the 317 is over 5 Watts. Without a this heatsink it will overheat and reduce output. Make sure that the thermal interface between the 317 and heatsink is good. A dab of silicone grease, heatsink compound, etc, is necessary. Dry metal on metal is not adequate to transfer the heat, and the device will be much hotter than the heatsink.
Title: Re: Current limiter based on LM317: maximum output current?
Post by: Zero999 on December 10, 2025, 10:04:28 pm
Connecting an LM317 current source in series with an LM317 voltage regulator won't give 9V out, with 12.6V in. The current source requires the ordinary 3V voltage drop, plus an extra 1.25V, in addition to the 3V of the voltage regulator.

Another approach is to use two regulator ICs to control a Darlington pair.

This circuit will act like a voltage source, then when a low value resistor is connected, quickly switch to a current source. The downside is the transient response isn't great. The voltage briefly drops, when a load is applied and there's a current spike when the resistance is lowered.

Here's a simulation. Up to 1ms, the R_load is 1M which is very high, so hardly and current flows, then it's reduced to 15R, for a further 1ms, then it's reduced to 10R to demonstrate the current source.
[attachimg=2]
Title: Re: Current limiter based on LM317: maximum output current?
Post by: PGPG on December 11, 2025, 08:04:45 am
... I expected that after LM7809 9V regulator, voltage drop can be up to 3V LM317's headroom plus 1.25V drop across R1. So in worst case, output voltage available for load can be as low as 9V - (3V + 1.25V) = 4.75V. But for 2 Ohm R_Load it 4.75V should be enough to get 625mA?
You can't assume 3V across the 317.
You didn't understood sentence you quoted.
OP was calculating how much headroom LM317 needs and what will be "output voltage available for load".
Title: Re: Current limiter based on LM317: maximum output current?
Post by: NightMoth on December 11, 2025, 08:59:42 am
Hello all

For each case you have doubts write in your post (additionally to what you write already) measured voltages before and after 7809.

Then the power dissipation will be 6.5 * 0.625 or a little over 4W. If the load is a short instead of 2 ohms, then power dissipation in the 317 is over 5 Watts. Without a this heatsink it will overheat and reduce output. Make sure that the thermal interface between the 317 and heatsink is good. A dab of silicone grease, heatsink compound, etc, is necessary.
.

If you want a 9V PSU, you should put the LM317 before the LM7809

I have added bigger heatsinks and put pieces of silicone between ICs and heatsink metal.
Also I measured voltage drop across LM317 and calculated it's power dissipation (and in other circuit points)
Also I made second version of original circuit - with current limiter before voltage regulator.
Leaving here test results for history (on schematic below).

Yes, voltage drop across LM317 is huge, and if it work like expected (625mA) power dissipation will be 5W, and it was my mistake to not take it into account. But there is still no more than 200mA current, so power dissipation does't exceed 1.5W.
After few minutes I still can touch chip (not heatsin,k but chip) and it is warm, but not hot.

Returning to my original question - what is max achivable limited current for LM317?
My conclusion is:
I think my LM317 chip (in current limiter configuration) limits current as programmed by R1 resistor only in a case if it's power dissipation below 1W.
Next step: I'll try the same with LM317 chips from other vendor.

Pic and schematic attached. You can ignore the LED.
Thanks, I'll try

Pictures:

Re-test: limiter after regulator
(https://www.eevblog.com/forum/beginners/current-limiter-based-on-lm317-maximum-output-current/?action=dlattach;attach=2715546;image)

(https://www.eevblog.com/forum/beginners/current-limiter-based-on-lm317-maximum-output-current/?action=dlattach;attach=2715550;image)

Second version: regulator after limiter
(https://www.eevblog.com/forum/beginners/current-limiter-based-on-lm317-maximum-output-current/?action=dlattach;attach=2715558;image)

(https://www.eevblog.com/forum/beginners/current-limiter-based-on-lm317-maximum-output-current/?action=dlattach;attach=2715554;image)

Title: Re: Current limiter based on LM317: maximum output current?
Post by: Ian.M on December 11, 2025, 10:26:17 am
Theoretically, with the tab bonded* to an actively cooled heatsink maintained at 25°C, a ST TO-220 package LM317 with RthJC (Thermal resistance junction-case i.e. mounting surface) of 5°C/W could dissipate up to 20 W.  Its rated for up to 125°C junction temperature so that's from 100° temperature rise, divided by the thermal resistance.   However the thermal limiting is a bit uncertain so don't bet on getting a full 20 W even if you assemble it perfectly.   

On a tiny little heatsink, with generic thin silpads between its tab and the heatsink, you are probably dissipation limit to at most 2.5W.  According to ST their TO-220 has a RthJA of  50°C/W, giving 2W with no heatsink and presumably forced airflow.   Without a fan an unheatsinked TO-220 mounted vertically is generally reckoned to be good for about 1W.  A minimum thickness smear of ordinary white thermal compound will be better than a silpad.

Do you have specifications for your original silver heatsinks or your new black ones?

Also, you really need to remove the breadboard contact resistance at both ends of the resistor from the experiment.  As the LM317 tab is connected to your output, solder one end of the current sense resistor top a ring terminal to fit the TO-220 mounting screw and bolt it on top of the tab.  For the other end, solder a fly-lead to the resistor leg, close to its body to go to the ADJ pin.  Use a significantly over-rated ceramic# body or ceramic coated resistor so it doesn't heat up much.

* e.g. directly sweat soldered to a copper heatsink - though it would be difficult to heat and cool the heatsink fast enough to follow an acceptable reflow profile.  Mounting it with a minimum thickness layer of a liquid metal heatsink compound would also be acceptable.

# Metal cased resistors need a heatsink to meet their power ratings.
 Unheatsinked, you can burn one out at under 20% of its nominal rating!
Title: Re: Current limiter based on LM317: maximum output current?
Post by: PGPG on December 11, 2025, 11:51:20 am
I have added bigger heatsinks and put pieces of silicone between ICs and heatsink metal.

Pieces of silicone certainly add a little to thermal resistance making things worse, but I have no idea how much. Last time I was using mica washers was may be 40 years ago. I have never had silicone ones.

But there is still no more than 200mA current,
As one of my lab tools I have current load made from LM317 with current selected by jumper (1-2-5-10 serie) up to 1A. When I use it, I hold the LM317 tab in a vice and make my test for only some seconds.
Title: Re: Current limiter based on LM317: maximum output current?
Post by: NightMoth on December 11, 2025, 11:56:29 am
Do you have specifications for your original silver heatsinks or your new black ones?

I don't have my heatsink specification, here is sizes:

-Silver: 17x11mm, 4 blades: height of blade 5mm, blade thickness 1mm, base plate thickness 1.5mm, M3 screw hole at 14mm height; 

-Black: 25x15x10mm, 6 blades: height of blade 5mm (first and last blades-10mm), blade thickness 0.5mm, base plate thickness 1mm, 2.5mm screw hole at 18mm height; 
Title: Re: Current limiter based on LM317: maximum output current?
Post by: magic on December 11, 2025, 12:16:52 pm
It looks like the LM317 is consistently the weakest link. The heatsinks are probably too small as well, but I would expect it to pass more current at least for a few seconds before it warms up. My vote on this being a dodgy LM317 which doesn't meet the specs at all.

I would test this LM317 in isolation: connect ADJ to ground, OUT to RL directly, and IN to a lower supply like 5V. Power dissipation would be 0.625A · 3.75V = 2.34W, which is not a lot and should work at least for a moment. If it doesn't, the chip is junk.

Also measure voltage directly on the pins of LM317, not on the breadboard. If it's 1.25V then you have a problem elsewhere (wrong value of R1? too high breadboard resistance?) but if it's less then the chip is at fault.
Title: Re: Current limiter based on LM317: maximum output current?
Post by: Ian.M on December 11, 2025, 12:20:45 pm
Unfortunately  sellers of those heatsinks typically don't have a Rth spec for them.   That means that for any serious design work, (rather than 'suck it and see' that the temperature rise isn't excessive with a worst case load on the device on the heatsink), you need to test one yourself, with known dissipation from a TO-220 device on one, measuring the TO-220 mounting surface temperature, ideally with a very thin probe in a small drilled hole next to the mounting screw, from the other side of the heatsink.  Use thermal paste on the probe!   If you get into this stuff, it may be worth investing a couple of bucks in a TO-220 package power resistor, value chosen so you can reach its rated power with your bench PSU (or at least max out the PSU) so you have an easily controllable adjustable heat source that wont quickly die if the heatsink is worse than expected.   
Title: Re: Current limiter based on LM317: maximum output current?
Post by: Ian.M on December 11, 2025, 12:34:09 pm
It looks like the LM317 is consistently the weakest link. The heatsinks are probably too small as well, but I would expect it to pass more current at least for a few seconds before it warms up. My vote on this being a dodgy LM317 which doesn't meet the specs at all.

I would test this LM317 in isolation: connect ADJ to ground, OUT to RL directly, and IN to a lower supply like 5V. If this doesn't work even for a moment, the chip is junk.

Yes, there's probably something resembling a 500 mA max LM317M die in there.  I also wouldn't bet on it's maximum input to output voltage rating being to spec.  If you want to test that, in the same test circuit, use a 100 ohm load for nom. 12 mA load current to guarantee its in regulation, but keep the worst case dissipation under 0.5 W, and crank up the input voltage.  A genuine LM317 should survive up to 40V input to output (i.e. 41.2V in with the ADJ pin grounded).   As most bench PSUs don't go high enough, you'll probably need two channels in series, with high current diodes across each output, cathode positive, to protect the channel with the lower setting from reverse polarity when the regulator fails.  I wouldn't be surprised if a fake LM317 blows under 20V.  :popcorn:
Title: Re: Current limiter based on LM317: maximum output current?
Post by: NightMoth on January 18, 2026, 03:41:14 pm
Hello all

Mistery solved! Problem endeed was in low quality LM317 chips

I got new batch of LM317 marked as "UMW" (manufacturer is “Youtai Semiconductor Company Limited“)
It works fine, I got 630mA output as expected.
But it's price is 5x expencive than low quality batch.

Low quality LM317 batch was marked as "WSA" (manufacturer is “STMicroelectronics”)
Maximum I got is 200mA for same circuit.
Title: Re: Current limiter based on LM317: maximum output current?
Post by: Ian.M on January 18, 2026, 04:03:31 pm
Hello all

Mistery solved! Problem endeed was in low quality LM317 chips

<snip>

Low quality LM317 batch was marked as "WSA" (manufacturer is “STMicroelectronics”)
Maximum I got is 200mA for same circuit.
Your low quality LM317 batch are outright fakes, with faked manufacturer markings.  Genuine STMicroelectronics parts purchased from an authorised distributer *will* meet specification, but will be significantly more expensive than good parts from a Chinese manufacturer and marked as such.  Caveat Emptor
Title: Re: Current limiter based on LM317: maximum output current?
Post by: NightMoth on January 19, 2026, 12:57:49 am
Hello all

Mistery solved! Problem endeed was in low quality LM317 chips

<snip>

Low quality LM317 batch was marked as "WSA" (manufacturer is “STMicroelectronics”)
Maximum I got is 200mA for same circuit.
Your low quality LM317 batch are outright fakes, with faked manufacturer markings.  Genuine STMicroelectronics parts purchased from an authorised distributer *will* meet specification, but will be significantly more expensive than good parts from a Chinese manufacturer and marked as such.  Caveat Emptor

Both good and bad batches are made in China (both batches also has markings "CHN").
I agree, bad batch should be fake, it was too cheep. You get what you pay for...