## Lm317 LM1117 Practical DC Regulated Power Supply Design

Lm317, LM1117, LM7805, LD1117V33 Practical DC Regulated Power Supply Design. A good power supply is especially important during regular study, as portability is also a consideration in addition to performance

Project Introduction
In the process of learning analog circuits, we will learn about the design of linear regulated power supplies. A good power supply is especially important during regular study, as portability is also a consideration in addition to performance. Combining the content of the course, we have designed a DC regulated power supply case that integrates practicality and functionality.

Application Scenarios:

##### Get new posts by email:
• Analog circuit simulation teaching
• Circuit schematic and PCB design teaching
• Electronic component identification and soldering courses
• Used as a power supply module for regular study and experiments

Circuit Characteristics:

• Input voltage: DC 9-30V
• Output fixed voltages: 5V, 3.3V, and adjustable voltage values
• When the voltage difference between input and output does not exceed 10V, ensure that the operating current is less than 600mA; when the difference exceeds 10V, keep the output current less than 400mA
• Operating temperature range: 0-100â„ƒ (to prevent damage from overheating, you can increase the heat sink or use other cooling methods)

Overall Design Scheme
Before designing the circuit, let’s consider the basic requirements for this power supply. Since commonly used microcontrollers and chips operate at 5V and 3.3V, we need a stable output of 5V and 3.3V. In some special cases, a 9V or other voltage power supply may also be needed, so we want to have an output that can adjust the voltage. The general circuit diagram is as follows:

Taking advantage of the simplicity of the linear power supply structure, small output ripple, low high-frequency interference, and ease of maintenance, this circuit is designed using three-terminal regulators. Based on the input characteristics of three-terminal regulators, it is divided into positive polarity and negative polarity to output positive and negative power respectively. Here, positive power input regulation is taken as an example. Commonly used positive polarity three-terminal regulators with fixed outputs include LM78XX series, LM1117-XX, and adjustable LM317 and LM1117-ADJ chips. After selection, we finally chose STMicroelectronics’ LM317T, LM7805, and LD1117V33 for the design.

The circuit design process should be divided into several stages. This project can first be simulated and verified before designing the schematic diagram and PCB.

Principle Analysis
Before designing the circuit, it is essential to review the datasheet provided by the device to better understand the characteristics of the selected chip. In the datasheet of LM317, we can learn that the chip can achieve an adjustable output from 1.2V to 37V, provide over 1.5A of output current, have linear and load regulation rates of only 0.1%, and support features like high-voltage float protection, current limiting, and internal voltage short-circuit protection.

The pin definitions and reference circuits in the datasheet are crucial for circuit design. LM317 has three pins, namely INPUT (input pin), OUTPUT (output pin), and ADJUST (adjustment pin). Pay attention to pin layout during circuit design to avoid short-circuiting the power supply due to incorrect connections. With the provided reference circuit and design experience in the manual, we designed the following circuit:

In this circuit, C1 and C2 are input filter capacitors, C3 and C4 are output filter capacitors. The large capacitors filter out low-frequency components from the signal, while the small capacitors filter out high-frequency noise. Two diodes are used in the circuit, where D1 diode prevents the output pin voltage from being higher than the input voltage due to capacitor energy storage during power loss; D2 diode prevents the ADJ pin voltage from being higher than the output pin voltage, both serving as protection to prevent chip damage. R1 and R2 work together, and adjusting the resistance value of the R2 potentiometer can change the output voltage. The R3 resistor and LED2 serve as indicators for the output power.

The designed circuit for LM7805 and LD1117V33 based on the corresponding datasheets is as shown below.

Simulation Design
Simulation Chart Creation
Switch from EasyEDA Standard Edition mode to simulation mode, create a project folder, create a new simulation sheet and save it in the project folder.

In the simulation basic library, find the voltage source_DC source (DC) under the power supply category as the power input, setting the voltage to 12V; find the LM317 and 7805 devices under the regulator category; click on the simulation library, search for LM1117_3V3, select LM1117_3V3 in the system library and place it on the canvas; then find four multimeters in the instrument list in the basic library, parallel them into the circuit to measure voltage values; in the diode category, find four LEDs, click on the diode, and set the color to red, blue, green, and yellow respectively to represent different output channels; in the general components category, find resistors, variable resistors, capacitors, and electrolytic capacitors and place them according to the parameters in the simulation diagram and connect them.

Simulation Verification
After clicking on the simulation, the voltages of 5V and 3.3V outputs are directly displayed. Change the sliding potentiometer factor in the LM317 circuit to 80% (connect a 1KÎ© resistor to the circuit), check the multimeter readings. If the factor is adjusted to 20%, check if the simulation result matches the theoretical calculation. If it does not match, consider the reasons.

Schematic Design
After the simulation verification, everyone must be eager to start designing the schematic. Save the simulation sheet and switch from simulation mode to standard mode to prepare for schematic design. Since the components involved in PCB design in a project come from the schematic, components in the simulation diagram should not be included in the PCB; therefore, it is important to open the simulation sheet, set the components to not transfer to PCB and not add to BOM.
Select the created project folder, right-click, create a new schematic, and start designing the schematic.

Power Input Circuit
There are various ways to supply power input. Here, we chose commonly used DC jacks and terminal blocks for power supply to provide options based on actual needs. In the power category of the basic library, choose DC005-T20; in the connector category, choose CONN-TH_2P-5.00 terminal block connector; then place a resistor in the resistor category, selecting the R_AXIAL-0.4_EU or R_AXIAL-0.4_US option; in the diode category, choose an LED, selecting LED-TH-3mm_R as the package type. Place a VCC identifier and a GND identifier in the electrical suspension window. The circuit connection is as shown in the figure.

Three-Terminal Regulator Circuit
Draw the three-terminal regulator circuit based on the figure, considering ease of soldering and uniform power, using plug-in packaging for convenience with each output route having a terminal block and three pins.

Component Selection Explanation
There are many symbol choices for each component, and practicality and maintainability should be considered during the actual application process. As an electronic engineer, we should make component selections when designing the schematic. Different manufacturers offer different devices, so the best way to choose a device is to search for the required device in the component library, select the package, manufacturer, check the price, brand, and stock of the selected device. Taking LM317 as an example, search for LM317 in the EasyEDA Standard Edition component library, and choose a suitable chip such as the TO-220-3 packaged LM317T-DG from STMicroelectronics. The same method can be used to search for other chips and passive components.

PCB Design
After completing the schematic design, check if the circuit is properly connected, and there are no missing connections. Once everything is checked, click on the top menu bar of the schematic and select Design-Schematic to PCB to start PCB design.

Outline Design
After generating the PCB, it is necessary to set an outline for the PCB. The size of the outline should be based on the number and size of components, as well as personal preference or enclosure requirements. Following the principles of appropriate size and aesthetics, for this project, a rectangle of 80mm in length and 60mm in width is set as the size of the PCB board. Note that when designing the PCB outline, try not to exceed 10cm*10cm, as exceeding this size may slightly increase costs.

Component Layout
After transferring components from the schematic to the PCB, the components may appear disorganized. In the second step of PCB design, categorize and layout the components according to each circuit module. Use the layout transfer function provided by EasyEDA to quickly layout each circuit module. Interface components should be placed at the edge of the board for easy wiring and operation.

PCB Routing
At this stage, take a look back at your completed DC regulated power supply simulation diagram, schematic, and PCB component layout – the final step is PCB routing. PCB routing in a double-layer circuit board involves top layer routing and bottom layer routing, where the top layer is default red and the bottom layer is blue. Routing involves connecting copper lines within the circuit board. Select layers and elements, then connect two pads of the same network. While it may seem like a simple game of connecting the dots, it requires patience

and adjustments, as the layout of components can affect the difficulty of routing. Here are some recommendations for routing in this project:

1. Â Set power lines to 35mil and signal lines to 25mil in width
2. Use bottom layer routing for easy DIY PCB production
3. Do not connect GND lines, use bottom layer copper fill instead
4. Prioritize straight lines in routing, use obtuse angles or arcs for corners
5. After completing the routing, add appropriate silk screen markings to indicate the purpose of the PCB board and interface functions.

Debugging Considerations
Once the PCB design is complete, export the Gerber files to a factory for PCB production, purchase the necessary components, and prepare for soldering and debugging. During the soldering and debugging process, consider the following:

1. Practice electrical safety during soldering, avoid touching the soldering iron tip to prevent burns
2. Â Solder components from low to high during the soldering process
3. Securely fix chips and heat sinks together with screws before soldering to ensure a tight fit
4. Use a DC power supply for input during testing, connect to a DC power jack or directly to the P2 terminal block, turn on the switch for testing, and use a multimeter to test if the output voltages match the simulation results.

With that, the DC regulated power supply design process is complete. This circuit can be used in regular electronic studies to provide power to other circuits, making it simple and convenient. If a negative power output is needed, feel free to design it yourself and integrate positive and negative power supplies into one circuit board. With your creativity, you can design your own experimental DC regulated power supply circuit board.

### Bom Lm317 LM1117 Practical DC Regulated Power Supply Design

 Parts Value Description Quantity Resistors 240 R1 Red, yellow, brown, gold 1 5K R2 3296W trimpot 1 1K R3,R4,R5,R6 Brown, black, red, gold 4 Capacitors 100uF/50V C1,C3,C6 Aluminum Electrolytic Capacitor 3 100nF C2,C4,C7,C8,C9,C10 Ceramic capacitor 6 10uF C5 Aluminum Electrolytic Capacitor 1 Semiconductors 1N4148 D1,D2 DO-35 Switching Diode 2 LED_B LED2 3 mm LED Blue 1 LED_Y LED3 3 mm LED Red 1 LED_G LED4 3 mm LED Blue Green 1 LED-TH-3mm_R LED1 3 mm LED Red 1 LM317T-DG U1 1.5A Adjustable 1.2V~37V Positive Low Drop Out (LDO) Regulator 1 LD1117V33 U3 1.5A Fixed 5V Positive Low Drop Out (LDO) Regulator 1 LM7805 U2 800mA Fixed 3.3V Positive Low Drop Out (LDO) Regulator 1 Miscellaneous OUT_5V P3 5mm Screw Terminal Block KF301-5.0-2P 1 OUT_3.3V P4 5mm Screw Terminal Block KF301-5.0-2P 1 HDR-M-2.54_1x3 J4,J1,J2,J3 1x3p 2.54mm Pin Header 4 12V DC DC Power Connector 6.3 mm 1 15.5*10.5*21 J5,J6,J7 15.5*10.5*21MM 6063-T5 – Heat sink 3 CONN-TH_2P-P5.00 P2 5mm Screw Terminal Block KF301-5.0-2P 1 SS-12F44-G5 SW1 Slide Switch SPDT 1 OUT_ADJ P1 5mm Screw Terminal Block KF301-5.0-2P 1 M3 Copper Pillar TP1,TP2,TP3,TP4 M3 Copper Pillar 4

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Share on the social networks!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?