X
Advertisement
variable voltage power supply

Variable Voltage Power Supply

Continuing on from our tutorial about converting an ATX PSU to a bench power supply, one very good addition to this is the LM317T positive voltage regulator.

The LM317T is an adjustable 3-terminal positive voltage regulator capable of supplying different DC voltage outputs other than the fixed voltage power supply of +5 or +12 volts, or as a variable output voltage from a few volts up to some maximum value all with currents of about 1.5 amperes.

With the aid of a small bit of additional circuitry added to the output of the PSU we can have a bench power supply capable of a range of fixed or variable voltages either positive or negative in nature. In fact this is more simple than you may think as the transformer, rectification and smoothing has already been done by the PSU beforehand all we need to do is connect our additional circuit to the +12 volt yellow wire output. But firstly, lets consider a fixed voltage output.

Fixed 9v Power Supply

There are a wide variety of 3-terminal voltage regulators available in a standard TO-220 package with the most popular fixed voltage regulator being the 78xx series positive regulators which range from the very common 7805, +5V fixed voltage regulator to the 7824, +24V fixed voltage regulator. There is also a 79xx series of fixed negative voltage regulators which produce a complementary negative voltage from -5 to -24 volts but in this tutorial we will only use the positive 78xx types.

The fixed 3-terminal regulator is useful in applications were an adjustable output is not required making the output power supply simple, but very flexible as the voltage it outputs is dependant only upon the chosen regulator. They are called 3-terminal voltage regulators because they only have three terminals to connect to and these are the Input, Common and Output respectively.

The input voltage to the regulator will be the +12v yellow wire from the PSU (or separate transformer supply), and is connected between the input and common terminals. The stabilised +9 volts is taken across the output and common as shown.

Related Products: Discrete Misc | Current Regulator

Voltage Regulator Circuit

7809 voltage regulator circuit

So suppose we want an output voltage of +9 volts from our PSU bench power supply, then all we have to do is connect a +9v voltage regulator to the +12V yellow wire. As the PSU has already done the rectification and smoothing to the +12v output, the only additional components required are a capacitor across the input and another across the output.

These additional capacitors aid in the stability of the regulator and can be anywhere between 100nF and 330nF. The additional 100uF output capacitor helps smooth out the inherent ripple content giving it a good transient response. This large value capacitor placed across the output of a power supply circuit is commonly called a “Smoothing Capacitor”.

These 78xx series regulators give a maximum output current of about 1.5 amps at fixed stabilised voltages of 5, 6, 8, 9, 12, 15, 18 and 24V respectively. But what if we wanted an output voltage of +9V but only had a 7805, +5V regulator?. The +5V output of the 7805 is referenced to the “ground, Gnd” or “0v” terminal.

If we increased this pin-2 terminal voltage from 0V to 4V then the output would also rise by an additional 4 volts providing there was sufficient input voltage. Then by placing a small 4 volt (nearest preferred value of 4.3V) Zener diode between pin-2 of the regulator and ground, we can make a 7805 5V regulator produce a +9 volts output voltage as shown.

Increasing The Output Voltage

increasing the output voltage

So how does it work. The 4.3V Zener diode requires a reverse bias current of around 5mA to maintain an output with the regulator taking about 0.5mA. This total current of 5.5mA is supplied via resistor “R1” from the output pin-3.

So the value of the resistor required for a 7805 regulator will be R = 5V/5.5mA = 910 Ohm. The feedback diode, D1 connected across the input to output terminals is for protection and prevents the regulator from being reverse biased when the input supply voltage is switched OFF while the output supply remains ON or active for a short period of time due to a large inductive load such as a solenoid or motor.

Then we can use 3-terminal voltage regulators and a suitable Zener diode to produce a variety of fixed output voltages from our previous bench power supply ranging from +5V up to +12V. But we can improve on this design by replacing the fixed voltage regulator with a variable voltage regulator such as the LM317T.

Variable Voltage Power Supply

The LM317T is a fully adjustable 3-terminal positive voltage regulator capable of supplying 1.5 amps with an output voltage ranging from around 1.25 volts to just over 30 volts. By using the ratio of two resistances, one of a fixed value and the other variable (or both fixed), we can set the output voltage to the desired level with a corresponding input voltage being anywhere between 3 and 40 volts.

