Table of Contents
KEY TAKEAWAYS
- Linear regulators (LDO) are simple but waste excess voltage as heat; switching regulators are more efficient
- Choose a regulator based on input voltage range, output voltage, current capacity, and efficiency requirements
- Decoupling capacitors near the regulator and IC power pins filter noise and prevent instability
- Battery-powered designs should use low-dropout (LDO) or buck converters to maximize battery life
Why Power Supply Matters
Every embedded system needs power. A microcontroller, its sensors, displays, and communication modules all require a stable voltage to operate correctly. If the power supply is noisy, unstable, or at the wrong voltage, your system will behave unpredictably or even get damaged.
Understanding power supply design is essential because:
- Different components need different voltages (3.3V, 5V, 12V)
- Batteries provide varying voltage as they discharge
- Noise on the power line can cause false sensor readings
- Exceeding a component’s voltage rating destroys it
Common Voltage Levels in Embedded Systems
| Voltage | Common Uses |
|---|---|
| 1.8V | Modern low-power microcontrollers, some memory chips |
| 3.3V | Most modern MCUs (ESP32, STM32, nRF52), sensors, SD cards |
| 5V | Arduino, USB devices, older sensors, relay modules |
| 9V / 12V | Motors, solenoids, LED strips, input power |
A common scenario: You power your board from a 9V battery or 12V adapter, then regulate it down to 5V and 3.3V for different components.
Power Supply Sources
USB Power
USB provides 5V and is the most common power source during development. Standard USB 2.0 supplies up to 500mA. USB 3.0 can supply up to 900mA. This is sufficient for most microcontroller boards with a few sensors.
Batteries
| Battery Type | Nominal Voltage | Notes |
|---|---|---|
| AA / AAA (Alkaline) | 1.5V per cell | 2x AA = 3V, 3x AA = 4.5V |
| Li-Ion / LiPo | 3.7V (4.2V full, 3.0V empty) | Rechargeable, high energy density |
| CR2032 (Coin cell) | 3V | Low current, long shelf life |
| 9V Battery | 9V | Convenient but limited capacity |
Wall Adapters
AC-to-DC adapters convert mains power (110/220V AC) to a DC voltage (5V, 9V, 12V). Always check the voltage and current rating.
Voltage Regulators
A voltage regulator converts one DC voltage to another, stable DC voltage. There are two main types:
Linear Regulators (LDO)
A linear regulator (Low Dropout Regulator or LDO) reduces voltage by dissipating the excess as heat. It is simple and produces very clean, low-noise output.
V_in (9V) ──── [LDO Regulator] ──── V_out (3.3V)
|
GND
(heat!)
Excess energy = (V_in - V_out) × I_out
= (9V - 3.3V) × 0.1A
= 0.57W dissipated as heatPopular linear regulators:
| Part | Output | Max Current | Dropout |
|---|---|---|---|
| LM7805 | 5V | 1A | ~2V |
| LM7833 | 3.3V | 1A | ~2V |
| AMS1117-3.3 | 3.3V | 1A | ~1V (LDO) |
| MCP1700-3.3 | 3.3V | 250mA | ~0.18V (very low dropout) |
Dropout voltage is the minimum difference needed between input and output. An LDO with 0.2V dropout can regulate 3.5V input to 3.3V output. A standard regulator like the LM7805 needs at least 7V input to produce stable 5V.
Advantages: Simple, cheap, very low noise, no switching artifacts, minimal external components.
Disadvantages: Inefficient when input-output voltage difference is large (wasted as heat), can overheat at high currents.
Switching Regulators (Buck, Boost, Buck-Boost)
Switching regulators use an inductor and a rapidly switching transistor to convert voltage much more efficiently. They waste very little energy as heat.
Types of switching regulators:
| Type | Function | Example Use |
|---|---|---|
| Buck (Step-Down) | Converts higher voltage to lower | 12V to 5V or 3.3V |
| Boost (Step-Up) | Converts lower voltage to higher | 3.7V LiPo to 5V |
| Buck-Boost | Can step up or step down | Battery input that varies above and below target |
Popular switching regulators:
- LM2596 – Buck converter, 3A, easy to use with adjustable output
- MP1584 – Small buck converter, up to 3A
- MT3608 – Boost converter, up to 2A
- TPS63001 – Buck-boost, ideal for single-cell LiPo projects
Advantages: Very efficient (85-95%), can step up voltage, handles large voltage differences well, minimal heat.
Disadvantages: More complex, generates electrical noise (switching artifacts), requires inductor and capacitors, more expensive.
Linear vs Switching: When to Use Which
| Scenario | Best Choice | Why |
|---|---|---|
| Powering analog sensors | Linear (LDO) | Low noise, clean power |
| 12V to 3.3V at 500mA | Switching (Buck) | Linear would waste 4.35W as heat |
| 5V to 3.3V at 100mA | Linear (LDO) | Small voltage drop, only 0.17W waste |
| 3.7V battery to 5V | Switching (Boost) | Need to step UP voltage |
| Audio/RF circuits | Linear (LDO) | Switching noise interferes with signals |
| Battery-powered IoT device | Switching | Efficiency extends battery life |
In many real projects, you use both: a switching regulator to efficiently step down the main voltage, followed by a linear regulator to provide clean power to sensitive components.
Decoupling Capacitors
Every IC in your circuit should have a decoupling capacitor (also called a bypass capacitor) placed as close as possible to its power pins. Typically a 100nF ceramic capacitor.
VCC ─────┬──── IC VCC pin
|
[100nF]
|
GND ─────┴──── IC GND pinDecoupling capacitors:
- Filter out high-frequency noise on the power line
- Provide instantaneous current when the IC switches states
- Prevent one chip’s noise from affecting other chips
Additionally, place a larger bulk capacitor (10uF to 100uF electrolytic) near the power input of your board to handle slower voltage fluctuations.
Practical Tips
- Always check datasheets for the voltage and current requirements of every component in your circuit.
- Add margin: If your circuit draws 200mA, use a regulator rated for at least 300-500mA.
- Heat management: If using a linear regulator with significant voltage drop, calculate the power dissipation and add a heatsink if needed.
- Use capacitors: Follow the regulator datasheet for input and output capacitor values. Missing capacitors can cause oscillation or instability.
- Separate analog and digital power: If your design has both analog sensors and digital logic, consider separate regulators or at least ferrite beads to isolate noise.
- Reverse polarity protection: Add a diode or MOSFET circuit to protect against accidental reverse power connection.
Summary
A stable power supply is the foundation of any reliable embedded system. Linear regulators are simple and quiet but waste energy as heat. Switching regulators are efficient but introduce noise. Understanding when to use each type, and how to properly filter and decouple your power rails, will save you from mysterious bugs and unreliable behavior in your projects.

Vivek Bhageria — Lead Firmware R&D Engineer, 12+ years. Ex-Bosch (automotive powertrain), MusicTribe (real-time audio), medical devices. M.Tech BITS Pilani. I write at NerdyElectronics — practical, register-level embedded systems for engineers who want to understand what’s actually happening under the hood.





