Pages Menu
Categories Menu

Posted by on Feb 13, 2013 in Electronics | 161 comments

How to build your own Power Supply

How to build your own Power Supply

This post has been written by Vishwam, an electronics geek and an awesome guitarist. He is a core member of roboVITics. Don’t forget to share your views once you read it!

What is a power supply?

A power supply is a device which delivers an exact voltage to another device as per its needs.

There are many power supplies available today in the market like regulated, unregulated, variable etc, and the decision to pick the correct one depends entirely on what device you are trying to operate with the power supply. Power supplies, often called power adapters, or simply adapters, are available in various voltages, with varying current capacities, which is nothing but the maximum capacity of a power supply to deliver current to a load (Load is the device you are trying to supply power to).

Why make one yourself?

One would ask himself, “Why do I make it myself, when it available in the market?” Well, the answer is- even if you buy one, it is bound to stop working in a while (and believe me, power supplies stop working without any prior indication, one day they’ll work, the next day they’ll just stop working!). So, if you build one yourself, you will always know how to repair it, as you will know exactly what component/part of the circuit is doing what. And further, knowing how to build one, will allow you to repair the ones you have already bought, without wasting your money on a new one.

What you need?

  1. Copper wires, with at least  1A current carrying capacity for AC mains
  2. Step Down Transformer
  3. 1N4007 Silica Diodes (×4)
  4. 1000µF Capacitor
  5. 10µF Capacitor
  6. Voltage regulator (78XX) (XX is the output voltage reqd. I’ll explain this concept later)
  7. Soldering iron
  8. Solder
  9. General Purpose PCB
  10. Adapter jack (to provide the output voltage to a device with a particular socket)
  11. 2 Pin plug


  1. LED (for indication)
  2. Resistor (Value explained later)
  3. Heat Sink for The Voltage Regulator (For higher current outputs)
  4. SPST Switch

Same Basic Concepts related to Power Supplies


Transformers are devices which step down a relatively higher AC input Voltage into a lower AC output voltage. To find the input and output terminals of a transformer is very tricky. Refer to the following illustration or the internet to understand where what is.

I/O Terminals of a transformer

I/O Terminals of a Transformer

Basically, there are two sides in a transformer where the coil winding inside the transformer ends. Both ends have two wires each (unless you are using a center-tapped transformer for full wave rectification). On the transformer, one side will have three terminals and the other will have two. The one with the three terminals is the stepped down output of the transformer, and the one with the two terminals is where the input voltage is to be provided.

Voltage Regulators

The 78XX series of voltage regulators is a widely used range of regulators all over the world. The XX denotes the voltage that the regulator will regulate as output, from the input voltage. For instance, 7805, will regulate the voltage to 5V. Similarly, 7812 will regulate the voltage to 12V. The thing to remember with these voltage regulators is that they need at least 2 volts more than their output voltage as input. For instance, 7805 will need at least 7V, and 7812, at least 14 volts as inputs. This excess voltage which needs to be given to voltage regulators is called Dropout Voltage.

NOTE: The input pin is denoted as ‘1’, ground as ‘2’ and output as ‘3’.

Voltage Regulator Schematic

Voltage Regulator Schematic

Diode Bridge

A bridge rectifier consists of an assembly of four ordinary diodes, by means of which we can convert AC Voltage into DC Voltage. It is found to be the best model for AC to DC conversion, over Full wave and Half wave rectifiers. You can use any model you want, but I use this for the sake of high efficiency (If you are using the full wave rectifier model, you’ll need a center-tapped transformer, and you will only be able to use half of the transformed voltage).

One thing to note about diodes is that they drop about 0.7V each when operated in forward bias. So, in bridge rectification we will drop 1.4V because at one instant two diodes are conducting and each will drop 0.7V. In case of Full wave rectifier, only 0.7V will be dropped.

So how does this drop affect us? Well, this comes in handy while choosing the correct step down voltage for the transformer. See, our voltage regulator needs 2 Volts more than its output voltage. For the sake of explanation, let’s assume that we are making a 12V adapter. So the voltage regulator needs at least 14 Volts as input. So the output of the diodes (which goes into the voltage regulator) will have to be more than or equal to 14 Volts. Now for the diodes’ input voltage. They’ll drop 1.4 Volts in total, so the input to them has to be greater than or equal to 14.0 + 1.4 = 15.4Volts. So I would probably use a 220 to 18 Volt step down transformer for that.

So basically, the transformer step down voltage should be at least 3.4V more than the desired Power Supply output.

Schematic and Illustration of a Diode

Schematic and Illustration of a Diode

Filter Circuit

We filter, both the input and output of the voltage regulator in order to get the smoothest DC Voltage as possible, from our adapter, for which we use capacitors. Capacitors are the simplest current filters available, they let AC current pass through and block DC, so they are used in parallel to the output. Furthermore, if there is a ripple in the input or output, a capacitor rectifies it by discharging the charge stored in it.

Schematic and illustration of a Capacitor

Schematic and Illustration of a Capacitor

How to build it?

Here is the circuit diagram for the Power Supply:

Circuit Diagram

Circuit Diagram

How it works

The AC mains are fed to the transformer, which steps down the 230 Volts to the desired voltage. The bridge rectifier follows the transformer thus converting AC voltage into a DC output and through a filtering capacitor feeds it directly into the input (Pin 1) of the voltage regulator. The common pin (Pin 2) of the voltage regulator is grounded. The output (Pin 3) of the voltage regulator is first filtered by a capacitor, and then the output is taken.

Make the circuit on a general purpose PCB and use a 2 Pin (5A) plug to connect the transformer input to the AC mains via insulated copper wires.

If you want to power up a device you bought from the market, you need to solder your Power supply output to an adapter jack. This adapter jack comes in a variety of shapes and sizes and completely depends on your device. I have included a picture of the most common type of adapter jack.

A very common sort of Adapter Jack

A very common sort of Adapter Jack

If you want to power up a self made circuit or device, then you would probably run the output wires of your supply into your circuit directly.

An important thing to note is that you will need to take care of the polarities, while using this supply, as most of the devices you will power up will only work on forward bias, and will not have an inbuilt rectifier to correct wrong polarities.

Connection ports of an Adapter Jack

Connection ports of an Adapter Jack

Almost all of the devices will need positive on the tip, and ground on the sleeve, except a few, for example, in the music industry, almost all the devices will need ground on the tip, and positive on the sleeve.

Optional Additions

You can add an LED with a current limiting resistor in series as indication of the power supply working. The resistance value is calculated as follows:

R = (Vout – 3)/0.02 Ω

Where, R is the series resistance value, and Vout is the output voltage of the voltage regulator (and the power supply as well).

Schematic and illustration of a Resistor

Schematic and Illustration of a Resistor

NOTE: The value of the resistor does not have to be exactly as calculated using this formula, it can be anything close to the calculated value, preferably greater.

Schematic and Illustration of an LED

Schematic and Illustration of an LED

In addition to an LED, you can also add a switch to control the ON/OFF mode of the power supply.

You can also use a Heat Sink, which is a metallic heat conductor attached to the voltage regulator with a bolt. It is used in case we need high current outputs from the power supply and the voltage regulator heats up.

A Heat Sink

A Heat Sink

Final Result

Here I have made a 12 Volt Power supply, to power up my microcontroller board. It works perfectly, and costs somewhere around a 100 bucks (Indian Rupees).

NOTE: All Microcontroller Boards will need a positive on the tip, and ground on the sleeve.

This is a 12 Volt Adapter I made

This is a 12 Volt Adapter I made


Some Notes and Observations

  1. Before soldering the parts onto the PCB, plan the layout of your circuit on it, this helps in saving space, and allows less room for errors while soldering.
  2. If you are new with circuits and soldering, I would suggest you make this setup on a bread board first, and verify your connections, and after this circuit has worked on the bread board, transfer this circuit onto a PCB and solder.
  3. Be careful, as you are working with AC mains directly.
  4. Check before hand, what voltage the device you are trying to power up with your power supply needs. You can burn out some devices with only a couple of extra volts.
  5. The 78XX series of voltage regulators is capable of providing currents up to 700mA if a heat sink is used.

So that’s it. If you like this post, have any views regarding it or any further queries and designs, please comment below. Also, do subscribe to maxEmbedded to stay updated! Cheers!

Vishwam Aggarwal


  1. How efficient is this circuit? Especially dropping such high voltages by regulators?

  2. how to connect a step down transformer on breadboard having 3 input wires and 2 output wires

  3. I want a power supply with 12v&5A output to run a wiper motor with load of 1/2kg.or is there any other idea to run the wiper motor. Please help me as soon as possible.

  4. Highly educational, am looking to power a cordless circular saw(Dewalt), it operates on 14.4v D.C. And 3.3a, I have some components on hand and have built an elenco variable voltage power supply. I simply need to produce 15v @ 8-9 amps, think it can be done?

  5. i want output of 24V 500ma….can you please share the circuit diagram??

  6. I want the 3 ampere current as an output with 5 volts , how can i get

  7. is there any calculation for deciding transformer output current range or how output current value is decided ???
    and is it necessary to use center tap transformer if i want to gate +12volts and -12 volts at output ??

  8. The article is really amazing and very useful, thanks.

  9. How can i find out a best quality power supply??

  10. I need 12volt DC but 6A output…can you recommend some changes in your diagram…can I still use 7812 regulator?…I have heatsinks and fan…

  11. Can u tell me how to make 24v 5a dc power supply using a transformer

  12. I want to know how to choose the value of capacitor

  13. information is very helpful and well explained step by step.You are doing great Job..

  14. help me. I want to make 12v 6A power supply.. can you help me?

    • taking transformer and regulators is not correct for such a power supply OF 12v / 6A . go for smps supply or do one thing go to a computer repair shop ask him for a working power supply from scrap . it will give 12v / 10A OR MORE AND ALSO 5V , 3.3 V SUPPLY IN IT

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: