Having trouble using LM317 as constant current source

Thread Starter


Joined Nov 12, 2021

I am using the circuit above. First, I am not getting 1.25 volts across adj. and Out terminals. I am using 12V. Vcc input and I am measuring 11.44 Volts at both the ADJ. and Output terminals of the LM317T. The current does not stay constant at 125 ma but varies according to the different load I put to it. I tried another new LM317 and still the same results. am I overlooking something? appreciate any feedback. Thanks


Joined Jan 6, 2004
The most simple albeit crude test is to short circuit both LEDs and bring the meter output straight to ground (briefly of course).


Joined Mar 14, 2008
but varies according to the different load I put to it.
Then it would appear the LM317 is not wired correctly.
Double-check the pinout of the particular LM317 you are using.

Below is the LTspice simulation of your circuit:
As you can, see the output current (green trace) is constant for a load resistance change of 0.1Ω to 60Ω (horizontal axis).
The load voltage (yellow trace) changes, of course, to keep the current constant with the change in load resistance.

Last edited:


Joined Jan 8, 2017
Assuming the LEDs are white they will each drop about 3 volts across them. So that is about 6 volts. 125 mA through a 470 resistor will drop about 58.75 volts. So you would require a total output voltage of 64.75 volts. As you are only supplying the circuit with 12 volts it can't possibly supply that output voltage. If you assume the LM317 requires at least 3 volts between input and output the maximum output voltage it can supply is about 9 volts. So the maximum load resistor value it could pass a current of 125 through mA is
9/0.125 = 72 ohms.



Joined Aug 1, 2013
That is clearly his intent in post #1. White LEDs mounted on heatsinks can handle this easily.

To the TS: There is no 470 ohm resistor in your drawing, which is correct. As above, adding that resistor to the output circuit will not work.

To test your circuit without damaging expensive components, replace the two LEDs with two 10 ohm resistors. If the circuit is wired correctly (check the 317 pinout), you should see approx 2.5 V across the load resistors.



Joined Mar 30, 2015
I have the 2 LEDs connected as the circuit above as the load, with the addition of a 470 ohm resistor in series with the LEDs.
That's a problem. The voltage drop on the resistor wants to be 125mA * 470 ohms = 58.75V. Clearly you can't do that with a 12V power source.

Thread Starter


Joined Nov 12, 2021
Why are you repeating what you stated in post #8?

Have you read the rest of the posts which explain why your circuit is not working?
Yes, and I am sorry for not answering everyone of you earlier. I was away for awhile. I will send each and everyone of you a personal gratitude message for helping solve this problem and the error I made. Thanks much! You all helped a lot~

Thread Starter


Joined Nov 12, 2021
You would need 58.75V to get 125mA through a 470Ω resistor. What did you expect to happen?
Yes, of course!!! I see the error I made thanks to you and all the rest who have responded. I am sorry for not answering much earlier but I was away for awhile.