Table of Contents
Voltage Regulators
A voltage regulator is a component that takes in electricity at one voltage and outputs a stable, consistent voltage. While most will step down a higher voltage to the desired level, some can boost a lower voltage and some can even do both. Think of it like a water pressure regulator: high, varying pressure comes in, but steady, controlled pressure comes out.
Voltage regulators are built into most power supplies, such as power-banks, USB-plugs and even some batteries. The Arduino Uno has a couple of built-in regulators that can take up to 12V and reduce it to 5V and 3.3V. Without regulation, components can be damaged or destroyed by too much voltage, circuits behave unpredictably as battery voltage drops, and you can't safely use common power sources like 9V batteries or 12V wall adapters with 5V components.
Sometimes, you'll want to build an independent voltage regulator into your project when you need multiple different voltages (like 12V for motors and 5V for sensors), when you can't find a power supply that matches your exact needs, or when you're using a battery that provides a higher voltage than your components need.
The most common type is a linear regulator, such as the LM7805. These are cheap and reliable, requiring only a couple of capacitors to function. The LM7805, for example, takes anywhere from 7-35V input and outputs a stable 5V. However, linear regulators have an important limitation: they convert the difference between input and output voltage directly into waste heat. This means they can get very hot. The bigger the gap between input and output voltage, and the more current you're drawing, the more heat they generate. If you're working with higher power, you may need to attach a heatsink to help dissipate this heat.
An alternative is a switching regulator. These work with an integrated transistor, an inductor, and a diode to transfer energy from input to output. The transistor is switched on and off at just the right frequency to maintain a fixed voltage. Switching regulators like the TSR 1-2450, are easy to use, very efficient and require no additional parts. However, they are more expensive than traditional linear regulators.
Voltage regulators have limits, so check the datasheet for maximum current and required capacitors. Small regulators typically only handle about 1 A, so they’re fine for an Arduino but not for big motors or high-current loads. Follow the datasheet’s capacitor recommendations (often one on the input and one on the output) so the regulator stays stable and provides stable power.
Exercise
Control an incandescent lightbulb using a transistor.
Can you also use PWM to dim it?



