Author Topic: Help with my LM317 limiter?  (Read 9071 times)

bokeb

  • Guest
Help with my LM317 limiter?
« on: July 09, 2021, 07:28:10 AM »
Following @Gene 's directions on how to build a LM317 current limiter circuit in his conversations with @Pemf silver (https://www.cgcsforum.org/index.php?topic=5538.msg45711#msg45711 and https://www.cgcsforum.org/index.php?topic=5555.0), I have begun attempting to build my own.

I have installed an extra potentiometer and ammeter in series to simulate changing resistance in the cell and see if the amperage changes. Unfortunately, right now it is. Unless I am testing this incorrectly, I believe I should get the same amperage regardless of how I adjust this extra resistance.
The power supply is a 19.5v DC laptop charger.

Gene or anyone else who has built a LM317 circuit - can you tell me what I am doing wrong?

bokeb

  • Guest
Re: Help with my LM317 limiter?
« Reply #1 on: July 09, 2021, 07:38:50 AM »
the whole circuit (max file size trouble, sorry)

I have another closeup angle of the breadboard but for the hell of me I can't get it to post

bokeb

  • Guest
Re: Help with my LM317 limiter?
« Reply #2 on: July 09, 2021, 07:44:51 AM »
the diagram

Offline Gene

  • Expert
  • Participant
  • ***
  • Posts: 1757
  • Likes: 190
Re: Help with my LM317 limiter?
« Reply #3 on: July 09, 2021, 07:53:09 PM »
So basically you installed a series resistor (pot) between the limiter output and ground to simulate the cell.  Thats fine.

What's the max cell simulator potentiometer resistance?

The way the circuit works is that the regulator will adjust its output voltage such that there is always 1.25V across the fixed resistor plus the potentiometer.  That means that the MAXIMUM cell voltage you can achieve is going to be something around 4.25V LESS than the voltage you're power supply is feeding to the regulator.

19.5V laptop charger? Did you mean to say 19.3V? All the ones I've seen have been 19.3V or 15V. That doesn't mean there aren't other voltage ones - I've just never seen one at 19.5V.

Anyway, assuming you're correct, 19.5V - 3 - 1.25 = 15.25v.

As long as whatever current you're trying to pass through your potentiometer cell simulator (wink) doesn't cause more than about 15V across that, the current should stay constant.  If you're using a 1K pot, that means the max resistance is 1K.  It also means you can't set the current to more than about 15ma because at 15ma, that'd be 15V on the limiter side. See what I mean?

E = I * R  -> Voltage is equal to current times resistance

where I is in amps so 0.001 is 1ma, R is in Ohms so 1K is 1000 as an example. If you were using a 500Ohm potentiometer, the max current you could set would be 30ma though if you're using the potentiometer and resistor values I've suggested, you'd be limited to around 25ma.  If you were using a 2K Ohm potentiometer the max current you could set would be around 7.5ma.

Measure the voltage at the output of your limiter (right side of the potentiometer that sets current). As long as that voltage stays below about 15V the current limiter should keep the current constant.

bokeb

  • Guest
