LM317 adjustable current source/regulator

  Рет қаралды 187,909

Lindsay Wilson

Lindsay Wilson

Күн бұрын

Adjustable constant-current source I designed for things like laser diodes. Full details at: imajeenyus.com/electronics/201...
More details on the grounded-wiper potentiometer feedback network: imajeenyus.com/electronics/201...
This was used to power a 300mW 808nm laser diode on the AxiDraw drawing machine for some rudimentary laser cutting: imajeenyus.com/computer/201605...

Пікірлер: 230
@hugobracamontesbaltazar
@hugobracamontesbaltazar 6 жыл бұрын
Excelent!, I was looking for a adjustable current circuit based on LM317, thank you very much. Regards from México.
@MathewPendleton
@MathewPendleton 7 жыл бұрын
your the first person to actually make this clear to me. Thanks!
@darkracer1252
@darkracer1252 5 жыл бұрын
or so you'd think but then you build it, and it doesn't work at all
@jonasaskenobis
@jonasaskenobis 2 жыл бұрын
Short and on point, thanks :) for those who are confused by schematic, the rheostat is connected like a potentiometer with R2 going into the viper
@imajeenyus42
@imajeenyus42 2 жыл бұрын
Thanks! Glad you liked it. Not to split hairs, but technically a rheostat is a 2-terminal device (variable resistor) whereas a potentiometer has 3 terminals (potential divider) ;-)
@jonasaskenobis
@jonasaskenobis 2 жыл бұрын
@@imajeenyus42 yeah, but for some reason the stabilisation part of your scheme didn't work for me until i connected it like a pot, with R2 on the wiper
@jimw7916
@jimw7916 2 жыл бұрын
Very few people know this , but, it does NOT have to be an adjustable regulator.... you could use almost any 3 pin reg such as a 5v reg etc.....it still works!
@imajeenyus42
@imajeenyus42 2 жыл бұрын
It will work, but it's less efficient because of the larger feedback voltage.
@howardsimpson489
@howardsimpson489 Жыл бұрын
Not only a good regulator tutorial but great bird sounds as well.
@imajeenyus42
@imajeenyus42 Жыл бұрын
I practised them for a long time 😂😂
@billguedesbr
@billguedesbr 6 жыл бұрын
Thanks for your explanation, good job.
@imignap
@imignap 4 жыл бұрын
Very nice video, I didn't even think to look at with a voltage divider to find V_R1 knowing V_R2, it didn't occur to me until later of course. Just note the total current out includes both I_R1 & I_R2 = 1.25/R2 which would bump up your min & max current amount (i.e. +1.25V/R2). You also want to be mindful of the maximum wattage going through the pot i^2*R3.
@shubhamshukla167
@shubhamshukla167 6 жыл бұрын
sir i want to make a cc/cv using 2 lm 317 and i understood the circuit but i want a dynamic range of current i want current upto 1.25/1.5/1A so please suggest me best resistor values along with the power rating and which are commonly available
@SankalpMandlik
@SankalpMandlik 5 жыл бұрын
Hi there , Your circuit is quite easy to understand , I have a situation where my current varies from 0amos to 2.5 amps and I would like it to vary as normal but I would like it to limit till 1.9amp and not exceed more than 1.9amp , is it possible through this circuit or this circuit will give me a constant xx ampere current. Thank you
@mechatrons
@mechatrons 5 жыл бұрын
Nicely done. If one desired a 0amp minimum, say 0 to 10ma, how would that look?
@jp-um2fr
@jp-um2fr 7 жыл бұрын
Hello Lindsay, I'd like to thank you for giving me a leg up or maybe a leg re up into an old hobby. Almost 50 years ago I was into valve amps. Google Mullard 20W - The National Valve Museum, yes I'm that old. I was looking around KZfaq and came across your video above. I was particularly interested in your current control. I had not touched electronics since my valve days and the 'gubbins' you were using intrigued me. I decided to have a go. Mind you picking a 60W soldering iron up by the wrong end made for an interesting start. I had had 410V across my nose but that's another story. Thanks to people on Forums and KZfaq videos like yours I am now into 2N3055's LM723 and all the bits for a bench power supply. Strangely enough though I think yours is one of the few videos that goes into a simple current control. I needed it as I wanted to play about with LED's. Things have moved on a bit since then but I just wanted to say - Thanks Lindsay.
@imajeenyus42
@imajeenyus42 7 жыл бұрын
Hi JP, thank you so much for the kind comment! I'm really happy my videos are of some use to people ;-) I like going back to basics with simple things like regulators and discrete components - so many things nowadays just use an "all-in-one" chip, which doesn't really give you much room for understanding how it operates. I actually love "antique" technology as well - anything involving tubes, Nixies, gas-discharge stuff. I'll enjoy reading an old book from 1940 about valve technology more than a modern one on semiconductor stuff. I've never done much with tubes, apart from once building a little oscillator with an ECC83, but I have played around with Nixies and even built some gas-discharge tubes (there's some stuff on my site at imajeenyus.com/vacuum/index.shtml if you're interested). Best regards, Lindsay.
@Mohitkumar-ev7he
@Mohitkumar-ev7he 3 жыл бұрын
Wow thats so easy ... but only when i saw your video...thank u
@MilanKarakas
@MilanKarakas 7 жыл бұрын
Good explanations. Did you noticed that in many datasheets, Vref is 1.2 V, not as it should be 1.25 V?
@peaceful1123
@peaceful1123 7 жыл бұрын
Yes, you're right. I got the same result as you did.
@DanielsGameVault
@DanielsGameVault 7 жыл бұрын
The LM338 has a max current of 5A - will your design work for that as well ? Provided of course the series resistor R1 can hold that.
@imajeenyus42
@imajeenyus42 7 жыл бұрын
Should do - it looks to have the same 1.25V reference voltage as the LM317. Thanks for mentioning the '338, by the way - didn't realise it came in 5A versions as well!
@DanielsGameVault
@DanielsGameVault 7 жыл бұрын
Great, but the issue is that I doubt you'd find a resistor that can hold that amount of current through it. At 5 volts, you'd already be pulling 25w (since V times I, equals P, assuming the load is rather heavy - something like an automotive halogen lamp or medium sized motor that draws the whole 5 amps). I was thinking of a pass transistor to take away most of that current, then somehow sample the voltage using the resistor divider so you can still get the 338 to do its thing. Haven't quite mulled it over, so I don't know exactly how it should look or work - might wanna check it out :)) An op-amp might come in handy as well somewhere.
@bhukyaravi5949
@bhukyaravi5949 4 жыл бұрын
Hello sir we are planning to charge a supercapacitor with 8.1A constant current so can we connect it directly to load?
@jamest.5001
@jamest.5001 5 жыл бұрын
I am completely new to electronics, and trying to learn on my own, would a heatsink be needed? When used as cc supply? I have a 18 combined watt rgbwyuv LED, I'm wanting to make a driver to power all the LED's it is a "all in one" LED the size of a 3-5w bead, the kwd is red, green, blue, white, yellow, and UV/Violet, basically all but a IR LED, I am building a small portable light, powered by a couple 18650's in series if I must, I think using a buck would be better than boost, although USB charging option would be a plus, I'm thinking of using the linear regulator for 2-3 supply's, to get close to the LED's peramerters, then use a resistor, for further limiting, or is there a easier way to do this?? I thought about using a rgb controller, or two, only use it with the rgb and the wy/uv! And just use resistors for limiting, crazy dumb questions I know, and very complex to light a LED!! Thanks!
@Darieee
@Darieee 7 жыл бұрын
Thanks ! Awesome explanation
@ej-1608
@ej-1608 5 жыл бұрын
Is it possible to replace the potentiometer with a digital potentiometer instead?
@arnolduk123
@arnolduk123 4 жыл бұрын
Very good explanation and no distracting music (apart from the odd fly on your paper). Is it possible to place a led in your circuit to indicate when the the current limit is reached ? If so where would be the best place to insert the LED ? Thanks
@imajeenyus42
@imajeenyus42 4 жыл бұрын
Thanks. This circuit is acting as a current regulator, not a limiter, so it's not really possible to have an LED somewhere to indicate when current is being limited because, well, it's not being limited!
@arnolduk123
@arnolduk123 4 жыл бұрын
@@imajeenyus42 Yes, I see what you mean now. Thanks.
@arnolduk123
@arnolduk123 4 жыл бұрын
@@imajeenyus42 sorry to bug you again, just wanted to re-phrase my question. I understand it is regulated but in a way, it is a limited current range by the adjustable trimmer R3 (125mA to 400ma). If I was to lets say short the output with a 10ohm resistor, then no more than 400ma would flow through it. Where could I add a LED to indicate that the current had reached the maximum regulated current set by R3 ? Does that make more sense ? Thanks for your time, I really enjoy your videos, they are always clear and explained very well.
@melikrasniqi1511
@melikrasniqi1511 7 жыл бұрын
Nice video. How to increase the output current to 10 Amps with 2N3055
@leonardjanus7599
@leonardjanus7599 6 жыл бұрын
Hello Could you suggest where put an optical coupler in that circuit? I mean, drive the optical coupler with a smartphone signal generator and then modulate/control the output of that circuit. Could also suggest a current controller for up to 100V? Max LM317 is 37V.
@Ziplock9000
@Ziplock9000 6 жыл бұрын
Are you trying to make a Tesla coil by chance and play music through it?
@autogc22
@autogc22 7 жыл бұрын
Why in the calculations you didn't considered the (1-x)·R3 for the other part of the potentiometer between x·R3 and the adjustment pin?? Nice video by the way!!
@imajeenyus42
@imajeenyus42 7 жыл бұрын
Thanks! You're absolutely right - there is (1-x)R3 in series with the adjustment pin, but I'm making the simplified assumption that the pin doesn't source or sink any significant current, so that resistance won't affect anything. In practice, there is a current of about 50uA flowing out the adjustment pin, which will become significant if R3 is relatively large, but I try and keep it around 1k or so to avoid this.
@anthonyselby8337
@anthonyselby8337 4 жыл бұрын
@@imajeenyus42 Interesting I'm glad you kept it simple seriously thanks for going deeper and explaining it so well great vid thanks
@TheSermor5
@TheSermor5 5 жыл бұрын
Hello! If I may ask, about the power of the resistors it's only mentioned the 3W of R1; and the others , R2 and R3, resistors? Can I use your calculations for an 1A output? It won't get on fire? :-) Joking but asking seriously! Thanks!
@imajeenyus42
@imajeenyus42 5 жыл бұрын
Hi! All the other resistors can be normal 1/4W varieties since they hardly dissipate any power at all. Yes, the calculations can be used for any current level - just work out the resistor values to suit.
@TheSermor5
@TheSermor5 5 жыл бұрын
Thanks!
@bmindonesia
@bmindonesia 7 жыл бұрын
halo i wanna to ask u, how to regulate the intensity of the laser with regulator current LM317..?
@Paberu85
@Paberu85 3 жыл бұрын
starting by reading and comprehending the Ohm's law.
@octotech91
@octotech91 5 жыл бұрын
Hello Lindsay, really nice video :) I tried to realize the current source circuit to obtain a very tiny current (less than 1 mA) but what I noticed is that also putting a very big R1 (like 10kohm or more), the current does not drop less than 1.45mA.... So I cannot obtain any current below this value, can you confirm it please? Thank you
@imajeenyus42
@imajeenyus42 5 жыл бұрын
Thanks for the comment! Unfortunately, the design procedure I've shown in the video relies on R1 being much, much smaller than R2 & R3. So if you did want to use say a 10kOhm for R1, you would need to make R2 & R3 much larger, in the region of say a few hundred kOhm. An additional complication is the leakage current out of the ADJ pin - although it's small (50uA), it would create significant voltage drops when using larger resistor values. It's really difficult to say exactly what the equation would be! If you want to play around with some values, I'd try 10kOhm for R1, 100kOhm for R2, and 1MOhm for R3 (the variable).
@octotech91
@octotech91 5 жыл бұрын
@@imajeenyus42 Hello, unfortunately it didn't work for me, but I have found a different solution for low current at this link: electronics.stackexchange.com/questions/211249/lm317-%C2%B5a-constant-current-source-possibility Thank you again for your help!
@harshbhoi3116
@harshbhoi3116 8 жыл бұрын
nice work... but the current is not constant for variable load.... can us suggest , what should be the resistor values for current range 100mA to 1amp
@imajeenyus42
@imajeenyus42 8 жыл бұрын
Not sure why you think the current isn't constant as the load varies, that's the whole point of the circuit. It will regulate the current, so long as the voltage drop across the LM317 doesn't become less than the dropout voltage, which is approximately 2V. Suitable values for a 100mA to 1A range (following equations given on my webpage). Minimum current is 0.1A, so R1 = 1.25/0.1 = 12.5Ohms. This carries a current of 1A, so power dissipation is 12.5W. I'd try 15W or 25W metal-clad resistor, which are available in a 12Ohm value. (If you can't get 12Ohm, put two 24Ohm in parallel). Maximum current is 1A. Min/max current ratio is 10, so (R3/R2) ratio is 9. Say you use R3 = 500Ohm (a standard potentiometer value). R2 is then 55.5Ohms - use a standard value of 56Ohms. Summary: R1 = 12.5 Ohms, 15W or 25W R2 = 56 Ohms R3 = 500 Ohms
@merseytrainz
@merseytrainz 7 жыл бұрын
A Very good video, Being a novice, could you please tell me the values for R1 & R2 in an example. I realise that the circuit diagram shown is for various input voltages but an example for say a input voltage of 9v and an output voltage of 6v would help me understand the circuit better. ManyThanks
@imajeenyus42
@imajeenyus42 7 жыл бұрын
There's lots of examples of LM317 voltage regulators online - for example, this one: www.learningaboutelectronics.com/Articles/LM317-voltage-regulator. The purpose of my circuit is a constant-current regulator, not a voltage regulator.
@imajeenyus42
@imajeenyus42 7 жыл бұрын
In the laser diode driver, for example, the output voltage ranges from 0 up to a few volts, depending on the current being delivered, diode characteristics etc. In a constant-current configuration, the LM317 could in theory be used in high-voltage applications, as long as the voltage drop across it never exceeds its maximum of about 37V. The problem with an adjustable regulator running from a HV supply - if you reduce the current to such a level that the voltage drop across the LOAD is relatively small, that will then drop a LARGE voltage across the LM317, blowing it. You can use it as a higher VOLTAGE regulator, but it requires additional components - for example, have a look here: www.pmillett.com/HV_reg.html. That can probably be modified to suit.
@DennisMurphey
@DennisMurphey 4 жыл бұрын
weird application i am considering if you are still about. My Model Train has a smoke generator. it vaporizes an oil to create white smoke that we puff into the air thru a Mini DC fan. The housing that do this are usually aluminum and a fixed size. My trains are S Scale and unique from 1950. I have made a Smoke housing that works via my 3D Printer. But if it over heats yes it will melt. I can use a 10 Ohm Heater to make good smoke at 9 volts. But the track power available ranges 5 to 20 AC Volts. My little DC Can motor needs DC so i run the track power thru a Rectifier and get a reduces DC volt, then for the Heater I run thru a 7809 With some caps to maintain the 9 volts. But it is not very stable and i have had low smoke and over heating issues. I wanted to see if i can use the 317 with a termistor Sensor to use Heater Temp to regulate the 317 output. So if it gets too hot the 317 regulates V out down. Is this practical in any way or am i dreaming up stuff that can not be done. My issue is space. My trains are not big so i need small and simple circuit. Can this be done? Dennis
@imajeenyus42
@imajeenyus42 4 жыл бұрын
Might be possible, I've seen a few people use a thermistor + LM317 for a fan speed controller (thing heats up, fan runs faster, cools it down). If you put a thermistor (NTC) in place of R2, then as it heated up, its resistance would drop, which would make the LM317 decrease its output voltage, thus reducing the heater power. You'd need to play around a bit with values though to get something that worked at just the right heater level.
@darkracer1252
@darkracer1252 5 жыл бұрын
so with this circuit you basicly can only make a printer turn the laser off and on right? manual power setting and then the printer has to do shading with changing the movement speed. are there computer controlled potentiometers?
@imajeenyus42
@imajeenyus42 5 жыл бұрын
Yes, correct. Search for "digital potentiometer", there's lots of options. Usually I2C or SPI interface.
@nonsocheazzoscrivere
@nonsocheazzoscrivere 5 жыл бұрын
I have some doubts about the circuit you drew at 4:50, R2 and R3 are not in series,because there is current flowing through adj pin,so they cannot form a resistance divider.
@imajeenyus42
@imajeenyus42 5 жыл бұрын
I have explained this time and time again to other commenters. Yes, there is a TINY current flowing through the adj pin, but it is INSIGNIFICANT. This is why, to all intents, we can consider R2 and x*R3 as being in series, forming a divider, and we can forget about (1-x)*R3 being in series with the adj pin. The current flowing through the adj pin is 50uA, according to the datasheet. Suppose we were using a 1k potentiometer. Then, the maximum drop across (1-x)*R3 would be 1k*50uA=0.05V. So instead of the reference voltage being 1.25V, it would be 1.20V - only a 4% difference. This is not something to worry about, and I really wish people would understand this! There is no point in trying to calculate the adjustable range exactly, for the simple reason that it IS adjustable. If you calculate that you're going to get a range of 100-400mA, and you actually get 95-405mA instead, is that really a big deal?!? Considering that the tolerance on most potentiometers is 10-20%, a 4% error caused by ignoring the adj pin current is irrelevant. I hope this doesn't come across as harsh, but I have explained this all before ;-)
@nonsocheazzoscrivere
@nonsocheazzoscrivere 5 жыл бұрын
​@@imajeenyus42 my fault,i had just written without reading the comments.
@fly9wheel
@fly9wheel 4 жыл бұрын
@@imajeenyus42 Quite right, there's always one!
@gocpod
@gocpod 2 жыл бұрын
Just as i was start learning how to add LEDs to my Golf Mk2 dash and retain dimmer function i stoped here first. Does anyone knows how to wire it in cars dash?
@HSRMF
@HSRMF 6 жыл бұрын
thanks for sharing ... but it's getting to high temperature when i use it to control my 12v soldering iron voltage.. any suggestions or different solution for high loads ?
@imajeenyus42
@imajeenyus42 6 жыл бұрын
MAKE A DEFERENCE شكل فرقاً You could try using an LM338 instead - they can handle up to 5A, exactly the same operation.
@johncoops6897
@johncoops6897 5 жыл бұрын
Linear regulators like this are NOT the best solution for high current or when large voltage differences. That is because the excess voltage is ALL converted to heat by the regulator. For soldering iron it is much better to use a switch mode buck regulator with constant current - these cost a few dollars from eBay etc.
@libanhussein7433
@libanhussein7433 10 ай бұрын
Excellent tutorial! Quick ?--> I'm still a bit confused about the potentiometer network. Could I use a 3 pin potentiometer, with one pin connected to R1, the middle pin connected to R2, and *the third pin connected to ground*? I noticed the 3rd pin was connected to the adjust pin but have seen these connected to GND typically
@imajeenyus42
@imajeenyus42 10 ай бұрын
You could, but that would give some weird response because it's then a sort of blend between a current regulator and a voltage regulator. I.e. it would regulate neither. If it's a current regulator you're after, one end of the pot needs to go to the adjust pin as shown.
@libanhussein7433
@libanhussein7433 10 ай бұрын
@@imajeenyus42 thanks so much for responding! Looking forward to building and testing this circuit!!
@libanhussein7433
@libanhussein7433 10 ай бұрын
@@imajeenyus42 this may be a basic question, but it's been my experience that laser diodes are best driven with current, not voltage. That being said, if the resistor values are chosen for a current range, should there be a concern for voltage limits of the laser diode being exceeded? Or is it safe to assume that if the current ratings are within the datasheet spec, there should be no cause for concern? Was the circuit you built for the laser cutter simulated in LTSpice, Multisim, etc before being built or were the hand calculations sufficient enough to get the gist of the circuit behavior? Thanks again for an excellent tutorial and quick support!
@imajeenyus42
@imajeenyus42 10 ай бұрын
@@libanhussein7433 Laser diodes, like LEDs, have essentially a constant voltage drop regardless of the current passing through them, so it's not like there's really a voltage limit that can be exceeded. The current is the important thing, and there is a current limit above which damage will occur (usually from overheating). So if the current is kept in the safe range, nothing really can go wrong. I didn't bother simulating anything here because it's a relatively simple circuit and the behaviour can be predicted just from the equation.
@libanhussein7433
@libanhussein7433 10 ай бұрын
@@imajeenyus42 really appreciate you taking the time to reply to these comments! Thanks again!🙏🏿
@TSulemanW
@TSulemanW 3 жыл бұрын
Nice explaination
@Robonza
@Robonza 6 жыл бұрын
Nice job on the explanation. I thought you would have needed a small cap on the output for the switching transients? Also have you tried modulating the ADJ pin instead. It will take much less current to control so cleaner switching would be easier I would guess. It would be inverted though.
@imajeenyus42
@imajeenyus42 6 жыл бұрын
The LM317 is a linear regulator, not switching, so a filter cap isn't strictly needed. It would help improve transient response to changes in the load, but too large a value can cause instability. I'm not sure what you mean by "modulating the ADJ pin"?
@Robonza
@Robonza 6 жыл бұрын
Lets say you switch your laser at 100khz. That transient load is too fast for the 10khz response of the LM317, so you would need a 0.1uf cap on the output and input in theory. Grounding the ADJ pin will switch off any load (1.25v out is off for most loads) So you can switch the ADJ pin. which is easier than switching 400ma. I will probably try all this in a few weeks when I get a chance. The next TV I build needs a modulated laser. I am just researching right now.
@DaroWannaKnow
@DaroWannaKnow 5 жыл бұрын
The calculation on Ir1 is correct, but you forgot to consider that final Iout current is equal to Ir1 + Ir2... I get that you omitted Ir2 since is much smaller than Ir1. But this may really confuse people trying to learn
@alephii
@alephii 5 жыл бұрын
I've got a different result here, the current is I = 1.25 (R1 + R2 + xR3) / (R1 * R2), the values in the end are not much different, but I am not sure if you calculated I1 correctly. In the end there is a R1 / R2 missing in the final equation, but since R2 >> R1 the difference is not very significant. Anyway, I think it might be confusing for people that are learning if they try to understand the calculations, that's why I am commenting it. Please Lindsay, take a look at it...
@imajeenyus42
@imajeenyus42 5 жыл бұрын
You're absolutely correct - in theory you should include the R1/R2 term, but like you say the ratio is so small in most applications as to be insignificant. For example R1 might be 10 ohms, and R2 might be many kiloohms.
@ThanassisTsiodras
@ThanassisTsiodras 3 жыл бұрын
Confimed - I reached the same result. The mistake Lindsey made was when he talked about "a resistor divider" when he computed V_R1. That is not correct; what happens instead, is this: (a) the voltage across R2 is 1.25V (b) that means the current across R2 is I_r2 = 1.25/R2 (c) the *same* current goes through xR3, since there's no current going in the Adj pin (very high impedance) (d) that gives us the total voltage drop V_total across both R2 and xR3 - since the same current goes through them: V_total = I_r2 * (R2 + x*R3). Now *that* voltage is the one driving the "secondary" current through R1: i.e. I_r1 = V_total/R1 = (1.25/R2)*(R2+x*R3)/R1. The two currents add to form the total I_out, which ends up as you computed. Sadly, the way KZfaq works, Lindsay can't fix the video - many people will be confused and learn the wrong thing about circuit analysis here.
@alexandervelasco8804
@alexandervelasco8804 Жыл бұрын
H Looking for an output of 10~150mA. I chose R1 = 100, R2 = 1k, R3 = 10k. This should put me at a maximum of 137.5mA and a minimum of 12.5mA. With an input of 13V (to reach get the needed 3V headspace), my minmimum current is 20mA. Any ideas why its 20 and not 12.5mA?
@imajeenyus42
@imajeenyus42 Жыл бұрын
It's because of the small current that flows out of the ADJ pin on the LM317. This is approximately 50-100uA. I haven't included its effects because it makes the equation more complicated. If you do include it, the effect is to increase the output current, and in your case it would increase the minimum from 12.5mA to around 20.
@alexandervelasco8804
@alexandervelasco8804 Жыл бұрын
@@imajeenyus42 this is what I figured. It just seemed like a big increase, but I guess not. Thanks for the reply
@valichesu
@valichesu 3 жыл бұрын
First of all thanks for the circuit idea! I tried the circuit with a LM350 (similar to LM317, but with 3A max current). Unfortunately it works only for small adjusting ranges (x to 4*x, where x is the current set by R1). I tried the schematic with R1=10Ohm, R3=1k (the potentiometer) and R2=50 Ohms and it doesn't work properly -> the adjusting range is from ~125mA which corresponds to the formula, to about 600mA. I suppose the limitation is due to the adj pin current. To solve the issue (I needed currents up to 2.5A) I have placed a small resistor and a switch in parallel with R1. So now I can change between 2 ranges: 125-600mA and ~700mA-2.6A. If someone managed to get continuous range between 125mA to more than 1.5A please reply.
@imajeenyus42
@imajeenyus42 3 жыл бұрын
The LM350 and LM317 have exactly the same specifications for the adjustment pin leakage current (50-100uA), so that's not the problem. It sounds like the input voltage isn't high enough. If you have a R1=10Ohm, that will drop 25V, and the LM350 needs at least 2V to operate, so that's 27V so far, then you need to add on whatever voltage your load requires.
@valichesu
@valichesu 3 жыл бұрын
@@imajeenyus42 you are perfectly right, the input voltage is about 20V, I was stupid 🙃. Thanks a lot for the fast answer!
@imajeenyus42
@imajeenyus42 3 жыл бұрын
@@valichesu No problem, glad to help!
@AgusWirajati
@AgusWirajati 4 жыл бұрын
Nice, could it be used for regulating low current? I need to regulate between 2mA - 50mA and minimum voltage is 10V let say i use 1k R1, 1k R2, 100ohm R3 and the calculation will result I min = 1.25mA & I max 126.25mA and how much is the output voltage would be in 10mA ?
@imajeenyus42
@imajeenyus42 4 жыл бұрын
Don't know how you arrived at those figures, that's not what the equation gives. Try R1 1k, R2 100, and R3 10k. Should give 1-100mA range, but note that the adjust pin current might become significant. Easiest is just to try it.
@AgusWirajati
@AgusWirajati 4 жыл бұрын
@@imajeenyus42 thank you for your quick response. I'll give it a try. I will share the result. Thank you
@ivanpanayotov1702
@ivanpanayotov1702 4 жыл бұрын
has anyone actually tested the schematic with the given values at the end of the video? I am very curious to understand if the theoretically determined current range is actually obtained
@imajeenyus42
@imajeenyus42 4 жыл бұрын
Yes - me. I used it to drive a 300mW laser diode on my AxiDraw plotter. From what I remember, the range was pretty close to what was calculated, maybe 150-380mA or so. It'll be a little off with component values, tolerances etc. imajeenyus.com/computer/20160531_axidraw_laser/index.shtml
@izzyramos-gunn9895
@izzyramos-gunn9895 3 жыл бұрын
I am powering an led source that needs about 6amps. I have 4 lm317t's each rated at 1.5a. Am I able to put these in parallel to increase the possible current? Like stacking them. I am not sure how this would affect the adjustment circuitry though. I plan on using a potentiometer.
@imajeenyus42
@imajeenyus42 3 жыл бұрын
There are a few examples shown in the datasheet of either connecting multiple LM317 in parallel or using an external pass transistor to increase the current capacity, but they are configured as voltage regulators, and I'm not sure how you'd do it for a current source. However, at these sort of current levels, you'd probably be far better using a switching regulator instead. There are lots of constant-current LED driver chips around, e.g. www.ti.com/lit/ds/symlink/lm3409.pdf
@izzyramos-gunn9895
@izzyramos-gunn9895 3 жыл бұрын
@@imajeenyus42 Thanks, I ordered a 8amp buck converter which has adjustable current and voltage at the output. It was only $4.99.
@photonic_induction2633
@photonic_induction2633 7 жыл бұрын
so if iid like to make this circut with a lm388 for a 5a adjustable current supply cloud i make that with this circut ?
@imajeenyus42
@imajeenyus42 7 жыл бұрын
Yes, should work exactly the same. Reference voltage is also 1.25V. (I'm assuming you mean the LM338; the LM388 is an audio amplifier)
@photonic_induction2633
@photonic_induction2633 7 жыл бұрын
cloud you add some practical resistances i dont seem to fully grasp the equasions
@imajeenyus42
@imajeenyus42 7 жыл бұрын
Use the equations given at imajeenyus.com/electronics/20160530_adjustable_current_source/index.shtml to work out the min and max current - it's most helpful if you stick them into Excel. For example, R1=2 Ohm, R2=220 Ohm, R3=2000 Ohm gives a minimum current of 625mA and a maximum current of 6.3A. Watch out: remember that R1 has to carry the full load current, so will need to be high-power. (In this example, power dissipation is nearly 80W!)
@briansegura6506
@briansegura6506 2 жыл бұрын
Hello. I was trying to have an adjustable 4-20ma constant current source using your circuit and did not get the results I had hope for and was hoping you could help. 4-20 ma, using 250 ohm potentiometer I calculated R1 = 312.5 ohms R2 = 62.5 ohms R3 = 250 ohms I did not get much current adjustment Any ideas??
@imajeenyus42
@imajeenyus42 2 жыл бұрын
The calculations shown assume that R1 is small compared with R2 & R3, which is not the case in your situation. Try 10x the value of both R2 and R3, i.e. 625 and 2500 ohms.
@Danyel615
@Danyel615 6 ай бұрын
I was using this circuit as a driver for low-power diodes. One blue, one red, one IR. They are all rated for Ith ~ 25 mA so I did the calculations for making I_in ~ 5mA and Imax ~ 40 mA. However, when I connected them, they all behaved very differently. Is it possible that the load (diode) affects the output of the circuit?
@imajeenyus42
@imajeenyus42 6 ай бұрын
Hmm, it shouldn't do. Something to check is that you have a sufficiently high input voltage - the LM317 has a dropout voltage of 2-3V, then there's the voltage drop across the current sense resistor, then finally the voltage drop across the diode load. If the supply voltage is insufficient, then you could still get an adjustable current at the output, but it wouldn't be as high and would behave strangely.
@Danyel615
@Danyel615 6 ай бұрын
@@imajeenyus42 Thanks for the reply. I'm using a 9V input. For the blue diode laser, using my calculated values I just got 1.2 V measured across the diode max. So then I just kept slowly reducing the resistors until I got the diode lasing ... but according to the calculations using the new R's, it should be sourcing 125 mA. I'm pretty sure it is not because the diode is rated for 50 mA max and I barely made it emit light, so I'm definitely missing something. Right now my circuit is working, but I don't know why :(
@imajeenyus42
@imajeenyus42 6 ай бұрын
@@Danyel615 What's the value you're using for the main sense resistor (R1 in the video)?
@Danyel615
@Danyel615 6 ай бұрын
@@imajeenyus42 I'm using R1 = 500 Ohms, so I min = 1.25/500 = 2.5 mA. R2 = 100 Ohm, R3 = 1.5 kOhms, so R3/R2 = 15 and Imax = 2.5 mA*16 = 40 mA, at least that's what I had at the start.
@imajeenyus42
@imajeenyus42 6 ай бұрын
@@Danyel615Here's the reason it's not working with a 9V supply. Say you drop 3V across the LM317, and 1V across the load, 4V total. That leaves 5V maximum that can be dropped across R1, so the maximum current that can possibly flow is 5/500 = only 10mA. You won't be able to reach the 40mA maximum current, because that would require 20V to be dropped across R1. This is actually a point which I should have mentioned. The main resistor R1 is sized based on the lowest current output, but it still has to carry the maximum current as well. For large min/max ratios, this means that R1 is quite large, drops a large voltage at maximum output, and hence you'll need a higher input voltage. A better circuit for what you're trying to do might be this: imajeenyus.com/temp/current_source.jpg. That's a single-transistor current source. The 10k pot applies a 0-9V voltage to the base of the transistor. It ensures that its emitter is always about 0.6V below the base voltage, so a 0-8.4V voltage appears across the 200R resistor. This will give a current range of 0-40mA or so. Neat thing is it's adjustable right down to zero (note if the base voltage is below 0.6V then the transistor will be off totally). I've shown both NPN and PNP versions, in case the diode needs to be connected to the 0V rail. Any common small amplifier transistors should work fine. The linearity and stability probably won't be as great as with an LM317, but it's maybe enough.
@Presidian123
@Presidian123 3 жыл бұрын
I looked other videos, people use diferents R1 and potencimeters, it is about a relation from the datasheet recomendation i guess, not a solid teory because people also break the releation, I guess it could affect the sensiblity or usefull range in the potenciometer. There u have 3 resistances in ur scheme I also has not ended to understand why to put R1, since it is to small i think my datasheet is despising it
@imajeenyus42
@imajeenyus42 3 жыл бұрын
I don't understand your question. Different people will of course use different values of resistors, since they will have different voltage/current requirements. If you are asking about R1, it is the current-sense resistor so obviously it will be small.
@anouarben779
@anouarben779 7 жыл бұрын
Hello lindsay following your calculation of VR1 I don't seem to get the same result as you maybe I'm wrong but I've got Vr1= 1.25.(R1/R1+xR3) because the resistive divider is between R1 and R3 no ??
@peaceful1123
@peaceful1123 7 жыл бұрын
You're right. He got all his calculation wrong. Vr1 = 1.25 [R1/ (R1+xR3)] and Iout = 1.25 [1/(R1+xR3) + 1/R2]. He also got his modified voltage regulator calculation wrong in another video. I did a simple experiment to verify his circuit. The problem is that when pin adj is connected to ground without any load resistor, Vout is not 1.25V as one would predict.
@imajeenyus42
@imajeenyus42 7 жыл бұрын
RIght. I see where you're getting confused, but I'm still right ;-) You can't calculate it the way you did, by thinking of R1+xR3 acting as the divider, because the same current does NOT pass through R1 and xR3. R1 carries the full load current, whereas xR3 only carries whatever small current flows through it and R2. It's R1 that's PRODUCING the voltage, which is then divided down by R2 + xR3. The IC adjusts its output until that divided-down voltage equals 1.25V (or close, when you account for the small 50uA current that flows out of the ADJ pin). I've built and used both the current regulator and voltage regulator circuits, and both work as I calculated. Not sure what you're referring to by Vout not being 1.25V when the ADJ pin is connected to ground - for a start, the ADJ pin is never intentionally connected to ground (unless you happen to short the output). It always goes to the feedback network. If you ARE using a constant-current circuit and you short the output, which DOES bring ADJ to ground, the Vout from the IC is indeed 1.25V (I just checked this). Hope that helps.
@trevortjes
@trevortjes 2 жыл бұрын
Build this thing to test power supplies and calculated a range of about 80mA - 1000mA when R1 = 16, R2 = 100 and R3 = 1220. But in reality my range is merely 240mA - 660mA. Not sure what is going on here and if there are better values available to get my desired range.
@imajeenyus42
@imajeenyus42 2 жыл бұрын
With those values, R1 will be dropping 16V at maximum current, so you'll need an input supply capable of delivering at least that above the level and voltage.
@trevortjes
@trevortjes 2 жыл бұрын
@@imajeenyus42 now that explains a lot as I'm testing 12v supplies. Guess I'll have to recalculate with maybe 4 or 8 ohms.
@willashland4597
@willashland4597 6 жыл бұрын
Hi Lindsay, great video. I was curious about the equation at 5:37, and was wondering if you could go into any more detail about it. I see that R2 and xR3 combined are in parallel with R1, but since we know the voltage across R2 = the voltage across R1 + xR3 = 1.25 V, wouldn't it be more accurate to say VR1 = 1.25(1 + R1/R3)? Or is that not right. Sorry to everybody else for nerding up the comments section
@imajeenyus42
@imajeenyus42 6 жыл бұрын
Hi, yeah, I know, it takes a bit of getting used to! The best way to think on it is looking at cause and effect, and which "direction" the effects flow in, if that makes sense. Here, the output current passes through R1, producing a voltage, which is then divided down by R2+xR3, and applied to the ADJ input. The chip then adjusts its output until the voltage at the ADJ input (well, the voltage between OUT and ADJ) is equal to 1.25V. At first glance, a lot of people (myself included, until I got the hang of it!) attack the problem from the other end, which is - The voltage across R2 is 1.25V, which is divided down by R1+xR3, so the voltage across R1 is 1.25*R1/(R1+xR3). That, unfortunately, is the wrong way to think about it - the ADJ terminal is an input, and SENSES the divided voltage produced by the resistors. Hope that makes things a bit clearer!
@TheMrTxM
@TheMrTxM 5 жыл бұрын
This helped me out understanding the formula, thanks for sharing! @@imajeenyus42
@angelodemichele
@angelodemichele Жыл бұрын
@@imajeenyus42 I fell there too, so VR2=1,25V=VR1 * R2/(XR3+R2) from here VR1=1,25*(R2+XR3)/R2. It is right? thanks
@imajeenyus42
@imajeenyus42 Жыл бұрын
@@angelodemichele Yes, that's correct - that's what I show in the video.
@SureshKumar-nk2ok
@SureshKumar-nk2ok 4 жыл бұрын
thanks bro nice presentation
@Ziplock9000
@Ziplock9000 7 жыл бұрын
I notice your configuration for R1,R2 and R3 is different from most CC circuits I've seen using the LM317. They usually just have a pot where R1 is and don't have R2 and R3.. Any reason why you've went with this design?
@imajeenyus42
@imajeenyus42 7 жыл бұрын
Thanks for the message. One reason is power-handling capability. Suppose I wanted an adjustment range of 100mA - 300mA. The potentiometer value is determined by the low end of the current range - in this case, 1.25V/100mA = 12.5 Ohms. But when the pot is adjusted to give the highest current, the full 12.5 Ohms has to pass a current of 300mA, which is just over 1W dissipation. I know you can get 1W variable resistors, but why risk it. The other main reason is getting a linear adjustment in response to potentiometer movement. The traditional method, with a pot in R1, gives a nonlinear response. My method gives a linear response, and avoids the need for a high-power potentiometer. In addition, it also offers protection if the potentiometer wiper happens to leave the track at any time (even briefly) - the output is forced to a low level, rather than high (with the traditional arrangement). This is especially important for things like laser diodes, which are extremely sensitive to over current. I've got much more on what I call the "grounded-wiper" potentiometer configuration on my website here: imajeenyus.com/electronics/20160517_potentiometer_feedback/index.shtml
@Ziplock9000
@Ziplock9000 7 жыл бұрын
Brilliant!. Good design. Thanks
@PanteraPersa
@PanteraPersa 3 жыл бұрын
This looks great. Could I use 500k pot (R3) + 47k (R2) to get 125-1400 (ish) mA to drive / dim a series of high power (3W) LEDs ?? the leds require 700mA - 3.2Vf and are arranged in 2x series of 3. On my bench supply, feeding 12V and CC of 1.4 draws about 9.99V. Dropping CC to 125mA has the desired effect. Could this work?
@imajeenyus42
@imajeenyus42 3 жыл бұрын
It would work, but unfortunately isn't very efficient. If I_min is 125mA, then R1 (the series current sense resistor) needs to be 10R. I_max/I_min is 1400/125=11.2, so R3/R2 has to be 10.2. Your choices of 500k + 47k are the right ratio, but I would choose 5k + 470R instead - with high value resistors, the leakage current out/in of the LM317 adjust pin can throw things off. At the maximum 1.4A, R1 will be dissipating 20W, so it'll need to be able to handle that power. Again at maximum 1.4A current, the LEDs will drop 10V, R1 14V and the LM317 needs 3V of headroom, so that's a minimum supply voltage of 27V - a 28V supply would probably be the closest.
@PanteraPersa
@PanteraPersa 3 жыл бұрын
@@imajeenyus42 Thanks Lindsay. I'm very new to all of this, and just happen to have 500k & 200k pots. I will try and obtain some other analog pots in the lower range, closer to the above, and possibly start with the LEDs in 1x3 to see if that improves the situation. The desire was to reduce the foot print somewhat. I do have some XL4015 / LM2596 CC drivers. If I cannot control this thru a 12v supply then I may just go the module route.
@PanteraPersa
@PanteraPersa 3 жыл бұрын
@@imajeenyus42 I found some 1K pots to use with 100 ohm as R2. Would this be ok? Also is the loss of wiper contact a concern and so should I look closer into your other topic regarding that? Thanks a lot.
@imajeenyus42
@imajeenyus42 3 жыл бұрын
@@PanteraPersa They should do the trick. With the circuit in the video, any loss of contact will cause the current to drop to the minimum value, so that won't be a problem.
@mezigames8925
@mezigames8925 4 жыл бұрын
you can control voltage and current with one lmr317 at the same time?
@imajeenyus42
@imajeenyus42 4 жыл бұрын
You can't control both voltage and current at the same time, no matter what circuit you use. You can control one parameter, but the other will then be determined by the load resistance. Depending on the configuration used, the LM317 can act either as a voltage or current regulator.
@nagarajub4011
@nagarajub4011 Жыл бұрын
@@imajeenyus42 hi sir, if we want to control voltage and current same time how?
@imajeenyus42
@imajeenyus42 Жыл бұрын
@@nagarajub4011 You can't. Did you even read my comment?
@nagarajub4011
@nagarajub4011 Жыл бұрын
@@imajeenyus42 ok thank you
@manojdvs3489
@manojdvs3489 6 жыл бұрын
How to vary both voltage and current in the same circuit ?
@electronicsnerd8820
@electronicsnerd8820 6 жыл бұрын
kzfaq.info/get/bejne/h7yPo5ek3rOahX0.html
@raulperezgomez8102
@raulperezgomez8102 Жыл бұрын
Hi Lindsay. I am getting very confused. I am newbie trying to understand the calculations from this circuit. Could you please explain how it should be calculated taking into consideration all the resistors and then explain where are you taking from the equation you use on the video? Thanks in advance.
@imajeenyus42
@imajeenyus42 Жыл бұрын
I have explained the equations as best as I can in the video. Can you please explain which particular equation you want to know about?
@raulperezgomez8102
@raulperezgomez8102 Жыл бұрын
@@imajeenyus42 I understand your explanation but I would like to know there is the equation coming from. How do you arrive to that solution from the original equations. I have been able now to calculate the values taking into account all resistors. But I don't know how to get to that formula you provided. Sorry I am the kind of person that needs to understand how to get into the results. I would thank you if could explain it to me. Thanks.
@raulperezgomez8102
@raulperezgomez8102 Жыл бұрын
Never mind Lindsay. I just found out where is your equation coming from. Thanks :)
@kka10001
@kka10001 3 жыл бұрын
Where is the part you designed...? Text books are full of your design.
@ThaboW11
@ThaboW11 4 жыл бұрын
Excellent.
@vishal_on_yt
@vishal_on_yt 3 жыл бұрын
Hey buddy. Is there any way we can make a circuit which is workable for both positive and negative supply. I mean as we know that LM137 is the negative complement of LM317, so can we make some something workable by making use of both of them.
@imajeenyus42
@imajeenyus42 3 жыл бұрын
I'm not sure what you mean - each regulator is only capable of handling its own polarity (positive or negative), I don't think there's a way of combining them so the output is continuously adjustable from negative to positive.
@vishal_on_yt
@vishal_on_yt 3 жыл бұрын
@@imajeenyus42 I meant that I want a circuit which can perform current limiting for both negative and positive supplies. Since LM317 can only work for positive supplies we need LM337 to work for negative supplies. So just by using a switch we can make them work right?
@imajeenyus42
@imajeenyus42 3 жыл бұрын
@@vishal_on_yt Possibly, I'm not sure.
@MACYNET323
@MACYNET323 3 жыл бұрын
Wich lm317 alternative with less drop out?thanks
@imajeenyus42
@imajeenyus42 3 жыл бұрын
You could try this, it looks suitable: www.microchip.com/wwwproducts/en/MIC29152
@rntesla
@rntesla 7 жыл бұрын
hey can you have 6 out stable from an 12v battery whit no load on it and if so how does it take amp watt to do that in standby mode ?
@imajeenyus42
@imajeenyus42 7 жыл бұрын
If you are asking, first, "Can you have a stable 6V output from a 12V battery?" then, yes. You don't even need to use the LM317 - there are plenty of fixed-voltage regulators which do the job, e.g. LM7806. As for "how does it take amp watt to do that in standby mode", I have no idea what you're talking about.
@rntesla
@rntesla 7 жыл бұрын
i mean if you dont put a load on it just want to have a floating 6v aut from the 12v input how much does the input vatt take to maintake the aut 6v whit no load on it
@imajeenyus42
@imajeenyus42 7 жыл бұрын
No load, no current flowing, so no power drawn from the supply.
@Ziplock9000
@Ziplock9000 6 жыл бұрын
If your going from 12v to 6v you should use a buck converter instead. Voltage regulators work by emitting the excess energy as heat and very inefficient. Buck converters can reduce voltage with over 90% efficiency and can be bought for pennies in the UK
@golamrabby603
@golamrabby603 3 жыл бұрын
Thanks a lot...
@JohnDoe-rm2gs
@JohnDoe-rm2gs 4 жыл бұрын
U teach, bro? Great vid by the way!
@akhilvaid7912
@akhilvaid7912 7 жыл бұрын
can u make similar video for lm337 regulator?
@imajeenyus42
@imajeenyus42 7 жыл бұрын
If you're using it as a current regulator, then the circuit will be exactly the same - current sense resistor, potentiometer, feedback etc. Just replace the LM317 with the LM337, keeping IN, OUT, and GND connections the same.
@akhilvaid7912
@akhilvaid7912 7 жыл бұрын
Lindsay Wilson and wat about using it as voltage regulator
@imajeenyus42
@imajeenyus42 7 жыл бұрын
Again, same deal - circuit is the same, just flipped upside down. I went and updated my page with a circuit for the LM337. Check out imajeenyus.com/electronics/20160517_potentiometer_feedback/index.shtml. Also added the circuit to the current regulator page as well - imajeenyus.com/electronics/20160530_adjustable_current_source/index.shtml
@qwerty_____146
@qwerty_____146 5 жыл бұрын
Thank you. nice.
@vishal_on_yt
@vishal_on_yt 3 жыл бұрын
In many of the circuits, ppl are using a capacitor in the beginning. Can you please tell what purpose it is serving
@imajeenyus42
@imajeenyus42 3 жыл бұрын
Power supply smoothing/decoupling
@vishal_on_yt
@vishal_on_yt 3 жыл бұрын
@@imajeenyus42 Thanks
@vishal_on_yt
@vishal_on_yt 3 жыл бұрын
Hey, one thing more. Is there any limit to the value of capacitor which we can use? I mean on what basis should we decide?
@imajeenyus42
@imajeenyus42 3 жыл бұрын
@@vishal_on_yt A lot depends what sort of smoothing you already have on the power supply feeding the regulator. If it's already well smoothed, you don't need much. Few uF low-Z film would probably do.
@vishal_on_yt
@vishal_on_yt 3 жыл бұрын
@@imajeenyus42 Thanks again. :)
@tayro7265
@tayro7265 5 жыл бұрын
If you use an LM338, connect pin2 of Lm338 to R1and R2. Connect other side of R1 to outer pin of Vr1 and load. Connect remaining side of R2 to Vr1 wiper pin. Connect last outer pin on Vr1 to Lm338 pin1. Vr1=***25ohm's R1=2ohm's 5w R1=5ohm's Should give a range of .625A to 3.87A. ***My Vr1 was 26ohms so the math was off a 26ohm.
@ablemicky9923
@ablemicky9923 3 жыл бұрын
That was great
@davykangwa9794
@davykangwa9794 5 жыл бұрын
It's great
@vant4888
@vant4888 7 жыл бұрын
I do not get it, why have not you used a constant current circuit from the datasheet ?
@imajeenyus42
@imajeenyus42 7 жыл бұрын
I don't understand what you mean. The only current regulator circuit in the datasheet is Figure 14, which is a current limiter. This is totally unsuitable for my application. My design gives a linear adjustment response, plus protection against wiper contact loss.
@vant4888
@vant4888 7 жыл бұрын
In TI datasheet there is "50-mA Constant-Current Battery-Charger Circuit" example. Basically you need only R1 to set constant current mode. R2 and R3 are ok if you need to adjust current except a resistance to ADJ terminal may (I am not sure) have some unwanted effect.
@imajeenyus42
@imajeenyus42 7 жыл бұрын
I am well aware of the circuits in the datasheet. There is no problem whatsoever about adding other resistances around the ADJ terminal. All the chip does is adjust its output until there is 1.25V between the ADJ terminal and the output. You can put in whatever resistive feedback networks you like. I have built many constant-voltage and constant-current regulators using the LM317.
@hichamtassi1753
@hichamtassi1753 3 жыл бұрын
Hello, very nice video ! i did the same, i used 1.5 Ohm to have an output of max 1A, but when i plug a load to my 12v lamp bulb, the voltage drops to 4v, is it normal ? many thanks.
@imajeenyus42
@imajeenyus42 3 жыл бұрын
What voltage of power supply are you using, and what is the wattage of the bulb?
@hichamtassi1753
@hichamtassi1753 3 жыл бұрын
@@imajeenyus42 Hello Wilson, thank you for answering. The power supply is an ATX 600W and the light bulb is 21W 12V. What i am trying to achieve is a battery charger with a constant output current of 1A and a voltage of 14V, but the voltage always drops...
@imajeenyus42
@imajeenyus42 3 жыл бұрын
@@hichamtassi1753 If you're regulating the current, then the output voltage will depend on the load resistance. You can't have a fixed output current AND a fixed output voltage, that's impossible. Your 1.5 Ohm resistor will give a current of 1.25/1.5 = 0.83A. If the bulb is rated 21W at 12V, that means its resistance is around 6.8 Ohm. With a current of 0.83A, that's a voltage drop of around 5.5V. However all that is extremely approximate since bulb resistance is highly nonlinear. A voltage of 4V across the bulb would seem quite reasonable.
@hichamtassi1753
@hichamtassi1753 3 жыл бұрын
@@imajeenyus42 very clear, why impossible to have Constant Current and Constant Voltage at the same time ? because if i consider the lamp as a battery to charge, with 4V it will never charge. I am more of a business background but dream of understanding electronic science. Thank you for taking your time to explain to me
@imajeenyus42
@imajeenyus42 3 жыл бұрын
@@hichamtassi1753 For a resistive load, which you can assume a lightbulb is, voltage and current must be related by Ohm's Law, i.e. the voltage across the load is the current flowing through it multiplied by its resistance. If you vary the current, the voltage must vary, and vice versa. A battery is more complex, because it's not a resistive load. Very approximately, the voltage remains constant until the battery is fully charged, then it starts to rise (overcharging). A power supply will normally put out a fixed voltage (e.g. 12V) and the current drawn will depend on the load applied. If instead you want to produce a constant current, that's when you'd use this regulator circuit. It will attempt to keep the current constant, within the limits set by the power supply. For example, if you have say a 12V power supply, you set the LM317 to regulate at 1A, but connect a 20 Ohm resistor, you are never going to get 1A flowing, because that would require 20V across the resistor, and the power supply is only 12V. I could go into more detail, but that should help with the basics.
@savranorganik3555
@savranorganik3555 6 жыл бұрын
Dear Lindsay, my circuit analysis classes were 35 years ago, and this video is 2 years only. The circuit has the advantage of defaulting tp R1+R3 in case potentiometer looses contact, fine. However you loose me from min.5 onwards. Letting R4=xR3, and R5=(1-x)R3, the equivalent resistance from ADJ pin's position to OUT pin is (1/(R1+R4))+(1/R2)+R5. Therefore the bottom half of the R3 pot cannot be assumed zero, it is in fact the dominant term to determine current adjustment. Voltage across R2 is not 1,25 volts. Even if it was You can't write VR1 as you wrote. It assumes same current over R4 (ie x.R3) as R2. Since there still is a 3rd branch coming out of that junction as I5 even if you reduce R5 (ie (1-x).R3) to zero. What's really happening here is the adjustment of R5.
@imajeenyus42
@imajeenyus42 6 жыл бұрын
Thanks for the comment. I agree, the circuit does look a little odd at first glance. However, the important thing to remember is that no (or at least very little) current flows in to or out of the ADJ pin of the LM317. Because of that fact, it does not matter what the value of R5=(1-x)R3 actually is, so it can be replaced with a short circuit. The current through R2 will be nearly equal to R4=xR3, so the divider equations I've written in the video will apply. Believe me, I built it, it works ;-) In reality, there is a current of about 50uA on the ADJ pin, but this is negligible for most applications.
@savranorganik3555
@savranorganik3555 6 жыл бұрын
Thanks for caring to respond Lindsay. Although I am really in deep sleep state with eyes half shut, at this wee hour here, I surely don't question the circuit does work. Just trying to clarify how it really works to brush off rust from my circuit analysis grasp, by rasping against your analysis, in friendly manner. I am guilty of not checking LM317 characteristics too. Hope you don't mind exercising with dumb old me here. :) Now, "but", if current to/from ADJ pin is close to zero, we can only consider that as an open circuit, not a short circuit. In that case, the effective resistor circle value on the output becomes equivalent to (1/R1)+ (1/(R2+R4)). Evem if we give R4 pot a huge range, the max effective resistance control range we get, that between LM317 OUT pin and overall circuit output node, vary from (1/R1) to (1/R1)+(1/R2). To increase that control range, we need a big value R1 and an R2 well below 1 ohm. Perhaps we could make R2 a 1ohm max. pot to use as a fine control over Iout? After I wake up, I should try this physically, and get back. Please feel free to explain even further... :)
@imajeenyus42
@imajeenyus42 6 жыл бұрын
No problems, I don't mind ;-) Try this for visualizing how the ADJ pin functions. Suppose you have a voltmeter which draws zero current from what it's measuring - it simply measures the voltage. And suppose you use it to measure the voltage of a 1.5V battery. If you connect the voltmeter directly to the battery, it will obviously measure 1.5V. Now, suppose you inserted a resistor between the voltmeter and the battery. Because no current flows, there is no voltage drop across that resistor, so the voltmeter will STILL read 1.5V. It's as if the voltmeter was still connected directly to the battery - i.e., the resistor replaced by a short circuit. This is why it's possible to ignore the presence of R5 (which is (1-x)*R3) - since no current flows, there is no voltage drop across it, so the voltage at the ADJ pin will be equal to the voltage at the junction of R2 and R4. The LM317 will adjust its output until the voltage between the OUT and ADJ pins is 1.25V, in other words until the voltage across R2 is 1.25V. That then means the voltage across R2+R4, or across R1, is 1.25*(1+(R4/R2)), because no current flows in to or out of the junction of R2+R4. Does that make any more sense? ;-) Regarding the relative value of R2, you don't want to make it really small, because that would give you a huge adjustment range. In the current-regulator circuit shown in the video, the maximum output current is (1+(R3/R2)) times the minimum output current (which is 1.25/R1). If you made R2 very small, that would give a very large output current.
@savranorganik3555
@savranorganik3555 6 жыл бұрын
Thanks for the continued exchange Lindsay. Well, we should measure both ends of R5 and see if the voltage drop is really close to zero. I have 4 old Chinese fake LM317's around, none seems good to test. Waiting for new ones. Maybe an EWB simulation would illuminate me? :)
@imajeenyus42
@imajeenyus42 6 жыл бұрын
According to the datasheet, the current on the ADJ pin is 50uA, so if R5 was on the order of 1k, that's only 0.05V, which is reasonably small compared with the 1.25V reference. I haven't actually got any to hand either, and unfortunately the only simulation software I know how to use (LTSpice) doesn't have an LM317 model ;-)
@paulpomme2502
@paulpomme2502 3 жыл бұрын
Thank's :)
@HieuPham-qs5pr
@HieuPham-qs5pr 3 жыл бұрын
I want constant current =900mA. How can I choose R1 R1 VR3?
@imajeenyus42
@imajeenyus42 3 жыл бұрын
Try R1=2R, R2=1k and R3=1k. Should give an adjustment range from about 0.6-1.2A.
@mareprah
@mareprah 6 жыл бұрын
Hello mr. Lindsay. Can you please give the info on how to calculate the power dissipation of the R1 resistor, since I am not able to figure it out for my case. You imajeenyus site you mention that the in your case it is 1.6W? Also, sorry if you mention it in the video, but I am not able to hear any sounds (problem on my end). Thank you in advance for the answer.
@imajeenyus42
@imajeenyus42 6 жыл бұрын
The power dissipation is calculated from (I^2)*R. Square the maximum output current and multiply by the resistance - in my case, the maximum output current is 0.4A, and the resistor is 10 Ohms, so the power is 0.4*0.4*10 = 1.6W. Not sure why you're not getting any sound, there's definitely sound on the video! Best regards, Lindsay.
@mareprah
@mareprah 6 жыл бұрын
Lindsay Wilson oh gosh, I didnt even think about that formula, shows how much of an amateur i am :). Thank you and have a nicce day. PS: the sound is my problem with the audio card, the video is fine. Watched it now on my phone and its ok.
@darkracer1252
@darkracer1252 5 жыл бұрын
so with this it does not matter what the input voltage is right? 5v or 12v or 36v it's all the same. only the higher the voltage the hotter the lm317 gets
@imajeenyus42
@imajeenyus42 5 жыл бұрын
Yes - the LM317 doesn't care what input voltage it sees (within its safe limits)
@darkracer1252
@darkracer1252 5 жыл бұрын
i have no clue how to measure if what i am doing is correct. if i wire it up like the schematic. and i test the resistance over the output and the input. it does not change (635 ohm or 1153 depending on the polarity of my probes) no matter what i do to the potentiometer. if i test the resistance between out Iout an adjust on the lm317. i get a range of 161 ohm. to 533 ohm. is i test the resistance between lm317 out and lm317 adjust. it ranges from 157ohm to 543ohm. if i connect the 12v plus of a led strip. to Iout. 2 9volt battery's + to lm317 in. and the ledstrip negative to the negative terminal of the battery. then the leds light up bright. and changing the potentiometer does nothing. hoever if i connect the 12v+ of the leds to lm317 adjust. i can actually manage to change the leds brightness. do you have a video of you actually building and using this thing so i can double check that i am doing it right instead of some written down schematic that might or might not be correct as it is now i am not hooking this up to a laser diode. i am 99.9999% sure it will just say poof.
@imajeenyus42
@imajeenyus42 5 жыл бұрын
@@darkracer1252 I do not have a video of my "actually building and using this thing" - that's the whole point of a schematic diagram. Suffice it to say, I have built and used this exact circuit for driving laser diodes. I have no idea why you are trying to measure the resistance between the OUT and ADJ terminals of the LM317 - that is going to be completely meaningless, because you have absolutely no way of knowing how the internal circuitry of the LM317 will respond to the test signal from the meter. Trying to measure the resistance of components in-circuit is always going to give strange results when they're connected to "active" components like semiconductors. Do NOT connect the load to the ADJ terminal - you are likely to damage the LM317 since it isn't meant to source a large current through the ADJ pin. All I can suggest is you double-check your circuit. The laser diode driver shown at 7:00 works perfectly well.
@darkracer1252
@darkracer1252 5 жыл бұрын
@@imajeenyus42 yeah it's not needed either. i'm just a freaking dumbass. i guess the load i was testing with had some sort of corrective circuit aswel. (you can hook it up to a straigh dc power source all day without issue) after i grabbed a single led diode. your schematic worked. when put on Iout i can adjust the brightness of the led. now i need to use something other then a 9V battery so it won't get drained and give me increasingly dimmer results. using 2 9v battery's seems to burn out the led though. wich kindof has me worried about hooking up an actual laser diode.
@darkracer1252
@darkracer1252 5 жыл бұрын
@@imajeenyus42 if i connected up the previous load. (the led strip with resistors and what not on it) it seemed the lm317 did nothing at all. it did not heat up in any way i wired it up. and i tried everything. but with the straight up single led diode. everything did what it's expected to do. turning the pot changed the brightness (although in reverse, clockwise was dimmer guess that's just a matter of reversing the outer wires of the potentiometer.) and the lm317 actually started heating up when i dimmed it. so i guess there is some black magic happening in the led strips i tested this circuit with before.
@ferinarakkal1442
@ferinarakkal1442 4 жыл бұрын
I am making 24v 10ams smps my output is 410mA I want to increase current at 10 amps how I get 10amps in output without Changing voltage
@imajeenyus42
@imajeenyus42 4 жыл бұрын
This circuit is a linear regulator, not a switchmode regulator, completely different.
@ferinarakkal1442
@ferinarakkal1442 4 жыл бұрын
Sir Plz advice me for completing this project
@incxxxx
@incxxxx 5 жыл бұрын
Why (1-x)R3 is neglected ? It can be greater than xR3. What is the sense?
@imajeenyus42
@imajeenyus42 5 жыл бұрын
Because the ADJ input pin of the LM317 has a very high input impedance, so any additional resistance in series with it (like (1-x)*R3) has no significant effect.
@incxxxx
@incxxxx 5 жыл бұрын
@@imajeenyus42 OK. Thank you.
@pritamsaha614
@pritamsaha614 6 жыл бұрын
What about high current situation like 4amos
@imajeenyus42
@imajeenyus42 6 жыл бұрын
Use an LM138/LM338 instead, which are rated to 5A.
@pritamsaha614
@pritamsaha614 6 жыл бұрын
For that case , will all the connections be same ...
@imajeenyus42
@imajeenyus42 6 жыл бұрын
Yes - the connections and operation are the same (it has the same reference voltage as the LM317)
@pritamsaha614
@pritamsaha614 6 жыл бұрын
Thanks a lot ...
@zainaabdin
@zainaabdin 4 жыл бұрын
Anything but317 it's unstable and breakdown easily
@imajeenyus42
@imajeenyus42 4 жыл бұрын
Really? How so?
@elex9rameshwargadekar190
@elex9rameshwargadekar190 3 жыл бұрын
I'm from India
@technology520
@technology520 3 жыл бұрын
kzfaq.info/get/bejne/gLJkebZltrXIYIE.html for the power supply in this video can you also adjust the current? I will use high current.
@angelbutter4166
@angelbutter4166 6 жыл бұрын
your illustrations need more explanation and diagrams... : {
@imajeenyus42
@imajeenyus42 6 жыл бұрын
Have you looked at the webpages as well? (Links in description). My intention is not to provide a complete tutorial on how to use an LM317 regulator; rather, I wanted to show the specific application of the grounded-wiper configuration.
@AB-yu2tj
@AB-yu2tj 2 жыл бұрын
It's not slow enough that he says it one letter at a time, then he has to draw it a n d say it Sloweer againnn
@imajeenyus42
@imajeenyus42 2 жыл бұрын
Oh excuse me for taking the time to explain the topic in a methodical manner. Next time I'll do it in under a minute with a thumping electrobass soundtrack, that keep you happy?
@AB-yu2tj
@AB-yu2tj 2 жыл бұрын
@@imajeenyus42 lol. I like that reply lollol
@AB-yu2tj
@AB-yu2tj 2 жыл бұрын
@@imajeenyus42 OH NOoo I have seen a couple of those. please whatever you do no electrobass or music during the video unless you want to torture me. I will take it slow and gentle as you have it. Lololo
@danhyatt2206
@danhyatt2206 2 жыл бұрын
that YOU designed?!?!?!? HAhahahahaha
@imajeenyus42
@imajeenyus42 2 жыл бұрын
Yes I did. What's your problem?
@grahamhall2662
@grahamhall2662 Жыл бұрын
Its not your idea at all. Its in the datasheet for this device.
@imajeenyus42
@imajeenyus42 Жыл бұрын
Show me where in the LM317 datasheet they describe using a "grounded-wiper" potentiometer arrangement to achieve a linear output adjustment. THAT is my idea. Not the concept of a constant current regulator itself.
#548 LM317 with Transistor for more Current
10:43
IMSAI Guy
Рет қаралды 36 М.
BJT Constant Current Driver
10:35
ElectronX Lab
Рет қаралды 76 М.
DELETE TOXICITY = 5 LEGENDARY STARR DROPS!
02:20
Brawl Stars
Рет қаралды 15 МЛН
She ruined my dominos! 😭 Cool train tool helps me #gadget
00:40
Go Gizmo!
Рет қаралды 13 МЛН
Would you like a delicious big mooncake? #shorts#Mooncake #China #Chinesefood
00:30
Watermelon Cat?! 🙀 #cat #cute #kitten
00:56
Stocat
Рет қаралды 22 МЛН
LM317 Adjustable Voltage Regulator Tutorial
4:08
Afrotechmods
Рет қаралды 1,6 МЛН
Back to Basics II: Adjustable Current Regulator with the LM317
7:14
learnelectronics
Рет қаралды 45 М.
LM358 Constant Current And Voltage Regulator Circuit
11:25
Total Circuit
Рет қаралды 6 М.
Adjustable Voltage regulator LM317  how to make!
10:36
Volos Projects
Рет қаралды 287 М.
How to Configure the LM317 Voltage Regulator
8:48
ForceTronics
Рет қаралды 158 М.
The Most Important Circuit for our Electrical Future?! (PFC) EB#55
11:26
Constant Current Source Circuits Tutorial
12:34
Lewis Loflin
Рет қаралды 157 М.
What should you Desolder? ... Dont Waste Expensive Components
8:05
ElectricMonkeyBrain
Рет қаралды 365 М.
Apple watch hidden camera
0:34
_vector_
Рет қаралды 60 МЛН
Iphone or nokia
0:15
rishton vines😇
Рет қаралды 1,6 МЛН
Main filter..
0:15
CikoYt
Рет қаралды 3,4 МЛН
iPhone 15 Unboxing Paper diy
0:57
Cute Fay
Рет қаралды 3,6 МЛН