Pages Menu
TwitterRssFacebook
Categories Menu

Posted by on Feb 13, 2013 in Electronics | 129 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

Optional

  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

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

Video

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
vishwam@delta.robovitics.in

129 Comments

  1. IT WAS HELPFULL

  2. i want to build 220 Volt DC power supply
    How Can I do This ?

    • Holy cow! Why do you even want to do that? I mean, for what application do you wish to use 220 VDC supply?

      • Dare sir I want to DC out put 12 with amp 15 from ac 230 volt so can you tell me how to it made.and tell me particular parts it will need

  3. I draw exact same diagram with 7812 regulator, step down transformer (500:58.5 coil ratio), Resistor 1.5 ohm, LED 5mA, in multisim component evaluator but it show led in off state only

    • Hi Siddhant

      The resistor value is very low it should be about 1K for 12 Volts. And this circuit works perfectly on MultiSim as well as hardware (as demonstrated), so you should consider checking your connections if it continues to not work.

      Hope this helps!

  4. hi. i want an output of 5 volts. the components I bought are as follow.
    12V transformer (1 number)
    470uF capacitor (1number)
    0.1uF (2 numbers)
    IC 7805 (1 number)
    1N4007 Diodes connected in bridge (4 numbers).
    how is the calculation done? what is the output received after the bridge connection and so on.

    • Hi Suraj

      Read the post for all the answers are in it.

      Hope this helps!

  5. thanks for ur article

    • i like to build a power supply, which take 230v ac, but i required 3 o/p’s, +5vdc, +12v dc and – 12v dc…………can u help in building this pcb.

      • Hi Suresh

        First you would want to get a 230 to 15-0-15 transformer which can give the combined current capacity of all the three networks that you trying to power up. After that, just follow this circuit for the 12V dual supply. For the 5 Volt output, just repeat the 7812 part in the circuit with a 7805.

        Hope this Helps!

    • Thanks for the feedback.

      Keep Reading, Keep Sharing :D

  6. i want to build an sensor circuit plz help

  7. thnx altt

    • You are welcome!

      • Hi Vishwam. Thank you for this guide. I would just like to ask if this type of power supply is linear and or switching? And also will a 35v capacitor ok for 18v output?

  8. Hey i need to build a power Supply for a car amplifier. Its a class project.

  9. Hey bro….. I wand to build a DC POWER SUPPLY 0-15v/0-2a… With volt meter and amp control meter.. Can u help me…

  10. hey can u help me making a 12v 20A fix power supply

  11. How can i make a 0-12v variable power supply that can handle up to 2A?

  12. Hi, thanks for the tutorial! I was wondering how you decided upon a 1000uF and 10uF? I want to make a 9VDC power supply to drive an LED and provide power to a 5V J-K flip flop and solid-state relay (triggers between 4-32VDC). Just want to understand the decision behind selecting those capacitor values so I order the right components. Thanks!

  13. Really helpful..but can i have a picture of breadboard connections..

  14. How can I build this If I am using V-0-V transformer I.e. Center tapped.
    Please suggest

  15. Thanks for this project guide Vishwam. I would be glad if you could also provide a maximized sample layout on a general purpose pcb like on the photo if it is ok with you. As a newbie I just can’t figure it out yet given only the circuit/schematic diagram. Thanks!

  16. Dear sir, good technical explanation, can you give such description for (input three phase 220v AC) 12 v, 1 amp output power suppy that can be used to power-up a muti component three phase energy meter. I want it to make with voltage drop capacitors (0,68 uf 440 V) filter capacitors & diodes, and zener diode. It should support jerk load of 3 latch relays, one display unit of 12 v, and comn load between mtr &external diaspay board. the display board is powered from mtr itself. pls suggest circuit with values and spike eliminting components.

  17. hi, thanks for this information
    please, can you explain how to check the output power capacity of this type of power supply? or if i buld another one how to check its output capacity?
    thank you

  18. what dose this four resistor ? , can i make this circuit without 7812 regulator ?

  19. How do i do if i want to have a unlimited power to multi devices? Thinking to do a led list that you can insert more led list in the future

  20. What is the circuit for transformer less ac to dc converter?

Leave a Reply

%d bloggers like this: