Variable Power Supply using LM317 Voltage Regulator


Until now we had discussed about different voltage regulator IC’s including 7805,723 etc but what’s to be noted was that these were all fixed voltage regulators.So now we shall see how design a simple variable voltage regulator using an LM317 IC.

Block Diagram

This circuit, like all voltage regulators  must  follow the same general block diagram

Block Diagram of Power Supply

Block Diagram of Power Supply

Here, we have got an input high voltage AC going into a transformer which usually steps down the high voltage AC from mains to low voltage AC required for our application. The following bridge rectifier and a smoothing capacitor to convert his AC voltage into unregulated DC voltage. But this voltage will change according to varying load and input stability. This unregulated DC voltage is fed into a voltage regulator which will keep a constant output voltage and suppresses unregulated voltage ripples. Now this voltage can be fed into our load.

Since the bridge rectifier  has already been discussed in a previous page,I will not be going deeper into that section, so  lets gets straight to the regulator circuit,

Simple Circuit Diagram

Simple Variable Power Supply using LM317

Simple Variable Power Supply using LM317

Firstly let us discuss about the need for the smoothing capacitance.As you know  the out put of the bridge rectifier will be as follows

Output of Brige Rectifier

Output of Brige Rectifier

As you can see, although the waveform can be considered to be a DC voltage since the output polarity does not invert itself, the large ripples that exist inthe output makes sit almost impossible to be used in any powering applications.So it is to remove these ripples that the smoothing capacitor[C1] is used. Now the output after the capacitor will be

Output of Capacitor Filter

Output of Capacitor Filter

Now to design the capacitor we use the simple equation, Y=1/(4√3fRC)

where,

  • Y = Ripple factor
  •  f  = Frequency (here 50Hz)
  • R = Required output voltage divided by maximum required output current
  • C = Value of the capacitance to be used

To calculate Y we van use the equations,

Y=Vac-rms / Vdc

Vac-rms = V/ 2√3

Vdc= VMax - (V/ 2)

Now all we need to know is the value of Vr which can be selected according to our need. Normally we take it as 0.4V which means that the maximum size of ripples in the output waveform will be 0.4v. One dis advantage of this method is that the ripple factor depends in output current, ie. the ripples may become larger or smaller while we vary the load.This is the reason why it  is absolutely necessary for the capacitor to be followed by a voltage regulator IC.

The most important part of this circuit is the 317 variable voltage regulator. The 317 is a  monolithic integrated circuit with adjustable 3-terminal positive-voltage regulator designed to supply more than 1.5 A of load current with an output voltage adjustable over a 1.2 V to 37 V range. It also comes with internal current limiting, thermal shutdown, and safe area compensation.All this makes it a very good candidate for a regulator if we need a moderately accurate supply with medium power output. For more details you may refer it’s data sheet. As you can see it has three pins,

  • INPUT         –  This is where we give the unregulated input
  • OUTPUT     –  This is where we will get the regulated output
  • ADJUST      -  The variable resistor connected to this pin, controls the output voltage

The design of the resistors are very simple, all we need to do is to follow the equations provided in the datasheet,

Vo = 1.25 x (1 + R2 / R1) + Iadj x R2

where,

  • Vo = Output voltage
  • R1,R2 = Resistor values
  • Iadj = current through the ADJUST pin

Some important points to be noted are,

  • ADJUST pin current must be about 50 to 100 uA. So we may neglect the second term of the equation to buy simplicity at the cost of accuracy.
  • The value of R1 has to be kept fairly small some where upto 500 ohms. It is to satisfy the minimum voltage requirement of the IC.

So this leaves us with two more components in the circuit the needs our attention, capacitors  C2 and C4. C2 is used to avoid ripples if filtering is performed at some distance from the regulator. Its valve is taken as 0.33 uF as prescribed in the datasheet. The capacitance C4 is very important in the circuit due to the fact that without this capacitance ,the 317 has a tendency to act as an oscillator in the Mhz ranges. It also has the added advantage of improving the transient response of the circuit.

Although these are the necessary components for the regulator to work properly, we advice adding some more elements to not only improve the efficiency of the circuit but also to provide added protection.the modified ciruit is given below,

Complete Circuit Diagram

Variable Power Supply using LM317

Variable Power Supply using LM317

The capacitance C3 bypassing the ADJUST pin to ground will improve the ripple rejection capability while the diodes are used to protect the regulator from excess flowing through it if a battery or any other voltage source is connected across the output terminals of the regulator. Since the value of C1 is very large it will tend to act as a short circuit when such a condition exists. This will force a large current to flow through the regulator rendering it useless. By adding the diode D5 current will flow through the diode rather than the regulator and thus protecting it. The diode D6 does the same with capacitor C3 . The value of C3 can be taken as 10uF .

It is also clear from the data sheet that the worst case scenario dropout voltage for the LM317 is almost 2.3 V. So, to be in the safe side it is advisable to select a transformer with at least 4V greater than the required output voltage(2.3V of 317 + 1.4V of bridge rectifier).

Now we have a complete variable voltage regulator using LM317.

Don’t hesitate to post any doubts as the comments below.




  • steve

    Sorry, but as I understand it the arrow on a diode shows the direction of flow of conventional current. It seems to me therefore that your bridge rectifier is the wrong way around. Otherwise some good stuff thank you.

  • http://www.electrosome.com/ Ligo George

    It is same as bridge rectifier… . arrangement of diodes are different.. but it is correct..

  • ghost

    hi, how did you arrive at the ripple factor, Vmax, Vac rms and Vdc in your circuit design?

  • meme

    how can I make the circuit’s output to start from 3 v instead of 1.25 v?

  • http://www.electrosome.com/ Ligo George

    Use a resistor series with RV1 corresponding to 3V..

  • WT

    Steve, you are correct. The diodes in the bridge are backwards in the schematic. We want conventional current to flow from the transformer to the “top end” of C1 and C2, so as to apply a positive filtered voltage to the input of the LM317. But, with the diodes as shown, positive conventional current flows to the “bottom end” of C1 and C2.

  • http://www.electrosome.com/ Ligo George

    Hello… you are right..
    I am extremely sorry for the inconvenience caused..
    All errors are corrected..