← Circuit results

Circuit

GPT 5.6 terra · typescript

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 18,544 bytes · SHA-256 046a4cbc7a3e
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Stereo Breadboard Amplifier — LM386 Build Guide</title>
<style>
/* ── css: guide-style ── */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--bg:#091016;--panel:#101b23;--panel2:#0d151c;--line:#233643;--text:#e9f1f5;--muted:#9cb0bd;--cyan:#42d3e8;--cyan2:#94f5ff;--lime:#c9f36a;--amber:#ffca66;--red:#ff7d7d;--shadow:0 18px 50px rgba(0,0,0,.28)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:radial-gradient(1000px 600px at 85% -10%,#123545 0%,transparent 60%),var(--bg);color:var(--text);font-family:Manrope,Arial,sans-serif;line-height:1.65}#guide{max-width:1220px;margin:auto;padding:28px}.hero{min-height:350px;border:1px solid #2b4c5b;border-radius:22px;background:linear-gradient(125deg,rgba(20,53,66,.9),rgba(12,20,27,.94) 58%);position:relative;overflow:hidden;padding:56px;box-shadow:var(--shadow)}.hero:after{content:'';position:absolute;width:520px;height:520px;border:1px solid rgba(66,211,232,.15);border-radius:50%;right:-230px;top:-240px;box-shadow:0 0 0 46px rgba(66,211,232,.035),0 0 0 100px rgba(66,211,232,.025)}.eyebrow,.tag{font:500 12px 'DM Mono',monospace;letter-spacing:.12em;text-transform:uppercase;color:var(--cyan)}h1{font-size:clamp(2.2rem,5vw,4.25rem);line-height:1.05;letter-spacing:-.06em;max-width:760px;margin:12px 0 20px;position:relative;z-index:1}.hero p{max-width:700px;color:#c7d7df;font-size:1.07rem;position:relative;z-index:1}.badges{display:flex;gap:10px;flex-wrap:wrap;margin-top:25px}.badge{border:1px solid #315264;background:#0a161d;color:#b9dce3;border-radius:999px;padding:5px 12px;font:12px 'DM Mono',monospace}.toc{display:flex;flex-wrap:wrap;gap:10px;padding:20px 2px}.toc a{text-decoration:none;color:var(--muted);border-bottom:1px solid transparent;padding:4px 0;font-size:.85rem}.toc a:hover{color:var(--cyan);border-color:var(--cyan)}section{margin:54px 0}h2{font-size:1.65rem;letter-spacing:-.035em;margin:0 0 20px;display:flex;align-items:center;gap:12px}h2 .num{font:500 12px 'DM Mono',monospace;color:var(--cyan);border:1px solid #315564;border-radius:7px;padding:3px 7px;letter-spacing:0}.lead{font-size:1.05rem;color:#c7d7df;max-width:860px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.card{background:linear-gradient(150deg,rgba(18,31,40,.9),rgba(11,19,26,.9));border:1px solid var(--line);border-radius:16px;padding:24px;box-shadow:var(--shadow)}h3{font-size:1rem;margin:0 0 12px;color:var(--cyan2)}ul{padding-left:20px;margin:0}li{margin:7px 0}.warning{border-left:3px solid var(--amber);background:rgba(255,202,102,.08);padding:16px 18px;border-radius:0 10px 10px 0;color:#f7e2b6}.warning strong{color:var(--amber)}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:14px;background:var(--panel2)}table{border-collapse:collapse;width:100%;min-width:720px}th{text-align:left;color:var(--cyan2);font:500 12px 'DM Mono',monospace;text-transform:uppercase;letter-spacing:.08em;background:#142630}td,th{padding:15px 17px;border-bottom:1px solid #20333e;vertical-align:top}tr:last-child td{border-bottom:0}td:first-child{font-weight:700}code,.pin{font:12px 'DM Mono',monospace;color:var(--lime);background:#14242b;padding:2px 5px;border-radius:4px}.diagram{background:#071016;border:1px solid #294552;border-radius:16px;padding:14px;overflow:auto}.diagram svg{width:100%;height:auto;min-width:720px;display:block}.caption{font-size:.83rem;color:var(--muted);margin:10px 4px 0}.steps{counter-reset:step;display:grid;gap:13px}.step{counter-increment:step;position:relative;padding:20px 22px 20px 72px;background:var(--panel2);border:1px solid var(--line);border-radius:13px}.step:before{content:counter(step,decimal-leading-zero);position:absolute;left:19px;top:21px;color:var(--cyan);font:500 13px 'DM Mono',monospace}.step h3{margin-bottom:5px}.step p{margin:0;color:#c2d1d9}.callout{margin-top:16px;padding:13px 15px;border:1px solid #2a5360;border-radius:10px;background:#10252d;color:#bdd8df;font-size:.9rem}.trouble{display:grid;grid-template-columns:1fr 2fr;border:1px solid var(--line);border-radius:13px;overflow:hidden}.trouble div{padding:13px 16px;border-bottom:1px solid var(--line)}.trouble div:nth-last-child(-n+2){border-bottom:0}.trouble .issue{font-weight:700;background:#111e26;color:#ffd1d1}.footer{border-top:1px solid var(--line);padding:24px 0 8px;color:var(--muted);font-size:.82rem}.mono{font-family:'DM Mono',monospace;font-size:.88em;color:var(--lime)}@media(max-width:700px){#guide{padding:15px}.hero{padding:34px 26px;min-height:0}.grid{grid-template-columns:1fr}section{margin:38px 0}.trouble{grid-template-columns:1fr}.trouble div:nth-last-child(2){border-bottom:1px solid var(--line)}}
</style>
</head>
<body>
<main id="guide" aria-label="Stereo audio amplifier breadboard build guide"></main>
<script>
(function () {
'use strict';
var __mods = {};
var __cache = {};
var __map = {};
function __require(id) {
  if (__cache[id]) return __cache[id].exports;
  var module = __cache[id] = { exports: {} };
  var factory = __mods[id];
  if (!factory) throw new Error("Module not found: " + id);
  factory(module.exports, function (spec) {
    var target = (__map[id] && __map[id][spec]) || spec;
    return __require(target);
  }, module);
  return module.exports;
}

// ── module: src/main.ts ──
__mods["src/main.ts"] = function (exports, require, module) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const app = document.querySelector('#guide');
app.innerHTML = `
<header class="hero"><div class="eyebrow">Bench Notes / 01 · Stereo Audio</div><h1>Build a stereo amplifier on a breadboard.</h1><p>Two classic LM386 low-voltage power amplifiers turn a line-level music signal into speaker-level audio. One IC handles the left channel and one the right: a compact, battery-friendly first amplifier with independently mixed stereo volume control.</p><div class="badges"><span class="badge">9 V DC</span><span class="badge">2 × LM386</span><span class="badge">8 Ω speakers</span><span class="badge">Beginner friendly</span></div></header>
<nav class="toc" aria-label="Guide sections"><a href="#safety">Safety</a><a href="#parts">Parts list</a><a href="#diagrams">Diagrams</a><a href="#assembly">Assembly</a><a href="#testing">Test & troubleshoot</a></nav>
<section id="intro"><h2><span class="num">00</span>Signal in, sound out</h2><p class="lead">An LM386 is a small mono audio power amplifier. Its non-inverting input receives an AC-coupled audio signal; internal gain amplifies it, and a large output capacitor protects the speaker from DC. Build the same proven circuit twice, share the 9 V supply and ground, then route the left and right contacts of a 3.5 mm source through a dual-gang volume pot.</p><div class="warning"><strong>Design note —</strong> This guide uses low power (about 0.3–0.7 W/channel). It is ideal for efficient 8 Ω speakers at desktop volume, not headphones or large hi-fi drivers.</div></section>
<section id="safety"><h2><span class="num">01</span>Safety & prerequisites</h2><div class="grid"><article class="card"><h3>Workbench rules</h3><ul><li>Disconnect the 9 V supply before moving wires or capacitors.</li><li>Observe electrolytic polarity: the striped lead is <span class="pin">−</span>. A reversed capacitor can vent or fail.</li><li>Use a regulated 9 V supply or fresh 9 V battery. Never use mains voltage.</li><li>Start at minimum volume; avoid shorting the speaker leads or supply rails.</li></ul></article><article class="card"><h3>Tools & baseline knowledge</h3><ul><li>Solderless breadboard, solid-core jumpers, wire cutters/strippers, and a multimeter.</li><li>Audio source with 3.5 mm cable/breakout; two 8 Ω speakers.</li><li>Optional: soldering iron only if making a permanent lead or jack adapter.</li><li>Recognize resistor color/value markings, capacitor polarity, IC notch orientation, and breadboard connected rows.</li></ul></article></div></section>
<section id="parts"><h2><span class="num">02</span>Complete parts list</h2><div class="table-wrap"><table><thead><tr><th>Component / part number</th><th>Qty.</th><th>Purpose / role</th></tr></thead><tbody><tr><td>LM386N-1 low-voltage audio power amplifier, DIP-8</td><td>2</td><td>One mono power stage per left/right channel.</td></tr><tr><td>10 kΩ dual-gang logarithmic potentiometer</td><td>1</td><td>Master stereo volume; use two 10 kΩ pots if dual-gang is unavailable.</td></tr><tr><td>10 µF electrolytic capacitor, ≥16 V</td><td>4</td><td>Two input coupling capacitors + two gain capacitors (pins 1–8).</td></tr><tr><td>220 µF electrolytic capacitor, ≥16 V</td><td>2</td><td>DC-blocked speaker outputs.</td></tr><tr><td>100 nF ceramic + 100 µF electrolytic</td><td>1 each</td><td>Shared supply decoupling; fit close to ICs.</td></tr><tr><td>10 Ω resistor + 47 nF capacitor</td><td>2 each</td><td>Output Zobel networks for stable high-frequency operation.</td></tr><tr><td>8 Ω speakers, 1 W or greater</td><td>2</td><td>Left and right sound output.</td></tr><tr><td>9 V battery + clip or regulated 9 V DC supply</td><td>1</td><td>Power source.</td></tr><tr><td>Breadboard, jumpers, 3.5 mm TRS breakout/jack</td><td>1 set</td><td>Prototyping and stereo source connection.</td></tr></tbody></table></div></section>
<section id="diagrams"><h2><span class="num">03</span>Circuit diagrams</h2><div class="diagram">${schematic()}</div><p class="caption">Figure A — Repeat the highlighted LM386 channel for LEFT and RIGHT. All ground symbols join the blue ground rail.</p><div style="height:18px"></div><div class="diagram">${breadboard()}</div><p class="caption">Figure B — Visual placement map. The center trench keeps each DIP-8 pin on its own breadboard row. Connect matching colored nets exactly once per channel.</p></section>
<section id="assembly"><h2><span class="num">04</span>Step-by-step assembly</h2><div class="steps"><article class="step"><h3>Prepare the power rails</h3><p>Link split red rails together and split blue rails together. Connect the battery clip <code>+9V</code> to red and <code>GND</code> to blue. Keep the battery disconnected for now.</p></article><article class="step"><h3>Place both LM386 ICs</h3><p>Straddle the center trench with notches facing up. The notch identifies the top: pin 1 is top-left, pin 8 top-right. Reserve the left IC for <span class="mono">L</span> and right IC for <span class="mono">R</span>.</p></article><article class="step"><h3>Wire power and decoupling</h3><p>For each IC connect pin <code>6 → +9V</code> and pin <code>4 → GND</code>. Place 100 nF ceramic and 100 µF electrolytic across the rails; the 100 µF positive lead goes to +9 V.</p></article><article class="step"><h3>Set gain and bypass</h3><p>Place a 10 µF capacitor from pin <code>1 (+)</code> to pin <code>8 (−)</code> on each IC for high gain. Connect pin <code>7</code> to ground with a 10 µF capacitor, positive lead at pin 7.</p></article><article class="step"><h3>Add the volume control and input</h3><p>TRS sleeve goes to GND; tip is Left and ring is Right. Feed each through a 10 µF input capacitor (positive toward pot/IC). Pot outer lug goes to signal, other outer lug to ground; each wiper goes to its IC pin <code>3</code>. Tie pin <code>2</code> to ground.</p></article><article class="step"><h3>Connect outputs and speakers</h3><p>From each pin <code>5</code>, fit 220 µF with <strong>positive at pin 5</strong>; its negative lead goes to the speaker + terminal. Speaker − returns to GND. Add the 10 Ω + 47 nF series Zobel from pin 5 to GND.</p></article></div><div class="callout"><strong>Before power:</strong> use continuity mode to confirm red and blue rails are not shorted. Check each IC’s pin 6 is +9 V and pin 4 is ground. Recheck every electrolytic stripe.</div></section>
<section id="testing"><h2><span class="num">05</span>Testing & troubleshooting</h2><div class="grid"><article class="card"><h3>Safe first power-up</h3><ol><li>Set volume fully down and disconnect the audio source.</li><li>Power the circuit; measure near each IC: pin 6 ≈ 9 V, pin 4 = 0 V.</li><li>Measure pin 5: it should sit near half the supply. The speaker side of each 220 µF should be near 0 V DC.</li><li>Connect source, play a quiet track, then raise volume slowly.</li></ol></article><article class="card"><h3>Isolation trick</h3><p>If only one channel fails, swap the input leads at the potentiometer. If the fault moves, it is source/input wiring; if it stays, inspect that channel’s IC, output capacitor, and speaker wiring.</p></article></div><div style="height:18px"></div><div class="trouble"><div class="issue">No sound</div><div>Verify source output, common TRS sleeve ground, pin 3 signal path, and speaker return. Check the pot wiper is used—not an unused lug.</div><div class="issue">Hum or buzz</div><div>Use one common ground rail; keep input wires short and away from pin 5/speaker wires. Add/verify rail decoupling capacitors.</div><div class="issue">Hot IC / battery drains</div><div>Disconnect power immediately. Look for +9 V-to-ground shorts, a backwards IC, or a reversed electrolytic. Do not continue until corrected.</div><div class="issue">Squeal or distortion</div><div>Confirm the 10 Ω + 47 nF Zobel is series-connected from pin 5 to ground. Shorten output leads and ensure pin 7 bypass capacitors are correctly oriented.</div></div></section><footer class="footer">LM386 DIP-8 reference: 1 gain · 2 GND · 3 input+ · 4 GND · 5 output · 6 VCC · 7 bypass · 8 gain. Values are practical starting points; check your specific LM386 datasheet before a permanent build.</footer>`;
function schematic() { return `<svg viewBox="0 0 960 435" role="img" aria-label="Stereo LM386 schematic"><style>.s{stroke:#c7e6ed;stroke-width:2;fill:none}.w{stroke:#42d3e8;stroke-width:3;fill:none}.p{fill:#101e27;stroke:#42d3e8;stroke-width:2}.t{fill:#dcecf0;font:14px Arial}.m{fill:#94f5ff;font:12px monospace}.g{stroke:#78a6b1;stroke-width:2}</style><text x="35" y="34" class="m">LEFT CHANNEL (repeat for RIGHT)</text><path class="w" d="M48 110H130M160 110H210M210 110H255"/><text x="36" y="96" class="t">L input</text><path class="s" d="M130 88v44m-11-44v44"/><text x="112" y="74" class="m">C1 10µF</text><path class="s" d="M160 110v42M143 152h34M148 160h24"/><text x="166" y="148" class="m">VR 10k</text><path class="s" d="M160 160v24M147 184h26M151 192h18"/><path class="p" d="M255 70h210v225H255z"/><text x="316" y="103" class="t">LM386 — LEFT</text><text x="265" y="128" class="m">1 GAIN</text><text x="265" y="157" class="m">2 GND</text><text x="265" y="186" class="m">3 IN+</text><text x="265" y="215" class="m">4 GND</text><text x="416" y="128" class="m">8 GAIN</text><text x="416" y="157" class="m">7 BYP</text><text x="416" y="186" class="m">6 +9V</text><text x="416" y="215" class="m">5 OUT</text><path class="w" d="M255 180h-45v-70M255 151h-28v120M255 210h-28v61M465 180h70M465 210h52M465 151h36v120M465 121h38v-58M255 121h-38v-58"/><path class="s" d="M217 63h34m-26-8v16m18-16v16M503 63h34m-26-8v16m18-16v16"/><text x="197" y="45" class="m">10µF gain</text><text x="491" y="45" class="m">10µF gain</text><path class="w" d="M535 180h55M590 180v-60h90"/><text x="565" y="108" class="m">+9V</text><path class="w" d="M517 210h80"/><path class="s" d="M597 190v39m-10-39v39"/><text x="605" y="214" class="m">10µF</text><path class="w" d="M597 229v42M570 271h54m-45 8h36m-27 8h18"/><path class="w" d="M535 210h65M600 210v-78h120M600 210h88"/><path class="s" d="M688 110v44m-11-44v44"/><text x="669" y="95" class="m">COUT 220µF</text><path class="w" d="M720 132h75v72"/><path class="s" d="M795 204v34m-16 0h32m-11 8h-10"/><text x="760" y="262" class="t">8Ω speaker</text><path class="w" d="M600 210v100h92"/><path class="s" d="M642 310h22l5-10 10 20 10-20 10 20 5-10h20M724 310v-22m-11 0h22m-11-8v16"/><text x="625" y="340" class="m">10Ω + 47nF Zobel</text><path class="g" d="M72 330h760M94 330v-16m-12 16h24m-17 8h10M227 271v59M597 271v59M795 238v92"/><text x="38" y="368" class="m">COMMON GROUND / 0V — pin 2, pin 4, input sleeve, speakers −</text><text x="36" y="407" class="t">RIGHT: duplicate this channel; use TRS ring → right pot section → second LM386.</text></svg>`; }
function breadboard() { return `<svg viewBox="0 0 960 340" role="img" aria-label="Breadboard placement guide"><style>.b{fill:#e9e5d8;stroke:#71808a;stroke-width:2}.h{fill:#53636d}.r{stroke:#ff6969;stroke-width:5}.u{stroke:#53cde1;stroke-width:5}.y{stroke:#c9f36a;stroke-width:4;fill:none}.x{fill:#14242b;stroke:#42d3e8;stroke-width:2}.t{fill:#dcecf0;font:14px Arial}.m{fill:#94f5ff;font:12px monospace}</style><rect x="55" y="38" width="850" height="255" rx="14" class="b"/><path class="r" d="M77 68h806"/><path class="u" d="M77 89h806"/><text x="78" y="56" class="m">+9V RED RAIL</text><text x="78" y="113" class="m">GND BLUE RAIL</text><path d="M475 125v145" stroke="#9fa9aa" stroke-width="8"/><g fill="#9ea69f">${Array.from({ length: 44 }, (_, i) => `<circle cx="${90 + i * 18}" cy="${135 + (i % 5) * 27}" r="3"/><circle cx="${90 + i * 18}" cy="${280 - (i % 5) * 27}" r="3"/>`).join('')}</g><rect x="235" y="151" width="120" height="96" rx="8" class="x"/><rect x="595" y="151" width="120" height="96" rx="8" class="x"/><text x="255" y="188" class="t">LM386</text><text x="257" y="209" class="m">LEFT • notch ↑</text><text x="615" y="188" class="t">LM386</text><text x="617" y="209" class="m">RIGHT • notch ↑</text><path class="r" d="M278 151V68M638 151V68"/><path class="u" d="M255 247v-158M615 247v-158"/><path class="y" d="M190 212h45M550 212h45M355 210h95M715 210h95"/><text x="99" y="324" class="m">TRS TIP → L pot → pin 3</text><text x="365" y="324" class="m">TRS RING → R pot → pin 3</text><text x="660" y="324" class="m">pin 5 → 220µF (+ at IC) → speakers</text><text x="125" y="138" class="m">Power: pin 6 to red / pin 4 to blue</text><text x="510" y="138" class="m">Fit 10µF from pins 1↔8</text></svg>`; }
};

// ── entry ──
__require("src/main.ts");
})();
</script>
</body>
</html>
<!-- agent-meta {"model":"openai/gpt-5.6-terra","provider":"openrouter","persona":"typescript","sessionId":"4b37cdc5-7c4a-4fe1-a33a-760d4e816030","tokensIn":54997,"tokensOut":6125,"tokensTotal":61122,"turns":8,"toolCalls":7,"failedToolCalls":0,"timestamp":"2026-07-31T16:28:04.772Z"} -->