[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/diy/ - Do It Yourself


View post   

File: 39 KB, 1001x578, currentlimiter.png [View same] [iqdb] [saucenao] [google]
1624295 No.1624295 [Reply] [Original]

I'm trying to build a simple current limiter based on a lm317 IC. I need the load to maintain a minimum of 10V at a range of 3.5-20+mA. The power supply I am thinking of using is 24V. The lm317T has a reference voltage of 1.25v and a minimum current rating of 3.5mA I am confused as to how to select the proper resistor and trimming resistor/potentiometer.
Is the resistors values determined by the input supply voltage or is it calculated by how much you want to drop the voltage at the load? Pic related is based off a supply of 24V. When the pots resistance is maxed it limits to 3.5ma and when the pots resistance is low it limits 20ma due to the fixed resistor.
Am I understanding this correctly or am I way off?

>> No.1624317
File: 49 KB, 307x284, 317_current.png [View same] [iqdb] [saucenao] [google]
1624317

>>1624295
The 317 is a 'floating' regulator that has no reference to ground. What it regulates is the voltage between its output pin and the adjustment pin to 1.25V. The load voltage is determined by the load, not the regulator. The regulator limits the current through the load. Without load the output voltage equals the input voltage minus a small dropout voltage of about 1V. The minimum output current to maintain regulation is typ. 3.5mA but can be as high as 10mA (see pic). This is not predictable and must be measured.

>> No.1624318

The current regulator maintains a constant output current and varies output voltage accordingly depending on the load resistance. Vout can go from Vin-Vdropout (24-4 ~ 20) to zero. If you need your Vout to stay above 10V then your load resistance can't go too low. Also, as you know the formula for Iout is 1.25/R. LM317 requires a current load of at least 10mA for the internal circuits of the LM317 to work correctly. So the maximum value of R (R1+R2 in your case) is 125R.

And for Vout to stay above 10V, your Rload should be >1K. But it can't go too high, say higher than 2K or your current will start dropping (but maybe that's what you mean by giving the range from 3ma to 20ma?). It doesn't sound very practical to try to maintain a certain Vout while also regulating current. But perhaps you don't need a constant current you only need to make sure it doesn't exceed a certain value, like 20mA? Do you have a variable load? What kind of a load are you driving? For Iout = 20mA you need your total R = 62.5ohm. Then your Rl should be > 500R so your Vout > 10V.
As your Rload increases above 1K your current will start to drop and will go down 3mA when Rload is about 10K

>> No.1624333

The load is an electroplating\electrolysis cell and in the cell itself the voltage can be adjusted by the depth of the cathode. So the voltage can be regulated that way. What I am trying to do with the lm317 is set a constant current that is limited and adjusted by the resistance of a fixed resistor and a potentiometer. The resistance of the load itself (water with a small amount of electrolyte) should be fairly stable, but will reduce a bit as more metal ions are released into the solution.
I was able to get a constant current before when playing with this by ganging a bunch of resistors together and adjusting the voltage of the cell with the depth of the cathode. It didn't matter how deep the cathode or anode was in regards to the current, but the voltage dropped or increased depending on cathode depth. But using a bunch of resistors isn't ideal and doesn't allow for adjustment of the current if I want the process to go faster or slower.

When you say Rload or 125R, how are you getting the value? This isn't the resistance of a resistor is it? The datasheet does say that typically the current for it to operate needs to be 3.5ma but as you said can be as high as 10ma. I would like to be able to adjust the current output withing a range of 3.5 (lower would be better) and up to 20ma or higher. I know the data sheet says the max for some versions of lm317 is 100ma but i've seen some at 1.5A

>> No.1624341

3.5 - 20ma sounds suspicously close to 4-20ma.
What are you doing this for?

>> No.1624343

>>1624333
>>1624341
sorry I didn't read the thread and replied. nevermind

>> No.1624347

>>1624343
im curious now, whats 4-20ma?

>> No.1624351

>>1624333
>100ma
That's the LM317L, a TO-92 or SMD version of the 317.

>> No.1624353

>>1624351
yes, this one also has a lower limit current of 2.5ma, but only if supplied with a max of 15v if I understand correctly. anything above it needs 3.5ma to function properly.

>> No.1624358

>>1624347
Common industrial sensor signalling method.
https://en.wikipedia.org/wiki/Current_loop
in short, it is an analog current of min 4ma to max 20ma for some sensor to emit and an actuator/plc to read and do something with.
one benefit is decent noise immunity.

>> No.1624591

>>1624333
>When you say Rload or 125R, how are you getting the value?
125R is not Rload it is the sum of R1 and R2 to set the current limit to 10mA.

