<!--date=20250224 -->


<h1>Power Supply Design</h1>
<p>Designing a power supply well requires understanding what the load needs (voltage accuracy, transient response, noise limits, isolation), what the input looks like (AC mains, battery, regulated bus), and how to connect them efficiently and safely. The protection circuits matter as much as the regulation itself — an unprotected supply can fail catastrophically and take the load with it.</p>

<h2>Design Checklist</h2>

<table>
  <thead><tr><th>Requirement</th><th>How to specify it</th><th>Affects</th></tr></thead>
  <tbody>
    <tr><td>Output voltage</td><td>Nominal ± tolerance (e.g., 5V ±2%)</td><td>Regulator topology, feedback accuracy</td></tr>
    <tr><td>Output current</td><td>Maximum continuous + peak surge</td><td>Transistor ratings, transformer/inductor sizing</td></tr>
    <tr><td>Input voltage range</td><td>Min and max (battery sag + overcharge, mains variation)</td><td>Dropout headroom, duty cycle limits</td></tr>
    <tr><td>Efficiency</td><td>Required % at typical load</td><td>Linear vs switching; switching frequency</td></tr>
    <tr><td>Output noise</td><td>mVpp ripple at specific frequency, or µV RMS in bandwidth</td><td>Topology choice; may require linear post-regulator after switcher</td></tr>
    <tr><td>Transient response</td><td>Max voltage deviation at max dI/dt step</td><td>Control loop bandwidth, output capacitance</td></tr>
    <tr><td>Isolation</td><td>Required or not; withstand voltage</td><td>Transformer-based topology mandatory if yes</td></tr>
    <tr><td>Operating temperature</td><td>Min/max ambient</td><td>Component derating; heatsink and fan requirements</td></tr>
  </tbody>
</table>

<h2>Linear Supply Design — Transformer to Output</h2>

<h3>Step 1 — Transformer Secondary Voltage</h3>
<pre>
After full-wave rectification and filtering, the DC voltage is approximately:
  V_DC = V_secondary_RMS × 1.414 − 2 × V_diode_forward

Needed V_DC:
  V_DC_min = V_out + V_dropout + V_ripple_peak

Example: 12V output, 78xx (V_dropout=2V), 2V ripple budget
  V_DC_min = 12 + 2 + 2 = 16V
  V_secondary = 16V / 1.414 ≈ 11.3V → use 12V RMS transformer

Transformer VA rating:
  VA = V_secondary × I_secondary × 1.5 (derating factor for rectifier current spikes)
  At 1A output: VA = 12V × 1A × 1.5 = 18VA → use 20 or 25VA transformer
</pre>

<h3>Step 2 — Filter Capacitor</h3>
<pre>
V_ripple = I_load / (f_ripple × C)

  f_ripple = 2 × f_mains (120Hz for NA, 100Hz for EU/UK — full-wave)

Solving for C:
  C = I_load / (f_ripple × V_ripple_allowed)

Example: 1A load, 120Hz, 2V ripple budget:
  C = 1 / (120 × 2) ≈ 4167µF → use 4700µF

For 2A, same budget:
  C = 2 / (120 × 2) ≈ 8333µF → use 10,000µF

Capacitor voltage rating: V_rating ≥ 1.5 × V_peak
  V_peak from 12V RMS transformer: 12 × 1.414 = 17V
  Use 25V or 35V rated electrolytic capacitors
</pre>

<h3>Step 3 — Regulator and Dissipation</h3>
<pre>
Power dissipated = (V_in − V_out) × I_load

At V_in=16V, V_out=12V, I_load=1A:
  P = (16-12) × 1 = 4W → heatsink required

Heatsink requirement:
  T_junction = T_ambient + P × θ_JA
  For 78xx TO-220: θ_JC = 5°C/W
  Required θ_total ≤ (125 − 25 − 20°C safety) / P = 80 / 4 = 20°C/W
  θ_JC = 5°C/W, θ_CS ≈ 0.5°C/W
  Required heatsink: θ_SA ≤ 14.5°C/W
