A power supply, whether it is a battery or a switched mode AC adapter, is one of the most important tools in electronics. Obviously, you need something to supply electricity to your electronic projects. Making your own power supply is also one of the most popular project for beginners and those who wants to start a hobby in electronics. In this Instructable, i will show you how i make an LM317 based 0 to 12 V adjustable regulated power supply.

But first, i want you all who read this to know that this is my first Instructables and English is not my first language. I apologized for any mistake.

Step 1: Background

I used to have a simple +-1.25 to 15 V as one of my electronics project. I was very proud of it as it was my first big elcetronics project that i have done without any help from my father and friends. I was using it to power a lot of projects for 2 years. After that unfortunately, it became clear that i needed a new power supply. I started to use it to power high current circuit and it heated up the small heatsink that used. It also only able to supply current up to Even after putting the bigger heatsink and transformer, it still unable to deliver the current i needed. After reading some articles and reviewing the circuit i used for it, i realized that the circuit is flawed as i needed an even larger heatsink and a huge transformer to be able to deliver at least 12 V at 1 A on both positive and negative rails. Finally, i decided to take it apart and built a new power supply

Step 2: Specification and Design Choices

As I planned to reuse the transformer from my original power supply, I decided to make a single positive power supply as I rarely used the negative portion of my old power supply. I also want my power supply to go down to 0 V, which means that the negative rail of the supply only need to supply a small current and don’t reduce half of the potential output power. I also want a bigger heat sink, a better enclosure and a multi turn potentiometer. Finally, I want to make the supply with a proper printed circuit board

I decided to just modify a normal LM317 power supply and add a charge pump negative voltage generator and a negative pass transistor regulator. Due to some constrain, I decided to use an old ATX power supply enclosure as it is the only case I have in hand and I am able to attach a PC fan as additional cooling as I am unable to obtain a bigger heat sink. I also used a small multi turn trimmer as it is cheaper the a full sized multi turn potentiometer while still offer more precision than normal potentiometer and modify it so a small potentiometer knob would fit.

I initially also wanted a current limiting capability for this supply. Unfortunately, I realized that my original plan to make the supply go down to 0 V. Since I am already have the circuit board printed, I am forced to make a ghetto modification on the PCB. In the end, I am able to make the supply despite of the difficulty.

If you want to know how exactly the lm317 goes to 0 V, you can't read my blog post.


Step 3: Component List

Here is the list of the component that is used for my power supply. I would put a link to Digikey and Element14 website for an exact or equivalent component with the list. But most of them can be obtain on any electronics components shop.

  • Bridge Diode Rectifier, at least can handle 600 V and 2 A ( Digikey | Element14 )
  • (5) 1N4004 or 1N4007 diode ( Digikey | Element14 )
  • Green 3mm diffused LED. This LED is used as both voltage reference and indicator light. You can use a 2 V zener instead.
  • LM317T adjustable voltage regulator ( Digikey | Element14 )
  • 7812 fixed 12 V voltage regulator ( Digikey | Element14 )
  • Capacitor
    • Electrolytic Capacitor 4700uF/25V
    • (2) Electrolytic Capacitor 470uF/25V
    • Electrolytic Capacitor 100uF/25V
    • (3) Electrolytic Capacitor 10uF/25V
    • Ceramic Capacitor 100nF
  • Resistor
  • BC557 transistor ( Digikey | Element14 ) Any PNP transistor that can handle at least 100mA
  • 1A Fuse and Fuse Holder ( Digikey | Element14 )
  • A set of Female Banana Plug ( Digikey | Element14 )
  • C14 power input connector ( Digikey | Element14 )
  • AC power switch
  • Step down transformer 1.6 A 15 V ( Digikey | Element14 )
  • 2 pin Screw Terminal ( Digikey | Element14 ) to connect to the transformer
  • 20 gauge wire
  • 26 gauge wire
  • ATX power supply case
  • 12 V 80mm computer fan ( Digikey | Element14 )
  • An Heatsink. I use an heatsink from an old ATX power supply. I use it for both of my regulator.
  • (4) 3mm bolt for ATX power supply case
  • (2) 3mm pair of nuts and bolt for transformer
  • (4) pair of nuts and bolt for PCB

For the PCB, i have made by an online electronics component distributor but you can make your own PCB using toner transfer method easily at your home. Also, i initially use a 47uF tantalum capacitor instead of 100uF Electrolytic Capacitor. I replaced it as it was damaged.

Step 4: Circuit Diagram

The picture above is the circuit diagram of the power supply. It is actually very similar to most of the lm317 based power supply with some key difference. One of them is the extra pair of 470 uF capacitor and 1N4007 diodes below the main bridge rectifier. It is a charge pump circuit used to create a low power negative DC voltage source. Normally a voltage doubler circuit is used to create split power supply from a single secondary turn power supply. The disadvantage of this circuit is the power output of the transformer is spilt in half for each DC rail. As I only planned to create a single rail positive power supply, half of the power will be unusable if I use this rectifier circuit. I choose to use charge pump instead of the voltage doubler as the voltage offset circuit only use small amount of current.

