apogeeweb title
Home  Technical Articles   LM317 Circuit: Variable Low Power Regulated Power Supply

Nov 21 2020

LM317 Circuit: Variable Low Power Regulated Power Supply

I Description

As we all know, low-power regulated power supplies are widely used electronic equipment in electronic system testing. However, this low-power power supply still has some inconvenience to use. For example, most of these power supplies have fixed voltage output or adjustable voltage, but there is no intuitive digital display.

Therefore, in response to the need for continuous adjustment of the power supply voltage and digital display function, this blog has designed an adjustable digital display low-power regulated power supply based on LM317:

  1. The design and debugging of regulated power supply can be realized;
  2. The output voltage can be adjusted continuously from 1.25V to 15V;
  3. The output current can reach 1.25A;
  4. The voltage adjustment accuracy can reach 0.25 level.

In summary, the LM317 regulated power supply has the characteristics of high output accuracy, easy adjustment and intuitive display.

How to Configure the LM317 Voltage Regulator?


I Description

II Introduction

III Principle of Adjustable Digital Display DC Power Supply

IV Circuit Design and Parameter

4.1 Selection of Power Transformer

4.2 Rectifier Filter Circuit

4.3 Output Adjustable Voltage Regulator Circuit

4.4 ADC Voltage Detection and Display Circuit

V Power Debugging and Testing

5.1 Power Debugging Issues

5.2 Test and Analysis

VI Conclusion

Component Datasheet


II Introduction

The low output power DC power supply is the necessary electronic equipment for using, testing and overhauling electronic products. It can ensure the supply of high-power electrical appliances when the load changes or the power grid fluctuates. This is reflected in two aspects: smooth working voltage output and sufficient load current drive capacity.

At present, the common low-power stabilized power supplies generally have a fixed voltage output or although the voltage is adjustable, there is no intuitive digital display, which brings inconvenience to users. Therefore, the use of low-cost stabilized chips and digital display modules to design and manufacture miniaturized low-power DC stabilized power supplies with adjustable output and digital display functions has universal application significance and use value for electronic system debugging and laboratory testing.

The low-power linear DC regulated power supply includes units such as voltage transformation, rectification, filtering, and voltage stabilization. In order to increase the output current, a current expansion circuit is often used in the design. At present, the design and manufacture technology of DC stabilized power supply is relatively mature. Therefore, the power supply design mainly considers the following practical application requirements:

  1. Miniaturization;
  2. High precision;
  3. Adjustable;
  4. Digital display;
  5. ...

This blog has designed an output adjustable low-power DC regulated power supply based on LM317 and ADC. This power supply:

  1. It can achieve 1.25~15V regulated output and adjustment;
  2. The maximum output current can reach 1.25A;
  3. With digital display function;
  4. It can visually display the real-time output voltage parameters of the power supply;
  5. The power supply voltage regulation coefficient is less than 0.01;
  6. The display accuracy reaches 0.25 level standard.

III Principle of Adjustable Digital Display DC Power Supply

The low-power stabilized power supply realizes the conversion of the mains into a stabilized DC output, and provides a stable voltage and sufficient load current for the load. In addition, the output voltage can be adjusted continuously, with a digital display of the output voltage. The composition of the regulated power supply circuit is as follows:

  • Power Transformers
  • Rectifier circuit
  • Filter circuit
  • LM317 voltage regulator circuit
  • ADC voltage detection
  • Display circuit
  • ...

principle of  digital display adjustable regulated power supply

Figure 1. Principle of  Digital Display Adjustable Regulated Power Supply

In each part of the unit circuit of the DC stabilized power supply, the power transformer reduces the input power to a suitable AC voltage through the power isolation transformer. For multi-channel power output, you can consider using a dual-winding multi-winding output transformer. The power of the power transformer is based on the design output power of the DC power supply.

The rectifier circuit adopts a bridge rectifier module and a rectifier tube to form a full-wave rectifier circuit, which rectifies the alternating current after voltage transformation into direct current with pulsating components. The inverted LC filter is used in the filter circuit to filter out the pulsating AC component, eliminate the ripple and output a smooth DC voltage.

The voltage stabilizing and adjusting circuit adopts the three-terminal integrated voltage stabilizing chip LM317 to perform filtered stabilization. When the load changes or the power supply voltage fluctuates, it can output a stable DC voltage. And change the variable resistance of the adjustment end of LM317 to realize the adjustment of the output power supply voltage to reach the predetermined output power supply voltage.

