Voltage Regulators
How a circuit turns a messy, sagging battery voltage into the clean, fixed voltage that sensitive chips actually need.
Most ICs — microcontrollers, sensors, logic chips — expect a supply voltage that stays within a narrow, specific range, commonly 3.3V or 5V. But real power sources are not that well-behaved: a battery's voltage droops as it discharges, and even a wall adapter's output can wobble under load. A voltage regulator sits between an unpredictable input supply and your circuit, and does one job: hold the output at a fixed voltage no matter what the input does (within limits) and no matter how much current your circuit draws (also within limits).
The simplest type is a linear regulator (a classic example is the 7805, which outputs a fixed 5V). It works essentially like a variable resistor that continuously adjusts itself to burn off exactly the extra voltage as heat. That makes it simple, cheap, and quiet electrically — but wasteful: if you feed a 7805 12V and it outputs 5V at 1A, the 7V difference is dissipated as heat, not used.
The more efficient alternative is a switching regulator, which doesn't burn off the extra voltage — it rapidly switches an inductor on and off to convert energy at much higher efficiency, often 85–95%. The tradeoff is more complexity, more external parts, and some high-frequency electrical noise. You'll look at how switching regulators actually work in the next lesson.
A linear regulator is the right choice when the voltage drop is small and efficiency doesn't matter much; a switching regulator earns its complexity when you're running from batteries and every bit of efficiency extends runtime.