The other difference is the pass transistor negative regulator. It is used to regulate the negative voltage to a stable voltage. I use a green LED as both a voltage reference and an indicator light. A 2 V Zener diode can be used as long as it is able to create a stable voltage near -1.25 V.

If you are interested in making your own PCB, i provide the schematic eagle file of the circuit. I don't have the board file as this is not my initial board design as you can see in the next step. Here is a tutorial for making a PCB using a toner transfer method.

Step 5: Assembly

There aren't many things to do apart from soldering the PCB according to the schematic, drilling some necessary hole and putting it all together. When soldering, solder the short component first like resistor and diode. Use the 20 gauge wire for wiring at the AC side, from the transformer to the PCB, and the output to the banana plug. The rest of the connection only carries low current so 26 gauge wire is used instead.

As mentioned before, i use a multi turn trimmer in place of the multi turn potentiometer. To be able to use it normally, a potentiometer knob has to be attach to the trimmer. To do this, first, cut a piece of copper sheet to a circle the size of the base of the knob. After that, using philips head screwdriver with diameter slightly smaller than the trimmer's head, make a hole at the center of the copper sheet. Don't cut the excess copper. Next, make a hole slightly larger than the trimmer's head on the case where it will go. After this, put the trimmer so that its head goes through the hole but not touching the edge of the hole and glue the trimmer in place (don't glue the hole). Next, fit the trimmer's head to the hole at the copper sheet with the part with excess copper at the bottom. Align the sheet so it flush with the trimmer's head. Next, put some solder at the center of the copper sheet to fuse it to the trimmer's head. Lastly, glue the knob to the copper sheet.

Note: The PCB in the photos are not based of the schematic in the last step. It is for my initial plan to have a constant current ability. Unfortunately, it didn't go well and i have to do some ghetto modification to make it work.

Step 6: Testing

For testing, i left the power supply open so i can access the 200 ohm trimmer to adjust the minimum output to 0 V. For testing, first check the voltage output while turning it up from 0 V to max. I was able to reach up to 15 V when unloaded. Although not shown in any of the picture, i also tested it with some power resistors. With it, my power supply was able to supply up to1.3 Amp at 5 V and just above 1 Amp at 12. However, when i tried to pull a higher current at 12 V, the voltage dropped. I also tested how log it can supply a constant voltage at 5 V and around 1 A and the voltage remains stable after 1 hour. Lastly, i set it to 5 V and use it to charge my phone. It was able to fully charge my phone from around 40 %, though it is 2 times slower than usual.

However, i do see some instability at lower voltage (around 3 V). But since i most likely to use the higher current at higher voltage this shouldn't be a problem.

Step 7: Conclusion

There are a number difficulty when designing and assembling the power supply. I also think that there are some components that might be unnecessary. But in the end, i am quite happy with the result. Of course, there are several improvement that can be done like:

  • Use a 10.000uF filter capacitor to reduce ripple at higher current.
  • A voltage indicator display.
  • A varistor as a over voltage protection. (I have the component but i forgot to put it in)
  • A bigger heat sink for more stability.
  • Black Paint !!! It clearly looks better in black.

One thing that i have to say is that this power supply is not exactly practical as there are many cheap DC-DC converter nowadays which can be easily adapted to a power supply. However, it is a good electronic project for those who are learning electronics to try out their electronics skill.

i have to make a variable power supply ranging from -12v to +12v dc output from 240v ac wall input... i am using LM317 and LM337 ... please help me out with the transformer ratiing to be used and which rectifiers diode to be used and values of capacitors and resisters...
<p>How do you build a power supply that allows for 12 v DC up to 6 amps or more?</p>
<p>I am not sure But, i do know that if you are planning to use current above 1.5 A, don't use linear regulator. This video might help you. </p><p>https://www.youtube.com/watch?v=CEhBN5_fO5o</p>
Regarding the!! slow charging issue,I remember reading something about the data wire in the 4strand USB cable. As far as I can remember the commercial chargers supposedly interface with the data wire in the USB cable to cause the phone/the device to charge at the rate they normally do. Try grounding the Data wire once and then charge the phone ? And.... pls let me know if it worked
<p>Actually i know that. I just forgot to mention it actually. Thanks for reminding it. I will try it.</p>
great (y)
<p>Great way to make a bench power supply. </p>
<p>Thank you, sir. Some of your videos and instructables are also interesting for me.</p>
dude i highly recommend dont useing that. its might be good at 200ma but when you drop down to3 volts the lm317 is liniar regulator so the heat will be damn high and no metter what heatsink you put on the ic will burn out. i recommend using switch type regulatoe
<p>Actually it is quite stable even at high current (as you can see in step 6). I do however think that i should have used a bigger heat sink for more stability. Also i don't want to just buy a DC-DC converter and use it in a power supply. I want to make my own.</p>
<p>Very nice!</p>

About This Instructable




More by randomkevin:0 - 12 V LM317 Power Supply 
Add instructable to: