Power Supplies Tutorial No.4 (Designing a regulated linear power supply)


Designing a Regulated Linear Power Supply

In this article we will take a look at the process of designing a power supply and some of the considerations that need to be taken into account. 

PLEASE NOTE: This article is designed to simply give you an understanding of the process, it is not designed to be a definitive design document. Please consider mains voltage is dangerous, selecting incorrect components IS dangerous and could cause potentially result injure, explosion, injury and in worst case death. DO NOT PLAY WITH THIS UNLESS YOU KNOW WHAT YOU ARE DOING.

So lets look at a specific reason we may need a power supply.

  • We want a regulated DC power supply that will operate from 240VAC Mains and output 5 VDC, with sufficient current capacity to light an LED.

OK  so we have some design criteria we need to consider:

  • 240 VAC mains input
  • 5 VDC output
  • 20 mA capacity

Lets get started.

So straight away we need a transformer to drop the mains supply to something more appropriate for generating out 5 VDC.

  • We will need a rectifier as well to turn out transformer secondary AC Voltage into DC.
  • A filter capacitor is required to smooth the rectified AC voltage.
  • As far as the regulator is concerned we may be able to use the LM7805 3 terminal regulator, its cheap, and if meets the current capacity requirement  then it may be the best way to go.
  • Oh and there is a requirement for the output capacitor on the LM7805 so we will need to include that as well.

So the circuit below should suit us fine, lets look into the components now

Regulator Selection

Ok so we have the basis of a circuit diagram, lets look at the LM7805 voltage regulator in more detail. If we download the data sheet for the device we can extract the following information.

  Min Typical Max Unit
DC Input Voltage     35 V
Output Voltage 4.8 5 5.2 V
Output Current     1.5 A
Load Regulation     50 mV
Quiescent Current     8 mA
Input Voltage 7.5     V

All characteristics are measured with a 0.22-μF capacitor from input to ground and a 0.1-μF capacitor from output to ground.

There is a Functional Block Diagram for reference and some example circuits and all the information you need to design a circuit suitable for use with the device.

OK so from the specifications we can see the output current requirement of 20mA is easily met. We can see the input voltage must be at least 7.5 Volts and we have selected an example circuit for the device we can use.

There are also characteristic curves for the power dissipation of the device and from these we can determine no heatsink will be required for our 20 mA output current requirement.

So lets think about what transformer we will use. The voltage regulator needs at least 7.5 Volts on its input. Lets allow a safety margin here and settle on an input of 12 Volt. 

One thing I should mention is we don’t want to select an input voltage too high as the excess voltage is dropped across the regulator and if the current is high this just results in heat we have to get rid of. In out case the current is low so it wont be an issue but always keep this in mind. It can be a bit of a balancing act.

Oh and lets cover off on the Output Capacitor now as well, we will select 0.1 µF as that is what the datasheet recommends.

Transformer Selection

So if we are looking for a 12 Volt unregulated supply then a reasonable rule of thumb is to select the transformer secondary RMS voltage to be the same. So for the transformer we are looking for a 240 VAC - 12 VAC transformer with at least 20 mA capacity plus the regulator quiescent current.

I = 20 mA + 8 mA = 28 mA so lets say 30mA


Filter Capacitor Selection

The value of the filter capacitor needs to take into account the current that will be drawn by the load and also by the regulator itself. We need to select a value that will ensure that the lowest voltage caused by the ripple is always above the regulator minimum input voltage.

The peak voltage from the transformer will be Vpeak_sec = 12 V(RMS) x squareroot(2) = 12 x 1.414 = 16.96 so lets call it Vpeak_sec = 17 V

If we check the datasheet for the rectifier diodes each have a 0.7 V drop across them so as two are always in circuit thats Vdiodes = 2 x 0.7 V = 1.4 V so lets call it Vdiodes = 2 V

Thi means the peak voltage across the Capacitor will be:

Vpeak_cap = Vpeak_sec  - Vdiodes  = 17 V - 2 V = 15 V

Now we have the peak voltage we can calculate the maximum allowable ripple 

Vr = Vpeak_cap - Vmin = 15 - 7.5 = 7.5 V

Ok so trust me with this Capacitance can be calculated using

C =( I x δt) / δV


So the current I is our load current + the regulator quiescent current 

I = 20 mA + 8 mA = 28 mA

δt is 1/100 Hz as we have 50 Hz mains that was full valve rectified to form a 100 Hz charging waveform so 

δt = 1/100 = 10 ms

So now we calculate for the capacitance:

C = (28mA x 10ms) / 7.5 V = 37 µF

We could choose 33 µF as its very close and given we have made some allowances on the side of caution along the way this should probably be Ok or we could select the next largest value of 47 µF to make sure it will be OK. Lets select 47 µF in our case.



So the one other thing we need to consider is the diodes that we will use. First they must be capable of handling the current we will be drawing through them and also we need to consider the Peak Inverse Voltage PIV they will be subjected to. The PIV is the reverse voltage that they will break down and start conducting at, this is obviously undesirable.

So back the start we calculated the transformer secondary peak voltage Vpeak_sec = 17 V and I like to allow at least a 50% safety margin so select diodes with 25V PIV.

If we take a look at the 1N400x series of rectifier diodes we could select the 1N4001 as it is good for 1 A forward current and 50 PIV. If you wanted to play it safe you could select the 1N4002 as well.


So our completed circuit would be:

Mains Power

OK well that pretty much covers off on the design of our power supply. But wait, what about the mains safety aspects. Thats a little outside the scope of what i had planed here but on the mains side you should consider a suitably rated switch, a fuse and earthing a metal case unneeded.

Again I can’t stress enough, mains power is very dangerous, DO NOT work with this unless you know what you are doing!!!

OK well thats covers off on designing a regulated linear power supply with a fixed output voltage. In the next article of the series we will look at variable voltage regulated linear power supplies.



Comments (0)

Leave a Comment