Most electronic circuits need low voltage direct current (DC). To minimise energy loss in power lines, the power companies use high voltage alternating current (AC). AC is also used for power distribution because it is possible to step the voltage up or down using a transformer. High voltage transmission is more efficient.
Here are some power supply circuits. The transformer steps the voltage down to a suitable low value. The diode/s only pass current in one direction so the AC is converted to DC. The capacitor stores charge and smooths out the raw DC. To get really good smoothing, electronic regulation is needed in addition to the capacitor used to store charge.
This is the simplest and least satisfactory. It is called a half wave rectifier because the diode only conducts for half the time.
This is a full wave rectifier using a transformer with a centre connection to the secondary coil.
This is a bridge rectifier. This is the best solution. It has a simple transformer and full wave rectification.
