<!--order=13-->


<h1>Diodes</h1>
<p>A diode is a one-way valve for current. Apply voltage in the forward direction and it conducts; reverse it and it blocks. That simple behaviour is useful in a surprising range of applications — rectification, voltage clamping, reverse-polarity protection, regulation, and light emission. Every power supply has at least one. Most circuits have several.</p>

<h2>How They Work</h2>
<p>A diode is a P-N junction — a piece of semiconductor doped to be P-type (holes, positive charge carriers) on one side and N-type (electrons) on the other. When forward-biased (positive at anode, negative at cathode), the depletion region narrows and current flows. Reverse-biased, the depletion region widens and current is blocked — until the reverse breakdown voltage is reached, at which point it conducts again (destructively, for most diodes).</p>

<svg viewBox="0 0 320 90" width="320" height="90" style="display:block;margin:1rem 0;" aria-label="Diode symbol">
  <rect width="320" height="90" fill="none"/>
  <!-- wire left -->
  <line x1="10" y1="45" x2="110" y2="45" stroke="#9aacbe" stroke-width="2"/>
  <!-- triangle (anode) -->
  <polygon points="110,20 110,70 160,45" fill="none" stroke="#7db85a" stroke-width="2"/>
  <!-- bar (cathode) -->
  <line x1="160" y1="20" x2="160" y2="70" stroke="#7db85a" stroke-width="2.5"/>
  <!-- wire right -->
  <line x1="160" y1="45" x2="250" y2="45" stroke="#9aacbe" stroke-width="2"/>
  <!-- labels -->
  <text x="80" y="15" text-anchor="middle" font-family="'Roboto Mono',monospace" font-size="11" fill="#9aacbe">Anode (+)</text>
  <text x="200" y="15" text-anchor="middle" font-family="'Roboto Mono',monospace" font-size="11" fill="#9aacbe">Cathode (−)</text>
  <text x="135" y="82" text-anchor="middle" font-family="'Roboto Mono',monospace" font-size="10" fill="#6b7a8d">current flows →</text>
  <!-- arrows showing direction -->
  <text x="270" y="49" font-family="'Roboto Mono',monospace" font-size="18" fill="#7db85a">→</text>
</svg>

<p>The forward voltage drop (Vf) is the voltage across the diode when it's conducting — it's not optional and must be accounted for in calculations. For silicon diodes it's about 0.6–0.7 V. For other types it varies considerably.</p>

<h2>Types and Characteristics</h2>

<table>
  <thead><tr><th>Type</th><th>Vf (forward)</th><th>Max reverse voltage</th><th>Speed</th><th>Primary use</th></tr></thead>
  <tbody>
    <tr><td>Silicon rectifier (1N4001–7)</td><td>0.6–0.7 V</td><td>50–1000 V (varies by suffix)</td><td>Slow</td><td>AC-to-DC rectification in power supplies</td></tr>
    <tr><td>Signal diode (1N4148)</td><td>0.6–0.7 V</td><td>75 V</td><td>Fast (4ns)</td><td>Signal steering, demodulation, clipping, ESD</td></tr>
    <tr><td>Schottky</td><td>0.15–0.45 V</td><td>20–200 V</td><td>Very fast</td><td>Switching supplies, high-frequency rectification, OR-ing</td></tr>
    <tr><td>Zener</td><td>0.6–0.7 V (forward)</td><td>Operates in reverse at Vz</td><td>Moderate</td><td>Voltage reference, clamping, simple regulation</td></tr>
    <tr><td>LED</td><td>1.8–3.5 V (colour-dependent)</td><td>5–7 V</td><td>Fast</td><td>Indicator lights, backlighting, optocouplers</td></tr>
    <tr><td>Transient voltage suppressor (TVS)</td><td>—</td><td>Clamps at breakdown voltage</td><td>Very fast (ps)</td><td>ESD protection, surge clamping</td></tr>
    <tr><td>Photodiode</td><td>—</td><td>Reverse-biased in operation</td><td>Fast</td><td>Light sensing, fibre-optic receivers</td></tr>
  </tbody>
</table>

<h2>LED Forward Voltage by Colour</h2>
<p>Always use a current-limiting resistor with an LED — they have no internal resistance and will self-destruct without one:</p>

<table>
  <thead><tr><th>Colour</th><th>Typical Vf</th><th>Wavelength</th></tr></thead>
  <tbody>
    <tr><td>Infrared</td><td>1.2–1.8 V</td><td>850–950 nm</td></tr>
    <tr><td>Red</td><td>1.8–2.2 V</td><td>620–750 nm</td></tr>
    <tr><td>Yellow</td><td>2.0–2.2 V</td><td>570–590 nm</td></tr>
    <tr><td>Green</td><td>2.0–3.5 V</td><td>495–570 nm</td></tr>
    <tr><td>Blue</td><td>2.9–3.5 V</td><td>450–495 nm</td></tr>
    <tr><td>White</td><td>3.0–3.5 V</td><td>Broadband (phosphor-converted blue)</td></tr>
    <tr><td>UV</td><td>3.0–4.0 V</td><td>315–400 nm</td></tr>
  </tbody>
</table>

