- Basics of electronic circuits

A voltage regulator is an electronic device that produces a steady and fixed output voltage, independently of its input voltage and output current. In reality, any voltage regulator has a range of input voltages for which it works, a certain level of efficiency and a limited amount of power it can handle. Therefore, a careful selection of the voltage regulator must be made depending on the application it is for.

The black box model of the voltage regulators is a 3-terminal device with:

- an input terminal with a certain input voltage $V_{in}$ and input current $I_{in}$
- an output terminal with output voltage $V_{out}$ and current $I_{out}$
- a common terminal $GND$

Most voltage regulators have a standard pinout. In the TO-220 package shown in the right, the pins connect to:

- Input voltage
- Ground
- Output voltage

Fixed voltage regulators have a block diagram as shown below. The *reference* block generates a reference voltage $V_{ref}$ that is expected to be insensitive to any type of perturbation. The resistive-divider provides a scaled-version of the output voltage
$$V_s = \frac{R_2}{R_2+R_1}V_{out}$$
to the regulator. It then adds a voltage reference $V_{ref}$ to the scaled voltage. The *control* block forces the output voltage to follow the resulting voltage.

Say the control block sets the output voltage to be the tracking error multiplied by $A \gg 1$ (a typical gain stage). Then: $$V_{out} = A(V_{ref} + V_s - V_{out} )$$ $$V_{out} = A(V_{ref} + \frac{R_2}{R_2+R_1}V_{out} - V_{out})$$ $$V_{out}\left(1+A\left(1-\frac{R_2}{R_2+R_1}\right)\right) = AV_{ref}$$ $$V_{out} \approx \left(1 + \frac{R_2}{R_1}\right) V_{ref}$$ We see that the output voltage can be defined by the ratio $R_2/R_1$.

Some regulators, such as the LM317, allow the designer to select a desired output voltage based on an external resistive-divider. They are called adjustable.

Voltage regulators can be roughly divided in two categories: **linear** and **switch-mode**. While linear regulators dissipate power when dropping the voltage level, switch-mode regulators transfer almost all energy from input to output. The input and output powers are defined as:
$$P_{in} = V_{in} I_{in}$$
$$P_{out} = V_{out} I_{out}$$

Linear regulators control the voltage drop between the input and output as required to produce the desired voltage. Since the power used to drop from the input to the output voltage is lost, these are mainly used for low power circuits and low voltage differences between input and output (otherwise a large dissipation of energy would overheat the regulator).

There are basically two types of linear voltage regulators:

For example, for the series regulator, the input and output currents are equal: $$I_{out} \approx I_{in}$$ Therefore, the efficiency is only defined by the ratio of voltages: $$\eta = \frac{P_{out}}{P_{in}} = \frac{V_{out} I_{out}}{V_{in} I_{in}} \approx \frac{V_{out}}{V_{in}}$$ and the lost power is in the resistance between input and output: $$P_{in} - P_{out} = (V_{in} - V_{out}) I_{in}$$

The switch-mode regulators are more elaborate and use energy storage devices such as inductors to buffer energy between the input and output. They work by getting energy from the input when the output voltage is below the desired value and cutting the energy flow from the input when the output voltage is above the desired value. This is done by switching on and off the power transistor that connects the input and output, hence the name switch-mode. Since all energy is being transferred from the input to the output as needed, the power loss only exists in parasitic resistances present in the components and wires. $$P_{out} \approx P_{in}$$ $$\eta = \frac{P_{out}}{P_{in}} \approx 1$$ $$P_{in} - P_{out} \approx 0$$ Therefore, these are preferable for power circuits and/or high voltage differences. In pratice, the efficiency $\eta$ is around 90-98%. The AC adapter that connects to your laptop has some sort of switch-mode power regulator to produce the steady DC voltage that the laptop requires.

In this kind of regulators, there are some external components between the output pin and the node we want to keep at a desired voltage. They have a block diagram as shown below. The *reference* block generates a reference voltage $V_{ref}$ that is expected to be insensitive to any type of perturbation. The *control* block uses the error between the reference voltage and the sensed output voltage to control the input-output relation.

The resistive-divider provides a scaled-version of the output voltage $$V_s = \frac{R_2}{R_2+R_1}V_{out}$$ to the regulator. It is then compared to the voltage reference $V_{ref}$. The control loop forces the output pin in a way that brings this error down. Say the control block sets the output voltage to be the tracking error multiplied by $A \gg 1$ (a typical gain stage). Then: $$V_{out} = A(V_{ref} - V_s)$$ $$V_{out} = A(V_{ref} - \frac{R_2}{R_2+R_1}V_{out})$$ $$V_{out}\left(1+A\frac{R_2}{R_2+R_1}\right) = AV_{ref}$$ $$V_{out} \approx \left(1 + \frac{R_1}{R_2}\right) V_{ref}$$ We see that the output voltage can be defined by the ratio $R_1/R_2$. This type of regulators need at least 4 pins, like the LM2575. Like their linear counterpart, the resistances can be inside or outside the chip.

These are the most distinct types of switched-mode voltage regulators:

- Buck/step down ($V_{in} > V_{out}$)
- Boost/step up ($V_{out} > V_{in}$)
- Buck-boost