Mini Project: LM317 Power Supply

The first power supply I had was a 1.5 amp, 6-voltage power supply. It could generate 3V, 4.5V, 6V, 7.5V, 9V and 12V. I always thought these were strange voltages – why not supply 3.3V and 5V?

In late 2014 I noticed that it was acting very oddly – e.g. I would set it to generate 9V, and it would generate a random voltage up to ~18V! I figured that this was because I had been running it at about 2.5A to power my CNC machine – 1A above the maximum allowed current. Whoops.

I decided to take it apart and have a look. This was the basic schematic.


The schematic of the power supply. Component names/values reflect my new design rather than the original design.

It is based around an LM317 linear regulator. This is a pretty common part which allows you to generate any voltage between 1.25V and 37V, so long as you supply it with an input voltage that is approximately 3V above your desired output. You choose the output voltage by selecting the correct combination of R1 and R2 as shown in the datasheet. I use this online calculator to calculate the correct resistor values.


You can select the output voltage by choosing the correct combination of R1 and R2

This circuit uses the six way switch (SW2) to select the correct resistor and correct transformer tap for the given voltage.

Although I had bought a better power supply to replace the broken one, it always helps to have spare power supplies, so I decided to rebuild it.

I only kept a few components from the original power supply – the plug, switch, transformer and heat sync – everything else is new. The schematic is more or less the same as before except that the resistors I selected allow it to generate 3.3V, 5.2V, 7.5V, 9V, 11.7V and 15V.


This is how it looks far


The internals

Although the circuit works perfectly, it obviously isn’t finished. The box doesn’t have a lid and has some gaps in the walls which need gluing together. Furthermore the heat sink needs to be attached to the LM317.

The heat sink is important because of the amount of heat it needs to dissipate. For example, on the 3.3V setting, the LM317 is supplied with approximately 10V. Therefore it needs to drop 6.7V across the LM317. At 1.5A this is a total of 10W which is enough to raise the temperature by about 190 degrees above room temperature (it has a thermal resistance of 19°C/W without a heat sink). This is way above the recommended 125°C operating temperature.

I will update once I have totally finished the power supply, however this won’t happen until I’m back in the UK.

One thought on “Mini Project: LM317 Power Supply

Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s