The LM317T variable voltage regulator also has built in current limiting and thermal shut down capabilities which makes it short-circuit proof and ideal for any low voltage or home made bench power supply.

The output voltage of the LM317T is determined by ratio of the two feedback resistors R1 and R2 which form a potential divider network across the output terminal as shown below.

LM317T Variable Voltage Regulator

lm317t variable voltage regulator

The voltage across the feedback resistor R1 is a constant 1.25V reference voltage, Vref produced between the “output” and “adjustment” terminal. The adjustment terminal current is a constant current of 100uA. Since the reference voltage across resistor R1 is constant, a constant current i will flow through the other resistor R2, resulting in an output voltage of:

lm317t regulator output voltage

Then whatever current flows through resistor R1 also flows through resistor R2 (ignoring the very small adjustment terminal current), with the sum of the voltage drops across R1 and R2 being equal to the output voltage, Vout. Obviously the input voltage, Vin must be at least 2.5 volts greater than the required output voltage to power the regulator.

Also, the LM317T has very good load regulation providing that the minimum load current is greater than 10mA. So to maintain a constant reference voltage of 1.25V, the minimum value of feedback resistor R1 needs to be 1.25V/10mA = 120 Ohm and this value can range anywhere from 120 ohms to 1,000 ohms with typical values of R1 being about 220Ω’s to 240Ω’s for good stability.

If we know the value of the required output voltage, Vout and the feedback resistor R1 is say 240 ohms, then we can calculate the value of resistor R2 from the above equation. For example, our original output voltage of 9V would give a resistive value for R2 of:

R1.((Vout/1.25)-1) = 240.((9/1.25)-1) = 1,488 Ohms

or 1,500 Ohms (1k5Ω) to the nearest preferred value.

Of course in practice, resistors R1 and R2 would normally be replaced by a potentiometer so as to produce a variable voltage power supply, or by several switched preset resistances if several fixed output voltages are required.

But in order to reduce the math’s required in calculating the value of resistor R2 every time we want a particular voltage we can use standard resistance tables as shown below which gives us the regulators output voltage for different ratios of resistors R1 and R2 using E24 resistance values.

Ratio of Resistances R1 to R2

R2
Value
Resistor R1 Value
150 180 220 240 270 330 370 390 470
100 2.08 1.94 1.82 1.77 1.71 1.63 1.59 1.57 1.52
120 2.25 2.08 1.93 1.88 1.81 1.70 1.66 1.63 1.57
150 2.50 2.29 2.10 2.03 1.94 1.82 1.76 1.73 1.65
180 2.75 2.50 2.27 2.19 2.08 1.93 1.86 1.83 1.73
220 3.08 2.78 2.50 2.40 2.27 2.08 1.99 1.96 1.84
240 3.25 2.92 2.61 2.50 2.36 2.16 2.06 2.02 1.89
270 3.50 3.13 2.78 2.66 2.50 2.27 2.16 2.12 1.97
330 4.00 3.54 3.13 2.97 2.78 2.50 2.36 2.31 2.13
370 4.33 3.82 3.35 3.18 2.96 2.65 2.50 2.44 2.23
390 4.50 3.96 3.47 3.28 3.06 2.73 2.57 2.50 2.29
470 5.17 4.51 3.92 3.70 3.43 3.03 2.84 2.76 2.50
560 5.92 5.14 4.43 4.17 3.84 3.37 3.14 3.04 2.74
680 6.92 5.97 5.11 4.79 4.40 3.83 3.55 3.43 3.06
820 8.08 6.94 5.91 5.52 5.05 4.36 4.02 3.88 3.43
1000 9.58 8.19 6.93 6.46 5.88 5.04 4.63 4.46 3.91
1200 11.25 9.58 8.07 7.50 6.81 5.80 5.30 5.10 4.44
1500 13.75 11.67 9.77 9.06 8.19 6.93 6.32 6.06 5.24

By changing resistor R2 for a 2k ohm potentiometer we can control the output voltage range of our PSU bench power supply from about 1.25 volts to a maximum output voltage of 10.75 (12-1.25) volts. Then our final modified variable power supply circuit is shown below.

Variable Voltage Power Supply Circuit

variable voltage power supply circuit