</pre>

<h2>Switching Supply Design — Buck Converter</h2>

<table>
  <thead><tr><th>Parameter</th><th>Formula</th><th>Example (12V→5V, 2A, 300kHz)</th></tr></thead>
  <tbody>
    <tr><td>Duty cycle D</td><td>D = V_out / V_in (ideally)</td><td>D = 5/12 = 0.417</td></tr>
    <tr><td>Inductor ripple current ΔI_L</td><td>Typically 20–40% of I_out</td><td>ΔI_L = 0.6A (30% of 2A)</td></tr>
    <tr><td>Inductance L</td><td>L = (V_in − V_out) × D / (f_sw × ΔI_L)</td><td>L = 7 × 0.417 / (300k × 0.6) = 16.3µH → 22µH</td></tr>
    <tr><td>Inductor peak current</td><td>I_peak = I_out + ΔI_L/2</td><td>I_peak = 2 + 0.3 = 2.3A → rate inductor at ≥3A Isat</td></tr>
    <tr><td>Output capacitor C_out</td><td>C = ΔI_L / (8 × f_sw × V_ripple)</td><td>C = 0.6 / (8 × 300k × 0.05V) = 500µF → 470µF low-ESR</td></tr>
    <tr><td>Input capacitor C_in</td><td>C_in = I_out × D × (1−D) / (f_sw × V_ripple_in)</td><td>C_in = 2 × 0.417 × 0.583 / (300k × 0.1) ≈ 16µF → 22µF</td></tr>
  </tbody>
</table>

<h3>Switching Frequency Trade-offs</h3>

<table>
  <thead><tr><th>Frequency</th><th>Inductor size</th><th>Cap size</th><th>Efficiency</th><th>EMI</th></tr></thead>
  <tbody>
    <tr><td>50–100 kHz</td><td>Large (100µH+)</td><td>Larger</td><td>Higher (lower switching loss)</td><td>Lower (easier to filter)</td></tr>
    <tr><td>200–500 kHz</td><td>Medium (10–47µH)</td><td>Medium</td><td>Good balance</td><td>Moderate</td></tr>
    <tr><td>1–4 MHz</td><td>Small (1–10µH)</td><td>Small ceramic</td><td>Lower (switching losses dominate)</td><td>Higher frequency, easier filter but harder shielding</td></tr>
  </tbody>
</table>

<h2>EMI and Filtering</h2>
<p>Switching supplies are inherently noisy. The fast switching edges contain high-frequency harmonics that radiate and conduct back into the mains:</p>
<pre>
Critical layout for minimum EMI (buck converter):
  Switching loop: FET → inductor → output cap → back to FET source
  Keep this loop SMALL — it's the primary radiating antenna
  Minimise loop area by placing FET, diode, and input cap tightly

Input EMI filter (before the converter):
  Common-mode choke: blocks CM noise returning to mains
  X-capacitors: across the supply line (line-to-line)
  Y-capacitors: from each line to chassis (line-to-earth)
  Minimum: ferrite bead + 100nF ceramic on input
  For conducted emissions compliance: proper LC input filter

Output ripple suppression:
  Main output cap + small LC filter (1µH + 10µF ceramic):
    Attenuates switching ripple by additional 40dB at f_sw
    Critical for noise-sensitive analog loads
</pre>

<h2>Protection Circuits</h2>

<h3>Overvoltage Protection (Crowbar)</h3>
<pre>
Crowbar circuit:
  Zener (Vz = V_out_max) in series with SCR gate
  SCR anode to output, cathode to GND (via fuse in series)

  Normal: V_out < Vz → SCR off
  Fault:  V_out > Vz → Zener conducts → SCR fires → shorts output → fuse blows

  Latching protection: SCR stays on until power cycled (fuse must blow first)

TL431-based precision crowbar:
  Reference voltage set by resistor divider
  ±0.5% trip accuracy vs ±5% for simple Zener
</pre>