Re: Help with my LM317 limiter?
« Reply #4 on: July 10, 2021, 04:42:18 AM »
Quote
So basically you installed a series resistor (pot) between the limiter output and ground to simulate the cell.  Thats fine.
Yup! Although, I am catching from an electronics forum now that the .25W pot I am using to simulate load has insufficient power dissipation. I think this is true as the pot is getting hot. A problem I can solve in the coming days if that is the problem (though really I just want to test my circuit here, don't actually need a properly functioning pot for simulation long term - I am thinking I can run to the store and buy a few 9v batteries and simulate a changing load by changing the input voltage instead?) For the moment I am solving this by adding a large LED in series... I think it is dissipating power sufficiently for now, but maybe also is messing up the circuit in some other way? I am very new to understanding especially power dissipation.

Quote
What's the max cell simulator potentiometer resistance?
The potentiometer I have in place of the cell is an extra 1 kOhm .25W turn trimmer like you suggest for use inside the LM317 loop. I have also tested a 2 kOhm .25W pot here with the same results - uniform logarithmic current change as I adjust the pot, all the way across its range.

Quote
19.5V laptop charger? Did you mean to say 19.3V?
the rear of the transformer does indeed state a 19.5V DC output. my cheap-o multimeter reads 19.6V... but I am using the 19.5 figure to be conservative.

Quote
the regulator will adjust its output voltage such that there is always 1.25V across the fixed resistor plus the potentiometer.
Quote
As long as whatever current you're trying to pass through your potentiometer cell simulator (wink) doesn't cause more than about 15V across that
Ok, I went to test the voltage across R1+R2 (actually had 3 fixed resistors in series totalling 95 Ohms at the time)... reading 3 Volts!? (and 16 V across the LED, or if replacing the LED back with the 1k pot, a range of 0 V at min to over 20 V near max) Ok, so I removed all 3 resistors with the intent to change the resistance and test that... and the LED stayed on....... Is that supposed to happen? Now the current is running in through the input leg and out through the adjust, making a complete circuit. I'm not sure I understand this. I'm reading 11 V across the input and adjust legs now. 8.4 V across the LED. I'm attaching a diagram of this circuit. If I set my multimeter to test for continuity and place on the input and adjust legs of a disconnected LM317, I get no reading.

...To be absolutely certain.. the image of the LM317 below the circuit diagram is identifying which pin is which with the LM317 is sitting flat, plastic side up, metal (flat) side down... and not the other way around right? Now I'm not certain.

Quote
If you're using a 1K pot, that means the max resistance is 1K.  It also means you can't set the current to more than about 15ma because at 15ma, that'd be 15V on the limiter side. See what I mean?

E = I * R  -> Voltage is equal to current times resistance
This is a concept I don't seem to understand. Why does the maximum resistance of any potentiometer matter in determining the maximum current? Wouldn't only the minimum resistance of the pot matter for determining maximum current? If I can get the pot to 1, (obviously for other reasons I wouldnt want to actually do this, but) then the maximum current would be equal to the input voltage, right? In this case 15 V giving 15 full Amps? (obviously also my power supply cannot handle this, but conceptually)
Sorry maybe I have everything super backwards.

Quote
Measure the voltage at the output of your limiter (right side of the potentiometer that sets current). As long as that voltage stays below about 15V the current limiter should keep the current constant.
If I can get my head around these other problems and am ready for this recommendation, where would I put the other lead of my voltmeter? One on the output of R2, the other one where?


....I'm going to go to sleep now, maybe I will have a eureka moment in my sleep lol.
Thanks very much for your attention, I'm going to keep working on this for at least a few days. I am determined to make this work.

Offline Gene

  • Expert
  • Participant
  • ***
  • Posts: 1757
  • Likes: 190
Re: Help with my LM317 limiter?
« Reply #5 on: July 10, 2021, 08:40:13 AM »
If you're looking at the regulator front  (back side is the metal side) with the leads pointing down, yes, left to right its adjust, out, in just as is shown.

I'm not going to even try and explain the adjust pin because its a fixed output current thats guaranteed to be less than 0.1ma.

The TO220 version of this regulator, as per the datasheet, requires a minimum output load current of 10ma to function properly. You may be able to go lower but its not guaranteed and will vary from part to part.

Ignore what I said about the load pot thats confusing you.  I didn't state what I was thinking properly and its really not important.

All I basically said is that there is a maximum cell voltage the circuit will operate to which is Vin - 3V - 1.25V so in your case 15.25V.  If the cell resistance is high enough that this voltage can't pass the current you set the limiter to through the cell, the current will start dropping.

I'm not sure how you got more than 1.25V across your resistors.  There should always be 1.25V across them if the circuit is operating properly.

So lets back up a minute. You built the circuit and you think its not working?

You take a voltmeter in current mode, hook it between the limiter circuit output and ground (negative on your power source), adjust the pot to set the current or use the fixed resistors and measure what the current you get is.

Now, putting the load simulator pot back in place, setting its resistance from a dead short up to that which causes a cell voltage around 15.25V, you WILL get a stable current that doesn't vary hardly anything.

Power is voltage times current  or current squared times resistance. If you have a 1K 0.25watt pot set to 1K, the max current you can run through it and not violate the 0.25watt rating is just shy of 16ma.

What current are you using with your load simulation test?

The lower you have the resistance set to, the higher the current you need to violate that 0.25watt limit.

Don't start getting clever. You'll just confuse yourself more. Verify the circuit is working properly first as designed.

Just continue to apply the 19.5V and leave it at that.  Put a pot in after the resistor like shown and hook the circuit up to a current meter and vary the pot from one end of its range to the other.  You should see the current changing but remaining constant when you stop adjusting the pot.

If it won't even do this, something is very wrong.

If it does, set it to something reasonable (say 10ma), disconnect the meter, hook the circuit up to your load simulator pot and adjust that from a dead short to ground to as high a resistance as you can go to where the current from the circuit starts changing.  To measure this, install the meter in current measuring mode between the output of the  limiter and the potentiometer so the meter is in series with the load.

Look to see if you get to a point where the current starts changing above a particular resistance.  Measure the voltage across the load potentiometer when this happens.  Also, disconnect the load pot and measure the resistance it was set to which caused the current to start dropping and let us know.

Believe it or not, those little blue 25 turn trimmer pots are rated for 0.5 watts (seriously).

bokeb

  • Guest
Re: Help with my LM317 limiter?
« Reply #6 on: July 11, 2021, 06:43:50 AM »
I followed your instructions to the T.. I'm still getting the same problem.

Unfortunately I seem to have fried my multimeter's milliamp circuit, so I have to give you imprecise readings from the 10A circuit now (10 mA resolution).

1) I first set up the circuit without the load-simulator-pot and attempted to adjust R2 to achieve 10 mA out. At absolute maximum resistance in R2 (reads about 993 Ohms), I'm reading about 60 mA out. Lowest it's giving me.

