« Back to home

7805 Voltage Regulators

As I mentioned on the PiStation project page I was having problems with the power supply module - it was overheating quite badly. Turns out this is a relatively common problem with linear voltage regulators (especially if you are using a relatively high input voltage, over 9V for example).

Regulator Circuit

The basic linear regulator circuit is very straightforward (you can see it in the schematic to the left). Normally all you need to add a few capacitors on the input and output end to provide some filtering and that's it. I've used this circuit a number of times without any problems but only to provide a very low current (around 100mA to 150mA). In this situation there is no overheating issues, the regulator gets warm but certainly doesn't start to fail.

The trouble is how a linear regulator works, essentially all the excess energy is dissipated as heat. It's fairly easy to calculate how much power needs to be discarded, simply use the following formula:

P = (Vin - Vout) * C

Where Vin is the input voltage, Vout is the output voltage and C is the current drawn by the target circuit. For a small circuit drawing 100mA this comes to (12 - 5) * 0.1 or 0.7 Watt.

The Raspberry Pi (and whatever you plug into the USB ports) pulls around 450mA which is a significant difference. The result is now (12 - 5) * 0.45 or 3.15W which is a big increase. A normal 7805 regulator in a TO-220 case simply can't dissipate that much heat.

One solution is to add a heat sink to the regulator to help it radiate away the heat, the other is to reduce the input voltage. This puts me between a rock and a hard place - I don't really want to add a large heat sink to the PiStation as that would increase the size and dropping the input voltage is a problem as well because the LCD requires a 12V supply.

There is another way to drop the input voltage to the regulator though - use a resistor to create a voltage drop from the raw input voltage to the input provided to the regulator. If we can drop the input voltage to 7.5V the amount of power the regulator needs to radiate drops to 1.125W which is a lot easier to handle.

Resistor Types

To get the required voltage drop at the 450mA current we can use a 10 Ohm resistor (R = V / I = 4.5 / 0.45 = 10 Ohm). The resistor is also going to need to radiate away that energy (P = V * I = 4.5 * 0.45 = 2.025W) so we can use a normal quarter watt resistor, we'll have to use a wirewound resistor that can handle the power required. If you look at the image to the right the type of resistors we are talking about are the top two. They are not exactly common for hobbiest digital projects.

Of course I don't have any available and it will be a few days before I can pick some up from the local Jaycar This means that this whole post is purely theoretical for the moment until I can prototype up the new design. In the meantime I'm going to move forward with the button interface and supporting software and just drive the Pi from a USB cable for the moment.