In this post I will elaborately explain how to build a simple LM317 based adjustable power supply circuit using minimum number of external components.
As the name suggests a variable power supply circuit provides the user with a range of linearly varying output voltages through a manually controlled potentiometer rotation.
A LM317 is a versatile device which helps an electronic hobbyist to build a variable voltage power supply quickly, cheaply and very efficiently.
Introduction
Whether it’s an electronic noob or an expert professional, an adjustable power supply unit is required by everybody in the field.
It is the basic source of power that may be required for various electronic procedures, right from powering intricate electronic circuits to the robust electromechanical devices like motors, relays etc.
A variable power supply unit is a must for every electrical and electronic work bench and it’s available in a variety of shapes and sizes in the market and also in the form of schematics to us.
These may be built using discrete components like transistors, resistors etc. or incorporating a single chip for the active functions.
No matter what the type may be, a power supply unit should incorporate the following features to become a universal and reliable with its nature:
Essential Features
- It should be fully and continuously adjustable with its voltage and current outputs.
- Variable current feature can be taken as an optional feature because it’s not an absolute requirement with a power supply, unless the usage is in the range of critical evaluations.
- The voltage produced should be perfectly regulated.
With the advent of chips or ICs like LM317, L200, LM338, LM723, configuring power supply circuits with variable voltage output with the above exceptional qualities has become very easy nowadays.
How to Use LM317 for Producing a Variable Output
Here I have explained how to construct a simplest power supply circuit using the IC LM317. This IC is normally available in TO-220 package and has three pin outs.
The pin outs are very easy to understand, since it consists of an input, an output and an adjustment pins that just needs to be wired up with the relevant connections.
The input pin is applied with a rectified DC input, preferably with the maximum tolerable input, that’s 24 volts as per the specs of the IC.
The output is received from the “out” pin of the IC while the voltage setting components are connected around the adjustment pin.
How to Connect LM317 in a Adjustable Voltage Power Supply Design
As can be seen the diagram, the assembly needs hardly any components and is in fact a child’s play to get everything in place.
Adjusting the pot produces a linearly varying voltage at the output that may be right from 1.25 volts to the maximum level supplied at the input of the Ic.
Though the shown design is the simplest one and therefore includes only a voltage control feature, a current control feature can also be included with the IC.
Adding a Current Control Feature
The figure above shows, how the IC LM317 can be effectively used for producing variable voltages and currents, as desired by the user.
The 5K pot is used for adjusting the voltage, whereas the 1 Ohm current sensing resistor is selected appropriately to acquire the desired current limit.
Enhancing with High Current Output Facility
The IC can be further enhanced for producing currents higher than its rated values. The diagram below shows how the IC 317 can be used for producing more than 3 amps of current.
LM317 Variable Voltage, Current Regulator
Our versatile IC LM317/338/396 may be used as an adjustable voltage and current regulator through simple configurations.
The idea was built and tested by one of the avid readers of this blog Mr. Steven Chiverton and used for driving special laser diodes which are known to have stringent operating specifications, and could be driven only through specialized driver circuits.
The discussed LM317 configuration is so accurate that it becomes ideally suitable for all such specialist current and voltage regulated applications.
Circuit Operation
Referring to the shown circuit diagram, the configuration looks pretty straightforward, two LM317 IC s can be seen, one configured in its standard voltage regulator mode and the other in a current control mode.
To be precise the upper LM317 forms the current regulator stage while the lower acts like a voltage controller stage.
The input supply source is connected across the Vin and ground of the upper current regulator circuit, the output from this stage goes to the input of the lower LM317 variable voltage regulator stage.
Basically both the stages are connected in series for implementing a complete foolproof voltage and current regulation for the connected load which is a laser diode in the present case.
R2 is selected to acquire a range of around 1.25A max current limit, the minimum allowable being 5mA when the full 250 ohms is set in the path, meaning the current to the laser may be set as desired, anywhere between 5mA to 1 amp.
Calculating the Output Voltage
The output voltage of a LM317 power supply circuit could be determined with the following formula:
VO = VREF (1 + R2 / R1) + (IADJ × R2)
where is = VREF = 1.25
Current ADJ is usually around 50 µA and therefore too negligible in most applications. You can ignore this.
Calculating Current Limit
The above is calculated by using the following formula:
R = 1.25/max allowable current
The current controlled voltage acquired from the upper stage is next applied to the lower LM317 voltage regulator circuit, which enables the desired voltage to be set anywhere from 1.25V to 30V, here the max range being 9V since the source is a 9V battery. This is achieved by adjusting R4.
The discussed circuit is assigned to handle not more than 1.5amps, if higher current is required, both the ICs may be replaced with LM338 for obtaining a max 5amp current or LM396 for a max of 10amp current.
The following lovely pictures were sent by Mr. Steven Chiverton, after the circuit was built and verified successfully by him.
Prototype Images
Upgrading LM317 with Push Button Voltage Control
So far we have learned how to configure an LM317 for producing adjustable output using a pot, now I have explained how push buttons may be used for enabling digitally controlled voltage selection.
We eliminate the use of mechanical pot and replace it with a couple of push buttons for the up/down selection of the desired voltage levels.
The innovation converts the traditional LM317 power supply design into a digital power supply design, by eliminating the low tech potentiometer which might be prone to wear and tear in the long run resulting in erratic operations and incorrect voltage outputs.
The modified LM317 design which would be allow it to respond to the push button selections can be seen in the following diagram:
The R2 resistors associated need to be calculated with respect to R1 (240 ohms) for setting up the intended push button selected voltage outputs.
High Current LM317 Bench Power Supply
This high current LM317 power supply can be used universally for any application that requires a high quality regulated high current DC supply, such as car sub woofer amplifiers, battery charges etc.
This power supply is designed to be as versatile as feasible, while also ensuring that the parts count stays low and affordable.
This simple LM317 fixed os adjustable voltage supply satisfies the conditions superbly and is capable of delivering up to 10 amps.
The voltage output is governed by the circuit stage containing R4, R5 and S3; observe that switch S3 is a part of R4.
For getting a fixed voltage output, R4 must be determined for getting zero ohms (fully counter-clockwise). In this situation, switch S3 should be in the open position.
The preset R5 should in that case be tweaked so that the circuit generates a 12 volt output (or anything your personal application requires).
To have an variable output, R4 can be flipped clockwise, with S3 in the closed position, and getting rid of R5 from the circuit.
The output voltage can now be operated by the R4 resistor solely. When the position of SPDT switch S2 is in 1, the highest output current can be accomplished having the two halves of T1 supplying current to the filter stage, in order to increase the overall current output 2 times more.
Having said that, the highest output voltage will be reduced by 50% in this position. It really is a much productive setting considering that the power transistor does not have to drop a significant amount of potential.
In position 2, the maximum voltage practically equals the power specifications of T1. Here, we employed a 24 volt center-tapped transformer for T1.
Lastly, D1 and D2 had been incorporated to safeguard the LM317 IC in case power was switched off with an inductive load at the output
References: http://www.ti.com/lit/ds/symlink/lm317.pdf
https://en.wikipedia.org/wiki/LM317
Andrew says
I have 4 symmetrical power supplies+42/-42@4.15Amps 300VAC. Need +35/-35 for a parallel LM3886 amplifier x4. Thinking LM317HV/ LM338HV With added transistor for additional current capability. Need small board’s and low part count, not a lot of room left, and price concerns. Already over my budget. Please help!!! Can’t find a viable solution commercially, don’t trust Chinese crap on Ebay. Like to put +/- on 1 board, so just need 4 board’s. Want to have board’s made, so a Gerber file would be invaluable. Thanks in advance, and for all I’ve learned from your site, your a 1st class engineer, but a better teacher.
Swagatam says
You can try the last circuit from the following article:
https://www.homemade-circuits.com/lm317-with-outboard-current-boost/
Make sure to add a series resistor with the base of 2N3055. It can be a 1K 1 watt.
suat kaleli says
Hi Swagatam;
I have made few times circuits all with the parts LM317, BD139 and Tip3055. But unfortunately all were OK at the beginning but then out of order. For instant the latest one at first current control was out of order and then BD139 was out of order and finally the resistance in the circuit was burnt. I need same purpose circuit again and your advice. Best Regards
P.S.: As known there also are 2 pots 5 K (voltage adjustment) and 10 K (current adjustment) in the circuit. However I have been using 5K plus 1 K for fine adjustment.
Swagatam says
Hi Suat,
An electronic circuit will go faulty due to some reason, so you will have to find the reason what is causing your circuits to become faulty. It can never go faulty while it is idle, it can become faulty only while it is being used and due to some specific reason such as an overload or over current.
Unless the transistors are over driven they can never become faulty, or may be the transistors are duplicate and not original that could also cause them to burn prematurely.
I can advise if I can see which schematic you are referring to.
suat kaleli says
Thanks for the detailed information. The video which I had made the circuit is at the youtube LM317-BD139-TIP3055 (By Zafer Yıldız) contents no schematic. However I can draw it but I do not know how to upload to your site.
But all parts are lm317-bd139-tip3055-10k pot-5 k pot and 220 R.
– 220 R is between the adjustment and out pins of the LM317.
– LM317 output connected to BD139 collector.
– LM317 input and TIP3055 collector are common.(As DC input)
– 10 pot, BD139 emitter and TIP3055 Base are common.
-BD139 base to 10 K pot.
– Other pin of the 10 K pot is common with the pins of LM317 out and BD139 collector.
– Ground to 5K pot and 5 K pot to LM317 adjustment.
– Output voltage is from TIP3055 emitter. Best Regards
Swagatam says
If it’s possible for you to draw it, then you can upload it to any “free image hosting site” and provide the link to me here, I will check it out.
Or you can refer to the following article and see if your circuit matches with one of the designs presented in the following article:
https://www.homemade-circuits.com/lm317-with-outboard-current-boost/
suat kaleli says
Hi Swagatam I have uploaded but I am not sure that I made it OK
Best regards
Swagatam says
Hi Suat,
the circuit looks incorrect to me, especially the BD139 connection.
You don’t have to use the BD139, you can connect the LM317 output directly with the base of the 2N3055 through a 1K resistor.
suat kaleli says
Thanks for the response Swagatam;
As I wrote before it works I tested and used first circuit about 3 months and then I made the second one both worked but their lifes were limited in shor period. So that means this project works but not stable since all were upset. In the circuit 5K pot control the voltage and 10 K limits the current. As a result my transformer output is AC 24V and it is 100VA (I think that means it is about 4 Amps.) So please advise me a circuit whic is suitable to my transformer and I can also limit the current if required. Best Regards
Swagatam says
Hi Suat, if the unit was working earlier and then becomes faulty overtime then it is strange. The life of the components can become affected only when there’s a fault in the circuit configuration or if the components are not good.
You can modify your design in the following manner and check how long it lasts.
https://www.homemade-circuits.com/wp-content/uploads/2022/08/LM317-with-2N3055-circuit-1.jpg
The above circuit will also perfectly work with your 24V 4 amp transformer.
You can also refer to the following posts for more options:
https://www.homemade-circuits.com/how-to-make-versatile-variable-voltage/
https://www.homemade-circuits.com/how-to-design-a-stabilized-bench-power-supply-circuit/
Roya says
Hello dear Swagatam,
Firstly, I congratulate you on your informative and excellent website.
I have been using a very good commercial variable 0 to 35V, 4A power supply since 30 years . It includes an LM723 IC and 3 potenciometers. A couple of days ago the IC and 2 of the potenciometers bunrt out. While repairing, I decided to draw its circuit as well. Now I want to send you this circuit I drew via Email, so that you could perhaps publish it on your website, so your visitors can benefit from it.
An important tip about using the device , as you would certainly know yourself, is that If the output voltage is set to a high value, for example 30 volts, we can draw almost 4 amps of current from the power supply without any concern. However, a critical situation arises when we want to take 3 or 4 amps of current from the device while the output of the device is set to low voltages such as 2 or 4 volts. It is in this state that transistors are forced to convert more than 100 watts of electrical power “inside them” into heat; a power that would have a devastating effect on power-transistors and would cause them to burn out.
I have added a 1N5401 diode across the output lines of the circuit for more security, as well as a 100mf electrolite capacitor for more stability of the voltage.
I hope you like it and redraw it more beautifully than what I have done.
Best regards
Roya
Swagatam says
Thank you Dear Roya,
I appreciate your kind response.
You can send me the image by uploading it to any free image hosting site, and then provide the link here.
Yes that’s the problem with all linear regulators, they tend to dissipate a lot of heat when the output voltage is much lower than the input voltage.
If you send me the schematic, I will post it in the following article:
IC 723 Voltage Regulator – Working, Application Circuit
Swagatam says
Thank you dear Roya, I got the schematic image on my email. will post it soon in the following article:
https://www.homemade-circuits.com/ic-723-voltage-regulator-working-application-circuit/
Ersa says
Hello. Thank you for your very interesting and educational site. Could you tell me if it is possible to use TIP35 instead of 2N3055? if yes, do I need to apply any modification in the circuit?
Thanks 😉
Swagatam says
Hi, Glad you liked the article. Yes TIP35 can be used instead of the 2N3055
Ersa Frans says
Thanks a bunch, swagatam ????
Frans says
Thanks a lot, dear Swagatam!
Moe says
Dear Sir Swagatam,
Hello. I have studied all your LM317 based power supply projects and have I have learnt a lot from your wonderful posts. However; I have assembled a very simple circuit similar to this one and it works very well. I have sent you an email with a picture, if you could please take a look and get back at me in case you can kindly offer some modifications.
Best wishes,
Moe
Swagatam says
Thank you Dear Moe,
Yes I have seen the diagram, it is perfect for getting high current variable output from an LM317 power supply and needs no further modifications:
Moe says
Dear Swagatam,
I had another question, if you don’t mind.
I have a 220 to 16 0 16 volt transformer as well, which produces 40 V after rectifying, as you know. Can I use 14 pieces of 1N5408 diodes in series and connect the last diode to the input of this circuit in order to reduce the 40V to about 30 volt ? or is there may be a better way to do this?
Best wishes,
Moe
Swagatam says
Dear Moe,
Yes you can do that, or you can simply use the 0-16V taps of the transformer and get an input voltage 23V after rectification, for the power supply
Moe says
Dear Swagatam
Hello. Thank you for your quick response. If I use one 0 and 16V taps of the transformer I will have only 23v output which will never deliver me 27 v on the output of the circuit. However, the input of the circuit is 30v. Is it possible to use 30v Zener diode across the 40V regulated instead of 14 pieces of 1N5408 diodes? and If your response is positive, would you please do a favor and show me how? if you don’t mind.
Swagatam says
Dear Moe,
Yes that’s correct, however a zener diode cannot be used for converting 40V to 30V in your case. Using 14 pcs of 1N5408 diodes may work but they may also become quite hot in the process.
Moe says
Thanks a lot for your help, dear Swagatam 🙂
Swagatam says
You are welcome Moe!
Frans says
Hello Sir Swagatam
Would you please answer my question?
I have a good heat sink of my old PC’s graphic card which cools down with a high speed 0.12A, 12V fan . I have accomodated 2N3055 on it. Can I accomodate LM317 directly on it too or I should isolate it form heat sink?
Best regards
Swagatam says
Hello Frans, you can connect the LM317 on the same heatsink but only with proper isolation kit. I would rather recommend using separate heatsinks for the two devices and make sure the two never come in contact with each other.
Ersa says
Dear Sir Swagatam
Hello
I have a 18V, 1.4A DC power supply. would you please tell me that the Circuit Posted by Moe (1.25 to 27 Volts P.S. made up of LM317 and 2N3055) would be able to work with it? I do not care if the output voltage does not go above 18v.
Best wishes
Ersa
Swagatam says
Hi Ersa, yes definitely you can use your power supply with the following circuit by Moe:
Ersa says
Thanks a lot for your response and so quick, of course; dear Sir Swagatam. Wish you all the best.
Best regards
Ersa
Swagatam says
It’s my pleasure Ersa…
ERsa says
Dear Sir Swagatam
Hello. I have another question and would be glad to have your response. According to the symbol of the capacitor connected to pin 2 of LM317, it should be a non polar one. Does it matter if I use an electrolyte 10uf 50V capacitor instead?
Thanks a lot Sir engineer
Best regards
Ersa
Swagatam says
Hi Ersa, you can use an electrolytic capacitor rated at 10uF/50V, it is absolutely fine..
Ersa says
Dear Sir Swagatam
Thank you so much for all your favor and kindness. I will do as you have instructed and will share the results of assembling the circuit.
Best wishes
Ersa
Swagatam says
Thank you Ersa, I appreciate your dedicated efforts.
Ersa says
Dear Sir Swagatam
Hello. If I want to use a metal box for accommodating all components of this power supply in it so as to use it as heat sink for 2N3055 as well, should I isolate the 5K pot. from the box?
Thank you in advance for your reply
Best regards
Ersa
Swagatam says
Hello Ersa,
You can enclose the circuit inside a metal box and mount the 2N3055 on the metal box, but you have make sure none of the other parts of the circuit comes in contact with the metal box. As far as the pot is concerned you can fit it on the metal box without any insulation because the pot itself is fully insulated from its contacts.
Ersa says
Hello dear Swagatam
Thank you very much for your very useful response.
Best wishes
Ersa
Swagatam says
You are welcome Ersa!
Ersa says
Dear Sir Swagatam
Hello. I have sent a video and pictures of how I assembled and the way that this power supply works on your Email. In the absence of the load, the maximum voltage on multi meter is 28 Volts. As you will see, when I connected a 24 volts lamp to it, the utmost voltage of P. S. is 20 volts which is certainly due to the wattage of my 220/22 volts transformer.
Thank you very much for all your help to me and publishing this simple and very good circuit.
Wish you healthy and joy.
With best wishes and respect
Ersa
Swagatam says
Thank you so very much Ersa, for your kind contributions! I appreciate it very much.
I have published all the images and the video at the bottom section of the following post:
https://www.homemade-circuits.com/lm317-with-outboard-current-boost/
ERsa says
Dear Sir Swagatam
Hello. I forgot to write you that I added one 1N5408 across the output for more security.
Best regards
Ersa
Swagatam says
No problem Ersa, yes I saw that, it is good for the providing added safety to the transistor and the entire circuit.
ERsa says
Dear Sir Swagatam
Hello. Publishing my video and photos of the power supply on your rich site with many viewers is a sign of your great love and kindness and made me so very happy. I have no doubt that this valuable action of yours, along with the very useful essays that you publish, is aimed at encouraging the viewers to learn and progress in electronic science, and I, for my part, admire your goal and wish you all the best.
By the way, the least and most voltage of the P. S. with no load is 1v and 28volts.
Wish you health and joy my dear Swagatam
Best regards
Ersa
Swagatam says
Thank you so much ERsa, for your generosity and your kind words. Please keep up the good work. Wish you too health and joy. Cheers!
Binoj K says
Hello sir, in search of a better lm317 , current and voltage adjust circuit for 30v ,2amp power supply, I experimented with Mr. Stevens circuit which used 2 LM 317 in series one for current adjust and other for voltage adjust. But the current adjust 317 become very hot even with a 200mA current with heat sink too. I changed both with lm338 but same result. I wonder how Mr Stevens made it for laser diode power supply. And I think with even 200mA current and so much of heat, it’s not wise to dissipate power in lm317. Is there any modifications possible for heat problem. Needs Ur help pls
Swagatam says
Hello Binoj, the heat dissipation is mainly due to the difference between the input voltage and the output voltage. As this difference increases the heat dissipation will also increase.
So first make sure that the input voltage is not higher than 5 V than the output voltage. Meaning, if suppose the output voltage is required to be 3 V, then the input voltage cannot higher than 8 or 9V.
Vee says
Hi Swagatam
Thanks for your reply, I was wondering if I sent the pics and got your email right, its good to know you received them. You must be a very busy person replying to so many questions, I can imagine & wonder how you spend so much time replying to us.
I’ll add the protection circuit you mentioned, you mean the one with the BC 547 & Ry, am I right. Shall send you more pics and thanks for your encouraging words, bless you
All the best to you,
Vee
Swagatam says
No problem Vee, you are most welcome.
Vee says
Hi Swagatam
How could I add on a short circuit protection for the LM317 & MJE2955 Variable power supply, I have added a fuse for the application I use it now
Vee
Swagatam says
Hi Vee, you can provide a current limiter stage to the entire circuit as indicated in the second last diagram from this article:
https://www.homemade-circuits.com/lm317-with-outboard-current-boost/
Vee says
Hi Swagatam
I sent you a picture of the variable power supply for my bench supply as well as for battery charging
I used an LM 317 with a MJE 2955 both with heat sinks to get additional current output.
It could take an input of 24 volts 5 to 6 amps with suitable heat sink and cooling fan for the MJE 2955
Also in the picture is the Auto cutoff device for Lead Acid battery charger
I don’t know if you received the same, if yes shall send you pics of the inside of these units. You can use them to show on your website.
I sent them at your “homemadecircuits@gmail.com”
Please reply
Thanks for all your ideas etc
Regards
Vee
Swagatam says
Thank you Vee, yes I got the email, and also got one attached image in which you have shown the complete set up of your work bench and testing equipment. It looks good and sophisticated.
Yes you can send the pictures of the prototype too, I will check them out.
John Clark says
Your basic schematic diagram will not work with only a 1 UF capacitor across the output. The LM317 datasheet states that a 100 UF capacitor is required to stop HF oscillation.
Swagatam says
Even if you don’t place any capacitor still the circuit will work beautifully…
Vee says
Hi Swagatam
Thank you very very much for your time and reply regarding the LM 317, I think I will try this circuit and this should solve all my problems of using the 24V/6A adapter and also avoid overheating.
Now how do I measure 600 mili Henry inductor, I have a few of them from okd circuit boards, its like a coil wound on a ferrite core, looks like a doughnut with copper wire wrapped around , the only problem is getting to measure the value of the inductance and can i use the MJE 2955 as the BJT or should I use the one shown in the circuit you sent me
Nice of the other person to send you the page from some electronic book
Thanks Swagatam
Regards
Vee
Swagatam says
Hi Vee, you will need frequency meter for measuring milli Henry.
MJE2955 can be used for the PNP over board transistor
Vee says
Hi Swagatam
Oh another question
Which circuit runs cooler and is better for getting about 3 to 5A output at about 12 volts with 24 volts input
The Lm 317 with the MJE2955
Or
The three LM 317’s in parallel
Thanks
Vee
Swagatam says
Hi Vee, in both the scenarios heat will be identical since both are working with a linear principle and not SMPS
Vee says
Hi Swagatam
Regarding the circuit I was telling you earlier using the LM317 and MJE2955 the 2955 temperature is around 43 to 45*C which is normal when i use an input voltage of about 16 volts and the load current around 2.55amps, when i use an input voltage of 24vdc the 2955 gets very hot beyond 65*C so I switched off the power to avoid any damage. The 16 volt supply is from another gadget and only have the 24 volt /6A adapter as spare for this project how can I reduce the input to about 16 volts using this adapter to use it with the variable voltage circuit
Thanks for your help Swagatam
Regards
Vee
Swagatam says
Hi Vee, yes the input/output difference increases, the devices get more and more hot. Also remember that the outboard transistor is not short circuit protected, therefore the output should never be short circuited.
24 V cannot be reduced to 16 V through a simple circuit, unless a buck converter is used, such as the following:
LM317 Variable Switch Mode Power Supply (SMPS)
The above circuit is actually the recommended one, as it is supposed to work with SMPS technology so heat generation will be minimum
Vee says
Hi Swagatam
I tried the LM 317 with the bypass BJT MJE2955T and it worked well. The 317 did not get hot at all but the 2955 temperature went upto 43* C with an ambient temp of 25*C at 3 amps output connected to 2 -12 volt 1 watt bulbs and 3 cooling fans, shall try going upto 4.5 or 5 amps with more load and see how it goes. The 317 in this circuit really does not require a heat sink i think.
Thanks for all your help and guidance
How do I send pictures to you
All the best to you
Regards
Vee
Swagatam says
Hi Vee, I am glad you could successfully build the project.
43 degrees is quite normal, even 60 degrees may not be too high for a power transistor.
Nevertheless, you can put transistor over the same heatsink as the LM317, which will protect the transistor from over heating.
You can upload the pictures on any free image hosting site and provide the lnk here, I’ll check them out.
sriram kp says
Hi, I need to build a fixed current circuit with LM338. I have seen many online calculators to find out the resistor but no one have mentioned regarding the wattage of the resistor. Could you please help me with the formula for required wattage for the resistor?
Swagatam says
Hi, you can multiply the current limit value with 1.25 to get the wattage.
sravya says
I established low led lights design Using 12 volts Step-down transformer and controlling lm317 transistor, lights from transformer and on other side I connected Arduino Uno with 5 volts charger but the program is executed in uno board but transformer side light was not blinking my doubt is both grounds are commonly not connected is that problem, my fear is about short circuit please give any answer shall I connect power supply both common grounds thank you.
Swagatam says
Yes, you are correct, the grounds must be connected in common whenever two supplies are used for two integrated circuit stages separately. So please connect the 5V negative with the 12V negative together to ensure a normal functioning of your circuit.
Ajay says
As you have provided the LM3915 circuit diagram, i didn’t understand how to connect the Push Button Voltage. Could you please help me connecting the Push Button to increase and decrease the voltage.
Swagatam says
Sorry, unfortunately the LM3915 circuit will not work, but an IC 4017 circuit can be used….however a 4017 will give one way control, not up/down…for example if you have selected 3rd step, you cannot go back to 2nd. To go back to 2nd you will have press reset and then count again by going through 1, 2….
youngking says
thank you sir for your response, one more thing, pls what is cl fillter i saw this while reading other people’s comment concerning the 7modified sine wave inverter in your article.by the way thereare much changes in your website keep it up.
Swagatam says
Thank you youngking, RC filter is a filter made by using capacitors and inductors to filter out harmonics to create the best possible sine waveform from a modified inverter. This is done at the secondary side of the transformer.
I am trying to maximize my site performance and therefore trying out different website templates.
youngking says
hello sir, how are you doing .please sir can one connect the same
mosfet on heat sink without any inslulator let say the upper and lower mosfet, will there be any effect because the gate will be tied together the same with the drain and the source as well .
Swagatam says
Hello youngking, isolator is not required for mosfets within individual channels, since they have their similar pins joined together anyhow.
youngking says
sir i don’t understand what you mean in thisrepile you gave ( just make sure to have a large filter capacitor across the bridge rectifier of your source power supply.) are you refering to the first circuit because i didn’t see any rectifier
Swagatam says
Please specify what is the power input are you using for feeding the LM338 circuit?
youngking says
sir, thank you for clearing my doubt, i will build this first circuit for my use but one more query can 104 capacitor be use as filter capacitor.
Swagatam says
You are welcome youngking, please ignore the capacitors shown in the diagram. Just make sure to have a large filter capacitor across the bridge rectifier of your source power supply.
youngking says
sir i’m refering to this first circuit l.e variable power supply circuit using lm317 the place you indicate 28v as input , how can i modified it to 12volt. next query is that i build 1kva inverter but my problem is that i don’t have the money to purchase 12v 100ah battery, but according to the information i gather it said that automobile battery is meant for starting of vehicle and not for inverter . it also stated that inverter battery is deep cycle battery, now can you explain reason why automobile battery is not meant for inverter, because i have 75ah automobile battery at my disposal. sir i will be waiting for your response
Swagatam says
younking, LM317/338 can be used with any input from 4.5V to 35V, so you can use 12V as the input.
Your information is not correct, an automobile battery can be effectively used for all inverter applications. Whoever told you this probably has no experience or knowledge regarding batteries or inverters.
youngking says
hello sir pls how can I modified this first circuit to 12volt input rather than the 28volt you indicated
Swagatam says
which circuit are you referring to?
Paaker says
Hi Swag,
its possible to adjust the Current too?
I wish to build variable bench power supply Voltage and Ampere can be adjustable.
Regards.
Swagatam says
Hi Paaker, In the second circuit you could alter the 1 ohm resistor values for getting different current ranges, this could be done using a rotary switch, or a 10 ohm 5 watt wirewound pot
Paaker says
You mean add a 10Ω 5W Pot instead of current sensing resistor right.
Regards.
Swagatam says
that’s correct 🙂
lm339n says
can i increase efficiency and current by adding a output npn transistor to the first circuit
Swagatam says
you can do it…
Hamid Ansari says
Hey which IC is best for power supply LM317;LM723;L200 for my project
Hamid Ansari says
Hey I was thinking to make a power supply but which one is better and variable — LM317;LM723;L200 for my college project
Swagatam says
LM317 is the best one, you can also replace the same with LM338 for increasing current capacity
aabhishek sharma says
hi sir,here is the video for making a variable power supply 0-15v dc 1000ma.please refer to the link
for my youtube video
Swagatam says
Abhishek,
please don’t send youtube links, instead you can send the video clip to my email, I’ll publish it in my site with your name in it 🙂
Jan says
Thank you I appreciate your assistance.
Regards
Jan
Swagatam says
you are welcome!
Jan says
Did you receive my email to you?
Swagatam says
No I didn’t, I think it would be better to upload the diagram on some free image hosting site and provide the link to me here, I’ll look into it and reply you right here.
Jan says
Hi Swagatam,
The link is https://ibb.co/hBCqWk
Regards
Jan
Swagatam says
Hi Jan,
it looks good to me, do you have any specific question?
Jan says
Hi Swagatam,
It works very well. However when I put a 2A load on the output at 12V, the TIP34C and LM317HV gets extremely hot. I have mounted them on large heatsinks.
The input voltage to the circuit is 26.5VDC.
Is it normal that these two components should get so hot or is there perhaps a design fault in my circuit.
Thank you for your assistance.
Regards
Jan
Swagatam says
Hi Jan, yes it s normal due to the small package of the TIP and LM317 (TO-220), if you use a TO-3 kind of BJT then probably the heat will be little less, so anyway using a large heatsink is the only remedy for the present situation…..
Jan says
Hi Swagatam,
I have been posting messages to you, but I dont think you received them. I want to send you a circuit diagram of the variable power supply which I have an overheating problem with. Please give me an email where I can send it.
Regards
Jan
Swagatam says
Hi Jan, I was busy with the maintenance work of my site therefore could not attend the comments, no problem you can send it to my email
homemadecircuits @ gmail.com, I’ll check it out
Jan Van Vuuren says
Hi Swagatam,
Thank you for the advice. I can get these parts locally.
Regards
Jan
Swagatam says
You are welcome Jan!
Jan Van Vuuren says
Hi. Swagatam,
Re: High Current Adjustable Regulator
I have difficulty sourcing the LM195/LM395 in my country. Is there any other product that I can use that will do the job?
Regards
Jan
Swagatam says
Hi Jan,
But I think you can get LM338 easily, if you get LM338 you can apply it in the last circuit which is shown the above article, and upgrade the transistor rating and achieve the required high output current.
Swagatam says
sorry, actually the last circuit itself utilizes the LM195….to eliminate this you can change the configuration and connect the lower BJT in a different method as shown in the following article
/blog/2017/06/7812-7805-ic-current-booster-circuit.html
consider the 78XX as your LM338 or LM317, adn apply the BJT as recommended in the article
Devil Den says
Sir can I use 220 ohm resistor instead of 240 ohm
Swagatam says
yes you can….
mattlander clairzil says
Hello sir, i can use the lm337 to reduce the voltage 72 volts DC to 38 volts DC ??
Swagatam says
Hello Matt, no that's not possible, because LM337 is rated to handle a maximum of 38V input, and moreover it's a negative voltage regulator
mark kim blando says
Sir swagatam hello again..pls. advice me wat to do abwt my power bank..it is charging to my samsung galaxy but remain to its voltage percentage not increasing..I am using a 9 packs of battery in serries connection, Ni-MH AA1500mAh 1.2V.
I took my circuit from a car charger..pls.pls. pls.mr swagatam I need your expertise especially me still learning in this
Swagatam says
Hi Mark, I think I have already answered this question in another post, I'll repeat it again, your power bank output capacity must be significantly higher than your phone battery capacity, especially the AH rating, otherwise the performance will never be at the optimal level
….and make sure the power bank bats are fully charged before using them for the intended purpose
muchson chanafi says
To adjust current in 2nd circuit, make a Variable pot. How much ohm pot? Max
Swagatam says
you can use a 2 ohm pot….
muchson chanafi says
Sorry I am asked again. Pot 2 ohm is nothing, can I paralel pot 4.7ohm with R 3.3 ohm (is 1.94 ohm) or with parallel with R 3.6 ohm (is 2.04 ohm)?
Swagatam says
yes that will also work…
muchson chanafi says
Ok, thank's sir…
muchson chanafi says
Hi Si. In 1st circuit, can I replace lm317 with lm388 or LM396?
Swagatam says
Hi Muchson, yes you can do that
v12u5 h4ck32 says
So it needs a very low resistance? The higher the value..the lower the current? and vice versa?…
and where is the negative of the output? base or emitter?
Swagatam says
yes that's correct, negative is at emitter, and positive at the base
v12u5 h4ck32 says
Can I change the current sensing resistor from fixed to a variable? like pot?
Swagatam says
yes if you are able to get a value with the specific low Ohms range
eshkariel tapiador says
I've seen some ckt on Google…they have a diode that is connected betwwen the Vin and Vout of the regulator..whats that for? can you explain? tnx
Swagatam says
that's for protecting the IC in a situation where the output of the might have a filter capacitor, and the input of the IC is shorted to ground, which is never possible under normal conditions.
Narottam Gupta says
Ok..
Thank you…very much… Sir..
Narottam Gupta says
Ooh…thanks Sir…
Also I thinking that if I use two IC(LMLM317 or LM338) in parallel than have any chance to reduce the heat ??
Swagatam says
A single LM338 would be enough since it's rated to handle up to 5 amp current
Narottam Gupta says
Sir,
I have done this …
It working well..
But one problem… the IC LM317 is too heating when some load (like a 6 volt dc motor) is connecte. I also used a medium size heat sink.
So please tell me how can reduce the heating problem…
Thank you…
Swagatam says
Narottam, Linear ICs like 317 and 338 will always heat up even with normal loads…it cannot be avoided, you can try LM338 instead and see the response
or try reducing the input voltage
Medha_vg says
Well…. Sir….we hav a project to design a 40mA power supply with transformer…. So basically I could be using either of these IC's…. But since we have just entered our branch I do not have knowledge to the depth…. Could you please suggest me what changes is to be done in the values of the passive components so as to get a 40mA power supply
Unknown says
Well…. Sir….we hav a project to design a 40mA power supply with transformer…. So basically I could be using either of these IC's…. But since we have just entered our branch I do not have knowledge to the depth…. Could you please suggest me what changes is to be done in the values of the passive components so as to get a 40mA power supply
Swagatam says
you can try the first circuit with IC LM317….no changes in the component values is required, use a 50mA transformer in order to restrict the output current to the specified limit
imanul sofian says
Dear Mr Swagatam,
is there a possibility that a 5Amps 50Hz transformer be combined with timer to regulate the Vout? I've successfully built a variable bench power supply with ic L200 and a few power transistors, but I don't think it's efficient enough.
Swagatam says
Dear imanul, i have no idea how a timer can be used for voltage/current regulation, one of the best options is shown in the above article first diagram, an LM338 may be used instead of Lm317 for a 5amp input
imanul sofian says
I'm sorry, not a timer, i mean some controller that's designed for smps, like pwm.
When using a linear regulator like LM317 I can feel a lot of heat on the heatsinks both from the ic and power transistors, and I believe that's a wasted power.
I googled the formula of the wasted heat, (Vin – Vout) x Amps.
eg. (18V – 6V) x 3A = 36Watts of wasted heat.
So if you could please teach me how I can get high efficiency by using alternative other than linear regulator. Building a complete smps, with ferrite core, is too hard for me.
Swagatam says
the formula and the calculations that you have shown is true for resistors and zeners, not for these sophisticated power regulator ICs. These ICs may dissipate say about 10% of the total power, which is quite reasonable.
You can try LM338 circuit for your application, or if you are interested to get 99% efficiency then ferrite cored smps is the only way to go..
imanul sofian says
Thank you Mr. Swagatam, a new lesson learned today.
Anyway I'd like to stock up common diodes at home, like 1n4001. Most people recommend the 1n4007-the highest voltage rating ones. With their particularly equal price, why do the manufactuter still make the lower ones? When I go to the retailer and ask for 1n4001 they give me 1n4007 instead, and saying "its the same". I dont think it's true, a "marking" means "something", right. And what about 1n5819 Schottky diodes, should I stock them up for my everyday electronics? Can they be used as the substitute for the 1n400x series?
Thank you in advance Mr. Swagatam for your advice.
Swagatam says
Thanks Imanul, yes the numbers definitely indicate a lot of things, 1N4007 is much better than 1N4001 in terms of reverse voltage handling capability, and nowadays all other variants are slowly getting obsolete except 1N4007.
1N5819 may be considered an enhanced version of 1N4007 in terms of speed and forward voltage drop but as far as voltage rating is concerned its far inferior just around 30V
Janesh Joshi says
Hi, I am trying to build a variable PSU using a 24 v smps and LM338. The circuit works but the output current is very low. The same circuit works with LM317. Could you advise me if any changes are needed in components for LM338. I have used the first circuit as shown here on top.
Swagatam says
Hi, please provide all the info regarding what exactly you are trying to include in your power supply, and what are the input/output amp specs
Janesh Joshi says
I am trying to build a benchtop variable supply. I just require variable output using LM338, 5k wirewound potentiometer which will be used to vary the voltage.Input amperes is 3A and same is needed at output. The 24v SMPS is a ready made manufactured by meanwell. Hope this info is helpful.
Swagatam says
The IC LM338 is designed to provide in excess of 5amps at its output, so if the input is 3amps you should get 3 amps full at the output of the IC, across the whole variable voltage range, if this is not happening your IC could be faulty(duplicate) or not connected correctly.
A 10k pot would work better than 5k
Janesh Joshi says
Thanks Swagatam, will try that.
Janesh Joshi says
Hi i tried the same circuit using 10k pot, still i get the same result. Now for the resistor between ADJ and Vout, do we need it to be of higher wattage, currently i am using 220 ohms 1/4 watt.
Swagatam says
All resistors can be 1/4 watt rated, it cannot be an issue.
Janesh Joshi says
Hi Swagatam, As you said, the LM338 turned out to be faulty. I ordered same ICs from Texas Instruments samples and they worked perfectly.
Now another issues is do LM338 have short circuit protection ? If not can i use your suggested circuit which uses relay to protect the SMPS from damage ?
Swagatam says
Hi Janesh, yes the LM338 has in-built output short circuit, over load protection, still for getting a desired current control you can add a BC547 transistor with the adj pin of the IC as shown in the following diagram…R4 is not important can be replaced with a wire link
https://www.homemade-circuits.com/2012/04/how-to-make-solar-battery-charger.html
Arun Prashan says
Hi sir,
I came across your work on “Bicycle Dynamo Battery Charger Circuit” in Homemade circuit design blog. It was really informative. I would like to ask something regarding that article. I am working on a hexapedal robot with battery switching mechanism. Once the primary battery gets beyond a preset voltage, secondary battery will power up the robot’s system. My concern is not regarding the switching circuit. Together with this, I am working on energy generation by attaching a generator to each motor. The current generated is intended to be used to recharge 30C 11.1V 2200mAh 3 cell LiPo battery. I am aware that the circuit mentioned in “Bicycle Dynamo Battery Charger Circuit” will not be useful for my purpose. Can you give me any other option pertaining my issue. I just need to know on how to modify the circuit to make it LiPo compatible. Thanks, looking forward for a reply.
Regards,
Arun Prashan
Swagatam says
Hi Arun, yes I'll post the required design in this blog soon, may be by tomorrow, so please be in touch
By the way if you are assuming that you would be able to charge the battery with the same energy which is being used for operating the robot, that may be not feasible….the output will be always less than the input
siddu says
Past 1 month observing yours technical article looks very helps
Thanks 😉
Abu-Hafss says
I checked with 24V supply:
R1=180, R2=5K POT, Output 24V at low R2 and high R2, POT frying.
R1=180, R2=10K POT wire wound, Output 1.5V at low R2, 24V at slight increase in R2, R1 heating up.
I have tried the fifth and last LM317…………all behaving similarly.
Swagatam says
Hi Abu-Hafss,
You decide how this can be possible, LM317 can be never wrong, its datasheet cannot be wrong, the indicated part values cannot be wrong.
I am suspecting that the entire lot of your LM317 could be duplicate and faulty… assuming your connections to be perfectly correct as per the diagram.
a wire wound pot is not required, even a preset should work here.
Abu-Hafss says
That is what I also thinking. But, is there any way to check and confirm if all those 5 regulators are dude?
Swagatam says
Hi Abu-Hafss,
the sparking of the pot itself suggests that the ADJ pin is shorted with the input pin which is probably causing the input supply to short to ground through the pot making all those sparks inside the pot.
Abu-Hafss says
As per datasheet the output voltage range is 1.5 – 37V. And input voltage must be 1.5V higher than the output, which means to get 37V at output the input should be 38.5V ! However, in my case the input is not 36V, it is 32V.
Ok, I will try with 220R (240R not have) and 10k POT.
Abu-Hafss says
Hi Swagatam
I need your help to get rid of the frustration I am experiencing with my first LM317 circuit.
As the configuration is quite simple, I soldered the components on PCB straightaway. The value of the resistor was selected based on the value of the POT and the required output voltage (30V). The step down transformer is about 500mA
Initially the 30V-analog voltmeter would show more than 30V. When I adjusted the POT, I noticed some spark or flash inside the POT. And then the output remains within 28V-32V. The current consumption of the load is hardly 100mA.
I assembled fresh components on a breadboard but same results. I checked the circuit on the simulator, it works perfectly…………….so where am I wrong???
Swagatam says
Hi Abu-Hafss,
R1 could be 240 ohms or a 120 ohms, it won't make any difference as long the pot is selected for satisfying both the values… in other words a 10K pot would be just enough.
so R1 is not so crucial.
There's hardly anything one can suggest regarding the troubleshooting of the first circuit, because it's as simple as can be.
Only two things which you probably know that could be causing the problems are, incorrect pin connections, or faulty (duplicate) devices. there's nothing else that could blow these devices of as these devices have a thorough and very robust internal protection circuitry.
Abu-Hafss says
Hi Swagatam
Here is how I made the connections.
https://dl.dropboxusercontent.com/u/20969135/LM317.png
So far I have used 3 devices unsuccessfully. None of them blew, instead I noticed flash inside the POT. Please confirm if R1 is 1/4W rated.
Abu-Hafss says
I have updated the connection diagram. Please re-check. That is how I am connecting the components.
I have tried another IC (4th one). When the POT is providing very low resistance the voltmeter shows about 5V. When trying to rotate the shaft of the POT, I can see light inside the POT which means it cannot withstand the current flowing thru it. Do I have to use a wire-wound POT?
Swagatam says
Hi Abu-Hafss,
use a new IC and try with a 24V supply, I think the 36V input could be damaging the IC….and it should 240 ohms for R1 and 10k for R2 ideally.
Abu-Hafss says
Just fried the 220 ohms resistor when used with 10k wire-wound POT.
Supply is 32V. And there is no load, no C2 only a 30V analog voltmeter.
I assume, earlier the carbon film of 5K POT could not withstand the I(adj) and now the 220 ohms resistor failed to withstand that current. Why I(adj) is so high?
Swagatam says
Hi Courtney,
Please refer to the following posts where you will find a simple method of controlling current using a variable resistor:
https://www.homemade-circuits.com/2013/06/universal-high-watt-led-current-limiter.html
Courtney E says
Hello Mr. Majumdar. What have to be done differently to adjust the output current to a specific value? I mean I would like to make the available current adjustable to that it could go through a digital ammeter before the terminal. Also, for the high current circuit, how should the circuit be fused? Thank you.
Swagatam says
50mA per second is huge, it's the problem of your clock not the battery configuration, I don't think any external circuit can help to reduce this.
If you increase the voltage from 1.5 to 1.8 would force the clock to consume even more current so that's not a correct approach, and the opamp has no role in the situation.
One method could be to use LM317 with an input of 2.4V and output of 1.25V supplying the clock
Another possible way could be to use a joule thief circuit.
Shrikant Nagpure says
Dear sir
Aap ne jo 7805 ke help se charger banane ki idea diya hai thanx for that . maine kal wo banake dekha . to successfully run hua . but wo 12v 12amp pe chalane ke bad hot ho raha tha . to plz usake liye koi solution batawo . sir muze actually muti pin charger aur sibhi automobile battery ke liye (motorcycle , car , truck )ke liye charger banana tha . so plz help me sir
Swagatam says
Dear Shrikant,
Use a large aluminum heatsink with the 7805 IC for preventing it from getting hot.
For using the circuit with many cell phiones you can try the folowing design
4.bp.blogspot.com/-6nMOBLLNkTQ/UgMfLIQHHRI/AAAAAAAAE8w/Ke2Ci0w91Oo/s1600/LM123%20Cell%20phone%20charger%20circuit.png
concor says
hello sir, I want to ask that for the above circuit which dynamo would be suitable as we want to charge our laptop from dynamo by using it in our bike wheel. and to charge a laptop e will require atleast 24v and from dynamo I don't know this much power can be generated or not and if it can be done then which dynamo will be used as there are different types of dynamo.
so should we use a d.c. motor as an input source or dynamo can work here. and please specify the ratings and type of d.c. motor or dynamo.
Thank you.
Swagatam says
Hello concor,
you can use any small dynamo rated at around 28V/2amp for the project, the dealer will be able to advise you better with the product.