Power Supply Design

Designing a power supply well requires understanding what the load actually needs (voltage accuracy, transient response, noise limits), what the input looks like (AC mains, battery, regulated bus), and how the two connect efficiently and safely. This covers the design considerations for linear and switching topologies, and the protection circuits that keep everything from failing catastrophically.

Linear Supply Design

For a linear supply the main design decisions are transformer sizing, rectifier selection, filter capacitor size, and regulator headroom.

Transformer Sizing

Secondary AC voltage required:
V_secondary = (V_out + V_dropout + V_ripple) / 0.9

For 5V output using 7805 (2V dropout), 1V ripple budget:
V_secondary = (5 + 2 + 1) / 0.9 = 8.9V → use a 9V or 10V transformer

The 0.9 factor accounts for the turns ratio — the AC RMS to DC ratio after full-wave rectification (V_DC ≈ V_RMS × 0.9 for a loaded full-wave rectifier).

Filter Capacitor

C = I_load / (2 × f × V_ripple)

For 1A load, 120Hz (full-wave), 1V ripple:
C = 1 / (2 × 120 × 1) = 4167µF → use 4700µF

For 2A load, same conditions: ~8200µF

Choose a capacitor with a voltage rating at least 1.5× the peak rectified voltage. For a 12V transformer: peak ≈ 12V × 1.414 ≈ 17V, so use 25V or 35V rated caps. Use low-ESR capacitors — high ESR increases ripple and causes the cap to heat up, shortening its life.

Switching Supply Design

Buck Converter Design

Key parameters:
- V_in, V_out, I_load (max), f_sw (switching frequency)
- Duty cycle D = V_out / V_in
- Inductor: L = (V_in - V_out) × D / (f_sw × ΔI_L)
  (ΔI_L = inductor current ripple, typically 20-40% of I_load)

Example: 12V in, 5V out, 2A load, 300kHz switching:
D = 5/12 = 0.417
L = (12-5) × 0.417 / (300,000 × 0.8A) = 12.2µH → use 15µH rated for 3A

Output capacitor: C = ΔI_L / (8 × f_sw × V_ripple)
For 0.8A ripple, 1mV ripple: C = 0.8 / (8 × 300,000 × 0.001) = 333µF
Use 330µF low-ESR electrolytic

Switching Frequency Trade-offs

Higher switching frequency means smaller L and C values (smaller board area), but higher switching losses in the FET and increased EMI. Lower frequency means bigger magnetics but less switching loss and less EMI. Most general-purpose buck converters run 200kHz–1MHz. High-efficiency designs (>95%) often run at lower frequencies with synchronous rectification (replacing the catch diode with a FET).

EMI and Filtering

The fast switching edges of an SMPS create radiated and conducted EMI. Input filtering is essential — a common-mode choke and X/Y capacitors at the input suppress high-frequency noise from getting back into the mains. Output filtering with a small LC filter (additional to the main output cap) further reduces switching ripple. The layout of the switching loop (FET → inductor → output cap → FET) must be as compact as possible to minimise the radiating loop area.

Protection Circuits

Overvoltage Protection

A crowbar circuit: a Zener in series with an SCR (silicon-controlled rectifier) connected across the output. If output voltage exceeds the Zener threshold, the SCR fires and short-circuits the output, blowing a fuse upstream. Protects the load at the cost of the supply. Used in linear bench supplies and anywhere an overvoltage condition could damage expensive downstream equipment.

Overcurrent / Short Circuit Protection

Most regulator ICs have built-in current limiting. For discrete designs, a current sense resistor (low-value, high-precision) in series with the output, with a comparator monitoring the voltage drop, can fold back the output voltage when current exceeds the limit:

V_sense = I_load × R_sense
When V_sense > V_threshold → reduce output voltage (fold back) or shut down

Reverse Polarity Protection

A P-channel MOSFET is a more efficient alternative to a series diode for reverse polarity protection:

       P-MOSFET
V_in──[S  D]──── V_out
      |  |
      G──┤← gate tied to output side (V_out) via resistor
         |
        GND

In normal operation: Vgs = V_out - V_in < 0 → MOSFET conducts
Reversed polarity: Vgs > 0 → MOSFET off → no current flows

The body diode still conducts briefly in reverse — add a Schottky in series if that's a concern. The voltage drop across the MOSFET in forward operation is I × RDS_on, typically much less than a diode's 0.4–0.7V.

Testing a Power Supply Design

Measurements to make:
1. No-load output voltage (verify regulation target)
2. Full-load output voltage (check regulation %)
3. Output ripple at full load (oscilloscope, AC coupled, 20MHz BW limit)
4. Transient response — sudden load change, watch for overshoot/undershoot
5. Efficiency = (V_out × I_out) / (V_in × I_in) × 100%
6. Output noise — critical for analog circuits (use spectrum analyser)
7. Thermal — run at full load for 30 min, check all components with IR thermometer