<h3>Overcurrent / Short Circuit Protection</h3>
<pre>
Current sense resistor + comparator:
  R_sense in series with output (0.05–0.1Ω)
  V_sense = I_out × R_sense
  At I_max: V_sense = I_max × R_sense > V_threshold → comparator trips → enable pin low

Foldback current limiting (safer for linear regulators):
  Above I_limit: output voltage folds back as current increases
  At short circuit: output voltage ≈ 0, current << I_limit
  Reduces power dissipation during fault (vs constant-current limiting)

Component: LM317 has built-in 1.5A current limiting and thermal shutdown.
  No external sense resistor needed for basic protection.
</pre>

<h3>Reverse Polarity Protection</h3>

<table>
  <thead><tr><th>Method</th><th>Voltage drop (forward)</th><th>Protection</th><th>Cost</th></tr></thead>
  <tbody>
    <tr><td>Series diode (1N5817 Schottky)</td><td>0.3–0.5V (always)</td><td>Good</td><td>Lowest</td></tr>
    <tr><td>P-MOSFET series (gate to output)</td><td>I × RDS_on ≈ 1–50mV</td><td>Good, lower drop</td><td>Low</td></tr>
    <tr><td>Fuse + diode in parallel</td><td>0V (forward), fuse blows reverse</td><td>Good (destructive)</td><td>Low</td></tr>
    <tr><td>Dedicated protection IC (e.g., MAX16054)</td><td>Very low</td><td>Excellent — includes transient protection</td><td>Moderate</td></tr>
  </tbody>
</table>

<pre>
P-MOSFET reverse polarity protection:

V_in ──[S  D]──── V_out
       G   │
       └───┴── tied to output rail via R (10kΩ)

Forward: Vgs = V_out − V_in &lt; 0 → MOSFET on → passes power
Reverse: Vgs = V_out − V_in &gt; 0 → MOSFET off → blocked
</pre>

<h2>Testing Checklist</h2>

<table>
  <thead><tr><th>Test</th><th>What to measure</th><th>Accept if</th></tr></thead>
  <tbody>
    <tr><td>No-load output voltage</td><td>V_out at zero current</td><td>Within ±1% of nominal</td></tr>
    <tr><td>Full-load output voltage</td><td>V_out at I_max</td><td>Load regulation within spec</td></tr>
    <tr><td>Output ripple</td><td>AC voltage on output (scope, AC coupled, 20MHz BW)</td><td>Less than specified (mVpp)</td></tr>
    <tr><td>Transient response</td><td>V_out deviation on sudden load step (0→50%→100%→50%→0)</td><td>Settles within spec time, overshoot within limits</td></tr>
    <tr><td>Efficiency</td><td>(V_out × I_out) / (V_in × I_in) × 100%</td><td>Meets spec at typical load</td></tr>
    <tr><td>Short circuit</td><td>Short output, measure supply current, check no damage</td><td>Current limits to rated maximum; recovers on removal of short</td></tr>
    <tr><td>Thermal</td><td>Infrared thermometer or thermocouple at full load, 30 min</td><td>All components below derating threshold</td></tr>
    <tr><td>Input range</td><td>V_out at V_in_min and V_in_max</td><td>Within regulation spec across full input range</td></tr>
  </tbody>
</table>

<h2>References</h2>
<ul>
  <li>Erickson &amp; Maksimovic — <em>Fundamentals of Power Electronics</em>, 3rd ed.</li>
  <li>Mohan, Undeland &amp; Robbins — <em>Power Electronics</em>, 3rd ed.</li>
  <li>Maniktala — <em>Switching Power Supply Design and Optimization</em></li>
  <li><a href="https://www.ti.com/tool/WEBENCH-POWER-DESIGNER" target="_blank" rel="noopener">TI WEBENCH — complete switching supply calculator and simulation ↗</a></li>
  <li><a href="https://www.analog.com/media/en/technical-documentation/application-notes/AN19fb.pdf" target="_blank" rel="noopener">Linear Technology AN19 — LT1070 Design Manual (PDF) — classic switcher design reference ↗</a></li>
</ul>