DC power supply output voltage detection uses the on-chip ADC of the microcontroller to detect the output voltage in real time. It converts the output power voltage into a digital quantity and displays it in real time by the LCD display circuit. The display circuit adopts a character-type liquid crystal module to display. After the digital quantity converted by ADC is processed by the controller, the liquid crystal is driven to realize the digital display of the output voltage value of the power supply.

IV Circuit Design and Parameter

4.1 Selection of Power Transformer

The maximum output of DC voltage is 15V. Considering that the three-terminal integrated voltage regulator has a voltage drop of about 1 to 2V, the voltage Uc after the capacitor is filtered is about 17V. Then the effective value of the secondary secondary output voltage of the transformer is U2=Uc/1.2=17V/1.2=14.2V. Because it is a low-power power supply, we choose a small 15V/20W power transformer.

4.2 Rectifier Filter Circuit

The selection of rectifier bridge is mainly based on two parameters:

  1. The withstand voltage VRM of the rectifier diode;
  2. The average ID of the current through the rectifier diode.

Here, we choose IN4007 rectifier diodes to form a full-bridge rectifier circuit.

The parameters of its forward average current of 1A and withstand voltage of 1000V meet the rectification requirements. And, the filter capacitor has an empirical value of 470~1000μF. In order to suppress the ripple, an electrolytic capacitor with a nominal value of 1000μF with a voltage of 25V is selected.

4.3 Output Adjustable Voltage Regulator Circuit

In this design, LM317 can be debugged and integrated three-terminal regulator as a regulator chip and realize the adjustment function of the output voltage. LM317 has the characteristics of continuously adjustable output voltage and wide adjustment range. Compared with other regulators, its linear regulation rate and load regulation rate have obvious advantages.

There are over-current protection circuits and safety zone protection circuits inside LM317. Its output voltage is 1.25~37V, and the load current can reach 1.5A. The LM317 output voltage is easy to adjust, and only two external resistors are needed to set the output voltage. In order to improve the transient response, a capacitor can be connected in parallel at the output.

The typical parameters of LM317 circuit are as follows:

  • The output current is 1.5A;
  • 0.01% linear adjustment rate;
  • 0.1% load regulation rate;
  • The ripple rejection ratio is 80dB;
  • It has the functions of over-current protection, over-heat protection, output short-circuit protection, and regulator safety zone protection.

The output adjustable voltage stabilizing circuit design based on LM317 is shown as in Fig. 2.

lm317 circuit

  Figure 2. lm317 Voltage Regulator Circuit

R1 and Rp in the circuit are the key components that determine the output voltage. The power supply voltage output is determined by the ratio between the two and the internal reference voltage, as shown in equation (3). The values of R1 and Rp are considered from two aspects:

  • From the formula (3) the output voltage calculation formula, the ratio of Rp/R1 determines the output, so Rp uses a variable resistor to facilitate adjustment;
  • Considering the minimum output current, the minimum operating current when LM317 works normally is generally 1.5mA, and R1 is the only path through which the minimum current is discharged when there is no load.

If the value of R1 is selected too large, there will be a big difference between the output voltage under no load and under load, which is not allowed.

Considering the above two aspects, R1 and Rp are calculated as follows:

Taking U0=15V, we can get Rp/R1=11. Knowing that R1 can work normally when the current reaches 1.5mA, it is necessary to find that R1 should be less than the resistance limit range of 830Ω, so R1=120Ω. Then the corresponding Rp resistance value should be 11×0.12kΩ=1.32kΩ, which can ensure that the power output reaches 15V. The nominal value of 2.2kΩ potentiometer is used for Rp to adjust the output voltage.

D1 and D2 are diodes for protecting LM317. When the input terminal is accidentally short-circuited, D1 is turned on, and C4 is discharged through D1. When the output terminal is short-circuited, D2 is turned on and C2 is discharged through D2 to protect LM317 from being burned. Here, D1 and D2 are both 1N4001.

C1 and C3 can filter out higher harmonics, and C4 can be used to improve the transient response of the load. Here C1, C3 take 0.1μF, and C4 takes 470μF.

4.4 ADC Voltage Detection and Display Circuit