<pre>
LED resistor formula:
R = (V_supply - V_LED) / I_desired

Example: 5V supply, red LED (Vf = 2V), target 20mA
R = (5V - 2V) / 0.02A = 150Ω → use 150Ω or 180Ω
</pre>

<h2>Rectification</h2>
<p>Converting AC to DC — the most common diode application in power supplies.</p>

<h3>Half-Wave Rectifier</h3>
<pre>
AC input ──[D]──┬── DC output (+)
                |
               [C]  ← filter capacitor
                |
GND ────────────┴── DC output (−)

V_DC ≈ V_peak − 0.7V   (one diode drop)
V_peak = V_RMS × √2

Example: 12V RMS transformer
V_peak = 12 × 1.414 = 16.97V
V_DC ≈ 16.97 − 0.7 = 16.3V (before load, with cap)
</pre>

<h3>Full-Wave Bridge Rectifier</h3>
<pre>
        D1         D3
AC+──┤►├──┬──┤►├──AC−
          |
         [Load / Cap]
          |
AC−──┤►├──┴──┤►├──AC+
        D2         D4

V_DC ≈ V_peak − 1.4V   (two diode drops)

Using 12V RMS:
V_DC ≈ 16.97 − 1.4 = 15.6V (with capacitor filtering)
</pre>
<p>The bridge rectifier uses all four half-cycles — more efficient than half-wave and produces less ripple. The standard approach for almost all linear power supplies.</p>

<h2>Common Part Numbers — Rectifiers</h2>

<table>
  <thead><tr><th>Part</th><th>Vrrm (max reverse)</th><th>If (avg forward current)</th><th>Notes</th></tr></thead>
  <tbody>
    <tr><td>1N4001</td><td>50 V</td><td>1 A</td><td>Low voltage mains rectification</td></tr>
    <tr><td>1N4004</td><td>400 V</td><td>1 A</td><td>Most common for mains (120/240V) supplies</td></tr>
    <tr><td>1N4007</td><td>1000 V</td><td>1 A</td><td>High voltage; drop-in replacement when unsure</td></tr>
    <tr><td>1N5819</td><td>40 V</td><td>1 A</td><td>Schottky — low Vf (0.3V), fast. Common in DC-DC converters</td></tr>
    <tr><td>MBR1045</td><td>45 V</td><td>10 A</td><td>Power Schottky for high-current supplies</td></tr>
  </tbody>
</table>

<h2>Zener Diodes</h2>
<p>Zener diodes are designed to conduct in reverse breakdown at a specific voltage (Vz). That breakdown voltage is stable and predictable, making them useful as voltage references:</p>
<pre>
Simple Zener shunt regulator:

         R_series
Vin ────[  470Ω ]────┬──── Vout = Vz (e.g., 5.1V)
                     │
                  [Zener]  ← reverse biased
                     │
                    GND

Resistor must limit current: I_R = (Vin − Vz) / R_series
Power in Zener: P_Z = Vz × I_Z
</pre>

<table>
  <thead><tr><th>Common Zener voltages</th><th>Typical use</th></tr></thead>
  <tbody>
    <tr><td>2.4 V, 2.7 V</td><td>Low-voltage references, ADC protection</td></tr>
    <tr><td>3.3 V</td><td>3.3V rail reference, logic level clamping</td></tr>
    <tr><td>5.1 V</td><td>5V reference, USB bus clamping</td></tr>
    <tr><td>12 V</td><td>12V supply regulation, clamp circuits</td></tr>
    <tr><td>15 V, 18 V</td><td>Op-amp supply clamping</td></tr>
  </tbody>
</table>

<h2>Protection Circuits</h2>

<h3>Flyback Diode (Freewheeling Diode)</h3>
<p>When a transistor switches off an inductive load (relay coil, motor, solenoid), the collapsing magnetic field generates a voltage spike — potentially many times the supply voltage. A diode across the load clamps the spike:</p>
<pre>
VCC ──────────────────┬── load (+)
                   [D] ← cathode to VCC, anode to transistor side
                      │
                   [load]  (relay coil, motor, etc.)
                      │
                  Transistor Collector
                  Transistor Emitter
                      │
                     GND
</pre>
<p>Use a fast diode (1N4148 for small loads, 1N4007 or Schottky for larger). Without it, the voltage spike can destroy the transistor or microcontroller driving it.</p>

<h3>Reverse Polarity Protection</h3>
<pre>
Series diode: Vin ──[D]── Protected circuit   (simple, 0.6V drop always)
P-MOSFET gate:            (better — near zero loss when forward, faster)
</pre>

<h2>References</h2>
<ul>
  <li>Horowitz &amp; Hill — <em>The Art of Electronics</em>, 3rd ed. Chapter 2</li>
  <li>Scherz &amp; Monk — <em>Practical Electronics for Inventors</em>, 4th ed.</li>
  <li><a href="https://www.electronics-tutorials.ws/diode/diode_1.html" target="_blank" rel="noopener">Electronics-Tutorials — Diodes ↗</a></li>
  <li><a href="https://www.vishay.com/diodes/" target="_blank" rel="noopener">Vishay Diode Portfolio (datasheets) ↗</a></li>
</ul>
