Circuit
muse spark 1.2 · basic

Browser check: Artifact runtime error. This is a technical check, not a quality review.
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 64,850 bytes · SHA-256 7eaccbdea796
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>STEREO AMP LAB — Build a Stereo LM386 Amplifier on Breadboard</title>
<style>
:root{
--bg:#050a14;
--bg2:#0a1226;
--panel:#0f1c33;
--panel2:#132040;
--line:#1e335c;
--line2:#24385f;
--text:#e6eefc;
--muted:#8ea0c2;
--dim:#5e7596;
--cyan:#2af0ea;
--cyan2:#00b7d1;
--amber:#ffb020;
--amber2:#ff6b2b;
--green:#2af59e;
--red:#ff4d6d;
--radius:16px;
--radius-sm:10px;
--shadow: 0 10px 40px rgba(0,0,0,.45), 0 2px 10px rgba(0,0,0,.4);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
margin:0;
font-family: ui-sans-system, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
background: var(--bg);
color:var(--text);
line-height:1.6;
overflow-x:hidden;
}
a{color:var(--cyan);text-decoration:none}
a:hover{text-decoration:underline}
p{margin:0 0 1em}
.mono{font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace}
.container{max-width:1120px;margin:0 auto;padding:0 20px}
.topbar{
position:sticky;top:0;z-index:50;
backdrop-filter: blur(12px);
background: rgba(5,10,20,.78);
border-bottom:1px solid rgba(42,240,234,.15);
}
.topbar-inner{display:flex;align-items:center;justify-content:space-between;padding:14px 0;gap:16px}
.brand{display:flex;align-items:center;gap:12px}
.logo{
width:40px;height:40px;border-radius:10px;
background: linear-gradient(135deg, var(--cyan), var(--cyan2));
display:grid;place-items:center;
box-shadow: 0 0 20px rgba(42,240,234,.35);
color:#001316;font-weight:900;font-size:18px;letter-spacing:-0.5px;
}
.brand h1{font-size:14px;letter-spacing:.18em;margin:0;font-weight:800}
.brand p{font-size:11px;color:var(--muted);margin:0;letter-spacing:.08em;text-transform:uppercase}
.nav{display:flex;gap:10px;flex-wrap:wrap}
.nav a{
font-size:12px;letter-spacing:.08em;text-transform:uppercase;
padding:8px 12px;border-radius:999px;
border:1px solid transparent;color:var(--muted);font-weight:600;
}
.nav a:hover{border-color:var(--line);color:var(--text);text-decoration:none;background:rgba(255,255,255,.03)}
.nav a.active{border-color:rgba(42,240,234,.35);color:var(--cyan);background:rgba(42,240,234,.08)}
.mobile-toggle{display:none;background:var(--panel);border:1px solid var(--line);color:var(--text);padding:8px 12px;border-radius:8px}
/* HERO */
.hero{
position:relative;
padding:42px 0 24px;
background:
radial-gradient(800px 400px at 75% -10%, rgba(42,240,234,.15), transparent 70%),
radial-gradient(600px 400px at 10% 0%, rgba(255,176,32,.10), transparent 70%),
linear-gradient(180deg, var(--bg2), var(--bg));
border-bottom:1px solid var(--line);
overflow:hidden;
}
.hero-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:28px;align-items:center}
.eyebrow{
display:inline-flex;align-items:center;gap:8px;
font-size:11px;letter-spacing:.16em;text-transform:uppercase;
color:var(--cyan);background:rgba(42,240,234,.08);
border:1px solid rgba(42,240,234,.2);padding:6px 10px;border-radius:999px;
}
.hero h2{
font-size:42px;line-height:.95;letter-spacing:-.03em;margin:14px 0 14px;
font-weight:900;
}
.hero h2 span{background:linear-gradient(90deg,var(--cyan),#7cf7ff);-webkit-background-clip:text;-webkit-text-fill-color:transparent}
.hero p.lead{color:#b8c6e2;font-size:16px;max-width:58ch}
.hero-card{
background: linear-gradient(180deg, var(--panel), #0c1730);
border:1px solid var(--line);
border-radius:var(--radius);
padding:18px;
box-shadow:var(--shadow);
}
.specs{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:16px}
.spec{
background:rgba(255,255,255,.03);border:1px solid var(--line);border-radius:12px;padding:12px;text-align:center
}
.spec b{display:block;font-size:18px;color:var(--cyan);line-height:1}
.spec span{font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.block-diagram{
display:flex;align-items:center;gap:6px;justify-content:space-between;margin:16px 0 8px;flex-wrap:wrap
}
.block{
flex:1;min-width:90px;background: #0a1430;border:1px solid var(--line2);
border-radius:10px;padding:10px 8px;text-align:center;
}
.block em{font-style:normal;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--cyan);font-weight:700}
.block p{font-size:12px;margin:2px 0 0;color:var(--muted)}
.arrow{color:var(--amber);font-weight:900}
.cta-row{display:flex;gap:10px;margin-top:18px;flex-wrap:wrap}
.btn{
appearance:none;border:none;cursor:pointer;
padding:12px 18px;border-radius:999px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;font-size:12px;
transition:.15s;
}
.btn-primary{background:var(--cyan);color:#001419;box-shadow:0 6px 20px rgba(42,240,234,.3)}
.btn-primary:hover{transform:translateY(-1px);box-shadow:0 10px 28px rgba(42,240,234,.4)}
.btn-ghost{background:transparent;color:var(--text);border:1px solid var(--line)}
.btn-ghost:hover{background:rgba(255,255,255,.05)}
.progress-wrap{margin-top:16px;background:rgba(255,255,255,.06);height:6px;border-radius:999px;overflow:hidden;border:1px solid var(--line)}
.progress-bar{height:100%;width:0;background:linear-gradient(90deg,var(--cyan),var(--green));transition:width .4s}
/* SECTIONS */
section{padding:36px 0;border-bottom:1px solid rgba(30,51,92,.6)}
.section-head{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:18px;flex-wrap:wrap}
.section-head h3{margin:0;font-size:22px;letter-spacing:-.02em;font-weight:900}
.section-head h3 i{font-style:normal;color:var(--cyan)}
.kicker{font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--amber);font-weight:800;margin-bottom:6px}
.desc{color:var(--muted);font-size:14px;max-width:65ch}
.card{
background: linear-gradient(180deg, var(--panel), var(--panel2));
border:1px solid var(--line);
border-radius:var(--radius);
padding:18px;
box-shadow:var(--shadow);
}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.mini-icon{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:rgba(42,240,234,.1);border:1px solid rgba(42,240,234,.2);color:var(--cyan);font-weight:900}
.warn{border-left:3px solid var(--amber);background:rgba(255,176,32,.07)}
.danger{border-left:3px solid var(--red);background:rgba(255,77,109,.07)}
.success{border-left:3px solid var(--green);background:rgba(42,245,158,.07)}
.list{margin:0;padding-left:18px;color:#b9c8e6}
.list li{margin:6px 0}
.list li::marker{color:var(--cyan)}
/* TABLE */
.table-wrap{overflow:auto;border-radius:12px;border:1px solid var(--line)}
table{width:100%;border-collapse:collapse;min-width:680px;font-size:13px}
thead th{
text-align:left;font-size:11px;letter-spacing:.12em;text-transform:uppercase;
color:var(--muted);background:#0b1530;padding:12px 14px;border-bottom:1px solid var(--line);
position:sticky;top:0;
}
tbody td{padding:12px 14px;border-bottom:1px solid rgba(30,51,92,.5);vertical-align:top}
tbody tr:hover{background:rgba(42,240,234,.04)}
.tag{font-size:10px;letter-spacing:.08em;text-transform:uppercase;padding:3px 7px;border-radius:999px;border:1px solid var(--line);color:var(--muted);background:rgba(255,255,255,.03)}
.qty{font-weight:800;color:var(--cyan);text-align:center}
.purpose{color:#b9c8e6}
/* DIAGRAMS */
.tabs{display:flex;gap:8px;margin-bottom:14px;flex-wrap:wrap}
.tab{
padding:9px 14px;border-radius:999px;border:1px solid var(--line);background:transparent;color:var(--muted);
font-weight:800;letter-spacing:.06em;text-transform:uppercase;font-size:11px;cursor:pointer;
}
.tab.active{background:var(--cyan);color:#001419;border-color:var(--cyan);box-shadow:0 6px 16px rgba(42,240,234,.25)}
.diagram-box{
background:#060c1d;border:1px solid var(--line);border-radius:16px;overflow:hidden;
}
.diagram-header{
display:flex;align-items:center;justify-content:space-between;padding:12px 14px;
background:rgba(255,255,255,.02);border-bottom:1px solid var(--line);flex-wrap:wrap;gap:10px;
}
.diagram-header b{font-size:12px;letter-spacing:.08em;text-transform:uppercase}
.legend{display:flex;gap:8px;flex-wrap:wrap}
.legend span{display:inline-flex;align-items:center;gap:6px;font-size:11px;color:var(--muted)}
.dot{width:10px;height:10px;border-radius:999px;border:1px solid rgba(255,255,255,.2)}
.svg-wrap{padding:10px;background: radial-gradient(600px 400px at 50% 0%, rgba(42,240,234,.06), transparent), #060c1d;overflow:auto}
.svg-wrap svg{width:100%;height:auto;display:block;min-width:640px}
/* STEPS */
.steps{display:grid;gap:14px}
.step{
display:grid;grid-template-columns:56px 1fr;gap:14px;
background: linear-gradient(180deg, var(--panel), #0c1730);
border:1px solid var(--line);border-radius:16px;padding:16px;
position:relative;overflow:hidden;
}
.step.done{border-color:rgba(42,245,158,.4);background: linear-gradient(180deg, #0f2a1e, #0f1c33)}
.step-num{
width:44px;height:44px;border-radius:12px;display:grid;place-items:center;
background:#07101f;border:1px solid var(--line2);color:var(--cyan);font-weight:900;
}
.step.done .step-num{background:var(--green);color:#00140a;border-color:var(--green)}
.step h4{margin:0 0 6px;font-size:15px}
.step p{color:#b9c8e6;font-size:13.5px;margin:0 0 10px}
.step ul{margin:0;padding-left:18px;color:#9fb0cc;font-size:13px}
.chip{font-size:11px;padding:5px 9px;border-radius:999px;background:rgba(42,240,234,.1);border:1px solid rgba(42,240,234,.25);color:var(--cyan);font-weight:700;display:inline-flex;gap:6px;align-items:center}
.check{
position:absolute;top:14px;right:14px;
display:flex;align-items:center;gap:8px;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)
}
.check input{accent-color:var(--green);width:16px;height:16px}
.code{
background:#040a18;border:1px solid var(--line);border-radius:10px;padding:10px 12px;
font-family:ui-monospace,monospace;font-size:12px;color:#9fd4ff;overflow:auto;
}
.pin-table{width:100%;font-size:12px;border-collapse:collapse;margin-top:8px}
.pin-table th{color:var(--muted);text-align:left;padding:6px 8px;border-bottom:1px solid var(--line);font-size:11px;letter-spacing:.08em;text-transform:uppercase}
.pin-table td{padding:6px 8px;border-bottom:1px solid rgba(30,51,92,.4)}
/* TROUBLESHOOT */
.accordion{display:grid;gap:10px}
.acc{
border:1px solid var(--line);border-radius:14px;background:var(--panel);overflow:hidden
}
.acc-btn{
width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;
padding:14px 16px;background:transparent;border:none;color:var(--text);cursor:pointer;text-align:left;
font-weight:800;font-size:13px;
}
.acc-btn span{color:var(--muted);font-weight:600;font-size:11px;letter-spacing:.06em;text-transform:uppercase;border:1px solid var(--line);padding:4px 8px;border-radius:999px}
.acc-panel{padding:0 16px 14px;color:#b9c8e6;font-size:13px;display:none;border-top:1px solid var(--line)}
.acc.open .acc-panel{display:block}
.acc.open .acc-btn{color:var(--cyan)}
.trouble-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.test-list{display:grid;gap:8px}
.test-item{display:flex;gap:10px;align-items:flex-start;background:rgba(255,255,255,.03);border:1px solid var(--line);border-radius:10px;padding:10px 12px}
.test-item i{width:22px;height:22px;border-radius:999px;display:grid;place-items:center;background:rgba(42,240,234,.15);color:var(--cyan);font-style:normal;font-weight:900;font-size:12px;flex:0 0 22px}
/* FOOTER */
footer{padding:22px 0 34px;color:var(--dim);font-size:12px;text-align:center}
@media(max-width:900px){
.hero-grid{grid-template-columns:1fr}
.grid2,.grid3,.trouble-grid{grid-template-columns:1fr}
.specs{grid-template-columns:repeat(3,1fr)}
.nav{display:none}
.nav.open{display:flex;position:absolute;top:64px;left:16px;right:16px;background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:12px;flex-direction:column;box-shadow:var(--shadow)}
.mobile-toggle{display:inline-flex}
.hero h2{font-size:34px}
.svg-wrap svg{min-width:520px}
}
</style>
</head>
<body>
<header class="topbar">
<div class="container topbar-inner">
<div class="brand">
<div class="logo">◈</div>
<div>
<h1>STEREO AMP LAB</h1>
<p>LM386 Dual • Breadboard Edition — V2.1</p>
</div>
</div>
<nav class="nav" id="nav">
<a href="#intro" class="active">Overview</a>
<a href="#safety">Safety</a>
<a href="#bom">Parts</a>
<a href="#diagrams">Diagrams</a>
<a href="#steps">Build</a>
<a href="#test">Test</a>
</nav>
<button class="mobile-toggle" id="menuBtn">☰ Menu</button>
</div>
</header>
<section class="hero" id="intro">
<div class="container hero-grid">
<div>
<div class="eyebrow">● No Soldering Required — Breadboard Only — 30-60 Min Build</div>
<h2>Build a <span>Stereo Audio<br>Amplifier</span> from Scratch.</h2>
<p class="lead">This guide walks you through a classic <strong>dual LM386</strong> low-voltage power amplifier — one chip per channel (Left / Right) — turning a weak headphone-level signal from your phone or laptop into room-filling sound through a pair of 8Ω speakers. No PCB. No soldering. Just a breadboard.</p>
<div class="block-diagram">
<div class="block"><em>Source</em><p>Phone / Laptop<br>~0.2V p-p</p></div>
<div class="arrow">→</div>
<div class="block"><em>Volume</em><p>10k Log Pot<br>Voltage Divider</p></div>
<div class="arrow">→</div>
<div class="block" style="border-color:rgba(42,240,234,.4);background:rgba(42,240,234,.08)"><em>LM386 x2</em><p>Gain 20–200<br>0.5W / ch</p></div>
<div class="arrow">→</div>
<div class="block"><em>Output</em><p>220µF AC Coupled<br>8Ω Speaker</p></div>
</div>
<div class="cta-row">
<a href="#steps" class="btn btn-primary">Start Building →</a>
<a href="#diagrams" class="btn btn-ghost">View Schematics</a>
</div>
<div class="progress-wrap" title="Build progress"><div class="progress-bar" id="progressBar"></div></div>
<div style="display:flex;justify-content:space-between;margin-top:6px">
<span class="mono" style="font-size:11px;color:var(--muted)"><span id="doneCount">0</span>/9 steps completed</span>
<span class="mono" style="font-size:11px;color:var(--muted)">Est. time 45 min • Difficulty: Beginner</span>
</div>
</div>
<div class="hero-card">
<div style="display:flex;align-items:center;justify-content:space-between">
<b style="font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted)">What You'll Achieve</b>
<span style="font-size:11px;background:rgba(42,245,158,.12);border:1px solid rgba(42,245,158,.3);color:var(--green);padding:4px 8px;border-radius:999px;font-weight:800">● STEREO OUTPUT</span>
</div>
<div style="margin-top:12px;display:grid;gap:10px">
<div style="display:flex;gap:12px;align-items:center;background:rgba(255,255,255,.04);border:1px solid var(--line);border-radius:12px;padding:12px">
<div style="font-size:22px">🔊</div>
<div><b style="font-size:13px">Loud, clean audio</b><p style="margin:0;color:var(--muted);font-size:12px">Drives 4Ω–32Ω speakers from a single 5–12V supply. Default gain 20× (26dB), boostable to 200×.</p></div>
</div>
<div style="display:flex;gap:12px;align-items:center;background:rgba(255,255,255,.04);border:1px solid var(--line);border-radius:12px;padding:12px">
<div style="font-size:22px">🎛️</div>
<div><b style="font-size:13px">Independent volume controls</b><p style="margin:0;color:var(--muted);font-size:12px">Dual 10kΩ logarithmic pots — true balance control for left & right.</p></div>
</div>
<div style="display:flex;gap:12px;align-items:center;background:rgba(255,255,255,.04);border:1px solid var(--line);border-radius:12px;padding:12px">
<div style="font-size:22px">⚡</div>
<div><b style="font-size:13px">How it works</b><p style="margin:0;color:var(--muted);font-size:12px">LM386 is a complete power amp on a chip: differential input → voltage gain → Class-AB push-pull output. Capacitors block DC while letting AC (audio) pass.</p></div>
</div>
</div>
<div class="specs">
<div class="spec"><b>5–12V</b><span>Supply</span></div>
<div class="spec"><b>20–200</b><span>Gain Range</span></div>
<div class="spec"><b>~0.45W</b><span>per Channel</span></div>
</div>
</div>
</div>
</section>
<section id="safety">
<div class="container">
<div class="section-head">
<div>
<div class="kicker">02 — Workbench Ready</div>
<h3><i>Safety</i> & Prerequisites</h3>
</div>
<p class="desc">This is a low-voltage project (9V), but good habits prevent fried chips and flaky grounds. Read this once before you plug anything in.</p>
</div>
<div class="grid3">
<div class="card danger">
<div class="mini-icon" style="color:var(--red);background:rgba(255,77,109,.12);border-color:rgba(255,77,109,.3)">⚠</div>
<h4 style="margin:10px 0 6px">Workbench Safety</h4>
<ul class="list">
<li><strong>Power off while wiring.</strong> Remove 9V battery / unplug supply until a step tells you to test.</li>
<li>Watch polarity: <span class="mono">+9V (red) → pin 6</span>, <span class="mono">GND (black) → pin 4</span>. Reversed power kills LM386 instantly.</li>
<li>Keep electrolytic capacitors oriented: white stripe = negative. Reversed = pop & leak.</li>
<li>No loose strands. A single stray wire shorting rails can overheat the battery.</li>
</ul>
</div>
<div class="card">
<div class="mini-icon">🛠</div>
<h4 style="margin:10px 0 6px">Tools Needed</h4>
<ul class="list">
<li>Breadboard (830-point) + jumper wire kit</li>
<li>Wire cutters / strippers & small needle-nose pliers</li>
<li>Digital multimeter (continuity + DC volts)</li>
<li>Audio source: phone / laptop + 3.5mm TRS cable (to cut or breakout)</li>
<li>2× 8Ω speakers (4–16Ω ok) or old computer speakers</li>
<li>9V battery + snap clip <em>or</em> 9V DC wall supply (regulated)</li>
<li><em>Optional:</em> soldering iron only if you want to tin speaker wires</li>
</ul>
</div>
<div class="card success">
<div class="mini-icon" style="color:var(--green);background:rgba(42,245,158,.12);border-color:rgba(42,245,158,.3)">✓</div>
<h4 style="margin:10px 0 6px">You Should Know</h4>
<ul class="list">
<li>How a breadboard works: 5-hole rows are connected, center trench isolates sides.</li>
<li>IC orientation: notch / dot = pin 1. Pin numbers go counter-clockwise.</li>
<li>Capacitors: µF values block DC, pass audio. Larger = deeper bass.</li>
<li>Potentiometer: middle pin is wiper (variable output), outer pins are ends.</li>
</ul>
<div class="code" style="margin-top:10px">LM386 Pinout (top view, notch up)<br>1 — Gain | 2 — -IN | 3 — +IN | 4 — GND<br>5 — Vout | 6 — Vs (5-12V) | 7 — Bypass | 8 — Gain</div>
</div>
</div>
</div>
</section>
<section id="bom">
<div class="container">
<div class="section-head">
<div>
<div class="kicker">03 — Bill of Materials</div>
<h3>Complete <i>Parts List</i></h3>
</div>
<p class="desc">Buy exactly this. Substitutions noted. All capacitors are electrolytic unless marked ceramic.</p>
</div>
<div class="card" style="padding:0;overflow:hidden">
<div style="padding:14px 16px;display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;background:rgba(255,255,255,.02);border-bottom:1px solid var(--line)">
<b class="mono" style="font-size:12px;letter-spacing:.08em">BOM • STEREO LM386 • 9V</b>
<span style="font-size:11px;color:var(--muted)">Quantities are for <strong style="color:var(--text)">STEREO</strong> (2 channels). Halve for mono test.</span>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th style="width:32%">Component / Part Number</th>
<th style="width:8%">Qty</th>
<th style="width:14%">Value / Spec</th>
<th>Purpose / Role in Circuit</th>
</tr>
</thead>
<tbody>
<tr><td><b>LM386N-1 / LM386N-3</b> <span class="tag">DIP-8</span></td><td class="qty">2</td><td>Low-Volt Audio Amp IC</td><td class="purpose"><strong>Heart of each channel</strong> — provides 20× to 200× voltage gain and drives speaker directly from pin 5.</td></tr>
<tr><td><b>Breadboard</b> — 830 tie-points</td><td class="qty">1</td><td>MB-102</td><td class="purpose">Solderless prototyping. Center trench keeps left/right channels isolated.</td></tr>
<tr><td><b>10kΩ Logarithmic Potentiometer</b> <span class="tag">Volume</span></td><td class="qty">2</td><td>A10k / B10k</td><td class="purpose">Voltage divider on input — attenuates audio before it hits the amp. Log taper = natural loudness.</td></tr>
<tr><td><b>10 µF Electrolytic Capacitor</b></td><td class="qty">3</td><td>16V+ • 5mm</td><td class="purpose">Input coupling (2×) blocks DC from source; Bypass cap on pin 7 stabilizes bias (1× shared).</td></tr>
<tr><td><b>220 µF Electrolytic Capacitor</b></td><td class="qty">2</td><td>16V+ • low ESR</td><td class="purpose"><strong>Output coupling</strong> — blocks ~4.5V DC bias on pin 5, passes only AC to speakers. Sets bass response.</td></tr>
<tr><td><b>100 µF Electrolytic Capacitor</b></td><td class="qty">1</td><td>16V</td><td class="purpose">Power supply decoupling — reservoir near ICs, prevents motorboating / oscillation.</td></tr>
<tr><td><b>0.05 µF (47–100nF) Ceramic</b> <span class="tag">104</span></td><td class="qty">2</td><td>Ceramic disc / MLCC</td><td class="purpose">Zobel network with 10Ω resistor — tames high-frequency instability on speaker line.</td></tr>
<tr><td><b>10 Ω Resistor</b> <span class="tag">¼W</span></td><td class="qty">2</td><td>Brown-Black-Black</td><td class="purpose">Part of Zobel network on output (in series with 0.05µF to GND). Prevents oscillation with inductive load.</td></tr>
<tr><td><b>1kΩ Resistor</b></td><td class="qty">2</td><td>Optional</td><td class="purpose">Input pull-down / protection if source is floating. Not always needed.</td></tr>
<tr><td><b>10 µF Cap + Jumper</b> <span class="tag">Gain Boost</span></td><td class="qty">2</td><td>Between pins 1 & 8</td><td class="purpose"><em>Optional</em> — add to jump gain from 20× → 200×. Leave empty for clean 20× default.</td></tr>
<tr><td><b>8 Ω Speaker</b> <span class="tag">0.5–3W</span></td><td class="qty">2</td><td>4Ω–16Ω acceptable</td><td class="purpose">Transducer — converts electrical AC from pin 5 into sound. 8Ω is ideal for LM386.</td></tr>
<tr><td><b>3.5mm TRS Jack / Breakout</b></td><td class="qty">1</td><td>Stereo (Tip=Left, Ring=Right)</td><td class="purpose">Audio input. Tip → Left pot, Ring → Right pot, Sleeve → GND.</td></tr>
<tr><td><b>9V Battery + Snap</b> or DC Supply</td><td class="qty">1</td><td>5–12V regulated</td><td class="purpose">Power. 9V battery is clean & portable; wall supply needs decoupling cap.</td></tr>
<tr><td><b>Jumper Wires</b> — assorted + <b>Breadboard wire</b></td><td class="qty">~40</td><td>Male-Male</td><td class="purpose">Interconnects. Use red for +V, black/blue for GND, yellow/white for signal.</td></tr>
</tbody>
</table>
</div>
<div style="padding:10px 14px;background:rgba(42,240,234,.06);border-top:1px solid var(--line);display:flex;gap:10px;align-items:center;flex-wrap:wrap">
<span style="font-size:12px;color:var(--muted)">Tip: buying a <strong style="color:var(--cyan)">LM386 kit</strong> (Amazon/Ali) usually includes all caps & resistors for ~$8.</span>
<span style="margin-left:auto;font-size:11px;letter-spacing:.06em;text-transform:uppercase;background:var(--amber);color:#1a0e00;padding:4px 8px;border-radius:999px;font-weight:900">Total cost ~$18–28</span>
</div>
</div>
</div>
</section>
<section id="diagrams">
<div class="container">
<div class="section-head">
<div>
<div class="kicker">04 — Visual Reference</div>
<h3><i>Circuit</i> Diagrams</h3>
</div>
<p class="desc">Both views show <strong>one channel</strong>. Build it twice — left and right are identical. Share power rails and ground.</p>
</div>
<div class="tabs">
<button class="tab active" data-tab="schem">◆ Schematic Symbol View</button>
<button class="tab" data-tab="bread">▦ Breadboard Wiring View</button>
<span style="margin-left:auto;display:flex;gap:6px;align-items:center">
<span class="mono" style="font-size:11px;color:var(--muted)">Gain: 20× (default) — add 10µF between Pin 1–8 for 200×</span>
</span>
</div>
<!-- SCHEMATIC -->
<div class="diagram-box" id="panel-schem">
<div class="diagram-header">
<b>Fig A — LM386 Mono Channel (replicate ×2 for stereo)</b>
<div class="legend">
<span><i class="dot" style="background:#ff3b3b"></i> +V Rail</span>
<span><i class="dot" style="background:#2af0ea"></i> Audio Signal</span>
<span><i class="dot" style="background:#1a1a1a;border-color:#444"></i> Ground</span>
<span><i class="dot" style="background:var(--amber)"></i> Speaker</span>
</div>
</div>
<div class="svg-wrap">
<svg viewBox="0 0 860 360" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="LM386 schematic">
<rect width="860" height="360" rx="14" fill="#070d1f"/>
<!-- title -->
<text x="24" y="26" fill="#7fb0d6" font-family="monospace" font-size="11" letter-spacing="1">LEFT CHANNEL (RIGHT IS IDENTICAL) — STEREO = DUAL MONO</text>
<!-- Power rail top -->
<line x1="40" y1="58" x2="820" y2="58" stroke="#ff3b3b" stroke-width="3" stroke-linecap="round"/>
<text x="700" y="54" fill="#ff6b6b" font-family="monospace" font-size="11">+9V ── Pin 6 (Vs)</text>
<circle cx="32" cy="58" r="6" fill="#ff3b3b" stroke="#fff" stroke-width="1.5"/>
<text x="12" y="80" fill="#ff6b6b" font-family="monospace" font-size="10">+9V</text>
<!-- GND rail bottom -->
<line x1="40" y1="310" x2="820" y2="310" stroke="#2a3a5a" stroke-width="3"/>
<text x="700" y="326" fill="#6d84a8" font-family="monospace" font-size="11">GND ── Pin 4</text>
<circle cx="32" cy="310" r="6" fill="#0a1226" stroke="#2a3a5a" stroke-width="1.5"/>
<text x="12" y="330" fill="#6d84a8" font-family="monospace" font-size="10">GND</text>
<!-- Input jack left -->
<g>
<rect x="60" y="130" width="54" height="56" rx="6" fill="#101d3a" stroke="#2a3a5a" stroke-width="1.5"/>
<text x="66" y="148" fill="#ffb020" font-size="10" font-family="monospace" font-weight="700">3.5mm</text>
<text x="66" y="160" fill="#ffb020" font-size="10" font-family="monospace" font-weight="700">INPUT</text>
<text x="66" y="175" fill="#8ea0c2" font-size="9" font-family="monospace">T=Left R=Right</text>
<circle cx="78" cy="120" r="3" fill="#2af0ea"/><circle cx="96" cy="120" r="3" fill="#ff6b2b"/><circle cx="88" cy="196" r="3" fill="#1a1a1a" stroke="#555"/>
</g>
<!-- Pot -->
<g>
<rect x="150" y="124" width="70" height="70" rx="8" fill="#0f1c33" stroke="#ffb020" stroke-width="1.6"/>
<text x="160" y="142" fill="#ffb020" font-size="9" font-family="monospace" letter-spacing="1">10k LOG</text>
<text x="165" y="155" fill="#fff" font-size="10" font-family="monospace" font-weight="800">VOLUME</text>
<circle cx="185" cy="175" r="14" fill="none" stroke="#ffb020" stroke-width="1.2"/>
<line x1="185" y1="175" x2="193" y2="167" stroke="#ffb020" stroke-width="2" stroke-linecap="round"/>
<text x="158" y="198" fill="#8ea0c2" font-size="7" font-family="monospace">1 • 2(w) • 3</text>
</g>
<!-- Input cap -->
<g>
<rect x="270" y="145" width="36" height="28" rx="4" fill="#fff" stroke="#cbd6ea"/>
<text x="274" y="162" fill="#0a1226" font-size="9" font-family="monospace" font-weight="800">10µF</text>
<text x="284" y="172" fill="#0a1226" font-size="7" font-family="monospace">— +</text>
</g>
<!-- LM386 IC -->
<g>
<rect x="360" y="90" width="150" height="180" rx="10" fill="#0c1730" stroke="#2af0ea" stroke-width="2"/>
<text x="395" y="112" fill="#2af0ea" font-family="monospace" font-size="12" font-weight="900">LM386</text>
<text x="405" y="126" fill="#5a7294" font-family="monospace" font-size="8">DIP-8 • GAIN 20</text>
<!-- pins -->
<g font-family="monospace" font-size="9">
<rect x="344" y="138" width="16" height="14" rx="3" fill="#1e335c" stroke="#2af0ea"/><text x="347" y="148" fill="#fff">1</text><text x="312" y="148" fill="#8ea0c2">GAIN</text>
<rect x="344" y="164" width="16" height="14" rx="3" fill="#1e335c" stroke="#8ea0c2"/><text x="347" y="174" fill="#fff">2</text><text x="312" y="174" fill="#8ea0c2">-IN</text>
<rect x="344" y="190" width="16" height="14" rx="3" fill="#2af0ea" stroke="#2af0ea"/><text x="347" y="200" fill="#001419" font-weight="800">3</text><text x="312" y="200" fill="#2af0ea">+IN</text>
<rect x="344" y="216" width="16" height="14" rx="3" fill="#1a2337" stroke="#555"/><text x="347" y="226" fill="#aaa">4</text><text x="312" y="226" fill="#6d84a8">GND</text>
<rect x="510" y="216" width="16" height="14" rx="3" fill="#ffb020" stroke="#ffb020"/><text x="514" y="226" fill="#1a0e00" font-weight="800">5</text><text x="530" y="226" fill="#ffb020">OUT</text>
<rect x="510" y="190" width="16" height="14" rx="3" fill="#ff3b3b" stroke="#ff3b3b"/><text x="514" y="200" fill="#fff" font-weight="800">6</text><text x="530" y="200" fill="#ff6b6b">Vs</text>
<rect x="510" y="164" width="16" height="14" rx="3" fill="#1e335c"/><text x="514" y="174" fill="#fff">7</text><text x="530" y="174" fill="#6d84a8">BYP</text>
<rect x="510" y="138" width="16" height="14" rx="3" fill="#1e335c"/><text x="514" y="148" fill="#fff">8</text><text x="530" y="148" fill="#8ea0c2">GAIN</text>
</g>
<!-- triangle -->
<polygon points="410,145 410,225 470,185" fill="none" stroke="rgba(42,240,234,.5)" stroke-width="1.4"/>
<text x="422" y="188" fill="rgba(42,240,234,.8)" font-size="16" font-weight="900">▷</text>
<!-- notch -->
<rect x="420" y="90" width="30" height="8" rx="4" fill="#2af0ea"/>
</g>
<!-- Output cap -->
<g>
<rect x="580" y="210" width="42" height="30" rx="5" fill="#fff" stroke="#cbd6ea"/>
<text x="582" y="228" fill="#0a1226" font-size="9" font-family="monospace" font-weight="800">220µF</text>
<text x="595" y="238" fill="#0a1226" font-size="7">+ —</text>
</g>
<!-- Zobel -->
<g>
<rect x="640" y="242" width="36" height="16" rx="3" fill="#132040" stroke="#6d84a8"/><text x="645" y="253" fill="#fff" font-size="8" font-family="monospace">10Ω</text>
<rect x="640" y="266" width="36" height="16" rx="3" fill="#fff" stroke="#6d84a8"/><text x="642" y="277" fill="#0a1226" font-size="7" font-family="monospace">0.05µF</text>
</g>
<!-- Speaker -->
<g>
<rect x="720" y="190" width="70" height="56" rx="8" fill="#1a0e00" stroke="#ffb020" stroke-width="1.5"/>
<text x="730" y="210" fill="#ffb020" font-size="9" font-family="monospace" font-weight="800">SPEAKER</text>
<text x="736" y="224" fill="#fff" font-size="10" font-family="monospace">8Ω 0.5W</text>
<text x="744" y="238" fill="#8ea0c2" font-size="16">((•))</text>
</g>
<!-- Wires -->
<path d="M 87 120 L 185 120 L 185 124" stroke="#2af0ea" stroke-width="2.2" fill="none"/>
<path d="M 185 194 L 185 205 L 270 205 L 270 159" stroke="#2af0ea" stroke-width="2.2" fill="none"/>
<path d="M 306 159 L 344 159 L 344 197 L 360 197" stroke="#2af0ea" stroke-width="2.2" fill="none"/>
<!-- -IN to GND -->
<path d="M 344 171 L 300 171 L 300 310 L 352 310 L 352 223" stroke="#6d84a8" stroke-width="1.6" fill="none" stroke-dasharray="4 3"/>
<!-- Vs to +V -->
<path d="M 518 197 L 560 197 L 560 58" stroke="#ff3b3b" stroke-width="2.2" fill="none"/>
<!-- GND -->
<path d="M 352 223 L 352 310" stroke="#2a3a5a" stroke-width="2.2" fill="none"/>
<!-- OUT to cap -->
<path d="M 526 223 L 580 223" stroke="#ffb020" stroke-width="2.2" fill="none"/>
<path d="M 622 223 L 720 223" stroke="#ffb020" stroke-width="2.2" fill="none"/>
<!-- Zobel -->
<path d="M 680 223 L 680 242 L 658 242" stroke="#6d84a8" stroke-width="1.4" fill="none"/>
<path d="M 658 258 L 658 278 L 680 278 L 680 310" stroke="#6d84a8" stroke-width="1.4" fill="none"/>
<!-- Speaker GND -->
<path d="M 720 246 L 680 246 L 680 310" stroke="#2a3a5a" stroke-width="1.8" fill="none"/>
<!-- Pin 7 bypass cap -->
<g>
<rect x="540" y="130" width="28" height="18" rx="3" fill="#fff" stroke="#8ea0c2"/><text x="543" y="142" fill="#0a1226" font-size="7" font-family="monospace">10µF</text>
<path d="M 518 171 L 540 171 L 540 139" stroke="#8ea0c2" stroke-width="1.4" fill="none"/>
<path d="M 554 148 L 554 310" stroke="#2a3a5a" stroke-width="1.4" fill="none" stroke-dasharray="4 3"/>
<text x="542" y="124" fill="#8ea0c2" font-size="8" font-family="monospace">Pin7→GND</text>
</g>
<!-- Decoupling -->
<g>
<rect x="600" y="68" width="32" height="22" rx="4" fill="#fff" stroke="#ff3b3b"/><text x="602" y="82" fill="#0a1226" font-size="7" font-family="monospace">100µF</text>
<path d="M 610 58 L 610 68" stroke="#ff3b3b" stroke-width="2"/><path d="M 610 90 L 610 310" stroke="#2a3a5a" stroke-width="1.6" stroke-dasharray="4 3"/>
</g>
<!-- Gain jumper dashed -->
<path d="M 352 145 L 332 145 L 332 120 L 538 120 L 538 145 L 518 145" stroke="#2af59e" stroke-width="1.6" fill="none" stroke-dasharray="6 4"/>
<text x="360" y="118" fill="#2af59e" font-size="8" font-family="monospace">OPTIONAL 10µF PIN 1–8 (GAIN 200)</text>
</svg>
</div>
<div style="padding:10px 14px;background:rgba(255,255,255,.02);border-top:1px solid var(--line);font-size:11px;color:var(--muted)" class="mono">
Signal path: Input jack → Pot wiper → 10µF coupling → Pin 3 (+IN) → amplified → Pin 5 → 220µF → Speaker. Pin 2 is grounded. Pin 7 gets 10µF to GND for stability.
</div>
</div>
<!-- BREADBOARD -->
<div class="diagram-box" id="panel-bread" style="display:none">
<div class="diagram-header">
<b>Fig B — Breadboard Wiring Guide (Top View)</b>
<div class="legend">
<span><i class="dot" style="background:#ff3b3b"></i> +9V</span>
<span><i class="dot" style="background:#111"></i> GND</span>
<span><i class="dot" style="background:#ffb020"></i> Left Channel</span>
<span><i class="dot" style="background:#2af0ea"></i> Right Channel</span>
</div>
</div>
<div class="svg-wrap">
<svg viewBox="0 0 860 420" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Breadboard wiring guide">
<rect width="860" height="420" rx="14" fill="#060a18"/>
<!-- Breadboard base -->
<rect x="30" y="40" width="800" height="340" rx="14" fill="#e8edf3" stroke="#b8c4d8" stroke-width="2"/>
<!-- power rails -->
<rect x="42" y="52" width="776" height="28" rx="6" fill="#fff" stroke="#c2cfe2"/>
<rect x="42" y="348" width="776" height="28" rx="6" fill="#fff" stroke="#c2cfe2"/>
<text x="54" y="70" fill="#ff3b3b" font-family="monospace" font-size="10" font-weight="800">+ + + + (RED RAIL = +9V)</text>
<text x="54" y="366" fill="#1a3a5a" font-family="monospace" font-size="10" font-weight="800">− − − − (BLUE RAIL = GND)</text>
<!-- red/blue lines -->
<line x1="48" y1="60" x2="810" y2="60" stroke="#ff3b3b" stroke-width="1.5" stroke-dasharray="2 3" opacity=".5"/>
<line x1="48" y1="368" x2="810" y2="368" stroke="#2a5a9a" stroke-width="1.5" stroke-dasharray="2 3" opacity=".5"/>
<!-- holes grid -->
<g opacity=".35">
<!-- generate holes visually -->
<!-- top field -->
<g fill="#9aa8c2">
<!-- quick manual holes -->
<!-- 30 columns x 5 rows top + 5 rows bottom -->
</g>
</g>
<!-- holes dots -->
<!-- We'll draw grid with pattern -->
<g id="holes">
<!-- Use JS? static approximate -->
</g>
<!-- draw holes manually via loop visual approximation -->
<!-- Instead draw as rect with circles -->
<!-- central trench -->
<rect x="42" y="190" width="776" height="14" rx="4" fill="#0a1226" stroke="#5a6d8a"/>
<text x="380" y="200" fill="#8ea0c2" font-family="monospace" font-size="8" letter-spacing="1">CENTER TRENCH — IC STRADDLES HERE</text>
<!-- IC Left -->
<g>
<rect x="210" y="150" width="90" height="100" rx="6" fill="#0c1730" stroke="#ffb020" stroke-width="2"/>
<rect x="248" y="150" width="14" height="8" rx="4" fill="#ffb020"/>
<text x="228" y="178" fill="#ffb020" font-family="monospace" font-size="9" font-weight="800">LM386 LEFT</text>
<text x="242" y="192" fill="#fff" font-family="monospace" font-size="7">PIN 1 ●</text>
<!-- pins visual -->
<g font-size="7" font-family="monospace" fill="#cbd6ea">
<text x="192" y="170">1</text><text x="192" y="188">2</text><text x="192" y="206">3</text><text x="192" y="224">4</text>
<text x="304" y="170">8</text><text x="304" y="188">7</text><text x="304" y="206">6</text><text x="304" y="224">5</text>
</g>
</g>
<!-- IC Right -->
<g>
<rect x="520" y="150" width="90" height="100" rx="6" fill="#0c1730" stroke="#2af0ea" stroke-width="2"/>
<rect x="558" y="150" width="14" height="8" rx="4" fill="#2af0ea"/>
<text x="534" y="178" fill="#2af0ea" font-family="monospace" font-size="9" font-weight="800">LM386 RIGHT</text>
<text x="552" y="192" fill="#fff" font-family="monospace" font-size="7">PIN 1 ●</text>
<g font-size="7" font-family="monospace" fill="#cbd6ea">
<text x="502" y="170">1</text><text x="502" y="188">2</text><text x="502" y="206">3</text><text x="502" y="224">4</text>
<text x="614" y="170">8</text><text x="614" y="188">7</text><text x="614" y="206">6</text><text x="614" y="224">5</text>
</g>
</g>
<!-- Pots -->
<g>
<rect x="110" y="100" width="60" height="34" rx="6" fill="#1a0e00" stroke="#ffb020"/>
<text x="118" y="116" fill="#ffb020" font-family="monospace" font-size="7" font-weight="800">VOL LEFT</text>
<text x="122" y="128" fill="#fff" font-family="monospace" font-size="7">10k LOG</text>
<circle cx="140" cy="92" r="10" fill="#ffb020" stroke="#fff"/>
</g>
<g>
<rect x="680" y="100" width="60" height="34" rx="6" fill="#001419" stroke="#2af0ea"/>
<text x="686" y="116" fill="#2af0ea" font-family="monospace" font-size="7" font-weight="800">VOL RIGHT</text>
<text x="692" y="128" fill="#fff" font-family="monospace" font-size="7">10k LOG</text>
<circle cx="710" cy="92" r="10" fill="#2af0ea" stroke="#fff"/>
</g>
<!-- Caps -->
<!-- Left input cap 10u -->
<g>
<rect x="180" y="210" width="18" height="30" rx="8" fill="#fff" stroke="#ffb020"/>
<text x="184" y="230" fill="#0a1226" font-size="6" font-family="monospace" text-anchor="middle">10µ</text>
</g>
<!-- Left output 220u -->
<g>
<rect x="320" y="200" width="22" height="44" rx="10" fill="#fff" stroke="#ffb020"/>
<text x="323" y="228" fill="#0a1226" font-size="6" font-family="monospace">220µ</text>
</g>
<!-- Right input cap -->
<g>
<rect x="490" y="210" width="18" height="30" rx="8" fill="#fff" stroke="#2af0ea"/>
<text x="494" y="230" fill="#0a1226" font-size="6" font-family="monospace">10µ</text>
</g>
<!-- Right output cap -->
<g>
<rect x="630" y="200" width="22" height="44" rx="10" fill="#fff" stroke="#2af0ea"/>
<text x="633" y="228" fill="#0a1226" font-size="6" font-family="monospace">220µ</text>
</g>
<!-- Power decoupling 100u -->
<g>
<rect x="380" y="72" width="20" height="36" rx="9" fill="#fff" stroke="#ff3b3b"/>
<text x="382" y="94" fill="#0a1226" font-size="6" font-family="monospace">100µ</text>
</g>
<!-- Bypass caps -->
<g>
<rect x="340" y="112" width="14" height="22" rx="7" fill="#fff" stroke="#8ea0c2"/>
<text x="342" y="126" fill="#0a1226" font-size="5">10µ</text>
</g>
<g>
<rect x="640" y="112" width="14" height="22" rx="7" fill="#fff" stroke="#8ea0c2"/>
<text x="642" y="126" fill="#0a1226" font-size="5">10µ</text>
</g>
<!-- Speakers -->
<g>
<rect x="340" y="290" width="76" height="46" rx="8" fill="#1a0e00" stroke="#ffb020"/>
<text x="350" y="310" fill="#ffb020" font-size="8" font-family="monospace" font-weight="800">SPEAKER L</text>
<text x="360" y="326" fill="#fff" font-size="14">◯</text>
<text x="366" y="322" fill="#ffb020" font-size="8">8Ω</text>
</g>
<g>
<rect x="650" y="290" width="76" height="46" rx="8" fill="#001419" stroke="#2af0ea"/>
<text x="658" y="310" fill="#2af0ea" font-size="8" font-family="monospace" font-weight="800">SPEAKER R</text>
<text x="670" y="326" fill="#fff" font-size="14">◯</text>
<text x="676" y="322" fill="#2af0ea" font-size="8">8Ω</text>
</g>
<!-- Battery -->
<g>
<rect x="42" y="80" width="48" height="28" rx="6" fill="#111" stroke="#ff3b3b"/>
<text x="48" y="98" fill="#fff" font-size="9" font-family="monospace" font-weight="800">9V</text>
<circle cx="90" cy="88" r="3" fill="#ff3b3b"/><circle cx="90" cy="100" r="3" fill="#111" stroke="#555"/>
</g>
<!-- Audio jack -->
<g>
<rect x="400" y="400" width="70" height="14" rx="4" fill="#ffb020" stroke="#1a0e00"/>
<text x="410" y="410" fill="#1a0e00" font-size="7" font-family="monospace" font-weight="800">3.5mm INPUT</text>
</g>
<!-- Wires - Left channel yellow, Right cyan, Power red, GND black -->
<!-- Power rails -->
<path d="M 90 88 L 392 88 L 392 72" stroke="#ff3b3b" stroke-width="2.5" fill="none"/>
<path d="M 90 100 L 390 100 L 390 348 L 210 348 L 210 224" stroke="#111" stroke-width="2" fill="none"/>
<path d="M 392 88 L 560 88 L 560 206" stroke="#ff3b3b" stroke-width="2.5" fill="none"/>
<path d="M 540 224 L 540 348" stroke="#111" stroke-width="2" fill="none"/>
<!-- Left signal -->
<path d="M 400 407 L 400 380 L 140 380 L 140 134" stroke="#ffb020" stroke-width="2" fill="none"/>
<path d="M 140 118 L 188 118 L 188 225" stroke="#ffb020" stroke-width="2" fill="none"/>
<path d="M 198 225 L 210 225 L 210 206" stroke="#ffb020" stroke-width="2" fill="none"/>
<path d="M 300 224 L 320 224 L 320 320 L 378 320" stroke="#ffb020" stroke-width="2" fill="none"/>
<!-- Left Zobel -->
<path d="M 320 250 L 340 250 L 340 348" stroke="#6d84a8" stroke-width="1.4" fill="none" stroke-dasharray="3 3"/>
<!-- Right signal -->
<path d="M 470 407 L 470 380 L 710 380 L 710 134" stroke="#2af0ea" stroke-width="2" fill="none"/>
<path d="M 710 118 L 520 118 L 520 118 L 508 118 L 508 225" stroke="#2af0ea" stroke-width="2" fill="none"/>
<path d="M 508 222 L 520 222 L 520 206" stroke="#2af0ea" stroke-width="2" fill="none"/>
<path d="M 610 224 L 630 224 L 630 310 L 688 310" stroke="#2af0ea" stroke-width="2" fill="none"/>
<!-- Ground returns -->
<path d="M 378 336 L 378 348" stroke="#111" stroke-width="1.6" fill="none"/>
<path d="M 688 326 L 688 348" stroke="#111" stroke-width="1.6" fill="none"/>
<!-- Bypass caps wiring -->
<path d="M 347 112 L 300 112 L 300 190" stroke="#8ea0c2" stroke-width="1.4" fill="none"/>
<path d="M 647 112 L 614 112 L 614 188" stroke="#8ea0c2" stroke-width="1.4" fill="none"/>
</svg>
</div>
<div style="padding:10px 14px;background:rgba(255,255,255,.02);border-top:1px solid var(--line);font-size:11px;color:var(--muted)" class="mono">
Breadboard tip: Keep jumper wires flat and short. Red = +9V rail, Black = GND rail, Yellow = Left audio, Cyan = Right audio. Each LM386 straddles the trench so pins 1-4 are on one side, 5-8 on the other.
</div>
</div>
</div>
</section>
<section id="steps">
<div class="container">
<div class="section-head">
<div>
<div class="kicker">05 — Hands-On Build</div>
<h3>Step-by-Step <i>Assembly</i></h3>
</div>
<p class="desc">Work left-to-right. Do one full channel, test it, then duplicate for stereo. Check off steps to track progress.</p>
</div>
<div class="steps" id="stepsList">
<div class="step" data-step="1">
<div class="step-num">01</div>
<div>
<h4>Place the ICs & Establish Power Rails</h4>
<p>With power <strong>off</strong>, seat both LM386 chips across the center trench (notch facing up). Pin 1 is top-left. Bridge the top & bottom power rails if your breadboard has a split.</p>
<ul>
<li>Run <span class="chip" style="border-color:#ff3b3b;color:#ff8a8a;background:rgba(255,59,59,.1)">Red wire: Battery + → Top Red Rail</span> → and from there to <strong>Pin 6</strong> on both ICs.</li>
<li>Run <span class="chip" style="border-color:#333;color:#8ea0c2">Black wire: Battery − → Bottom Blue Rail</span> → to <strong>Pin 4</strong> on both ICs.</li>
<li>Add the <strong>100µF decoupling capacitor</strong> between rails, as close to the ICs as possible (stripe = GND).</li>
</ul>
<div class="code">Quick continuity check (multimeter beep): + rail → Pin 6 = 0Ω | − rail → Pin 4 = 0Ω | + to − = OL (no short)</div>
</div>
<label class="check"><input type="checkbox" class="step-check"> Done</label>
</div>
<div class="step" data-step="2">
<div class="step-num">02</div>
<div>
<h4>Ground the Inverting Input & Add Bypass Cap</h4>
<p>LM386 pin 2 (−IN) must be tied to ground for stable 20× gain. Pin 7 (Bypass) gets a 10µF cap to ground to clean the internal bias.</p>
<ul>
<li>Left IC: jumper <strong>Pin 2 → GND rail</strong></li>
<li>Right IC: jumper <strong>Pin 2 → GND rail</strong></li>
<li>Each IC: <strong>10µF cap</strong> from <strong>Pin 7 → GND</strong> (observe polarity: + to pin 7)</li>
</ul>
<table class="pin-table"><tr><th>Pin</th><th>Left Ch.</th><th>Right Ch.</th></tr><tr><td>2 (−IN)</td><td>Direct to GND</td><td>Direct to GND</td></tr><tr><td>7 (Bypass)</td><td>10µF → GND</td><td>10µF → GND</td></tr></table>
</div>
<label class="check"><input type="checkbox" class="step-check"> Done</label>
</div>
<div class="step" data-step="3">
<div class="step-num">03</div>
<div>
<h4>Wire the Volume Pots (Voltage Dividers)</h4>
<p>Place the two 10k pots off-breadboard or on the edge. Each pot has 3 pins: 1 = GND, 2 = wiper (output), 3 = input.</p>
<ul>
<li>Pot <strong>Pin 1 → GND rail</strong></li>
<li>Pot <strong>Pin 3 → 3.5mm jack</strong> (Tip = Left pot pin 3, Ring = Right pot pin 3, Sleeve = GND)</li>
<li>Leave <strong>Pin 2 (wiper)</strong> for next step — this is your variable audio signal.</li>
</ul>
<div class="code">TRS breakout: T (tip) ── Left Pot Pin 3 | R (ring) ── Right Pot Pin 3 | S (sleeve) ── GND<br>Turn pot fully CCW = silence. Fully CW = max (but LM386 handles it).</div>
</div>
<label class="check"><input type="checkbox" class="step-check"> Done</label>
</div>
<div class="step" data-step="4">
<div class="step-num">04</div>
<div>
<h4>Input Coupling Capacitors (DC Block)</h4>
<p>Audio from the pot wiper must be AC-coupled into Pin 3 (+IN). The 10µF cap blocks any DC offset from the source.</p>
<ul>
<li>Left: <strong>Pot wiper (Pin 2) → 10µF (+ leg) → 10µF (− leg) → IC Pin 3</strong></li>
<li>Right: same with second 10µF</li>
<li>Add a 10k–100k resistor from Pin 3 to GND if you hear hum when input is unplugged (keeps input from floating).</li>
</ul>
</div>
<label class="check"><input type="checkbox" class="step-check"> Done</label>
</div>
<div class="step" data-step="5">
<div class="step-num">05</div>
<div>
<h4>Output Stage: 220µF + Zobel Network → Speaker</h4>
<p>Pin 5 sits at ~4.5V DC (half supply). The 220µF cap strips that DC and passes only audio to the speaker.</p>
<ul>
<li><strong>Pin 5 → 220µF (+ leg) → 220µF (− leg) → Speaker (+)</strong></li>
<li><strong>Speaker (−) → GND rail</strong></li>
<li>Zobel (anti-oscillation): from the <em>speaker-side</em> of the 220µF, connect <strong>10Ω resistor → 0.05µF cap → GND</strong> in series.</li>
</ul>
<div class="card warn" style="padding:10px 12px;font-size:12px;margin-top:8px">⚠ Speaker wires must not touch the power rails. A short on Pin 5 forces the IC into thermal shutdown and can melt breadboard plastic.</div>
</div>
<label class="check"><input type="checkbox" class="step-check"> Done</label>
</div>
<div class="step" data-step="6">
<div class="step-num">06</div>
<div>
<h4>Optional Gain Boost (Pin 1–8)</h4>
<p>Default gain = 20× (26dB). Perfect for line-level sources. For weak sources (electret mic, low phone volume), boost to 200×.</p>
<ul>
<li>To boost: add <strong>10µF cap between Pin 1 and Pin 8</strong> (+ to Pin 1). Gain jumps to 200×.</li>
<li>For adjustable gain, put a 1.2kΩ resistor + 10µF in series between 1–8 → gain ≈ 50×.</li>
<li>Leave empty for cleanest sound with normal phone/laptop output.</li>
</ul>
<div class="code">Try 20× first. If you need to max phone volume to hear anything, then add the 10µF gain cap.</div>
</div>
<label class="check"><input type="checkbox" class="step-check"> Done</label>
</div>
<div class="step" data-step="7">
<div class="step-num">07</div>
<div>
<h4>Duplicate for Stereo & Dress the Wiring</h4>
<p>Right channel is a mirror of left. Double-check symmetry, then neaten.</p>
<ul>
<li>Verify both channels share the <strong>same power rails</strong> and <strong>same GND point</strong> (star ground near battery −).</li>
<li>Keep audio wires (yellow/cyan) <strong>away</strong> from power wires — prevents hum pickup.</li>
<li>Twist speaker wires loosely; keep decoupling cap leads short.</li>
</ul>
</div>
<label class="check"><input type="checkbox" class="step-check"> Done</label>
</div>
<div class="step" data-step="8">
<div class="step-num">08</div>
<div>
<h4>Pre-Power Sanity Check (2 Minutes That Save Chips)</h4>
<p>Do this with battery <strong>disconnected</strong>.</p>
<div style="display:grid;grid-template-columns:1fr 1fr;gap:10px">
<div class="test-item"><i>1</i><span><b>Visual:</b> IC notch up? Electrolytics oriented correctly (stripe → GND on outputs, + → Pin 5/7)?</span></div>
<div class="test-item"><i>2</i><span><b>Resistance:</b> + rail to GND should read ~kΩ, not ~0Ω. If 0Ω you have a short.</span></div>
<div class="test-item"><i>3</i><span><b>Continuity:</b> Pin 4 → GND, Pin 6 → +V, Pin 2 → GND (all beep). Pin 5 → Speaker → GND should <em>not</em> beep (blocked by cap).</span></div>
<div class="test-item"><i>4</i><span><b>Pots:</b> wiper to GND varies 0–10kΩ as you turn.</span></div>
</div>
</div>
<label class="check"><input type="checkbox" class="step-check"> Done</label>
</div>
<div class="step" data-step="9">
<div class="step-num">09</div>
<div>
<h4>First Power-Up & Sound Test</h4>
<p>Now connect power and test incrementally.</p>
<ul>
<li>Turn both volume pots <strong>fully counter-clockwise (min)</strong>.</li>
<li>Connect 9V. Immediately check: ICs should stay cool. 9V at Pin 6? ~4.5V at Pin 5? Good.</li>
<li>Plug audio source (volume 50%), play music, <em>slowly</em> advance left pot. You should hear clean audio. Repeat right.</li>
<li>If it squeals, move wires apart or add the Zobel 10Ω+0.05µF if you skipped it.</li>
</ul>
<div class="card success" style="padding:12px;margin-top:10px">
<b style="color:var(--green)">Success sounds like:</b> <span style="color:#b9c8e6">Clean music at moderate volume, no hum with source paused, both speakers balanced. If one channel is louder, swap speakers to isolate wiring vs speaker variance.</span>
</div>
</div>
<label class="check"><input type="checkbox" class="step-check"> Done</label>
</div>
</div>
</div>
</section>
<section id="test">
<div class="container">
<div class="section-head">
<div>
<div class="kicker">06 — Make It Reliable</div>
<h3><i>Testing</i> & Troubleshooting</h3>
</div>
<p class="desc">90% of breadboard amp failures are wiring, not bad parts. Use this matrix to diagnose in seconds.</p>
</div>
<div class="trouble-grid">
<div class="card" style="padding:0;overflow:hidden">
<div style="padding:12px 14px;background:rgba(255,255,255,.03);border-bottom:1px solid var(--line)"><b class="mono" style="font-size:11px;letter-spacing:.08em">SYMPTOM → CAUSE → FIX</b></div>
<div style="overflow:auto">
<table style="min-width:100%">
<thead><tr><th>Symptom</th><th>Likely Cause</th><th>Fix</th></tr></thead>
<tbody style="font-size:12.5px">
<tr><td><b>No sound at all</b></td><td>Power reversed, loose Pin 6/4, speaker open</td><td>Measure 9V at Pin 6, 0V at Pin 4; re-seat IC; test speaker with 1.5V battery “pop”</td></tr>
<tr><td><b>Loud hum/buzz (50/60Hz)</b></td><td>Missing GND, ground loop, long audio leads</td><td>Star-ground all GNDs at one point; keep input wires short & away from power; add 100µF cap across rails</td></tr>
<tr><td><b>Squeal / oscillation</b></td><td>Feedback, no Zobel, gain cap with long wires</td><td>Add 10Ω+0.05µF Zobel; remove 1–8 cap; shorten leads; keep decoupling cap near IC</td></tr>
<tr><td><b>Distorted / crackling</b></td><td>Clipping (too much gain), low battery, speaker over-driven</td><td>Lower source volume or remove gain cap; fresh battery; try 8Ω not 4Ω for louder but cleaner</td></tr>
<tr><td><b>One channel dead</b></td><td>Input cap reversed, pot miswired, cold contact</td><td>Swap left/right inputs to isolate; wiggle pot — if sound cuts, replace jumper</td></tr>
<tr><td><b>IC gets hot fast</b></td><td>Output shorted to GND/V+, speaker <4Ω</td><td>Disconnect speaker, check Pin 5 not shorted; ensure 220µF not shorted; use ≥8Ω</td></tr>
<tr><td><b>Motorboating (putt-putt)</b></td><td>Supply sag, shared battery with oscillations</td><td>Larger decoupling (220µF) across rails; fresh battery; separate power leads per channel</td></tr>
</tbody>
</table>
</div>
</div>
<div style="display:grid;gap:14px">
<div class="card">
<h4 style="margin:0 0 8px">Safe Testing Procedure <span style="font-size:11px;background:rgba(42,240,234,.1);border:1px solid rgba(42,240,234,.2);color:var(--cyan);padding:3px 7px;border-radius:999px">3-STEP</span></h4>
<div class="test-list">
<div class="test-item"><i>1</i><span><b>Power without signal:</b> Connect 9V, no input. Measure DC: Pin 6 ≈ 9V, Pin 5 ≈ 4.5V, Pin 3 ≈ 0V. Current draw ~4–8mA per IC. If >30mA, power off — you have a short.</span></div>
<div class="test-item"><i>2</i><span><b>Finger test:</b> Lightly touch Pin 3 (input) with a fingertip — you should hear a loud 50/60Hz buzz from the speaker. No buzz = output stage dead.</span></div>
<div class="test-item"><i>3</i><span><b>Signal injection:</b> Plug phone at low volume, slowly raise pot. If distortion appears early, reduce source volume 20% (phones clip before the amp does).</span></div>
</div>
</div>
<div class="card warn">
<h4 style="margin:0 0 6px;color:var(--amber)">Common Beginner Mistakes</h4>
<ul class="list" style="font-size:13px">
<li><strong>Reversed electrolytic</strong> — white stripe must go to lower voltage side (GND for output cap’s outer leg).</li>
<li><strong>Loose ground</strong> — breadboard rails often split in the middle; bridge with a jumper.</li>
<li><strong>Feedback loop</strong> — microphone near speaker = howl. Keep input and output physically separated.</li>
<li><strong>Floating inputs</strong> — unplugged jack picks up hum; turn pot to zero or short input to GND when idle.</li>
<li><strong>Wrong pot taper</strong> — linear pot makes volume jump suddenly. Use log (audio) taper for smooth control.</li>
</ul>
</div>
<div class="accordion">
<div class="acc open">
<button class="acc-btn">How can I make it louder? <span>Answer</span></button>
<div class="acc-panel">
Add the 10µF between Pin 1–8 (gain 200). Use a fresh 9V (or 12V regulated, max for LM386N-1 is 12V, N-3 is 18V but keep ≤12V on breadboard). Use a larger speaker box / ported enclosure — acoustic gain is free loudness.
</div>
</div>
<div class="acc">
<button class="acc-btn">Can I use a 5V USB supply? <span>Answer</span></button>
<div class="acc-panel">Yes, but power = V²/(2R). At 5V into 8Ω you get ~0.1W — quiet but works great for desktop. Keep decoupling cap and keep leads short. USB is noisy — add 100µF + 0.1µF at rails.</div>
</div>
<div class="acc">
<button class="acc-btn">Why does it crackle when I move wires? <span>Answer</span></button>
<div class="acc-panel">Breadboard contacts oxidize. Pull jumpers, re-insert, and use solid-core 22AWG jumpers instead of floppy stranded wires. Wiggle-test each connection while music plays to find the culprit.</div>
</div>
</div>
</div>
</div>
<div class="card" style="margin-top:16px;display:flex;gap:14px;align-items:center;flex-wrap:wrap;background:linear-gradient(90deg, rgba(42,240,234,.08), rgba(255,176,32,.08))">
<div style="width:42px;height:42px;border-radius:12px;background:var(--cyan);display:grid;place-items:center;color:#001419;font-weight:900">♫</div>
<div>
<b>Enjoy your build!</b> <span style="color:var(--muted)">You’ve just built a true class-AB stereo power amplifier — the same topology inside guitar amps and vintage radios. Next steps: add a tone control (RC filter), or swap LM386 for PAM8403 for 3W stereo.</span>
</div>
<button class="btn btn-ghost" onclick="window.print()" style="margin-left:auto">🖨 Print Guide</button>
</div>
</div>
</section>
<footer>
<div class="container">
<p class="mono">STEREO AMP LAB • LM386 Dual — Educational build. Always disconnect power when rewiring. • Designed for learning, not for critical listening.</p>
<p style="margin-top:6px">© 2026 • Built with inline SVG • No external dependencies • Responsive • Dark-tech theme</p>
</div>
</footer>
<script>
const tabs = document.querySelectorAll('.tab');
const panels = { schem: document.getElementById('panel-schem'), bread: document.getElementById('panel-bread') };
tabs.forEach(t=>{
t.addEventListener('click', ()=>{
tabs.forEach(x=>x.classList.remove('active'));
t.classList.add('active');
const k = t.dataset.tab;
panels.schem.style.display = k==='schem' ? '' : 'none';
panels.bread.style.display = k==='bread' ? '' : 'none';
});
});
const checks = document.querySelectorAll('.step-check');
const bar = document.getElementById('progressBar');
const doneCount = document.getElementById('doneCount');
function updateProgress(){
const total = checks.length;
const done = [...checks].filter(c=>c.checked).length;
const pct = total? (done/total*100):0;
bar.style.width = pct + '%';
doneCount.textContent = done;
document.querySelectorAll('.step').forEach((s,i)=>{
if(checks[i].checked) s.classList.add('done'); else s.classList.remove('done');
});
localStorage.setItem('ampProgress', JSON.stringify([...checks].map(c=>c.checked)));
}
checks.forEach(c=>c.addEventListener('change', updateProgress));
// restore
try{
const saved = JSON.parse(localStorage.getItem('ampProgress')||'[]');
saved.forEach((v,i)=>{ if(checks[i]) checks[i].checked = !!v; });
}catch(e){}
updateProgress();
// accordion
document.querySelectorAll('.acc-btn').forEach(b=>{
b.addEventListener('click',()=>{
const acc = b.closest('.acc');
acc.classList.toggle('open');
});
});
// mobile menu
const menuBtn = document.getElementById('menuBtn');
const nav = document.getElementById('nav');
menuBtn?.addEventListener('click',()=> nav.classList.toggle('open'));
// nav active on scroll
const ids = ['intro','safety','bom','diagrams','steps','test'];
const navLinks = [...document.querySelectorAll('.nav a')];
window.addEventListener('scroll', ()=>{
let cur = 'intro';
ids.forEach(id=>{
const el = document.getElementById(id);
if(el && window.scrollY + 120 >= el.offsetTop) cur = id;
});
navLinks.forEach(a=>{
a.classList.toggle('active', a.getAttribute('href')==='#'+cur);
});
});
</script>
</body>
</html>
<!-- agent-meta {"model":"meta/muse-spark-1.2","provider":"openrouter","persona":"basic","sessionId":"63d57274-56de-489a-ad1a-61faa2d89d61","tokensIn":594,"tokensOut":21115,"tokensTotal":21709,"cost":0.09035695,"turns":1,"toolCalls":0,"failedToolCalls":0,"timestamp":"2026-08-06T15:25:08.656Z"} -->