Building a Simple Power Supply


Every electrical project has to have a a source of electricity to function. This could be a battery pack, solar panel, wall outlet, or a potato with electrodes stuck in it! There are lots of possibilities, but the point of this guide is to go over a few basics to create an extremely simple and robust power supply which can be used on many different projects.

Looking for the easy way out? Check out this 5V, 1A, switching regulator from Dimension Engineering. They do have other products available to meet your requirements.

Looking Ahead - Make a Plan

The first step in almost any design is figuring out what you are trying to make. How much power do you need? What are the voltage and current requirements? Will this supply be powering a few chips and LEDs or a large motor? It's very likely you won't know your exact requirements from the start, but you will have to make an educated guess. When in doubt, always plan for power more then you will actually need. These questions will help you to get started.
  • What are you planning to power with this supply?
  • Is this a stand alone supply or part of a larger circuit?
  • Are there (known) specific power requirements?
  • What is your desired output voltage?
  • What is the maximum amount of current that could be drawn?
  • What is the average current that will be drawn?
  • What type of input (source) will be used?
  • What is the voltage of the input (source)?
  • Does your input (source) have power/current limitations?
  • What features would you like (switch, LED indicator, etc)?
Depending on your overall design, some of these questions may be more important than others. For most small projects, the main things to consider are input voltage, output voltage, and expected current draw. Because this is supposed to be a simple power supply, it will be assumed that a DC input voltage source is being used, and thus a DC-DC conversion is desired. A battery pack will easily accomplish this. For tips on how to get a stable DC input using the wall outlet as a power source (120V AC) check out the Mousey Power Supply Project.

Regulator Basics

A voltage regulator takes an input voltage and regulates it to some desired output voltage. There are many different ways to do this, some being much more efficient than others. Unfortunately, to make a truly simple power supply, the less efficient route will need to be taken. The easiest way thing to use is a linear drop out regulator. This type of regulator will generate a fixed or variable output voltage, dissipating all of the excess input voltage as heat, hence the inefficiency. This is not the best way to do things if a large current draw is anticipated due to the large waste of energy, especially when using batteries as a source. This is why it is important to understand what the minimum dropout voltage requirement is (the input minus the output) so a source can be chosen such that as little energy is wasted as possible.

Component Selection

Although the complete workings of a regulator circuit can be designed (again, see the Mousey Power Supply Project) it is much easier to use a prepackaged component. I usually go to Digikey when I am in need of parts because I am very familiar with their website navigation and can quickly search for the exact part I am looking for. Searching for for "Regulators" and selecting the "PMIC - Voltage Regulators - Linear (LDO)" from the list of options will bring up this product listing.

The next step is to narrow the search parameters using the list of requirements we made at the start. Again, the most important parameters to our design are input and output voltage and current output. However, it may also be useful to select a few other options such as topology (fixed, adjustable, positive, negative, etc) and mounting type (surface mount or through hole). The voltage dropout parameter may also be useful if you are working with a small regulation (such as 6V to 5V). It is always a good idea to apply only one filter at a time to make sure you aren't using too many search parameters. If there are multiple options, a final sorting by price can be the deciding factor of what you decide to use.

If you are having trouble picking a good regulator, the 78xx series is a very good place to start. These three pin packages are available in many different output voltages (use the 79xx for negative outputs) with a wide input range. The available output current is typically dependent upon the packaging in use - larger packages can dissipate more heat and supply more current. Here is a datasheet detailing this popular component series.

Circuit Design

Once a regulator is chosen, the datasheet will usually contain many design tips which should be followed. Any additional components may also be acquired using Digikey or any other supplier.

Capacitors

The most common external components necessary for stable operation are input and output capacitors. Sometimes, these are absolutely required, and sometimes they are only recommended for better transient response - how it deals with changes. For supplies far away from the source, a high input capacitance is needed. For supplies power large loads with sudden changes (such as motors), a high output capacitance is needed. There are a lot of factors which can come into play, but for the average small project power source, anything between 1 and 100 microfarads should more than suffice at the input, and a range of .1 to 10 microfarads is generally appropriate for the output. Electrolytic capacitors are typically used for both; however, using a variety of different types of capacitors at the output can increase transient response. These types of caps are sometimes called "voodoo capacitors" because there is no mathematical analysis to prove why they are used.

Reverse Voltage Protection

Aside from the capacitors, there are a few other components that can be added to increase the overall robustness and/or usefulness of the circuit. The first of which is a series diode at the input. As long as a diode is chosen which can handle the amount of current which will be consumed by the supply, this can be a very simple way to prevent reverse polarity. Since the diode will only allow current to flow in one direction, connecting the power source in reverse polarity will not damage the circuit because the diode will restrict the current flow. Schottky diodes are a good choice due to their quick response time and typically low dropout voltage.

Over-Voltage Protection

While a series diode can protect against hooking the batteries up backwards, a parallel avalanche diode can be used to protect against over-voltage. Avalanche diodes will break down at a specific reverse-bias voltage, allowing current to flow. For example, if your circuit can only take an input up to 9V, but you accidentally connect a 12V battery pack, an avalanche diode with a breakdown voltage of 9V will protect the circuit by effectively shorting the input. Because the current will want to flow in the path of least resistance, it will pass through the diode as opposed to the regulator circuit. This can be dangerous; however, as the battery will rapidly discharge back into itself and it as well as the diode can quickly overheat. 

Miscellaneous Extras

Adding a power switch can be a great way to avoid constantly connecting and disconnecting batteries to turn the power on and off, while an LED with series resistor in parallel with the load will give a clear indication of the power state as well as supplying the minimum current draw which some regulators require. Finally, placing a fuse at the input is a fail safe to protect against any unexpected accidents.


Although shown in the above schematic, the protection diodes D1 and D2 as well as the fuse can be removed as long as you are careful with the voltage input. Also, the actual size of the input and output capacitors will depend on the regulator in use as well as the design needs. For a brighter indicator LED, a smaller resistor R1 can be used. Be sure to appropriately limit the current in the LED. An LED usually dissipates about 2V, and 10mA should make it plenty bright.

ILED = (VCC - VLED) / R1