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!

Dear readers, please note that this is the old website of maxEmbedded. The articles are now no longer supported, updated and maintained. Please visit the new website here and search for this post. Alternatively, you can remove .wordpress from the address bar to reach the new location.

Example: If the website address is, then removing .wordpress from it will become

We apologize for the inconvenience. We just want to give you a better viewing and learning experience! Thanks!

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

53 responses to “How to build your own Power Supply

  1. hi sir, i am working on converting a dc power car amplifier to work on the ac mains in my house. i have been supplying it with power from a compaq series ps2013 psu for about a month,but i smelt something burning one day and it stopped working. i think a resistor may have been damaged in it,not too sure. it is a crunch 1400w 2.2 channel amplifier that im thinking of making a power supply you think it would have been more economical if i bought another psu or make one on my own. if so, what are my needed devices and design? i am not too sure of the input current,but i know the input voltage is 12v dc. please answer…

    • Hi Brooks, To question that whether it will be more economical to build it on your own or buy it is pretty tough to answer without the current rating. Please find the current or try looking for the current rating of the PSU you were using with it. Further instead of making a new one, try repairing the old PSU
      Hope this Helps!

  2. sir help me please this is very good that what you explain
    but i have to cnvert 220v ac to 12v dc then using osciltr again into AC
    simple 220v AC to 12Vdc
    then 12Vac to 12V Ac
    and i dont know how it will be done
    kindly tell me please

    • Hi Mona
      What sort of an oscillator are you trying to build? I mean a sine Wave Generator, square wave generator or something else?

    • The values are not calculated. The value of the capacitor increases with the level of purity of DC required. So, if you draw high currents from the supply, your output will start to give AC characteristics. In that case if you increase the value of the capacitor, Tat AC component will start getting suppressed.

      Hope this Helps! 🙂

We'd love to hear from you!

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s