# Having trouble using LM317 as constant current source

#### uiticus

Joined Nov 12, 2021
23
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.

Les.
Brilliant reply. Thank you!!! I knew I came to the right place to help solve this problem I faced.

#### uiticus

Joined Nov 12, 2021
23
You would need 58.75V to get 125mA through a 470Ω resistor. What did you expect to happen?
Brilliant response!!! Thank you. I see now where I made the error. Thank you much!!! Sorry I couldn't answer each one of you much earlier since I was away for awhile.

#### uiticus

Joined Nov 12, 2021
23
The resistor is only needed if powering the LEDs from a voltage source.
It's not needed with a current source.
Yes, of course!!! Thank you. You and the rest helped me solve the circuit problem I faced. Thank you much!!!

#### uiticus

Joined Nov 12, 2021
23
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.

ak
What a brilliant suggestion! Thank you. I see now where made the error. Thanks much to all of you

#### uiticus

Joined Nov 12, 2021
23
Welcome to AAC!
I want to send each one of you who took the effort and time to help me solve the circuit problem I faced, this message of appreciation and gratitude.

You were all truly helpful in helping me find a solution. I knew I came to the right place. You all are so knowledgeable in the field of electronics.
Sorry I could not have answered all you much earlier since I was away for awhile.

Thank you much!

#### uiticus

Joined Nov 12, 2021
23
Welcome to AAC!
I want to send each one of you who took the effort and time to help me solve the circuit problem I faced, this message of appreciation and gratitude.

You were all truly helpful in helping me find a solution. I knew I came to the right place. You all are so knowledgeable in the field of electronics.
Sorry I could not have answered all you much earlier since I was away for awhile.

Thank you much!

#### uiticus

Joined Nov 12, 2021
23
Welcome to AAC!
The most simple albeit crude test is to short circuit both LEDs and bring the meter output straight to ground (briefly of course).
I want to send each one of you who took the effort and time to help me solve the circuit problem I faced, this message of appreciation and gratitude.

You were all truly helpful in helping me find a solution. I knew I came to the right place. You all are so knowledgeable in the field of electronics.
Sorry I could not have answered all you much earlier since I was away for awhile.

Thank you much!

#### uiticus

Joined Nov 12, 2021
23
You would need 58.75V to get 125mA through a 470Ω resistor. What did you expect to happen?
I want to send each one of you who took the effort and time to help me solve the circuit problem I faced, this message of appreciation and gratitude.

You were all truly helpful in helping me find a solution. I knew I came to the right place. You all are so knowledgeable in the field of electronics.
Sorry I could not have answered all you much earlier since I was away for awhile.

Thank you much!

#### uiticus

Joined Nov 12, 2021
23
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.

View attachment 252548
I want to send each one of you who took the effort and time to help me solve the circuit problem I faced, this message of appreciation and gratitude.

You were all truly helpful in helping me find a solution. I knew I came to the right place. You all are so knowledgeable in the field of electronics.
Sorry I could not have answered all you much earlier since I was away for awhile.

Thank you much!

#### uiticus

Joined Nov 12, 2021
23
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.

Les.
I want to send each one of you who took the effort and time to help me solve the circuit problem I faced, this message of appreciation and gratitude.

You were all truly helpful in helping me find a solution. I knew I came to the right place. You all are so knowledgeable in the field of electronics.
Sorry I could not have answered all you much earlier since I was away for awhile.

Thank you much!

#### uiticus

Joined Nov 12, 2021
23
The resistor is only needed if powering the LEDs from a voltage source.
It's not needed with a current source.
Yes, of course! I see the error I made. Thank you much!!!

#### uiticus

Joined Nov 12, 2021
23
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.

ak
I want to send each one of you who took the effort and time to help me solve the circuit problem I faced, this message of appreciation and gratitude.

You were all truly helpful in helping me find a solution. I knew I came to the right place. You all are so knowledgeable in the field of electronics.
Sorry I could not have answered all you much earlier since I was away for awhile.

Thank you much!

#### uiticus

Joined Nov 12, 2021
23
Thank you so much for posting an incorrect schematic and wasting our time.

Bob
I am truly sorry sir. I did not mean to do that. I apologize.

#### crutschow

Joined Mar 14, 2008
31,495
I will send each and everyone of you a personal gratitude message for helping solve this problem and the error I made.
That's really not necessary, but if you want to indicate your gratitude just click on the icon on the person's post.

#### uiticus

Joined Nov 12, 2021
23
That's really not necessary, but if you want to indicate your gratitude just click on the View attachment 252643 icon on the person's post.
Greetings, I did as you suggested to place a 10 ohm resistor to ground instead of the LEDs', by putting one end of the resistor to the output of the LM317 and the other end of the resistor to ground. I have connected a 100 ohm resistor between the adjust pin and the output pin of the LM317, so that I should be sourcing a constant 12.5 ma current to the 10 ohm resistor.

I applied 12 volts DC to the input of the LM317. The results were that 10 volts appeared across the 10 ohm resistor and it was drawing about 1 Amp of current instead of 12.5 Amps. I quickly disconnected the DC supply.

I noticed the only way the LM317 will source 12.5 Amps with the 100 ohm resistor connected between the Adj. pin and output pin, is when I connect the adjust pin to ground. Grounding the adjust pin enabled 12.5 ma to be drawn through the resistor and into the IC. But the schematic diagram I provided, and all other schematic diagrams online, did not have the Adj. pin grounded and claim it should work but not when I tried it.

Any suggestions

#### crutschow

Joined Mar 14, 2008
31,495
I applied 12 volts DC to the input of the LM317. The results were that 10 volts appeared across the 10 ohm resistor and it was drawing about 1 Amp of current instead of 12.5 Amps.
Then you either have it connected wrong (double-check the LM317 pinout) or you have a faulty LM317.
The LM317 will not work as a constant-current source if the ADJ pin is grounded.

#### uiticus

Joined Nov 12, 2021
23
Then you either have it connected wrong (double-check the LM317 pinout) or you have a faulty LM317.
The LM317 will not work as a constant-current source if the ADJ pin is grounded.
Thank you for your reply. I quadrupled checked the connections very carefully. I even tried 3 other new LM317s' and still the same unwanted results. I have a batch of 20 new LM317s and will try the other new ones in the morning and see the results.

#### crutschow

Joined Mar 14, 2008
31,495
I did as you suggested to place a 10 ohm resistor to ground instead of the LEDs', by putting one end of the resistor to the output of the LM317 and the other end of the resistor to ground.
That's not what I suggested and that's not what the schematic shows.
The load goes to the output of the 100Ω resistor and the ADJ pin, not the output of the LM317.

#### uiticus

Joined Nov 12, 2021
23