← Circuit results

Circuit

Claude Opus 4.8 · full

Initial view of Circuit

Reviews & generation details

Reviews

No human review yet. Unreviewed does not mean unsuccessful.

Generation context

Imported historical artifact. Its exact original instructions and lineage are not known.

Generation prompt · exact text unavailable

See the current prompt for reference. It may differ from the instructions used to generate this artifact.

Inspect original source 49,776 bytes · SHA-256 1b2b583fca94
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Build a Stereo Audio Amplifier · LM386 Breadboard Guide</title>
<style>
  :root{
    --bg:#0c1015;
    --bg-2:#11171f;
    --panel:#151d27;
    --panel-2:#1b2530;
    --line:#26323f;
    --ink:#e7edf3;
    --ink-dim:#9fb0c0;
    --ink-faint:#6b7c8c;
    --accent:#3ddc97;
    --accent-2:#4aa8ff;
    --amber:#ffb454;
    --red:#ff6b6b;
    --wire-red:#ff5a5a;
    --wire-blk:#8896a4;
    --wire-grn:#3ddc97;
    --wire-blu:#4aa8ff;
    --wire-yel:#ffd166;
    --mono:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;
    --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    --radius:12px;
    --maxw:960px;
  }
  *{box-sizing:border-box}
  html{scroll-behavior:smooth}
  body{
    margin:0;
    font-family:var(--sans);
    background:
      radial-gradient(1200px 600px at 80% -10%, rgba(74,168,255,.08), transparent 60%),
      radial-gradient(1000px 500px at -10% 10%, rgba(61,220,151,.07), transparent 55%),
      var(--bg);
    color:var(--ink);
    line-height:1.65;
    -webkit-font-smoothing:antialiased;
  }
  a{color:var(--accent-2);text-decoration:none}
  a:hover{text-decoration:underline}

  /* ---------- Layout ---------- */
  .wrap{max-width:var(--maxw);margin:0 auto;padding:0 20px}
  main section{padding:54px 0;border-top:1px solid var(--line)}
  main section:first-of-type{border-top:none}

  /* ---------- Header ---------- */
  header.hero{
    position:relative;
    padding:70px 0 60px;
    background:
      linear-gradient(180deg, rgba(74,168,255,.06), transparent 70%),
      repeating-linear-gradient(90deg, rgba(255,255,255,.015) 0 1px, transparent 1px 40px),
      repeating-linear-gradient(0deg, rgba(255,255,255,.015) 0 1px, transparent 1px 40px);
    border-bottom:1px solid var(--line);
    overflow:hidden;
  }
  .kicker{
    display:inline-flex;align-items:center;gap:8px;
    font-family:var(--mono);font-size:12px;letter-spacing:.16em;text-transform:uppercase;
    color:var(--accent);
    border:1px solid rgba(61,220,151,.35);
    background:rgba(61,220,151,.07);
    padding:5px 12px;border-radius:999px;
  }
  .kicker .dot{width:7px;height:7px;border-radius:50%;background:var(--accent);box-shadow:0 0 10px var(--accent)}
  h1{
    font-size:clamp(30px,6vw,52px);
    line-height:1.05;margin:18px 0 10px;letter-spacing:-.02em;
    background:linear-gradient(180deg,#fff,#b7c6d4);
    -webkit-background-clip:text;background-clip:text;color:transparent;
  }
  .lede{font-size:clamp(16px,2.4vw,20px);color:var(--ink-dim);max-width:640px;margin:0}
  .hero-stats{display:flex;flex-wrap:wrap;gap:14px;margin-top:28px}
  .stat{
    background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);
    padding:12px 16px;min-width:120px;
  }
  .stat b{display:block;font-size:20px;color:var(--accent)}
  .stat span{font-size:12px;color:var(--ink-faint);letter-spacing:.04em;text-transform:uppercase}

  /* ---------- Nav / TOC ---------- */
  nav.toc{
    position:sticky;top:0;z-index:20;
    background:rgba(12,16,21,.82);backdrop-filter:blur(10px);
    border-bottom:1px solid var(--line);
  }
  nav.toc ol{
    list-style:none;display:flex;gap:6px;overflow-x:auto;
    margin:0;padding:10px 20px;max-width:var(--maxw);margin:0 auto;
    scrollbar-width:thin;
  }
  nav.toc li{flex:0 0 auto}
  nav.toc a{
    display:block;font-size:13px;color:var(--ink-dim);
    padding:6px 12px;border-radius:8px;white-space:nowrap;
    border:1px solid transparent;
  }
  nav.toc a:hover{color:var(--ink);background:var(--panel);border-color:var(--line);text-decoration:none}

  /* ---------- Headings ---------- */
  h2{
    font-size:clamp(22px,3.6vw,30px);letter-spacing:-.01em;margin:0 0 6px;
    display:flex;align-items:center;gap:14px;
  }
  h2 .num{
    font-family:var(--mono);font-size:15px;color:var(--bg);
    background:var(--accent);width:34px;height:34px;border-radius:9px;
    display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;
    box-shadow:0 4px 16px rgba(61,220,151,.3);
  }
  h3{font-size:19px;margin:30px 0 8px;color:var(--ink)}
  .section-sub{color:var(--ink-faint);margin:0 0 26px;font-size:15px}
  p{margin:0 0 14px}
  p, li{color:var(--ink-dim)}
  strong{color:var(--ink)}

  /* ---------- Cards / grids ---------- */
  .grid{display:grid;gap:16px}
  @media(min-width:640px){.grid.cols-2{grid-template-columns:1fr 1fr}.grid.cols-3{grid-template-columns:repeat(3,1fr)}}
  .card{
    background:linear-gradient(180deg,var(--panel),var(--bg-2));
    border:1px solid var(--line);border-radius:var(--radius);
    padding:20px;
  }
  .card h3{margin-top:0}
  .card .ic{font-size:22px;margin-bottom:6px}

  /* ---------- Callouts ---------- */
  .callout{
    border-radius:var(--radius);padding:16px 18px;margin:18px 0;
    border:1px solid var(--line);background:var(--panel-2);
    display:flex;gap:14px;align-items:flex-start;
  }
  .callout .badge{font-size:20px;line-height:1.4}
  .callout.warn{border-color:rgba(255,107,107,.4);background:rgba(255,107,107,.07)}
  .callout.tip{border-color:rgba(61,220,151,.4);background:rgba(61,220,151,.06)}
  .callout.note{border-color:rgba(74,168,255,.4);background:rgba(74,168,255,.06)}
  .callout p{margin:0}
  .callout b{color:var(--ink)}

  /* ---------- Tables ---------- */
  .table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:var(--radius)}
  table{border-collapse:collapse;width:100%;min-width:520px;font-size:14.5px}
  thead th{
    background:var(--panel-2);color:var(--ink);text-align:left;
    padding:12px 14px;font-weight:600;letter-spacing:.02em;
    border-bottom:1px solid var(--line);position:sticky;top:0;
  }
  tbody td{padding:11px 14px;border-bottom:1px solid var(--line);color:var(--ink-dim);vertical-align:top}
  tbody tr:last-child td{border-bottom:none}
  tbody tr:nth-child(odd){background:rgba(255,255,255,.015)}
  td .part{color:var(--ink);font-weight:600}
  td .pn{font-family:var(--mono);font-size:12.5px;color:var(--accent-2);display:block;margin-top:2px}
  .qty{font-family:var(--mono);color:var(--amber);text-align:center;font-weight:600}

  /* ---------- Code / pin blocks ---------- */
  code{font-family:var(--mono);font-size:.9em;background:rgba(255,255,255,.06);padding:2px 6px;border-radius:5px;color:var(--accent)}
  pre{
    background:#0a0e13;border:1px solid var(--line);border-radius:var(--radius);
    padding:16px 18px;overflow-x:auto;font-family:var(--mono);font-size:13px;
    color:var(--ink-dim);line-height:1.6;margin:16px 0;
  }
  pre .c{color:var(--ink-faint)}
  pre .k{color:var(--accent)}
  pre .n{color:var(--amber)}

  /* ---------- Steps ---------- */
  ol.steps{list-style:none;counter-reset:step;padding:0;margin:0}
  ol.steps > li{
    counter-increment:step;position:relative;
    padding:0 0 22px 58px;margin:0;
  }
  ol.steps > li::before{
    content:counter(step);
    position:absolute;left:0;top:0;
    width:38px;height:38px;border-radius:10px;
    background:var(--panel-2);border:1px solid var(--line);
    color:var(--accent);font-family:var(--mono);font-weight:700;font-size:16px;
    display:flex;align-items:center;justify-content:center;
  }
  ol.steps > li::after{
    content:"";position:absolute;left:18px;top:40px;bottom:6px;width:2px;
    background:linear-gradient(var(--line),transparent);
  }
  ol.steps > li:last-child::after{display:none}
  ol.steps > li h3{margin:6px 0 6px}
  ol.steps p{margin:0 0 8px}

  /* ---------- SVG figures ---------- */
  figure{margin:22px 0;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:18px;overflow:hidden}
  figure svg{width:100%;height:auto;display:block;border-radius:8px}
  figcaption{margin-top:12px;font-size:13px;color:var(--ink-faint);text-align:center}
  .svg-bg{fill:#0a0e13}
  .lbl{font-family:var(--mono);font-size:11px;fill:var(--ink-dim)}
  .lbl-b{font-family:var(--mono);font-size:12px;fill:var(--ink);font-weight:700}
  .pin{font-family:var(--mono);font-size:9.5px;fill:var(--ink-faint)}
  .wire{fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
  .node{fill:var(--ink)}

  /* ---------- Checklist ---------- */
  ul.check{list-style:none;padding:0;margin:16px 0}
  ul.check li{position:relative;padding:6px 0 6px 30px;border-bottom:1px solid var(--line)}
  ul.check li:last-child{border-bottom:none}
  ul.check li::before{
    content:"✓";position:absolute;left:0;top:6px;color:var(--accent);
    font-weight:700;
  }
  ul.tools{list-style:none;padding:0;margin:0;display:grid;gap:8px}
  ul.tools li{padding-left:26px;position:relative}
  ul.tools li::before{content:"›";position:absolute;left:6px;color:var(--accent-2);font-family:var(--mono)}

  /* ---------- Footer ---------- */
  footer{border-top:1px solid var(--line);padding:34px 0 60px;color:var(--ink-faint);font-size:13px}
  footer .wrap{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;align-items:center}

  .pin-legend{display:flex;flex-wrap:wrap;gap:10px 18px;margin:14px 0;font-size:13px}
  .pin-legend span{display:inline-flex;align-items:center;gap:7px;color:var(--ink-dim)}
  .swatch{width:22px;height:6px;border-radius:3px;display:inline-block}
</style>
</head>
<body>
<!-- ================= HERO ================= -->
<header class="hero">
  <div class="wrap">
    <span class="kicker"><span class="dot"></span> Breadboard Electronics · Beginner → Intermediate</span>
    <h1>Build a Stereo Audio Amplifier from Scratch</h1>
    <p class="lede">A complete, solder-free guide to assembling a dual-channel LM386 amplifier on a breadboard — drive two 8Ω speakers from your phone, laptop, or any line-level source.</p>
    <div class="hero-stats">
      <div class="stat"><b>~45 min</b><span>Build time</span></div>
      <div class="stat"><b>2×</b><span>Channels (L/R)</span></div>
      <div class="stat"><b>9V</b><span>Supply</span></div>
      <div class="stat"><b>No solder</b><span>Breadboard only</span></div>
    </div>
  </div>
</header>

<!-- ================= TOC ================= -->
<nav class="toc" aria-label="Contents">
  <ol>
    <li><a href="#intro">1 · Introduction</a></li>
    <li><a href="#safety">2 · Safety &amp; Prerequisites</a></li>
    <li><a href="#parts">3 · Parts List</a></li>
    <li><a href="#diagrams">4 · Circuit Diagrams</a></li>
    <li><a href="#assembly">5 · Assembly</a></li>
    <li><a href="#testing">6 · Testing &amp; Troubleshooting</a></li>
  </ol>
</nav>

<main class="wrap">

<!-- ================= 1. INTRO ================= -->
<section id="intro">
  <h2><span class="num">1</span> Introduction</h2>
  <p class="section-sub">What you're building and how it works.</p>

  <p>The <strong>LM386</strong> is a classic low-voltage audio power amplifier IC that has been the go-to chip for hobbyist audio projects for decades. A single 8-pin chip takes a weak line-level audio signal (the millivolt-scale output from a phone or computer) and boosts it enough to drive a small speaker directly. For <strong>stereo</strong>, we simply build two identical LM386 stages side by side — one for the <strong>left</strong> channel and one for the <strong>right</strong>.</p>

  <p>Each LM386 is internally an <strong>inverting/non-inverting power op-amp</strong> with a fixed input structure. Audio enters the non-inverting input (pin&nbsp;3), the chip amplifies it by a factor set between pins&nbsp;1 and&nbsp;8 (default <strong>×20 gain</strong>, up to <strong>×200</strong> with a capacitor), and the amplified signal exits on pin&nbsp;5 through a coupling capacitor to the speaker.</p>

  <div class="grid cols-3">
    <div class="card"><div class="ic">🎚️</div><h3>Input stage</h3><p>A 10k potentiometer sets volume, feeding the audio into pin&nbsp;3. A coupling cap blocks DC so only the AC audio passes.</p></div>
    <div class="card"><div class="ic">📈</div><h3>Gain stage</h3><p>The LM386's internal amplifier multiplies the signal. Pins&nbsp;1&amp;8 control gain — leave open for ×20.</p></div>
    <div class="card"><div class="ic">🔊</div><h3>Output stage</h3><p>Pin&nbsp;5 drives the speaker through a 220µF coupling cap; a Zobel network keeps it stable.</p></div>
  </div>

  <div class="callout note">
    <span class="badge">💡</span>
    <p><b>The signal path in one line:</b> <code>audio in → volume pot → coupling cap → LM386 pin 3 → amplify → pin 5 → coupling cap → speaker</code>. Do this twice (left + right) and you have stereo.</p>
  </div>

  <h3>What you'll achieve</h3>
  <ul class="check">
    <li>A working two-channel amplifier that plays audible stereo music through two speakers.</li>
    <li>A clear mental model of coupling capacitors, decoupling, gain, and grounding.</li>
    <li>A reusable breadboard layout you can extend (bass boost, higher gain, tone control).</li>
  </ul>
</section>

<!-- ================= 2. SAFETY ================= -->
<section id="safety">
  <h2><span class="num">2</span> Safety &amp; Prerequisites</h2>
  <p class="section-sub">Low voltage, but respect the basics.</p>

  <p>Good news: a 9V battery-powered breadboard project is one of the safest electronics builds you can do — there's no mains voltage and no soldering. Still, a few habits keep both you <em>and</em> your components alive.</p>

  <div class="callout warn">
    <span class="badge">⚠️</span>
    <p><b>Golden rule:</b> always disconnect the power (unplug the battery clip) before adding, moving, or removing any component or wire. Hot-swapping parts on a live rail is the #1 way to kill an IC or cap.</p>
  </div>

  <div class="grid cols-2">
    <div class="card">
      <h3>Workbench safety</h3>
      <ul class="tools">
        <li><b>Mind the polarity</b> — electrolytic caps and the battery have a + and −. Reversing an electrolytic can make it vent or pop.</li>
        <li><b>Protect your ears</b> — a mis-wired amp can output a loud pop or squeal. Start with volume at zero and speakers a little distance away.</li>
        <li><b>ESD awareness</b> — touch a grounded metal object before handling the LM386 to discharge static.</li>
        <li><b>Keep it dry &amp; tidy</b> — no drinks over the bench; trim stray wire ends that can short across rails.</li>
        <li><b>Heat</b> — if a chip or resistor gets hot to the touch, cut power immediately; something is shorted.</li>
      </ul>
    </div>
    <div class="card">
      <h3>Tools needed</h3>
      <ul class="tools">
        <li><b>Solderless breadboard</b> — the platform; no soldering iron required.</li>
        <li><b>Pre-cut jumper wires</b> — or 22 AWG solid-core hookup wire.</li>
        <li><b>Wire cutters / strippers</b> — for trimming custom-length wires.</li>
        <li><b>Multimeter</b> — <em>essential</em> for checking voltage, continuity, and polarity before power-up.</li>
        <li><b>Audio source</b> — phone/laptop with a 3.5&nbsp;mm output.</li>
        <li><b>Small screwdriver</b> — for the potentiometer / terminal blocks.</li>
        <li><em>Optional:</em> soldering iron only if you want to attach leads to the speakers or a 3.5mm jack permanently.</li>
      </ul>
    </div>
  </div>

  <h3>Prerequisite knowledge</h3>
  <p>You don't need to be an engineer, but you should be comfortable with these concepts:</p>
  <div class="grid cols-3">
    <div class="card"><h3>Breadboard rows</h3><p>The inner columns of 5 holes are electrically connected vertically; the long side rails (± buses) run horizontally.</p></div>
    <div class="card"><h3>Reading a schematic</h3><p>Lines are wires, junction dots are connections, and each symbol maps to a physical part. We label every pin.</p></div>
    <div class="card"><h3>Polarity</h3><p>Electrolytic caps: the stripe marks the <b>negative</b> leg. The long lead is <b>positive</b>. Ceramics have no polarity.</p></div>
  </div>
</section>

<!-- ================= 3. PARTS LIST ================= -->
<section id="parts">
  <h2><span class="num">3</span> Complete Parts List</h2>
  <p class="section-sub">Bill of materials for a full stereo (2-channel) build.</p>

  <div class="table-wrap">
    <table>
      <thead>
        <tr><th>Component</th><th class="qty">Qty</th><th>Purpose / Role in the circuit</th></tr>
      </thead>
      <tbody>
        <tr>
          <td><span class="part">LM386 Audio Power Amplifier IC</span><span class="pn">LM386N-1 · DIP-8</span></td>
          <td class="qty">2</td>
          <td>The heart of each channel. One chip per speaker — amplifies the line-level input up to speaker level.</td>
        </tr>
        <tr>
          <td><span class="part">8-pin DIP socket</span><span class="pn">optional</span></td>
          <td class="qty">2</td>
          <td>Protects the IC from bent pins; not strictly needed on a breadboard but nice for reuse.</td>
        </tr>
        <tr>
          <td><span class="part">Electrolytic capacitor 10µF</span><span class="pn">≥16V radial</span></td>
          <td class="qty">2</td>
          <td>Input coupling cap — blocks DC from the audio source, passes only the AC audio into pin&nbsp;3.</td>
        </tr>
        <tr>
          <td><span class="part">Electrolytic capacitor 220µF</span><span class="pn">≥16V radial</span></td>
          <td class="qty">2</td>
          <td>Output coupling cap — passes amplified audio to the speaker while blocking DC bias.</td>
        </tr>
        <tr>
          <td><span class="part">Electrolytic capacitor 100µF</span><span class="pn">≥16V radial</span></td>
          <td class="qty">1</td>
          <td>Power-supply decoupling (bulk) — smooths the rail and stops the amps from oscillating.</td>
        </tr>
        <tr>
          <td><span class="part">Ceramic capacitor 0.1µF</span><span class="pn">104</span></td>
          <td class="qty">2</td>
          <td>High-frequency decoupling across each IC's power pins — kills noise and RF instability.</td>
        </tr>
        <tr>
          <td><span class="part">Ceramic capacitor 0.047µF</span><span class="pn">473</span></td>
          <td class="qty">2</td>
          <td>Part of the Zobel network (with the 10Ω resistor) on pin&nbsp;5 to keep the output stable.</td>
        </tr>
        <tr>
          <td><span class="part">Resistor 10Ω</span><span class="pn">1/4 W</span></td>
          <td class="qty">2</td>
          <td>Zobel resistor — series-connected with the 0.047µF cap from output to ground.</td>
        </tr>
        <tr>
          <td><span class="part">Dual-gang potentiometer 10kΩ</span><span class="pn">B10K linear, or 2× single</span></td>
          <td class="qty">1</td>
          <td>Master volume. A dual-gang pot adjusts both channels together; two single 10k pots also work.</td>
        </tr>
        <tr>
          <td><span class="part">8Ω speaker</span><span class="pn">0.5–3 W</span></td>
          <td class="qty">2</td>
          <td>The output transducers — one left, one right.</td>
        </tr>
        <tr>
          <td><span class="part">3.5&nbsp;mm stereo audio jack</span><span class="pn">breakout / breadboard-friendly</span></td>
          <td class="qty">1</td>
          <td>Connects your phone/laptop. Provides Left, Right, and Ground (sleeve) tap points.</td>
        </tr>
        <tr>
          <td><span class="part">9V battery + clip</span><span class="pn">or 5–12V DC supply</span></td>
          <td class="qty">1</td>
          <td>Powers both channels. A regulated 9V wall adapter gives cleaner, quieter audio than a battery.</td>
        </tr>
        <tr>
          <td><span class="part">Solderless breadboard</span><span class="pn">full-size, 830 tie-points</span></td>
          <td class="qty">1</td>
          <td>The build platform. Full-size gives room for both channels and shared power rails.</td>
        </tr>
        <tr>
          <td><span class="part">Jumper wire kit</span><span class="pn">M-M assorted</span></td>
          <td class="qty">1 kit</td>
          <td>Interconnects. Use color coding: red = +9V, black = GND, others = signal.</td>
        </tr>
      </tbody>
    </table>
  </div>

  <div class="callout tip">
    <span class="badge">🧰</span>
    <p><b>Shopping shortcut:</b> Most of these come in a single "LM386 amplifier kit." If you already have a component assortment, you likely only need to buy the LM386 chips and the dual-gang pot.</p>
  </div>
</section>

<!-- ================= 4. DIAGRAMS ================= -->
<section id="diagrams">
  <h2><span class="num">4</span> Circuit Diagrams</h2>
  <p class="section-sub">Schematic symbols first, then a physical breadboard map.</p>

  <h3>4.1 · Single-channel schematic (LM386)</h3>
  <p>This is <strong>one channel</strong>. Build it twice — once for Left, once for Right — sharing the same +9V and ground. The dual-gang pot has two identical sections, one per channel.</p>

  <figure>
    <svg viewBox="0 0 720 440" role="img" aria-label="LM386 single channel schematic">
      <rect class="svg-bg" x="0" y="0" width="720" height="440"/>

      <!-- Power rail top (+9V) -->
      <line class="wire" x1="40" y1="40" x2="680" y2="40" stroke="var(--wire-red)"/>
      <text class="lbl-b" x="44" y="30" fill="var(--wire-red)">+9V</text>
      <!-- Ground rail bottom -->
      <line class="wire" x1="40" y1="400" x2="680" y2="400" stroke="var(--wire-blk)"/>
      <text class="lbl-b" x="44" y="422" fill="var(--wire-blk)">GND</text>

      <!-- ===== Input: jack + pot ===== -->
      <!-- audio in -->
      <circle cx="55" cy="230" r="5" class="node" fill="var(--wire-grn)"/>
      <text class="lbl" x="30" y="218">IN</text>
      <line class="wire" x1="55" y1="230" x2="95" y2="230" stroke="var(--wire-grn)"/>

      <!-- Potentiometer (volume) as box with wiper -->
      <rect x="95" y="205" width="20" height="50" rx="3" fill="none" stroke="var(--ink-dim)" stroke-width="2"/>
      <line class="wire" x1="105" y1="205" x2="105" y2="150" stroke="var(--wire-blk)"/>
      <line class="wire" x1="105" y1="150" x2="105" y2="400" stroke="none"/>
      <!-- top of pot to nothing (signal top), bottom to ground -->
      <line class="wire" x1="105" y1="255" x2="105" y2="400" stroke="var(--wire-blk)"/>
      <!-- wiper -->
      <line x1="115" y1="230" x2="140" y2="230" stroke="var(--ink)" stroke-width="2"/>
      <path d="M128 224 l10 6 l-10 6" fill="none" stroke="var(--ink)" stroke-width="2"/>
      <text class="lbl" x="80" y="285">10k VOL</text>

      <!-- input coupling cap 10uF -->
      <line class="wire" x1="140" y1="230" x2="175" y2="230" stroke="var(--wire-grn)"/>
      <line x1="175" y1="215" x2="175" y2="245" stroke="var(--ink)" stroke-width="3"/>
      <path d="M188 215 q-8 15 0 30" fill="none" stroke="var(--ink)" stroke-width="3"/>
      <text class="lbl" x="160" y="205">10µF</text>
      <line class="wire" x1="188" y1="230" x2="250" y2="230" stroke="var(--wire-grn)"/>

      <!-- ===== LM386 chip ===== -->
      <rect x="250" y="130" width="150" height="180" rx="8" fill="var(--panel-2)" stroke="var(--accent)" stroke-width="2"/>
      <text class="lbl-b" x="325" y="120" text-anchor="middle" fill="var(--accent)">LM386</text>
      <!-- notch -->
      <path d="M315 130 a10 10 0 0 0 20 0" fill="none" stroke="var(--accent)" stroke-width="2"/>

      <!-- pins left: 1 gain, 2 -in, 3 +in, 4 gnd -->
      <text class="pin" x="245" y="160" text-anchor="end">1 GAIN</text>
      <text class="pin" x="245" y="197" text-anchor="end">2 −IN</text>
      <text class="pin" x="245" y="234" text-anchor="end">3 +IN</text>
      <text class="pin" x="245" y="271" text-anchor="end">4 GND</text>
      <!-- pins right: 8 gain, 7 bypass, 6 vcc, 5 vout -->
      <text class="pin" x="405" y="160">GAIN 8</text>
      <text class="pin" x="405" y="197">BYPASS 7</text>
      <text class="pin" x="405" y="234">VCC 6</text>
      <text class="pin" x="405" y="271">VOUT 5</text>

      <!-- pin stubs -->
      <line class="wire" x1="235" y1="157" x2="250" y2="157" stroke="var(--ink-dim)"/>
      <line class="wire" x1="235" y1="194" x2="250" y2="194" stroke="var(--ink-dim)"/>
      <line class="wire" x1="250" y1="230" x2="250" y2="230" stroke="var(--ink-dim)"/>
      <line class="wire" x1="235" y1="267" x2="250" y2="267" stroke="var(--ink-dim)"/>
      <line class="wire" x1="400" y1="157" x2="415" y2="157" stroke="var(--ink-dim)"/>
      <line class="wire" x1="400" y1="230" x2="415" y2="230" stroke="var(--ink-dim)"/>
      <line class="wire" x1="400" y1="267" x2="415" y2="267" stroke="var(--ink-dim)"/>

      <!-- pin3 +in connects to coupling cap (already at 250,230) -->
      <!-- pin2 -in to ground -->
      <line class="wire" x1="235" y1="194" x2="220" y2="194" stroke="var(--wire-blk)"/>
      <line class="wire" x1="220" y1="194" x2="220" y2="400" stroke="var(--wire-blk)"/>
      <!-- pin4 gnd to ground -->
      <line class="wire" x1="235" y1="267" x2="205" y2="267" stroke="var(--wire-blk)"/>
      <line class="wire" x1="205" y1="267" x2="205" y2="400" stroke="var(--wire-blk)"/>
      <!-- pin1 gain open -->
      <text class="lbl" x="200" y="150" fill="var(--ink-faint)">open</text>

      <!-- pin6 VCC to +9V -->
      <line class="wire" x1="450" y1="230" x2="450" y2="40" stroke="var(--wire-red)"/>
      <line class="wire" x1="415" y1="230" x2="450" y2="230" stroke="var(--wire-red)"/>
      <!-- decoupling 0.1uF from pin6 to gnd -->
      <line class="wire" x1="480" y1="230" x2="480" y2="330" stroke="var(--wire-blu)"/>
      <line class="wire" x1="450" y1="230" x2="480" y2="230" stroke="var(--wire-blu)"/>
      <line x1="470" y1="330" x2="490" y2="330" stroke="var(--ink)" stroke-width="3"/>
      <line x1="470" y1="338" x2="490" y2="338" stroke="var(--ink)" stroke-width="3"/>
      <line class="wire" x1="480" y1="338" x2="480" y2="400" stroke="var(--wire-blk)"/>
      <text class="lbl" x="495" y="338">0.1µF</text>

      <!-- pin5 VOUT -> Zobel + output cap -->
      <line class="wire" x1="415" y1="267" x2="500" y2="267" stroke="var(--wire-yel)"/>
      <circle cx="500" cy="267" r="4" class="node"/>
      <!-- Zobel: 10ohm + 0.047 to gnd -->
      <line class="wire" x1="500" y1="267" x2="500" y2="300" stroke="var(--wire-blk)"/>
      <rect x="490" y="300" width="20" height="34" rx="2" fill="none" stroke="var(--ink-dim)" stroke-width="2"/>
      <text class="lbl" x="515" y="320">10Ω</text>
      <line class="wire" x1="500" y1="334" x2="500" y2="350" stroke="var(--wire-blk)"/>
      <line x1="490" y1="350" x2="510" y2="350" stroke="var(--ink)" stroke-width="3"/>
      <line x1="490" y1="358" x2="510" y2="358" stroke="var(--ink)" stroke-width="3"/>
      <text class="lbl" x="515" y="360">.047µF</text>
      <line class="wire" x1="500" y1="358" x2="500" y2="400" stroke="var(--wire-blk)"/>

      <!-- output coupling 220uF -->
      <line class="wire" x1="500" y1="267" x2="560" y2="267" stroke="var(--wire-yel)"/>
      <line x1="560" y1="252" x2="560" y2="282" stroke="var(--ink)" stroke-width="3"/>
      <path d="M573 252 q-8 15 0 30" fill="none" stroke="var(--ink)" stroke-width="3"/>
      <text class="lbl" x="545" y="242">220µF</text>
      <line class="wire" x1="573" y1="267" x2="620" y2="267" stroke="var(--wire-yel)"/>

      <!-- speaker -->
      <rect x="620" y="252" width="14" height="30" fill="none" stroke="var(--ink-dim)" stroke-width="2"/>
      <path d="M634 252 l22 -14 v58 l-22 -14 z" fill="none" stroke="var(--ink-dim)" stroke-width="2"/>
      <text class="lbl" x="618" y="300">8Ω SPKR</text>
      <!-- speaker to gnd -->
      <line class="wire" x1="640" y1="282" x2="640" y2="400" stroke="var(--wire-blk)"/>
      <line class="wire" x1="620" y1="267" x2="620" y2="252" stroke="none"/>

      <!-- junction dots -->
      <circle cx="450" cy="230" r="3.5" class="node"/>
      <circle cx="105" cy="400" r="3.5" class="node"/>
      <circle cx="205" cy="400" r="3.5" class="node"/>
      <circle cx="220" cy="400" r="3.5" class="node"/>
      <circle cx="480" cy="400" r="3.5" class="node"/>
      <circle cx="500" cy="400" r="3.5" class="node"/>
      <circle cx="640" cy="400" r="3.5" class="node"/>
      <circle cx="450" cy="40" r="3.5" class="node"/>
    </svg>
    <figcaption>Fig. 1 — One LM386 channel. Volume pot → 10µF coupling cap → pin 3. Pin 6 = +9V (with 0.1µF decoupling), pins 2/4 = GND. Pin 5 output goes through a Zobel network (10Ω + 0.047µF) and a 220µF coupling cap to the 8Ω speaker.</figcaption>
  </figure>

  <div class="pin-legend">
    <span><i class="swatch" style="background:var(--wire-red)"></i> +9V power</span>
    <span><i class="swatch" style="background:var(--wire-blk)"></i> Ground</span>
    <span><i class="swatch" style="background:var(--wire-grn)"></i> Input signal</span>
    <span><i class="swatch" style="background:var(--wire-yel)"></i> Output signal</span>
    <span><i class="swatch" style="background:var(--wire-blu)"></i> Decoupling</span>
  </div>

  <h3>4.2 · Pinout reference</h3>
  <figure>
    <svg viewBox="0 0 520 220" role="img" aria-label="LM386 pinout top view">
      <rect class="svg-bg" x="0" y="0" width="520" height="220"/>
      <!-- chip body -->
      <rect x="180" y="40" width="160" height="140" rx="10" fill="var(--panel-2)" stroke="var(--accent)" stroke-width="2"/>
      <path d="M245 40 a15 15 0 0 0 30 0" fill="none" stroke="var(--accent)" stroke-width="2"/>
      <text class="lbl-b" x="260" y="118" text-anchor="middle" fill="var(--accent)">LM386</text>
      <text class="pin" x="260" y="134" text-anchor="middle">(top view)</text>
      <!-- left pins 1-4 -->
      <g>
        <rect x="160" y="60" width="20" height="12" fill="var(--ink-dim)"/><text class="pin" x="155" y="70" text-anchor="end">1 · GAIN</text>
        <rect x="160" y="95" width="20" height="12" fill="var(--ink-dim)"/><text class="pin" x="155" y="105" text-anchor="end">2 · −IN (gnd)</text>
        <rect x="160" y="130" width="20" height="12" fill="var(--ink-dim)"/><text class="pin" x="155" y="140" text-anchor="end">3 · +IN (signal)</text>
        <rect x="160" y="165" width="20" height="12" fill="var(--ink-dim)"/><text class="pin" x="155" y="175" text-anchor="end">4 · GND</text>
      </g>
      <!-- right pins 8-5 -->
      <g>
        <rect x="340" y="60" width="20" height="12" fill="var(--ink-dim)"/><text class="pin" x="365" y="70">8 · GAIN</text>
        <rect x="340" y="95" width="20" height="12" fill="var(--ink-dim)"/><text class="pin" x="365" y="105">7 · BYPASS</text>
        <rect x="340" y="130" width="20" height="12" fill="var(--ink-dim)"/><text class="pin" x="365" y="140">6 · VCC (+9V)</text>
        <rect x="340" y="165" width="20" height="12" fill="var(--ink-dim)"/><text class="pin" x="365" y="175">5 · VOUT</text>
      </g>
      <!-- pin1 dot -->
      <circle cx="200" cy="55" r="4" fill="var(--amber)"/>
      <text class="pin" x="200" y="30" text-anchor="middle" fill="var(--amber)">▲ pin 1 marker</text>
    </svg>
    <figcaption>Fig. 2 — LM386 top-view pinout. Find pin 1 by the dot / notch, then pins run counter-clockwise. Orient the notch to the left.</figcaption>
  </figure>

  <h3>4.3 · Breadboard wiring guide (stereo)</h3>
  <p>Below is a beginner-friendly physical layout. The top red bus is <strong>+9V</strong>, the bottom blue bus is <strong>GND</strong>. The two chips straddle the center trench. Colored lines are jumper wires; components sit in the numbered columns.</p>

  <figure>
    <svg viewBox="0 0 760 460" role="img" aria-label="Breadboard wiring layout for stereo LM386">
      <rect class="svg-bg" x="0" y="0" width="760" height="460"/>
      <rect x="20" y="20" width="720" height="420" rx="10" fill="#12181f" stroke="var(--line)" stroke-width="1.5"/>

      <!-- Power buses -->
      <rect x="34" y="40" width="692" height="26" rx="5" fill="rgba(255,90,90,.08)" stroke="rgba(255,90,90,.4)"/>
      <text class="lbl-b" x="42" y="57" fill="var(--wire-red)">+ &nbsp;+9V RAIL</text>
      <rect x="34" y="394" width="692" height="26" rx="5" fill="rgba(74,168,255,.08)" stroke="rgba(136,150,164,.5)"/>
      <text class="lbl-b" x="42" y="411" fill="var(--wire-blk)">−  GND RAIL</text>
      <!-- center trench -->
      <line x1="34" y1="230" x2="726" y2="230" stroke="var(--line)" stroke-width="1" stroke-dasharray="3 4"/>
      <text class="pin" x="730" y="234" text-anchor="end" fill="var(--ink-faint)">center gap</text>

      <!-- ============ LEFT CHANNEL chip ============ -->
      <g>
        <rect x="120" y="200" width="120" height="70" rx="6" fill="var(--panel-2)" stroke="var(--accent)" stroke-width="1.6"/>
        <path d="M170 200 a10 10 0 0 0 20 0" fill="none" stroke="var(--accent)" stroke-width="1.6"/>
        <text class="lbl-b" x="180" y="240" text-anchor="middle" fill="var(--accent)" font-size="11">LM386 · L</text>
        <!-- pin markers -->
        <text class="pin" x="130" y="196">1</text><text class="pin" x="160" y="196">2</text><text class="pin" x="190" y="196">3</text><text class="pin" x="220" y="196">4</text>
        <text class="pin" x="130" y="285">8</text><text class="pin" x="160" y="285">7</text><text class="pin" x="190" y="285">6</text><text class="pin" x="220" y="285">5</text>
        <circle cx="132" cy="205" r="2.5" fill="var(--amber)"/>
      </g>
      <!-- LEFT: pin6 (VCC) up to +9V rail -->
      <path class="wire" d="M245 265 h20 v-205" stroke="var(--wire-red)"/>
      <text class="pin" x="248" y="255" fill="var(--wire-red)">6→+9V</text>
      <!-- pin4 gnd down to rail -->
      <path class="wire" d="M100 200 v194" stroke="var(--wire-blk)"/>
      <path class="wire" d="M220 200 h-120" stroke="var(--wire-blk)"/>
      <text class="pin" x="105" y="360" fill="var(--wire-blk)">4→GND</text>
      <!-- pin2 gnd -->
      <path class="wire" d="M160 200 v-16 h-45 v210" stroke="var(--wire-blk)"/>
      <!-- pin3 input from pot/cap -->
      <path class="wire" d="M190 200 v-40" stroke="var(--wire-grn)"/>
      <!-- input cap on pin3 -->
      <rect x="182" y="132" width="16" height="26" rx="2" fill="none" stroke="var(--ink)" stroke-width="2"/>
      <text class="pin" x="200" y="150" fill="var(--wire-grn)">10µF→3</text>
      <!-- pin5 output -->
      <path class="wire" d="M220 270 v40" stroke="var(--wire-yel)"/>
      <rect x="212" y="312" width="16" height="26" rx="2" fill="none" stroke="var(--ink)" stroke-width="2"/>
      <text class="pin" x="232" y="330" fill="var(--wire-yel)">5→220µF</text>
      <!-- decoupling 0.1uF pin6 to gnd -->
      <path class="wire" d="M266 300 v90" stroke="var(--wire-blu)"/>
      <text class="pin" x="270" y="300" fill="var(--wire-blu)">0.1µF</text>

      <!-- speaker L -->
      <g>
        <rect x="205" y="356" width="12" height="24" fill="none" stroke="var(--ink-dim)" stroke-width="1.6"/>
        <path d="M217 356 l16 -10 v44 l-16 -10 z" fill="none" stroke="var(--ink-dim)" stroke-width="1.6"/>
        <text class="pin" x="238" y="374">SPKR L</text>
      </g>

      <!-- ============ RIGHT CHANNEL chip ============ -->
      <g>
        <rect x="470" y="200" width="120" height="70" rx="6" fill="var(--panel-2)" stroke="var(--accent-2)" stroke-width="1.6"/>
        <path d="M520 200 a10 10 0 0 0 20 0" fill="none" stroke="var(--accent-2)" stroke-width="1.6"/>
        <text class="lbl-b" x="530" y="240" text-anchor="middle" fill="var(--accent-2)" font-size="11">LM386 · R</text>
        <text class="pin" x="480" y="196">1</text><text class="pin" x="510" y="196">2</text><text class="pin" x="540" y="196">3</text><text class="pin" x="570" y="196">4</text>
        <text class="pin" x="480" y="285">8</text><text class="pin" x="510" y="285">7</text><text class="pin" x="540" y="285">6</text><text class="pin" x="570" y="285">5</text>
        <circle cx="482" cy="205" r="2.5" fill="var(--amber)"/>
      </g>
      <path class="wire" d="M595 265 h20 v-205" stroke="var(--wire-red)"/>
      <text class="pin" x="598" y="255" fill="var(--wire-red)">6→+9V</text>
      <path class="wire" d="M450 200 v194" stroke="var(--wire-blk)"/>
      <path class="wire" d="M570 200 h-120" stroke="var(--wire-blk)"/>
      <text class="pin" x="455" y="360" fill="var(--wire-blk)">4→GND</text>
      <path class="wire" d="M510 200 v-16 h-45 v210" stroke="var(--wire-blk)"/>
      <path class="wire" d="M540 200 v-40" stroke="var(--wire-grn)"/>
      <rect x="532" y="132" width="16" height="26" rx="2" fill="none" stroke="var(--ink)" stroke-width="2"/>
      <text class="pin" x="550" y="150" fill="var(--wire-grn)">10µF→3</text>
      <path class="wire" d="M570 270 v40" stroke="var(--wire-yel)"/>
      <rect x="562" y="312" width="16" height="26" rx="2" fill="none" stroke="var(--ink)" stroke-width="2"/>
      <text class="pin" x="582" y="330" fill="var(--wire-yel)">5→220µF</text>
      <path class="wire" d="M616 300 v90" stroke="var(--wire-blu)"/>
      <text class="pin" x="620" y="300" fill="var(--wire-blu)">0.1µF</text>
      <g>
        <rect x="555" y="356" width="12" height="24" fill="none" stroke="var(--ink-dim)" stroke-width="1.6"/>
        <path d="M567 356 l16 -10 v44 l-16 -10 z" fill="none" stroke="var(--ink-dim)" stroke-width="1.6"/>
        <text class="pin" x="588" y="374">SPKR R</text>
      </g>

      <!-- ===== Input jack + dual pot (left area) ===== -->
      <g>
        <rect x="40" y="95" width="60" height="40" rx="5" fill="none" stroke="var(--ink-dim)" stroke-width="1.6"/>
        <text class="pin" x="70" y="112" text-anchor="middle">3.5mm</text>
        <text class="pin" x="70" y="126" text-anchor="middle">JACK</text>
        <!-- L R G taps -->
        <text class="pin" x="105" y="100" fill="var(--wire-grn)">L</text>
        <text class="pin" x="105" y="118" fill="var(--wire-grn)">R</text>
        <text class="pin" x="105" y="136" fill="var(--wire-blk)">G</text>
      </g>
      <!-- pot -->
      <rect x="300" y="95" width="80" height="40" rx="5" fill="none" stroke="var(--amber)" stroke-width="1.6"/>
      <text class="pin" x="340" y="112" text-anchor="middle" fill="var(--amber)">DUAL 10k</text>
      <text class="pin" x="340" y="126" text-anchor="middle" fill="var(--amber)">VOLUME</text>
      <!-- jack L/R to pot -->
      <path class="wire" d="M115 100 h175" stroke="var(--wire-grn)"/>
      <path class="wire" d="M115 118 h420 v6" stroke="var(--wire-grn)" opacity=".7"/>
      <!-- pot wiper L to left cap -->
      <path class="wire" d="M300 130 h-110 v0" stroke="none"/>
      <path class="wire" d="M310 135 v20 h-120 v-3" stroke="var(--wire-grn)"/>
      <path class="wire" d="M370 135 v10 h160 v-13" stroke="var(--wire-grn)"/>
      <!-- jack ground to gnd rail -->
      <path class="wire" d="M115 136 h10 v260" stroke="var(--wire-blk)"/>

      <!-- battery -->
      <g>
        <rect x="640" y="95" width="70" height="46" rx="5" fill="none" stroke="var(--ink-dim)" stroke-width="1.6"/>
        <text class="pin" x="675" y="114" text-anchor="middle">9V</text>
        <text class="pin" x="675" y="130" text-anchor="middle">BATTERY</text>
        <text class="pin" x="648" y="90" fill="var(--wire-red)">+</text>
        <text class="pin" x="700" y="90" fill="var(--wire-blk)">−</text>
      </g>
      <path class="wire" d="M648 95 v-42" stroke="var(--wire-red)"/>
      <path class="wire" d="M704 141 v250" stroke="var(--wire-blk)"/>
    </svg>
    <figcaption>Fig. 3 — Physical breadboard map (stereo). Red = +9V, gray/blue = ground, green = input signal, yellow = speaker output. Both LM386 chips share the same power/ground rails, jack, and dual-gang volume pot. Keep input wires short and away from output wires to avoid feedback.</figcaption>
  </figure>

  <div class="callout note">
    <span class="badge">🧭</span>
    <p><b>Reading the map:</b> This is a simplified, schematic-style layout — exact hole positions will differ on your board. The key relationships to preserve: pin 6 → +9V, pins 2&nbsp;&amp;&nbsp;4 → GND, pin 3 → coupling cap → pot wiper, pin 5 → 220µF → speaker → GND.</p>
  </div>
</section>

<!-- ================= 5. ASSEMBLY ================= -->
<section id="assembly">
  <h2><span class="num">5</span> Step-by-Step Assembly</h2>
  <p class="section-sub">Build one channel fully, verify it, then mirror it for the second. Power stays OFF until Section 6.</p>

  <ol class="steps">
    <li>
      <h3>Prepare the power rails</h3>
      <p>Don't connect the battery yet. First, jumper the two halves of each bus if your breadboard has a break in the middle: run a red wire between the two <code>+</code> rail segments and a black wire between the two <code>−</code> segments so power reaches the whole board.</p>
      <p>Add the <strong>bulk decoupling capacitor</strong> now: place the <code>100µF</code> electrolytic across the rails — <strong>long leg (+)</strong> into the red rail, striped <strong>(−)</strong> leg into the blue rail. This is your reservoir cap.</p>
    </li>
    <li>
      <h3>Seat the first LM386</h3>
      <p>Straddle the center trench with the chip so pins 1–4 are on one side and 5–8 on the other. Orient the <strong>notch / dot (pin 1) to the left</strong>. Push gently and evenly. If using a DIP socket, seat the socket first, then the chip.</p>
      <div class="callout warn"><span class="badge">⚠️</span><p><b>Never</b> place the chip so pins short across the trench — the gap must sit under the chip's plastic body, isolating the two pin rows.</p></div>
    </li>
    <li>
      <h3>Wire power &amp; ground to the chip</h3>
      <p>Connect the following with short jumpers:</p>
      <pre><span class="c"># LM386 power connections</span>
pin 6 (VCC)  <span class="k">→</span>  <span class="n">+9V</span> rail   <span class="c">(red)</span>
pin 4 (GND)  <span class="k">→</span>  GND rail   <span class="c">(black)</span>
pin 2 (−IN)  <span class="k">→</span>  GND rail   <span class="c">(black)</span></pre>
      <p>Pin 2 goes to ground because we use the non-inverting input. Pin 1 (gain) is left <strong>open</strong> for the default ×20 gain.</p>
    </li>
    <li>
      <h3>Add the decoupling capacitor</h3>
      <p>Place a <code>0.1µF</code> ceramic cap (marked <code>104</code>) as close as possible to the chip, bridging <strong>pin 6 (VCC) to the ground rail</strong>. Ceramics are non-polar, so orientation doesn't matter. This tiny cap suppresses high-frequency noise and stops the amp from motor-boating or squealing.</p>
    </li>
    <li>
      <h3>Build the input: pot → coupling cap → pin 3</h3>
      <p>Mount the <strong>10k pot</strong> so its three legs land in separate columns. Wire one outer leg to the incoming audio (from the jack's Left tap) and the other outer leg to ground. The <strong>center wiper</strong> is your volume-adjusted signal.</p>
      <pre><span class="c"># Input coupling</span>
pot wiper  <span class="k">→</span>  10µF (+ leg)
10µF (− leg / stripe)  <span class="k">→</span>  pin 3 (+IN)</pre>
      <p>The <code>10µF</code> cap blocks DC from your source so only the AC audio reaches the amplifier. Point the <strong>positive leg toward the incoming signal</strong> (the higher-bias side).</p>
    </li>
    <li>
      <h3>Build the output: pin 5 → Zobel → 220µF → speaker</h3>
      <p>From <strong>pin 5 (VOUT)</strong>, run the amplified signal to the <strong>+ leg of the 220µF</strong> output coupling cap. The other side of the cap goes to your speaker's + terminal; the speaker's − terminal goes to the ground rail.</p>
      <p>Add the <strong>Zobel network</strong> from pin 5 to ground: a <code>10Ω</code> resistor in series with a <code>0.047µF</code> (473) ceramic cap. This damps high-frequency ringing and keeps the output stage stable into an inductive speaker load.</p>
      <pre><span class="c"># Output stage</span>
pin 5  <span class="k">→</span>  220µF (+)  <span class="k">→</span>  speaker (+)
speaker (−)  <span class="k">→</span>  GND rail
pin 5  <span class="k">→</span>  10Ω  <span class="k">→</span>  0.047µF  <span class="k">→</span>  GND   <span class="c">(Zobel)</span></pre>
    </li>
    <li>
      <h3>Connect the audio jack</h3>
      <p>Wire the 3.5mm stereo jack's three signals: <strong>Left tip</strong> → the pot's left-channel input leg, <strong>Right ring</strong> → (for now, or the right pot section), and <strong>Sleeve</strong> → the ground rail. A common ground between your audio source and the amp is essential — without it you'll get hum or silence.</p>
    </li>
    <li>
      <h3>Mirror everything for the right channel</h3>
      <p>Repeat steps 2–6 for the second LM386, placed a few columns to the right. It shares the same +9V rail, ground rail, jack ground, and (if dual-gang) the same pot. Route the jack's <strong>Right</strong> channel to this chip's pin 3 through its own <code>10µF</code> cap.</p>
      <div class="callout tip"><span class="badge">✅</span><p><b>Symmetry check:</b> the two channels should look like mirror images. Any difference between them is where a wiring bug is likely hiding.</p></div>
    </li>
    <li>
      <h3>Final visual inspection</h3>
      <p>Before any power: confirm every electrolytic's stripe faces ground/negative, no bare wires touch across rails, the chips' pin-1 dots both face left, and nothing bridges the center trench except the chip bodies.</p>
    </li>
  </ol>
</section>

<!-- ================= 6. TESTING ================= -->
<section id="testing">
  <h2><span class="num">6</span> Testing &amp; Troubleshooting</h2>
  <p class="section-sub">Measure before you power. Then power up carefully.</p>

  <h3>6.1 · Pre-power checklist (multimeter)</h3>
  <p>With the battery still <strong>disconnected</strong>, set your multimeter to <em>continuity</em> mode and verify:</p>
  <ul class="check">
    <li>There is <strong>no continuity between the +9V rail and the GND rail</strong> — a beep here means a short; find and fix it before powering.</li>
    <li>Pin 6 of each chip has continuity to the +9V rail; pins 2 and 4 have continuity to GND.</li>
    <li>Each speaker reads roughly <strong>8Ω</strong> across its terminals (resistance mode).</li>
    <li>Both electrolytic caps are oriented with the stripe toward ground.</li>
  </ul>

  <h3>6.2 · Powering up safely</h3>
  <p>Turn the <strong>volume pot fully down</strong>, keep speakers at arm's length, then connect the 9V battery. Watch and listen:</p>
  <div class="grid cols-2">
    <div class="card"><h3>Good signs</h3><p>Silence or a faint hiss. Chips stay cool. A very small "tick" from the speaker at power-on is normal (cap charging).</p></div>
    <div class="card"><h3>Cut power immediately if…</h3><p>A chip gets warm/hot within seconds, you smell anything, a cap bulges, or there's a loud continuous squeal or motor-boating "put-put" sound.</p></div>
  </div>
  <p>If all is calm, plug in your audio source, press play, and slowly bring the pot up. You should hear clean stereo audio grow louder.</p>

  <h3>6.3 · Common mistakes &amp; fixes</h3>
  <div class="table-wrap">
    <table>
      <thead><tr><th>Symptom</th><th>Likely cause</th><th>Fix</th></tr></thead>
      <tbody>
        <tr><td>No sound at all</td><td>No common ground between source and amp; or coupling cap reversed/open</td><td>Confirm jack sleeve → GND rail. Verify 10µF and 220µF orientation and seating.</td></tr>
        <tr><td>Only one channel plays</td><td>A wiring difference between the two channels</td><td>Compare channels side by side; check that chip's pin 3, pin 5, and pot leg.</td></tr>
        <tr><td>Loud squeal / whistle</td><td>Feedback loop — missing decoupling or input wire coupling to output</td><td>Add/verify the 0.1µF at pin 6; shorten and separate input vs. output wires.</td></tr>
        <tr><td>"Put-put" motor-boating</td><td>Weak supply decoupling / sagging battery</td><td>Confirm the 100µF bulk cap is present; use a fresh battery or regulated supply.</td></tr>
        <tr><td>Faint / distorted, weak volume</td><td>Wrong pin used for input, or gain too low for source</td><td>Ensure signal enters pin 3. For more gain, add a 10µF from pin 1 to pin 8 (×200).</td></tr>
        <tr><td>Constant 50/60 Hz hum</td><td>Ground loop or loose ground jumper</td><td>Reseat all black wires; use a single solid ground path back to the jack sleeve.</td></tr>
        <tr><td>Chip gets hot</td><td>Reversed power, output shorted to ground, or reversed electrolytic</td><td>Cut power. Recheck pin 6/pin 4 polarity and the 220µF orientation.</td></tr>
      </tbody>
    </table>
  </div>

  <div class="callout tip">
    <span class="badge">🎧</span>
    <p><b>Want more volume?</b> Bridge pins 1 and 8 with a <code>10µF</code> cap (+ on pin 1) to jump the gain from ×20 to ×200. Add a <code>10µF</code> on pin 7 (bypass) to ground for the cleanest, lowest-noise sound.</p>
  </div>

  <div class="callout note">
    <span class="badge">🚀</span>
    <p><b>Next steps:</b> once this works, try a simple bass-boost network across pins 1–5, swap the battery for a regulated 9–12V supply for cleaner output, or transfer the design to a soldered perfboard for a permanent build.</p>
  </div>
</section>

</main>

<footer>
  <div class="wrap">
    <span>Stereo LM386 Amplifier · Breadboard Build Guide</span>
    <span>Built for learning — always double-check polarity before powering up.</span>
  </div>
</footer>

</body>
</html>
<!-- agent-meta {"model":"anthropic/claude-opus-4.8","provider":"openrouter","persona":"full","sessionId":"e815aedb-40b4-4d88-9644-75020aa9878a","tokensIn":407532,"tokensOut":25568,"tokensTotal":433100,"turns":17,"toolCalls":16,"failedToolCalls":1,"timestamp":"2026-07-22T19:36:13.689Z"} -->