![the only website that answers to all circuit-related questions](https://www.homemade-circuits.com/wp-content/uploads/2023/12/notice-e1703592741106.jpg)
In this post we will elaborately discuss 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.
![LM317 IC pinout specifications TO-220](https://www.homemade-circuits.com/wp-content/uploads/2011/12/IC317PowerSupply252CSimplest.png)
![caution electricity can be dangerous](https://www.homemade-circuits.com/wp-content/uploads/2022/10/caution.jpg)
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 we’ll try to understand 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
![LM317 variable power supply circuit diagram](https://www.homemade-circuits.com/wp-content/uploads/2011/12/IC317PowerSupply252CSimplest-1.png)
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
![LM317 current control circuit diagram](https://www.homemade-circuits.com/wp-content/uploads/2011/12/IC317PowerSupply252CSimplest-2.png)
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.
![high current LM317 power supply circuit diagram](https://www.homemade-circuits.com/wp-content/uploads/2011/12/IC317PowerSupply252CSimplest-3.png)
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.
![constant voltage and constant current regulator circuit diagram using two LM317 ICs](https://www.homemade-circuits.com/wp-content/uploads/2014/08/steven-1.png)
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
![constant voltage and constant current regulator layout diagram using two LM317 ICs](https://www.homemade-circuits.com/wp-content/uploads/2014/08/current-controll-voltage-controll-driver-for-laser-diodes-1.jpg)
![constant voltage and constant current regulator prototype image](https://www.homemade-circuits.com/wp-content/uploads/2014/08/2nd-laser-driver-power-supply-001-1.jpg)
![constant voltage and constant current regulator prototype image](https://www.homemade-circuits.com/wp-content/uploads/2014/08/2nd-laser-driver-power-supply-002-1.jpg)
![constant voltage and constant current regulator prototype image](https://www.homemade-circuits.com/wp-content/uploads/2014/08/2nd-laser-driver-power-supply-003-1.jpg)
![constant voltage and constant current regulator prototype image](https://www.homemade-circuits.com/wp-content/uploads/2014/08/2nd-laser-driver-power-supply-004-1.jpg)
![constant voltage and constant current regulator prototype image](https://www.homemade-circuits.com/wp-content/uploads/2014/08/2nd-laser-driver-power-supply-005-1.jpg)
![constant voltage and constant current regulator PCB layout](https://www.homemade-circuits.com/wp-content/uploads/2014/08/2nd-laser-driver-power-supply-009-1.jpg)
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 let's understand 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:
![LM317 with Push Button Voltage Control](https://www.homemade-circuits.com/wp-content/uploads/2016/09/317-2.png)
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.
![High Current LM317 Bench Power Supply circuit diagram](https://www.homemade-circuits.com/wp-content/uploads/2020/06/high-current-LM317-power-supply-using-2N3055.jpg)
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
Have Questions? Please Comment below to Solve your Queries! Comments must be Related to the above Topic!!