What is a Voltage Regulator?
A voltage regulator is a component that converts a voltage to a lower (or higher) level.
A typical example is if you want to use a 9V battery, but you need 5V in the circuit. For example to create a portable USB charger. Then you can use a voltage regulator that takes those 9V as an input and creates a stable 5V output to use in your circuit.
Or if you need different voltage levels for a circuit you’re building. Let’s say you have a circuit with a microcontroller that needs 5V and a motor that needs 12V. Instead of using two power supplies, you can use just a 12V supply and add a voltage regulator that provides 5V for the microcontroller.
![](https://www.build-electronic-circuits.com/wp-content/uploads/2021/05/Voltage-regulator-circuit.png)
How To Connect a Voltage Regulator
Usually, you need a few extra components connected to your voltage regulator to make the output a bit more stable. At least a capacitor or two. But it depends on the one you choose. You’ll find info about how to connect a specific voltage regulator in its datasheet.
For example, the voltage regulator 7805 is a common one. It gives you 5V out. From the 7805 datasheet, you can find this example circuit that shows that you need two capacitors:
![A simple 7805 voltage regulator circuit with 5V output](https://www.build-electronic-circuits.com/wp-content/uploads/2021/05/7805-circuit-simple.png)
Types Of Voltage Regulators
There are two common types of voltage regulators that are worth knowing about:
- Linear Voltage Regulators
- DC-DC Switching Regulators
The linear voltage regulator is the simplest one that only requires a couple of capacitors and maybe a resistor or two to work.
Examples of linear regulators are the 7805 and the LM317 with an adjustable output voltage.
![Basic LM317 circuit](https://www.build-electronic-circuits.com/wp-content/uploads/2021/05/LM317-circuit-simple.png)
The DC-DC switching regulator is a bit more complex and needs an inductor and a diode to work. One example is the LM2596. But often you can find these as small modules (look for DC-DC converters) that have everything needed on the board.
![Voltage regulator: DC-DC converter module](https://www.build-electronic-circuits.com/wp-content/uploads/2021/05/DC-DC-converter-500x333.jpg)
The main difference between the two is that a linear regulator wastes much more power than the switching regulator. So the linear regulator can easily get really warm if you don’t provide good cooling.
Also, the switching regulator is the only one that can give you a higher output voltage than the one you put in. A linear regulator will always give you a lower output voltage.
How Linear Voltage Regulators Work
There are many ways to design a linear voltage regulator. Here’s maybe one of the simplest:
![](https://www.build-electronic-circuits.com/wp-content/uploads/2021/05/voltage-regulator-simple.png)
The output will always be the Zener voltage of the diode minus the VBE voltage of the transistor. VBE is usually around 0.6V to 0.7V. So with a 5.6V Zener diode, you’ll get around 5V on the output.
If the output voltage goes up beyond 5V, that means VBE becomes lower. That would make the transistor reduce the current so that the voltage goes down again. If the output goes lower than 5V, the opposite would happen.
How Switching Regulators Work
The other main type is the switching regulator. This is a voltage regulator that is switching the input voltage on and off and uses some smart circuit tricks with an inductor to convert the voltage in a much more power-efficient way.
There are 3 main types:
- Buck converter – Can convert to a lower voltage
- Boost converter – Can convert to a higher voltage
- Buck-boost converter – Can convert both to a lower and a higher voltage
Here’s the basic concept of a buck converter:
![How a buck converter works](https://www.build-electronic-circuits.com/wp-content/uploads/2021/05/Buck-converter.gif)
When the switch is pushed, current flows into the inductor, capacitor and load from the battery. Both the inductor and the capacitor gets charged. When the switch is released, the stored energy in the inductor and capacitor provides the current for the load.
In real life, the switch is replaced by a transistor. And there is a sensing mechanism that checks the output voltage and turns the transistor on and off faster (to get more voltage) or slower (to get less voltage).
Questions?
Let me know what questions you have about the voltage regulator in the comment section below. I’ll do my best to answer them and update the article accordingly!