2) I noticed the LM317 is getting very hot.

3) After adding in the load-simulator-pot (another 1k pot) at minimum resistance, the current reads about 60 mA. Immediately after beginning to increase the load-simulator-pot resistance, the current starts dropping, reading about 10 mA at maximum, and about 20 mA at the halfway point. It appears to be a uniform logarithmic change across the whole range of the pot. I can confirm that before the milliammeter blew, I was getting similar results, though I can't give you those figures now.

4) Performed the same tests with a spare LM317 swapped out, same results.

Offline Gene

  • Expert
  • Participant
  • ***
  • Posts: 1757
  • Likes: 190
Re: Help with my LM317 limiter?
« Reply #7 on: July 11, 2021, 09:17:39 AM »
OK, I'm totally confused.  As long as you're powering the LM317 with less than I think its 37V max and you have about a 1K resistor between output and the adjust pin you SHOULD be getting about 1.25ma.

The output current of the regulator should remain constant regardless the load as long as the voltage across the load, due to resistance, doesn't exceed around 15V given your power supply.

Many others have built this limiter.  It works fine. Something else is going on with your setup and I'm baffled as to what it is.

To get 60ma through a 993Ohm resistor, you would need to put about 59.6volts across it.  You're only starting with 19.5V and should be losing about 3V through the regulator so obviously something is wrong.

With a 993Ohm resistor across output and adjust pins, you should be limiting to about 1.26ma.

Is it possible you have a couple bad LM317 devices?  If the pot is working and the wires work (wink), what else is there?

Open the meter up.  The current ranges are usually fused. There should be  a fuse or two in there. Some meters actually have a spare set of fuses inside the meter.  If a fuse is toast, just figure out what it should be (they should tell you either on the inside of the back lid or the outside what it is) and replace it.

bokeb

  • Guest