We can improve our basic voltage regulator circuit a little more by connecting an Ammeter and a Voltmeter to the output terminals. These instruments will give a visual indication of both the current and voltage output from the variable voltage regulator. A fast-acting fuse can also be incorporated if desired in the design to provide additional short circuit protection as shown.

voltmeter and ammeter addition

Disadvantages of the LM317T

One of the main disadvantages of using the LM317T as part of a variable voltage power supply circuit to regulate a voltage is that as much as 2.5 volts is dropped or lost as heat across the regulator. So for example, if the required output voltage is to be +9 volts, then the input voltage will need to be as much as 12 volts or more if the output voltage is to remain stable under maximum load conditions. This voltage drop across the regulator is called “dropout”. Also due to this dropout voltage some form of heatsinking is required to keep the regulator cool.

Fortunately low dropout variable voltage regulators are available such as the National Semiconductor “LM2941T” Low Dropout variable voltage regulator which has a low dropout voltage of just 0.9 volts at maximum load. This low dropout comes at a cost as this device is only capable of delivering 1.0 amp with a variable voltage output from 5 to 20 volts. However, we can use this device to give an output voltage of about 11.1V, just a little lower than the input voltage.

So to summarise, our bench power supply that we made from an old PC power supply unit in a previous tutorial can be converted to provide a variable voltage power supply by using a LM317T to regulate the voltage. By connecting the input of this device across the +12V yellow output wire of the PSU we can have both fixed +5V, +12V and a variable output voltage ranging from about 2 to 10 volts at a maximum output current of 1.5A.

75 Comments

Join the conversation!

Error! Please fill all fields.

What's the Answer *

  • R
    RichF

    I have seen many articles on using the LM317 but mostly have a min outut of 1.25v
    I am looking for a simple way to get a zero base adjustible supply to be added to an ATX computer supply. TI in their data sheet shows what will work for me.
    http://www.ti.com/lit/ds/slvs044x/slvs044x.pdf
    If I use -12v from the AtX suppy, how are the values calculated for a 0 to +12 supply
    Thanks

  • M
    M3

    Please Guys I have a UPS with 24V lead acid Battery, What is the best way to bypass the 220V AC transformer to get 0.6A at 9V DC for a router and 0.8A at 15V DC for a nanostation “shall be hooked directly to the POE”.

  • s
    sumit oza

    LM317T IC how to work

  • A
    Abraham

    Gud day sir please my question if u connect the Vref of 240 ohms regualtor very hot and if use multimeter to test the voltage out u will see it dropping then while are we using it because I see without it it still work and no heat generated

  • R
    Reuben

    I designed my smartphone dc charger from 12v battery and i put R1=100R and R2 = 500Vr ,i set vr to 5v output .Can this produce 1.5Amps and 5v for this design?

  • r
    rachid

    please could you add a triggered buzzer qaund it there’s a short circuit in a motherboard or will have one surinteseter because I want to use to test the phone portabl

  • L
    LAVAN

    I want to take a 317 transistor and run it with ten 3055 or 2955 to give me 50amp at 15 volts

  • S
    SAMI

    Hi,
    How design a power electronic system, referred to as ‘the device’ in below, which has the following specifications:
    – The device is supplied from a single-phase wall outlet which has a 240 V rms, 50 Hz specification (through terminals I1, I2).
    – The device can generate a fixed 5 V dc (through terminals O1, O2, O3).
    – The device can also produce a variable 0 to 20 V dc (through terminals O4, O5).
    – The device can also produce two fixed 60 V 50 Hz ac outputs, that can even be connected in series to produce a fixed 120 V ac (through terminals O6, O7, O8).
    – The device can also produce a variable 0-60 V, 50 Hz or 60 Hz ac output (through terminals O9, O10). There will be a up/down button on the device to select either 50 or 60 Hz.
    – The device will only have one of its outputs functioning at a time (i.e., it will not be loaded through multiple outputs simultaneously).
    – The device should be able to supply a load (a variable resistor with a minimum resistance of 10 ohms), when connected to either of its output terminals.

    Regards,
    SAMI

  • S
    Simon

    You mention a pass transistor, I wondered where it was.

  • G
    Glennprejean

    Don’t laugh the McGurn YouTube take a a computer charger cord and converted into a voltage regulator or I have a 12 V solar panel trying to charge Batteries any suggestions unemployed welder

Looking for the latest from TI?