Linear Regulators are the easiest type of voltage regulators. In principle they simulate a VDR (Voltage dependent resistor) which is outputting a stable voltage.

Linear Voltage Regulators are the simplest if their kind. Just to mention the 78xx-series (positive voltage) and the 79xx-series (negative voltage), which are widely used. Their principle is shown below: a transistor with a Z-diode at the base.

For this, there are to regulation paths for the voltage:
Uz-Ube-Ua and Ua-UCE-Ue

If the current is rising, so is Ua. Since Uz is about constant, Ube is falling. So the transistor is turning slightly off and Uce is rising (since Ue is constant), so the current is falling again and Ua is kept constant this way
The same loop is for a falling current, but with different direction of the rising and falling voltages.

The current can change either by an increasing Ue or by a decreasing Rlast (Routput) (or a decreasing Ue and an increasing Rlast).

It is to mention that according to Kirchhoff’s voltage law Ue equals Uz + Ube

Now it is time for the 7805 and its circuit. Since the 7805 needs a Voltage-Drop of about 3V, you need at least 8V as V+. The capacitors are preventing the regulator from oscillating.

This is a fixed voltage regulator. If you need a variable voltage regulator, this task can be a lot more difficult. But wait, there are some easy components which are exactly made for this application, for example the LM317 or LM340K (for positive voltages). There are not depending on a Z-diode but with a differential voltage between the ouput voltage and an adjust-pin. On the adjust-pin, you just need to add a small voltage divider

I already built some power supplies with the LM317, suitable for up to 1.5 Amps. Here is the schematic for it

The diodes are protecting the IC from reverse voltage or during shutdown. The voltage divider is made with R3 and R2.

The input voltage always needs to be higher than the output voltage, since the LM317 and the 78xx- and 79xx series typical need about 3V voltage drop.

And this is where the problems of LPSs are. The remaining voltage (U+ – Ua) always drops over the transistor. If there is a bigger current passing through, there is a lot of wasted power. So keep your ICs on a heatsink and provide sufficient airflow!

But even though they are wasting a lot of power, the output voltage is smooth as butter and they don’t need a lot of parts or components. The circuit is very stable and can be used anywhere (where not much power is needed….)