A power supply converts AC mains (or battery voltage) into the stable DC that electronics needs. Every circuit has one — whether it's the 5V regulator on an Arduino, a bench supply in a lab, or a multi-rail ATX supply in a PC. Understanding how they work explains why some supplies are heavy and some are tiny, why switching supplies are noisy, and why audio gear often sounds better on a linear supply.
Linear vs. Switching — Overview
Property
Linear PSU
Switching PSU (SMPS)
Efficiency
30–60% (worse with large step-down)
75–95%
Size & weight
Large and heavy (mains transformer)
Small and light
Output noise
Very low (clean DC)
Higher — switching ripple and EMI
Regulation speed
Fast transient response
Slower (loop bandwidth limited by filter)
Heat
Excess voltage burned off as heat
Minimal — most energy transferred
Complexity
Simple
Complex — controller IC, inductor, feedback loop
Cost
Low for low currents, high for high currents
Higher fixed cost, scales well to high power
Best use
Audio, RF, low-noise sensing, lab bench, low current
Battery charging, motor drives, computer PSUs, anything needing high efficiency
Linear Power Supply — Block by Block
Transformer: steps 120/240VAC down to 12-18VAC
Bridge rectifier: converts AC to pulsating DC
Filter capacitor: smooths the ripple to rough DC
Linear regulator: removes remaining ripple, holds output constant
Sizing the Filter Capacitor
V_ripple ≈ I_load / (f_ripple × C)
f_ripple = 2 × mains frequency (120Hz in NA, 100Hz in EU/UK — full-wave)
I_load = maximum current draw
C = filter capacitance
Example: I_load = 1A, f = 120Hz, target ripple = 1V
C = I_load / (f × V_ripple) = 1 / (120 × 1) = 8,333 µF → use 10,000 µF
For 500mA draw and 1V ripple: C ≈ 4,167 µF → use 4,700 µF
Motors, fans, relay coils, op-amp dual rail with 7912
7815
+15V
1A
~2V
Op-amp supply, Class AB audio output stages
7905
−5V
1A
~2V
Negative rail for dual-supply op-amp circuits
7912
−12V
1A
~2V
Most common negative rail
LM317
1.25V – 37V (adj.)
1.5A
~3V
Adjustable with two resistors: Vout = 1.25 × (1 + R2/R1)
A standard 7805 circuit. The 100nF bypass capacitors are mandatory for stability — placed as close to the IC pins as possible.
Power dissipation: P = (V_in − 5V) × I_load
At 12V in, 500mA: P = 7 × 0.5 = 3.5W → needs heatsink
Switching Power Supplies — Topologies
Topology
V_out vs V_in
Isolation
Efficiency
Typical use
Buck (step-down)
V_out < V_in
No
85–95%
Converting 12V to 5V, 3.3V, 1.8V on PCBs
Boost (step-up)
V_out > V_in
No
80–92%
Battery to USB 5V, white LED drivers
Buck-boost
V_out can be < or > V_in
No
75–90%
Battery-powered devices where V_bat ranges above and below V_out
Flyback
Either
Yes
75–85%
Wall warts, offline power supplies, multi-output supplies
Forward
V_out < V_in
Yes
80–90%
Medium-power regulated supplies, telecom
LLC resonant
Varies
Yes
93–97%
High-efficiency PC PSUs, EV chargers, server PSUs
Buck Converter Operation
The core topology of a buck converter. The switch (usually a MOSFET) chops the input voltage, and the inductor-capacitor network smooths those pulses back into steady DC.
Duty cycle D = V_out / V_in (ideally)
Switching frequency: 50kHz – 2MHz typical
Inductor value (approximate):
L = (V_in − V_out) × D / (f_sw × ΔI_L)
ΔI_L = ripple current, typically 20-40% of I_out
Output voltage ripple:
ΔV_out = ΔI_L / (8 × f_sw × C_out)
Bench Power Supply Selection
Use case
Recommendation
General electronics lab, hobbyist
30V / 3A or 5A adjustable, with current limiting — RD6018, Rigol DP832
Audio / RF sensitive work
Linear supply — Agilent E3630A or equivalent; avoid switching supplies in the lab
Battery simulation
Bipolar supply or programmable supply with source/sink capability
MCU / embedded work
3.3V and 5V fixed outputs + one adjustable; USB-PD supply also useful
References
Erickson & Maksimovic — Fundamentals of Power Electronics, 3rd ed.
Horowitz & Hill — The Art of Electronics, 3rd ed. Chapter 9