Power Supplies

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

PropertyLinear PSUSwitching PSU (SMPS)
Efficiency30–60% (worse with large step-down)75–95%
Size & weightLarge and heavy (mains transformer)Small and light
Output noiseVery low (clean DC)Higher — switching ripple and EMI
Regulation speedFast transient responseSlower (loop bandwidth limited by filter)
HeatExcess voltage burned off as heatMinimal — most energy transferred
ComplexitySimpleComplex — controller IC, inductor, feedback loop
CostLow for low currents, high for high currentsHigher fixed cost, scales well to high power
Best useAudio, RF, low-noise sensing, lab bench, low currentBattery charging, motor drives, computer PSUs, anything needing high efficiency

Linear Power Supply — Block by Block

  1. Transformer: steps 120/240VAC down to 12-18VAC
  2. Bridge rectifier: converts AC to pulsating DC
  3. Filter capacitor: smooths the ripple to rough DC
  4. 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

Choosing a Transformer

V_transformer_RMS needed:
  V_DC = V_out + V_dropout + V_ripple_peak
  V_peak = V_DC (approximately — cap charges to peak)
  V_transformer = V_peak / 1.414

Example for 12V regulated output, 78xx regulator (2V dropout), 2V ripple margin:
  V_DC_min = 12 + 2 + 2 = 16V
  V_peak needed = 16V
  V_transformer = 16 / 1.414 ≈ 11.3V RMS → use 12V RMS transformer

VA rating = V_transformer × I_load × 1.5 (derating factor)

The 78xx Regulator Family

PartOutput voltageMax currentDropoutNotes
7803+3.3V (approx)1A~2VLess common — use LDO for 3.3V
7805+5V1A~2VMost common. Powers 5V logic, microcontrollers.
7809+9V1A~2VLess common; 12V with LM317 is more flexible
7812+12V1A~2VMotors, fans, relay coils, op-amp dual rail with 7912
7815+15V1A~2VOp-amp supply, Class AB audio output stages
7905−5V1A~2VNegative rail for dual-supply op-amp circuits
7912−12V1A~2VMost common negative rail
LM3171.25V – 37V (adj.)1.5A~3VAdjustable with two resistors: Vout = 1.25 × (1 + R2/R1)
7805 Linear Regulator Circuit A standard 7805 voltage regulator circuit with input and output bypass capacitors to ground. Vin (7–35V) 7805 IN OUT GND 100nF 100nF 5V out GND
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

TopologyV_out vs V_inIsolationEfficiencyTypical use
Buck (step-down)V_out < V_inNo85–95%Converting 12V to 5V, 3.3V, 1.8V on PCBs
Boost (step-up)V_out > V_inNo80–92%Battery to USB 5V, white LED drivers
Buck-boostV_out can be < or > V_inNo75–90%Battery-powered devices where V_bat ranges above and below V_out
FlybackEitherYes75–85%Wall warts, offline power supplies, multi-output supplies
ForwardV_out < V_inYes80–90%Medium-power regulated supplies, telecom
LLC resonantVariesYes93–97%High-efficiency PC PSUs, EV chargers, server PSUs

Buck Converter Operation

Buck Converter Topology A schematic showing the basic components of a buck converter: an input voltage, a switch, a diode to ground, an inductor in series, and a smoothing capacitor. Vin Switch Diode L (Inductor) C (Cap) Vout GND
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 caseRecommendation
General electronics lab, hobbyist30V / 3A or 5A adjustable, with current limiting — RD6018, Rigol DP832
Audio / RF sensitive workLinear supply — Agilent E3630A or equivalent; avoid switching supplies in the lab
Battery simulationBipolar supply or programmable supply with source/sink capability
MCU / embedded work3.3V and 5V fixed outputs + one adjustable; USB-PD supply also useful

References