LM317 is commonly used for voltage regulation in DC circuits. The IC is one of the popular adjustable positive voltage regulators that comes with features like over voltage protection, internal current limiting, overload protection, low quiescent current (for more stable output) and safe area compensation (its internal circuitry limit the maximum power dissipation so it does not self-destruct). Apart from many features, less number of components are required to make it operational. So, the LM317 regulator is easy to use and assemble in a circuit.
In this project, an adjustable power supply using LM317 is designed which inputs main AC supplies (220V-230V AC) and outputs DC voltage below 12V. The LM317 has an adjustable output voltage of 1.28 V to 11 V and draws maximum 1.5 A current.
The conventional steps of power circuit designed are followed while assembling this circuit including stepping down AC voltage, converting AC voltage to DC voltage, Smoothing DC voltage, Compensating transient currents, Voltage regulation, Voltage variation and Short circuit protection.
Components Required –
Fig. 1: List of components required for LM317 IC based Adjustable Power Supply
Block Diagram –
Fig. 2: Block Diagram of LM317 IC based Adjustable Power Supply
Circuit Connections –
The circuit is assembled following conventional steps of power circuit design. For stepping down the 230 V AC, a 12V – 0 -12V transformer is taken. One end of the secondary coil of the transformer and centre tape of it are connected with a full-bridge rectifier. The full bridge rectifier is built by connecting four SR560 diodes to each other designated as D1, D2, D3 and D4 in the schematics. The cathode of D1 and anode of D2 is connected to one of the secondary coil and cathode of D4 and anode of D3 is connected to the centre tape. The cathodes of D2 and D3 are connected from which one terminal is taken out for output of rectifier and anodes of D1 and D4 are connected from which other terminal is taken out for output from full-wave rectifier.
A capacitor of 0.1 uF (shown as C1 in schematics) is connected between the output terminals of full-wave rectifier for smoothing purpose. For voltage regulation LM317 is connected in parallel to the smoothing capacitor. A variable resistance is connected in resistive voltage divider configuration with the regulator IC for voltage adjustment and capacitor of 1 uF (shown as C2 in schematics) is connected in parallel at the output for compensating transient currents. There is a diode connected between Input voltage and output voltage terminals of the voltage regulator IC for short circuit protection.
Get the schematic diagram drawn or printed on a paper and make each connection carefully. Only after checking each connection made correctly, plug in the power circuit to an AC supply.
How the circuit works –
The power circuit designed here takes input from the main AC supplies and has the circuit assembled in the following stages –
1. AC to AC Conversion
2. AC to DC Conversion – Full Wave Rectification
4. Compensation of Transient Current
5. Voltage Regulation
6. Voltage Adjustment
7. Short Circuit Protection
AC to AC conversion
The voltage of Main Supplies is approximately 220-230V AC which further needs to be stepped down to 12V level. To reduce the 220V AC to 12V AC, a step-down transformer with centre taping is used. The use of centre tap transformer allows to generate both positive and negative voltage at the input, however only positive voltage will be drawn from the transformer. The circuit takes some drop in the output voltage due to resistive loss. Therefore a transformer of high voltage rating greater than the required 12 V needs to be taken. The transformer should provide 1.5 A current at the output. The most suitable step-down transformer that meets the mentioned voltage and current requirements is 12V-0-12V/2A. This transformer step downs the main line voltage to +/-12V AC, as shown in the below image.
Fig. 3: Circuit Symbol of 12-0-12 V Transformer
AC to DC conversion – Full Wave Rectification
The stepped down AC voltage needs to be converted to DC voltage through rectification. The rectification is the process of converting AC voltage to DC voltage. There are two ways to convert an AC signal to the DC one. One is half wave rectification and another is full wave rectification. In this circuit, a full wave bridge rectifier is used for converting the 24V AC to 24V DC. The full wave rectification is more efficient than half wave rectification since it provide complete use of both the negative and positive sides of AC signal. In full wave bridge rectifier configuration, four diodes are connected in such a way that current flows through them in only one direction resulting in a DC signal at the output. During full wave rectification, at a time two diodes become forward biased and another two diodes get reverse biased.
Fig. 4: Circuit Diagram of Full Wave Rectifier
During the positive half cycle of the supply, diodes D2 and D4 conduct in series while diodes D1 and D3 are reverse biased and the current flows through the output terminal passing through D2, output terminal and the D4. During the negative half cycle of the supply, diodes D1 and D3 conduct in series, but diodes D4 and D2 are reverse biased and the current flows through D1, output terminal and the D3. The direction of current both ways through the output terminal in both conditions remain the same.
Fig. 5: Image showing negative cycle in Full Wave Rectifier
Fig. 6: Image showing positive cycle in Full Wave Rectifier
The SR560 diodes are chosen to built the full wave rectifier because they have the maximum (average) forward current rating of 2A and in reverse biased condition, they can sustain peak inverse voltage up to 36V. That is why, SR560 diodes are used in this project for full wave rectification.
Smoothing is the process of filtering the DC signal by using a capacitor. The output from the full-wave rectifier is not a steady DC voltage. The output from the rectifier has double the frequency of main supplies but contains ripples. Therefore, it needs to be smoothed by connecting a capacitor in parallel to the output of full wave rectifier. The capacitor charges and discharges during a cycle giving a steady DC voltage as output. So, a capacitor (shown as C1 in schematics) of high value is connected to the output of rectifier circuit. As the DC which is to be rectified by the rectifier circuit has many AC spikes and unwanted ripples, so to reduce these spikes capacitor is used. This capacitor acts as a filtering capacitor which bypasses all the AC through it to ground. At the output, the mean DC voltage left is smoother and ripple free. A capacitor of 0.1 uF is used for smoothing AC signal.
Fig. 7: Circuit Diagram of Smoothing Capacitor
Compensating Transient Currents
At the output terminals of the power circuit, a capacitor ( shown as C2 in schematics) is connected in parallel. This capacitor helps in fast response to load transients. Whenever the output load current changes then there is an initial shortage of current, which can be fulfilled by this output capacitor.
The output current variation can be calculated by
Output current ,Iout = C (dV/dt) where
dV = Maximum allowable voltage deviation
dt = Transient response time
Considering dv = 100mV
dt = 100us
In this circuit a capacitor of 1 uF is used so,
C = 1uF
Iout = 1 u (0.1/100u)
Iout = 1 mA
This way it can be concluded that output capacitor will respond for 1 mA current change for a transient response time of 100 us.
Fig. 8: Circuit Diagram for Transient Current Compensation
LM317 is used for the voltage regulation. LM317 is a monolithic positive voltage regulator IC. Being monolithic, all the components are inbuilt on the same semiconductor chip making the IC small in size having less power consumption and low cost. The IC has three pins – 1) Input pin where maximum 40 V DC can be supplied, 2) Output pin which provides output voltage in the range of 1.25 V to 37 V and 3) Adjust pin which is used to vary the output voltage corresponding to the applied input voltage. For input up to 40 V, the output can vary from 1.25 V to 37 V.
There is an In-built OPAM (Operational Amplifier) on the IC whose inverting input is connected with the adjustment pin. The non-inverting input is set by a band gap voltage reference whose voltage is independent of the temperature, power supply and circuit loading. Therefore, LM317 gives a stable reference voltage of 1.25 V across its adjust pin. The reference voltage of 317 can be from 1.2 V to 1.3 V. The output voltage of 317 can be adjusted in a set range using a resistor divider circuit between the output and ground.
For setting the desired voltage at the output of LM317, resistive voltage divider circuit is used between the output pin and ground. By the effect of this configuration, the voltage at the output pin can be adjusted. The value of resistive voltage divider need to be chosen in such a way that it can provide required voltage range at the output. The voltage divider circuit has a programming resistor which has a fixed resistance (Shown as R1 in schematics) and another is variable resistor (Shown as R2 in schematics). By setting a perfect ratio of feedback resistor (fixed resistor) and variable resistor desired output voltage corresponding to the input voltage can be obtained.
The 317 provides a stable reference voltage of 1.25 V across the adjustment pin. This means there is a constant voltage drop across R1 too. The current at adjustment pin is also constant and in the range of 50 uA to 100 uA. Therefore a constant current flows through R1 as well as R2. Therefore, sum of voltage drop across R1 and R2 gives Vout as follows –
Vout = Vref*(1+(R2/R2))
Some amount of quiescent current also flows from the adjustment pin, this current add some error term in the above equation which makes the output unstable. That is why, the IC is designed in such a way that the Quiescent current should remain in microamperes to make the output stable.
Vout = Vref*(1 + (R2/R2)) + Iq*R2
Iq = quiescent current is the current which flows from the adjustment pin when the circuit is not driving any load.
As Iq is in 100 uA, so the term Iq*R2 is very small and can be neglected in the equation.
The LM317 provides minimum load current of 10mA. Hence to maintain a constant reference voltage of 1.25V, the minimum value of feedback resistance is
R1 = 1.25/Imin
R1 = 1.25V/0.010 = 125 ohm
The range of variable resistor R1 is from 125 ohms to 1000 ohm and the typical value of R1 is from 220 ohms to 240 ohms for better stability. By using above equation value of R2 can also be calculated.
The LM317 has the following internally tolerable power dissipation –
Pout = (Maximum operating temperature of IC)/ (Thermal Resistance, Junction−to−Ambient + Thermal Resistance, Junction−to−case)
Pout = (150) / (65+5) (values as per the datasheet)
Pout = 2 W
Therefore, LM317 internally can sustain up to 2 W power dissipation. Above 2 W, the IC will not tolerate the amount of heat generated and will start burning. This can cause a serious fire hazard also. So heat sink is needed to dissipate the excessive heat from the IC.
The output voltage can be varied by using the adjust pin of LM317 IC. The variable resistor R1 is used for varying the voltage at the output from 1.28 V to 11 V.
Short Circuit Protection
A diode D5 is connected between the voltage input and voltage output terminals of 317 IC so that it can prevent the external capacitor from discharging through the IC during an input short circuit. When the input is shorted then the cathode of the diode is at ground potential. The anode terminal of the diode is at high voltage since C2 is fully charged. Therefore in such a case, the diode is forward biased and all the discharging current from capacitor passes through the diode to the ground. This saves the LM317 IC from the back current.
Fig. 9: Circuit Diagram for short circuit protection
Testing and Precautions –
The following precautions should be taken while assembling the circuit –
• The current rating of the step-down transformer, bridge diodes and voltage regulator ICs must be greater than or equal to the required current at the output. Otherwise, it will be unable to supply the required current at the output.
• The voltage rating of the step-down transformer should be greater than the maximum required output voltage. This is due to the fact that, the 317 IC take voltage drop of around 2 to 3 V. Thus input voltage must be 2V to 3V greater than the maximum output voltage and should be in the limit of the input voltage of LM317.
• The capacitors used in the circuit must be of higher voltage rating than the input voltage. Otherwise, the capacitors will start leaking the current due to the excess voltage at their plates and will burst out.
• A capacitor should be used at the output of rectifier so that it can handle unwanted mains noise. Similarly Use of a capacitor at the output of the regulator is recommended for handling fast transient changes and noise at the output. The value of output capacitor depends on the deviation in the voltage, current variations and transient response time of the capacitor.
• A protection diode should always be used while using a capacitor after a voltage regulator IC, for preventing the IC from back current while discharging of the capacitor.
• For driving the high load at the output, heat sink should be mounted at the holes of the regulator. This will prevent the IC from blowing off due to heat dissipation.
• As the regulator IC can draw current up to 1.5 A only, a fuse of 1.5 A needs to be connected. This fuse will limit the current in the regulator up to 1.5 A. For current above 1.5 A, the fuse will blow off and this will cut the input supply from the circuit. This will protect the circuit and regulator ICs from current greater than 1.5 A.
Once the circuit is assembled, it’s time to test it. Plug in the circuit to main supplies and change variable resistance. Take the voltage and current readings at the output terminal of the power circuit using a multimeter. Then connect fixed resistances as load and check the voltage and current readings again.
At the output terminals input voltage was 12V and on adjusting the variable resistance, the output voltage read between 1.28 to 11 V when no load was connected.
After setting output voltage to 11V and connecting a load of 20 ohms the output voltage is read 10.4V and the output current is measured 520 mA so the power dissipation at load of 20 Ω resistance is as follow –
Pout = (Vin – Vout)*Iout
Pout = (12-11) * 0.520
Pout = 0.52W
During testing of the circuit, it was found that when current demand increases at the output then the output voltage starts reducing. As the current demand increases, 317 IC start heating up and IC take more drop across it which reduces the output voltage. Though from the above practical experience, power dissipation in the IC is found within the internal tolerable limits, it is still recommended to use a heat sink to aid cooling the IC and to increase the lifespan of it.
The power circuit designed in this project can be used as a constant current source regulator or an adjustable power supply of 1.25 V to 37V DC.