Power supply voltage detection uses low-cost STC microcontroller STC12C5410AD, and uses its on-chip 10bit ADC to complete voltage detection A/D conversion. And the STC microcontroller directly controls the character LCD 1602 to display the output voltage of the power supply. The voltage detection and display circuit is shown in Figure 3. This solution can flexibly expand the monitoring function of the digital display power supply, and directly monitor the output current value after adding the current detection circuit.

The core chip of the output voltage detection circuit STC12C5410AD microcontroller has 8 channels of 10-bit ADC, which can detect multiple DC voltages. C8, C9, JT1 form a crystal oscillator circuit, C13 and R13 form a power-on reset circuit, and together with STC12C5410AD form the smallest single-chip microcomputer system . Taking into account the adjustability of the LM317 output, the minimum system power supply alone uses the auxiliary power supply composed of 7805, and also provides a 5V power supply voltage for the liquid crystal module.

The voltage to be measured of the voltage detection circuit comes from the power supply voltage VIN output by the LM317 circuit, and its voltage range is 1.25 to 15V. The specific voltage value is adjusted and determined by the Rp potentiometer. The power supply voltage VIN is sent to the ADC pin P1.1/AD1 of STC12C5410AD after the circuit is attenuated and amplified. We should consider the case where the maximum power supply voltage to be tested is 15V, which has exceeded the test range (0-5V) of the microcontroller ADC. Therefore, VIN is first divided by 1/6 through the voltage divider resistors R1 and R2, and then connected to the same phase amplifier composed of TL084 for 2 times amplification and conditioning. Ensure that when the maximum power output is 15V, the voltage sent to the ADC channel P1.1 of the microcontroller does not exceed 5V. There is a linear relationship between the power supply voltage VIN to be tested and the input voltage VAD1 of the AD1 port of the microcontroller.

The display unit adopts LCD1602 character liquid crystal module, which is controlled by a single-chip microcomputer to realize the digital display of the power supply voltage. The LCD enable terminal EN, read-write control R/W and data/address control terminal R/S are controlled by P3.0, P3.7 and P3.5 of the single-chip microcomputer respectively. At the same time, the 8-bit display data D0~D7 and the instruction address code sent to the LCD are controlled by the P2 port. The contrast of the liquid crystal is adjusted by the voltage Vo output by the adjustable potentiometer. The digital quantity that detects the output voltage of the power supply is converted by the single-chip microcomputer into the ASCII code of the actual voltage value and sent to the LCD for display. The corresponding relationship is shown in formula (5).

Voltage detection and display circuit

Figure 3. Voltage Detection and Display Circuit

V Power Debugging and Testing

5.1 Power Debugging Issues

LM317 output 1.25 ~ 15V circuit debugging is relatively simple, the power device circuit board adopts double-sided printed board PCB design, assembly welding power transformer, rectifier filter circuit, LM317 voltage regulating circuit, voltage detection microcontroller and LCD module and other components are can.

The adjustable digital display regulated power supply is shown in Figure 4.

Since the voltage output range of LM317 is 1.25~37V, Iadj in the voltage calculation formula is very small (50μA) and can be ignored. The resistance of the potentiometer is 2.2kΩ to meet the adjustment range of output voltage 1.25~15V. Considering the convenience of adjustment, WXD3-13-2W multi-turn winding potentiometer can be used as a precision adjustment knob.

In order to improve the ADC detection accuracy of the output voltage, the parameter detection correction coefficient can be added to the detection program, and the detection accuracy can be further improved through actual measurement correction.

During debugging, when the power supply outputs low voltage and high current, the voltage difference and current carried by the LM317 circuit will be large, which will produce large power consumption. Therefore, the LM317 chip in the power supply should be packaged with TO-220 and a small heat sink Play a role of heat dissipation protection.adjustable digital display power supply

Figure 4. Adjustable Digital Display Power Supply

LM317 adjustable three-terminal regulator, the minimum output voltage is 1.25V. If the regulated power supply is required to be adjusted from 0V, a negative voltage bias should be added to the regulator circuit. The power input requires three input terminals, positive, negative and ground. The circuit is relatively complicated. Generally, the regulated power supply requires less from 0V. Starting tune. Therefore, the power supply is adjusted directly from 1.25V.

5.2 Test and Analysis

DC voltage stabilization tests the output voltage and output current characteristics of the power supply. Here, we select the typical load RL=100Ω and RL=10Ω, adjust the power output and test the output voltage and load current. The test results are shown in Table 1.

