LM317 current limiter is not working properly, help - Page 1
Forum section: electronics / beginners

author: u666sa
author_rank: Frequent Contributor
timestamp: November 25, 2023, 11:10:17 am
content: I have a simple current limiter, I want to give about 800 mAh to ring light. Resistance is 1.58 ohm, and the resulting current is 192 mAh. I just don't understand what's going on! According to datasheet, formule for output current is IO = (VREF / R1) + IADJ = 1.25 V / R1, so 1.25 / 1.58 should be 791 mAh. But I am getting 192 mAh. What's happening? What am I doing wrong?

author: Andy Chee
author_rank: Super Contributor
timestamp: November 25, 2023, 11:32:33 am
content: I’m going to guess that you may have burned out the potentiometer wiper carbon track with too much current. At the very least you have damaged it and it has changed value.Basically you have forgotten to calculate power dissipation in your resistor, in your case, 0.8 * 0.8 * 1.58 = 1 watt, which is too much for the typical 0.5 watt potentiometer.I completely missed that your wiring was wrong!

author: iMo
author_rank: Super Contributor
timestamp: November 25, 2023, 11:33:01 am
content: Because your wiring is wrong..The output of your current source is not from "output pin" but from ADJ pin..

author: u666sa
author_rank: Frequent Contributor
timestamp: November 25, 2023, 11:38:08 am
content: Nah and nah. I googled it! Basically, for it to work properly I needed to give it 14 volts. Instead of 12V. A bit more volts. Then it works. In any case. Bad solution for my problem. My problem is that 144 LED light from aliexpress shines just as bright as my 56 LED light, not brighter. It gets brighter at 1.2 amps, but then it melts.So what I'm trying to do is limit current to 800 mAh. At that current it does not readily melt and still provides good brightness.I mean, this could be the same problem with stock power supply that light came with. Perhaps output voltage is too low for internal current regulator to regulate current properly, it too was stuck at 225 mAh or something, no matter what. It is a EY marking smd 3 leg component.

author: DavidAlfa
author_rank: Super Contributor
timestamp: November 25, 2023, 12:41:08 pm
content: Post input vs output voltages. For a 317 you need an input of at least 1.5V over output.Otherwise you're topping out.

author: wraper
author_rank: Unknown
timestamp: November 25, 2023, 12:46:39 pm
content: You need a heatsink on LM317.

author: Dave
author_rank: Super Contributor
timestamp: November 25, 2023, 01:16:14 pm
content: Ah (ampere hours) are a unit of charge, NOT current. You're measuring A (amperes).The total voltage drop your regulator circuit will need is about 4.25V. That is the minimum recommended input-to-output voltage of the LM317 IC, plus the 1.25V reference voltage. Bear in mind that at 800mA, you're going to be dissipating a considerable amount of heat, so a heatsink might be required.

author: Zero999
author_rank: Super Contributor
timestamp: November 25, 2023, 05:11:32 pm
content: What's the forward voltage of the LEDs?An off the shelf constant current LED driver would be ideal, but if you can't get one, use a constant voltage power supply around 10% to 33% higher, than VFand a suitable resistor.

author: floobydust
author_rank: Super Contributor
timestamp: November 25, 2023, 05:55:04 pm
content: Have you tried connecting the LM317 properly? Check your pinout and the circuit.You're missing a second resistor which is used either for current-sense or voltage control, depending on where you connect it. 500Ω pot?I have a 12V LED string with LM317 for voltage control and it can work as a dimmer, but very touchy. Losses are are about 1.5V

author: langwadt
author_rank: Super Contributor
timestamp: November 25, 2023, 05:57:10 pm
content: Quote from: wraper on November 25, 2023, 12:46:39 pmand a different resistor, that pot won't like 800mA

author: u666sa
author_rank: Frequent Contributor
timestamp: November 25, 2023, 08:56:52 pm
content: Quote from: langwadt on November 25, 2023, 05:57:10 pmLet's say input voltage is 14V. If I would use variable resistor, what wattage would it have to be? Needed output current is 100 to 900 milliamps.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: November 25, 2023, 09:53:30 pm
content: The 14V input voltage is not relevant. The LM317 will start limiting output voltage as soon as there is 1.25V between the output pin and the adjust pin. So if you want to go to 900mA, then the dissipated power in the resistor is 0.9*1.25 = 1.125W.Using the LM317 as a current source (or sink) combined with a single resistor is a nice trick, but it does not work very well for an adjustable current limit, because the the full current has to pass though the potentiometer, and potentiometers which can handle this are sort of obsolete. You can still find them (search for "rheostat") but they are so expensive that they are rarely used.If you do not need a fully adjustable limit, you can use a few resistors in parallel, and use switches to change the total resistance. For example, if you use 12.5 Ohm resistors, then each the current limit will be a multiple of 100mA, depending on the number of resistors (+switches).

author: langwadt
author_rank: Super Contributor
timestamp: November 25, 2023, 10:04:05 pm
content: Quote from: Doctorandus_P on November 25, 2023, 09:53:30 pmyou could size the resistor for the minimum current and use a pot across it with the wiper connected to the adjust pinthough you'd get a rather large voltage drop at full current

author: coppercone2
author_rank: Super Contributor
timestamp: November 25, 2023, 10:05:55 pm
content: the cheap carbon potentiometers do 2-3W

author: iMo
author_rank: Super Contributor
timestamp: November 25, 2023, 10:08:51 pm
content: Quote from: iMo on November 25, 2023, 11:33:01 amAgain, your wiring in your above shot (photo) is wrong.The output of your current source shall be from ADJ pin, not from OUTPUT pin of the LM317.