A Power Supply Works
How power supplies work
A power supply is used to reduce the mains electricity at 240 volts AC down to some thing more useable, say 12 volts DC. There are two types of power supply, linear and switch mode.
A linear power supply uses a transformer to reduce the voltage. The ratio of primary windings (connected to the mains) to the number of secondary windings (connected to the output) would give the ratio of how much the voltage reduced by, in this case a ratio of 20:1 reduces the 240 volts AC input in to 12 volts AC on the secondary windings.
A switch mode supply works by turning the mains electricity on and off very quickly to reduce the voltage. In this case the reduction in voltage depends upon the ratio of the on time and off time. Switching takes place very fast, at 10,000 times a second or quicker. Using this technique the bulky transformer found in a linear supply can be replaced with a smaller one.
Below is a block diagram of a switch mode power supply. The AC signal is rectified and regulated to produce a high DC voltage. This is then switched on and off rapidly by a FET. Then the switched signal goes through a transformer, although this can reduce the voltage it isolates the output from the mains electricity (for safety reasons). Feedback of the output is then used to control the mark space ratio of the switching so that the output stays at the required voltage. The transformer used in a switch mode supply is much smaller and cheaper than the type used in linear supply, but must be able to handle the higher switching frequencies.
We have already mentioned that there are two types of transformer, those used at low frequencies (50Hz) in a linear power supply and the high speed (>10KHz) version used in switch mode supplies. The linear power supply transformer typically uses a steel core. Because eddy currents would occur in a solid steel core and reduce the efficiency the core is made from insulated steel plates stacked next to each other with the windings wrapped around them
A regulated supply uses an IC, where the IC monitors the output voltage relative to a reference voltage and adjusts the output accordingly. Regulators have a much lower ripple and often include over current and over temperature protection, whereby they automatically shut down making them and the rest of the supply indestructible. The part shown right is a 7805, a common 5 volt regulator.
In the block diagram of the switch mode power supply, the final stage was to smooth out the pulses by adding a large capacitor. Depending upon how accurate the supply needs to be this solution may be adequate. In this design the output will have some ripple; it will vary from the required voltage by a small amount, maybe a few percent.
The most common case type is the plastic case. This is because it can be easily made using an injection moulding process and features such as PCB mounting holes or clips, holes for cable entry exit etc can be included in the design at virtually no extra parts cost. The more expensive alternative is a metal enclosure; however these must be grounded for safety reasons.