Under two typical load conditions, the relative error of the output voltage indicated by the power supply can be better than 0.254%, and the accuracy is basically 0.25. In addition, the power supply has good load characteristics, and the output voltage does not fluctuate greatly with the increase of load current.

The load characteristics under the rated output voltage of 15V are shown in Table 2. Under the condition that the power supply is output under light load and the voltage reaches the rated value of 15V, gradually increase the load current, and test the load characteristics of the power supply, that is, the change characteristics of the output voltage of the power supply. The result shows that when the load current changes from 0.1A to 1.2A, the voltage fluctuation of 15V constant voltage output is only 0.12V. This shows that this power supply has a good load capacity.

VI Conclusion

This article designs a low-power DC regulated power supply with digital display and output adjustable functions based on LM317. The power supply is based on the low-cost single-chip STC12C5410AD for voltage sampling detection and driving liquid crystal display, which realizes the real-time detection and output display of the power supply voltage.

The test results show that the power supply achieves a continuously adjustable output of 1.25V to 15V. It has the characteristics of stable operation, high output accuracy, and intuitive display. The output detection accuracy reaches 0.25 level; the power output is realized by flexible voltage detection and LCD display. The monitoring function can accurately reflect the working status of the power output in time,

This design combines the adjustability of the regulated power supply with the digital display to provide a convenient power supply solution for electronic testing.

Component Datasheet

LM317 Datasheet


  • What is lm317 used for?

The LM317 serves a wide variety of applications including local, on card regulation. This device can also be used to make a programmable output regulator, or by connecting a fixed resistor between the adjustment and output, the LM317 can be used as a precision current regulator.

  • What is the maximum input voltage of lm317?

The LM317 is an adjustable voltage linear regulator that can output 1.25 – 37V at up to 1.5A current with an input voltage range of 3 – 40V.

  • What is the difference between lm317 and lm317t?

Member. There is no functional difference as they are one in the same. The T at the end just indicates that it's in a TO-220 package. They usually tag on extra things after the part name to reference things like package, temp range, etc.

  • Is lm317 a transistor?

The LM317 is an adjustable three-terminal positive-voltage regulator capable of supplying more than 1.5 A over an output-voltage range of 1.25 V to 32 V. ... By using a heat-sinked pass transistor such as a 2N3055 (Q1) we can produce several amps of current far above the 1.5 amps of the LM317.

  • How does an lm317 work?

The circuit consists of a low-side resistor and high-side resistor connected in series forming a resistive voltage divider which is a passive linear circuit used to produce an output voltage which is a fraction of its input voltage. 

  • What is IC lm317?

The LM317 device is an adjustable three-terminal positive-voltage regulator capable of supplying more than 1.5 A over an output-voltage range of 1.25 V to 37 V. It requires only two external resistors to set the output voltage. The device features a typical line regulation of 0.01% and typical load regulation of 0.1%.

  • How do I know if my lm317 is working?

Testing lm317t.
If you look to the ic, the legs towards you, the right one is the input pin. you must see a difference of minimum 1.2V between the two pins, otherwise the IC is faulty. furthermore, the first test is to see if you have input voltage !

  • What is the working priciple of lm317?

LM 317 works on a very simple principle. It is a variable voltage regulator i.e. supports different output voltage levels for a constant applied input voltage supply.

  • How to make a simple voltage regulator circuit using LM317?


Related Articles

  • LM317: Switched Mode Power Supply
    IntroductionA switched-mode power supply (SMPS) is an electronic power supply that incorporates a switching regulator to convert electrical power efficiently. Switched mode power supplies have replace...
  • LM317 Voltage Regulator: Alternative, Datasheet, Applications [Video]
    DescriptionLM317 is a adjustable 3-terminal positive-voltage regulator, this bolg covers LM317 regulator alternative, datasheet, applications, features and other information on how to use and where to...
  • LM317 Voltage Regulator: Principle, Application [FAQ]
    DescriptionThis blog briefly introduces LM317 in two parts. The first part is the principle of the LM317 three-terminal adjustable voltage regulator; the second part is three application circuits with...
  • LM317 Typical Application Circuit
    IntroductionThe LM317 device is an adjustable three-terminal positive-voltage regulator capable of supplying more than 1.5 A over an output-voltage range of 1.25 V to 37V. In addition, it has the adva...

0 comment

Leave a Reply

Your email address will not be published.