Re: Help with my LM317 limiter?
« Reply #8 on: July 12, 2021, 12:39:55 AM »
I'm planning on heading into town tomorrow to get some more LM317's, as well as some more alligator clip wires so I can try building the circuit entirely without the breadboard, if needed (maybe it's that?). Will let you know hopefully tomorrow night how that builds.

Maybe I will find some 200 mA fuses too, which is what the $10 multimeters available to me take. So far I have only been able to find 500 mA fuses.
Which is what I had had to have installed after the last incident.
..Which is how I know this milliammeter is now fully fried.

But hey... at least I saved the fuse

Offline Gene

  • Expert
  • Participant
  • ***
  • Posts: 1757
  • Likes: 190
Re: Help with my LM317 limiter?
« Reply #9 on: July 12, 2021, 07:41:32 PM »
I guess its possible the LM317's are bad but those things are beasts usually.  You can practically having them glowing before they die. But anything is possible I guess.

Given the only parts in that circuit are the LM317, the pot and wires, if you've verified the pot is working, which I'm sure you have, what else could it be?

I kind of doubt the breadboard has an issue. I can't say I've ever seen anyone wear one of them out but I guess its possible.

Yeah, perplexing.

One thing though with the LM317D (think its a D - TO220 package) is that at low currents you may be able to go lower, the spec is 10ma minimum to maintain regulation so I'd test your circuit with 10ma+ and stay over that wire until you figure out whats going on.  Then you can start lowering the current until the thing begins to get unstable and then write that down and stay maybe 1ma ABOVE that at a minimum when you use it for making Colloidal Silver.

bokeb

  • Guest
Re: Help with my LM317 limiter?
« Reply #10 on: July 15, 2021, 06:14:33 AM »
Sorry for the delay, ran to the city yesterday to get multiples of all new components, got around to rebuilding it with these today.

This new circuit is everything new except the 19.5v power supply, the breadboard, and the multimeter. Wires, LM317(T)'s , resistors, and pots all new.

R1 is a 980 Ohm resistor.
R2 is a 2k pot with a 19 ohm minimum.

Hooked everything up.

Similar(ish) results:
17.4 volts across R1.
between 50 and 60 milliamps between R2 and ground with R2 at 19 ohms. 0.9 volts across R2, 17.5 volts across R1.
between 40 and 50 milliamps between R2 and ground with R2 at  94 ohms. 4.5 volts across R2, 14 volts across R1.

Again tested with 2 (new) LM317(T)'s , basically same results.
The T model is all I can find in my country, I looked for the LZ, no go. But I gleaned from your previous posts that the T would work also, just would not regulate as low of a milliamperage (low single digit range) that the T would. Actually fine for me as I am using a bullion anode, lots of surface area, hoping to try to run at 15 mA. Regardless I also gleaned that for the tests I am doing, the LM317 T should work just fine.

I am starting to wonder if possibly my supply store I have been buying from just has a whole batch of bad LM317's. This is a developing country. I may run and buy some more from a few other component stores I know of.

I will now rebuild this circuit with alligator-clip-wires in place of the breadboard. If I still get the same results, the only problem source I can imagine besides the LM317's is my power supply. In that case, maybe I go buy some 9v batteries for testing purposes?

bokeb

  • Guest
Re: Help with my LM317 limiter?
« Reply #11 on: July 15, 2021, 06:20:23 AM »
copper line on left is in from hot, insulated line on right is out to R2

bokeb

  • Guest
Re: Help with my LM317 limiter?
« Reply #12 on: July 15, 2021, 06:47:47 AM »
Built it without the breadboard, still all the same results. Can cross off the breadboard.

Offline Gene

  • Expert
  • Participant
  • ***
  • Posts: 1757
  • Likes: 190
Re: Help with my LM317 limiter?
« Reply #13 on: July 15, 2021, 09:36:26 PM »
I didn't expect it to be the breadboard.

What output current are you testing it with?

As I said, given the spec's on the TO220 version of the LM317, you really should be testing at 10ma+ - at least until you verify its working and then you can start backing it down to see how low you can go before the circuit stops functioning properly.  I could be wrong but I doubt you could get down to 5ma but thats yet to be determined.

So given the resistor you have across output and Adjust, whats the actually current the thing puts out (meter across adjust to power supply ground) without the pot in circuit?

I don't have any TO-220 versions of the LM317 here but I do have some of the TO-92 versions - the LM317LZ I think the designation is - max output 100ma.

If I get a chance in the next day or two I'm going to build up a circuit on a breadboard - have the same type you do - and see how it works.

The pinout for the TO-220 you're using is correct as per the datasheet.




bokeb

  • Guest
Re: Help with my LM317 limiter?
« Reply #14 on: July 16, 2021, 08:28:44 AM »

So given the resistor you have across output and Adjust, whats the actually current the thing puts out (meter across adjust to power supply ground) without the pot in circuit?


reading a steady 60 mA through the 10-mA-resolution meter.
That is with R1 still a 980 Ohm resistor, and with the R2 load-simulation-pot removed completely.

EDIT: Ok this is interesting: I repeated this test with my other LM317's (I have 5 from the original store, and 2 from another store I just bought today), again with R1 at 980 Ohms and R2 removed, testing current across Adjust and power-supply-ground:
4 out of 5 from the original store are all giving me roughly 60 mA (of which the one I used in the test I uploaded here last night is one)
1 of those 5 is giving me roughly 30 mA. (I'll call this LM317-1)
2 out of 2 from the new store are also giving me roughly 30 mA. (I'll call these LM317-2 and LM317-3)
Obviously this at the very least means there's something going on with at least some of my LM317 units.

So I redid the test with R2 re-installed for mA between Adj and ground, and Volts across R1 and R2, for all 3 of the LM317's reading 30 mA, and with R1 at 980 Ohms and R2 at 22 Ohms, 100 Ohms, and at 218 Ohms:

LM317-1 with R2 at 22 Ohms:    R1 17.7V , R2 0.8V , 30mA between Adj and ground
LM317-1 with R2 at 100 Ohms:  R1 15.5V , R2 3.0V , 30mA between Adj and ground
LM317-1 with R2 at 218 Ohms:  R1 12.7V , R2 5.8V , 20mA between Adj and ground

LM317-2 with R2 at 22 Ohms:    R1 17.7V , R2 0.8V , 30mA between Adj and ground
LM317-2 with R2 at 100 Ohms:  R1 15.5V , R2 3.0V , 30mA between Adj and ground
LM317-2 with R2 at 218 Ohms:  R1 12.7V , R2 5.8V , 20mA between Adj and ground

LM317-3 with R2 at 22 Ohms:    R1 17.7V , R2 0.8V , 30mA between Adj and ground
LM317-3 with R2 at 100 Ohms:  R1 15.5V , R2 3.0V , 30mA between Adj and ground
LM317-3 with R2 at 218 Ohms:  R1 12.7V , R2 5.8V , 20mA between Adj and ground

for reference, re-measured the LM317 from last night:
LM317-o with R2 at 22 Ohms:    R1 17.2V , R2 1.2V , 60mA between Adj and ground
LM317-o with R2 at 100 Ohms:  R1 13.6V , R2 4.9V , 40-50mA between Adj and ground
LM317-o with R2 at 218 Ohms:  R1 10.3V , R2 8.2V , 40mA between Adj and ground

Lots of measurements, all the same confirmations. Clearly I'm getting V(R1)+V(R2) = 18.5V no matter what. I guess all LM317's are dropping just about exactly 1.0V?

Well, importantly... conclusion is even these 3 LM317's that read I(out) 30mA with no R2, already start reading I(out) 20mA with an R2 set to just 218 Ohms. Is it possible that 218 Ohms is already like, *way* more resistance than I should be getting in the colloidal silver cell? Obviously it would help here if I went and got yet another multimeter (3rd one now) to get some precise I(out) measurements... maybe I will do that tomorrow.. but first perhaps I will try simulating my electrolysis cell with the right ratio of electrolyte and measure the resistance across 1.5 inches of that. I'm sure that information is on this forum somewhere, guess I'll look for that tomorrow also.

I haven't heard your input on my idea of swapping my power supply for a few 9V batteries... do you think it's possible my issue is somehow my power supply? All I know about it is that it says 19.5V DC out on the back, and my multimeter(s) read 19.6V across hot and ground. Other than that maybe it could be the electricity running to my developing-nation-abode somehow?


If I get a chance in the next day or two I'm going to build up a circuit on a breadboard - have the same type you do - and see how it works.


I would seriously appreciate that.