>a range of 3.5 (lower would be better) and up to 20ma or higher.
Assuming you can go as low as 3.5mA (which you probably can't), you need to adjust the total of R1+R2 in the rage of 62.5R for 20mA to about 360R to go down to ~3.5mA.


>(water with a small amount of electrolyte)
I don't know what the resistance of the solution is so you may need to measure it. But it is probably on the order of ohms so you should be fine. Just try the resistor values I mentioned and see what happens. If there is not enough electrolyte the resistance can be very high so your current wont be regulated and just drop down really low.
You can connect your cell in series with a resistor and measure the voltage drop. Just make sure the input voltage is not too high or use a high wattage resistor as needed.

> in the cell itself the voltage can be adjusted by the depth of the cathode
The part really confused me. Does the cell produce voltage? Is it a battery? I thought you meant electrolysis which is the opposite? Or you are measuring Vout at the cell?

>> No.1624788
File: 22 KB, 999x414, currentreg2.png [View same] [iqdb] [saucenao] [google]
1624788

>>1624591
>125R is not Rload it is the sum of R1 and R2 to set the current limit to 10mA.
Ok I wasn't sure if those numbers were in ohms or kohms etc

>Assuming you can go as low as 3.5mA
Yea, I thought the lm317l could go that low, to 2.5ma, but I think I misread the table in the data sheet. I can't seem to find that part now anyway.

>The part really confused me. Does the cell produce voltage? Is it a battery? I thought you meant electrolysis which is the opposite? Or you are measuring Vout at the cell?
Sorry, maybe I'm confusing electrolysis and electroplating, I thought they were synonyms. I am doing electroplating. I thought this is how it works: If you have a solution with an electrolyte and two dissimilar metals as the cathode and anode, the anodes metal will be liberated into the solution as ions and then travel and plate-out to the cathode. At the same time since you are applying voltage to the electrolyte solution its causing electrolysis and breaking the water apart into hydrogen and oxygen. Or does electrolysis only occur in absence of an electrolyte?

I am taking a measurement at the cells positive and negative leads, so I guess Vout? This will show a variable voltage depending on the depth of the cathode. So in a sense the voltage of the load can be regulated, but once the cathode is left alone the voltage is constant. Isn't it a battery too, albeit a low efficiency battery because 2 dissimilar metals are in the presence of an electrolyte?

At any rate, I think I've figured this out a bit better from my original post by looking it up and with your help. pic related is what I've come up with and it's similar values to what you have mentioned. I was confused about where to properly calculate resistor value, but now I understand that the lm317 regulates voltage out to 1.25 pins and you can calculate it based off that and not the loads voltage.

>> No.1624816

>>1624788
wait, never mind about the battery comment, that's two dissimilar metals in the presence of an acid, not an electrolyte.

What I don't understand now is how the load can get more then 1.25 volts if the lm317 regulates the voltage to 1.25v. I saw a video where it lights a 2.2v LED and it's voltage drop on a multimeter is 2.2v

>> No.1624819

>>1624788
>I wasn't sure if those numbers were in ohms or kohms
R or no letter at all means Ohms. For example 125 or 125R both mean 125Ohm.

>Sorry, maybe I'm confusing electrolysis and electroplating,
No I don't think you are confusing anything. I was just making you were not talking about a cell that produces voltage (such as a galvanic cell that converts chemical energy into electrical energy). Electrolysis / electroplating both do the opposite.

>This will show a variable voltage depending on the depth of the cathode
That means the resistance of your cell varies for whatever reason.

> in a sense the voltage of the load can be regulated
Do you need it to be regulated? I wasn't sure about your requirement to keep the voltage close to 10V. Just curious, what's that for?


>albeit a low efficiency battery
My understanding is not a battery at all since electrolysis / electroplating convert electrical energy into chemical energy not the other way around

>> No.1624823

>>1624816
ah didn't notice this post you commented already on galvanic vs electrolytic cell

> regulates the voltage to 1.25v.
1.25v is the internal voltage reference. the regulated Vout is set by two resistors. But you are regulating current not voltage in your circuit. and the Vout is whatever it takes to keep the current constant.

>> No.1624844

>>1624819
>Do you need it to be regulated? I wasn't sure about your requirement to keep the voltage close to 10V. Just curious, what's that for?
Keeping the voltage above 10v supposedly ensures the ions are being liberated from the anode into solution and the electrolyte is being reduced at the cathode. I don't need it to be regulated just have it stay above 10V.

>That means the resistance of your cell varies for whatever reason.
Yea it will as more ions enter the water conductivity should go up, but simply moving the cathode is enough for a drastic and immediate change. If it was fully submersed it dropped the voltage from 24 to 6 or something.

>1.25v is the internal voltage reference. the regulated Vout is set by two resistors. But you are regulating current not voltage in your circuit. and the Vout is whatever it takes to keep the current constant.
Ok, that makes sense.

Thanks for the help.