Circuit
GPT 5.6 Luna Pro · typescript

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 16,375 bytes · SHA-256 8b944a93da89
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Stereo Amp Lab — Breadboard Guide</title>
<style>
/* ── css: theme ── */
:root{--bg:#08111f;--panel:#0e1b2d;--panel2:#12243a;--line:#263c58;--text:#e8f0fa;--muted:#9bb0c8;--cyan:#55d6ff;--amber:#ffc857;--green:#7ee2a8;--red:#ff7b89;--shadow:0 18px 50px #0005}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--text);font:15px/1.65 Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif}a{color:var(--cyan);text-decoration:none}a:hover{text-decoration:underline}.app-shell{max-width:1240px;margin:auto;padding:0 24px 70px}.topbar{display:flex;align-items:center;justify-content:space-between;padding:22px 0;border-bottom:1px solid var(--line)}.brand{font-weight:800;letter-spacing:.08em;font-size:12px;color:var(--cyan);text-transform:uppercase}.nav{display:flex;gap:18px;font-size:13px}.hero{padding:72px 0 54px;display:grid;grid-template-columns:1.15fr .85fr;gap:54px;align-items:center}.kicker{color:var(--amber);font-weight:800;letter-spacing:.15em;text-transform:uppercase;font-size:12px}.hero h1{font-size:clamp(38px,6vw,72px);line-height:.98;letter-spacing:-.05em;margin:15px 0 22px;max-width:720px}.hero h1 span{color:var(--cyan)}.hero p{font-size:18px;color:var(--muted);max-width:650px}.hero-card{background:linear-gradient(145deg,#123253,#0d1a2c);border:1px solid #2e5875;border-radius:22px;padding:28px;box-shadow:var(--shadow);position:relative;overflow:hidden}.hero-card:after{content:'';position:absolute;width:180px;height:180px;border-radius:50%;right:-70px;top:-70px;background:#55d6ff18}.meter{display:flex;gap:8px;align-items:end;height:110px;margin:20px 0}.meter i{display:block;width:19px;background:var(--cyan);border-radius:4px 4px 0 0;box-shadow:0 0 18px #55d6ff66}.meter i:nth-child(1){height:35%}.meter i:nth-child(2){height:60%}.meter i:nth-child(3){height:48%}.meter i:nth-child(4){height:82%}.meter i:nth-child(5){height:65%}.meter i:nth-child(6){height:94%}.meter i:nth-child(7){height:55%}.meter i:nth-child(8){height:74%}.section{padding:58px 0;border-top:1px solid var(--line)}.section-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:24px}.section h2{font-size:32px;letter-spacing:-.03em;margin:0}.section-intro{color:var(--muted);max-width:680px;margin:8px 0 0}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.card{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:22px}.card h3{margin:0 0 7px;font-size:17px}.card p{color:var(--muted);margin:0}.icon{color:var(--cyan);font-size:24px;margin-bottom:10px}.notice{background:#352b13;border:1px solid #8e6b23;color:#ffe9a8;border-radius:12px;padding:17px 20px;margin:22px 0}.notice strong{color:var(--amber)}.parts{width:100%;border-collapse:collapse;background:var(--panel);border:1px solid var(--line);border-radius:14px;overflow:hidden}.parts th{text-align:left;background:var(--panel2);color:var(--cyan);font-size:12px;letter-spacing:.08em;text-transform:uppercase}.parts th,.parts td{padding:14px 16px;border-bottom:1px solid var(--line);vertical-align:top}.parts td{color:var(--muted)}.parts td:first-child{color:var(--text);font-weight:650}.parts tr:last-child td{border:0}.diagram{background:#07101c;border:1px solid var(--line);border-radius:16px;padding:15px;overflow:auto}.diagram svg{display:block;width:100%;min-width:760px;height:auto}.diagram-caption{font-size:13px;color:var(--muted);margin:11px 3px 0}.steps{display:grid;gap:13px;counter-reset:step}.step{display:grid;grid-template-columns:44px 1fr;gap:17px;background:var(--panel);border:1px solid var(--line);padding:18px;border-radius:13px}.step:before{counter-increment:step;content:counter(step,decimal-leading-zero);color:var(--bg);background:var(--cyan);font-weight:900;border-radius:9px;width:40px;height:40px;display:grid;place-items:center}.step h3{margin:0 0 5px}.step p{margin:0;color:var(--muted)}code,.pinmap{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#c5f4ff;background:#07121e;border:1px solid #22415a;padding:2px 6px;border-radius:5px;font-size:.9em}.pinmap{display:block;padding:13px;margin-top:10px;white-space:pre-wrap}.checks{display:grid;grid-template-columns:1fr 1fr;gap:16px}.checks .card{border-left:3px solid var(--green)}.checks .card.warn{border-color:var(--red)}.footer{padding:35px 0;color:var(--muted);font-size:13px;border-top:1px solid var(--line)}@media(max-width:800px){.hero{grid-template-columns:1fr;padding-top:45px}.grid,.checks{grid-template-columns:1fr}.nav{display:none}.app-shell{padding:0 16px 45px}.section{padding:40px 0}.parts{font-size:13px}.parts th,.parts td{padding:10px}.section h2{font-size:27px}}
</style>
</head>
<body>
<div id="app" class="app-shell"></div>
<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('#app');
app.innerHTML = `
<header class="topbar"><div class="brand">◈ AMP LAB / 01</div><nav class="nav"><a href="#parts">Parts</a><a href="#schematics">Schematics</a><a href="#build">Build</a><a href="#test">Test</a></nav></header>
<main>
<section class="hero"><div><div class="kicker">Practical electronics / beginner build</div><h1>Build a <span>stereo</span><br>amp on a breadboard.</h1><p>A pin-by-pin guide to two LM386 audio power amplifier channels. Turn a phone-level signal into room-filling sound while learning how power, gain, coupling, and grounding fit together.</p></div><aside class="hero-card"><div class="kicker">Signal monitor</div><h3>LEFT + RIGHT / LOW-VOLTAGE OUTPUT</h3><div class="meter"><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i></div><small>Designed for a 5–9 V supply · 8 Ω loads</small></aside></section>
<section class="section"><div class="section-head"><div><h2>01 / Start safe</h2><p class="section-intro">Low voltage does not mean no risk. Read the rails twice before applying power.</p></div></div><div class="notice"><strong>Safety first:</strong> use only an isolated 5–9 V DC source. Never connect to mains. Power off before changing wires; a polarized capacitor installed backwards may vent or fail.</div><div class="grid"><article class="card"><div class="icon">◎</div><h3>Workbench</h3><p>Eye protection, tidy leads, good lighting, and a nonconductive surface. Soldering is optional—this is breadboard-first.</p></article><article class="card"><div class="icon">⌁</div><h3>Tools</h3><p>Multimeter, wire cutters/strippers, jumper wires, phone or signal source, and two 8 Ω speakers.</p></article><article class="card"><div class="icon">◌</div><h3>Know the basics</h3><p>Rows of five breadboard holes connect internally. Capacitors marked + are polarized. Pin 1 is identified by the IC notch or dot.</p></article></div></section>
<section class="section" id="parts"><div class="section-head"><div><h2>02 / Bill of materials</h2><p class="section-intro">Buy two identical channels. LM386 is a single amplifier, so one chip handles each speaker.</p></div></div><table class="parts"><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 IC</td><td>2</td><td>One amplifier channel per IC; internal gain 20.</td></tr><tr><td>10 µF electrolytic capacitor</td><td>2</td><td>Input coupling; blocks DC from the source.</td></tr><tr><td>220 µF electrolytic capacitor</td><td>2</td><td>Output coupling to each speaker.</td></tr><tr><td>100 nF ceramic + 100 µF electrolytic</td><td>2 each</td><td>High/low-frequency supply decoupling.</td></tr><tr><td>10 kΩ audio-taper potentiometer</td><td>2</td><td>Independent left/right volume.</td></tr><tr><td>8 Ω, 0.5–1 W speakers</td><td>2</td><td>Left and right loads.</td></tr><tr><td>5–9 V regulated supply or 9 V battery + clip</td><td>1</td><td>Clean, isolated power.</td></tr><tr><td>Solderless breadboard + jumper wire kit</td><td>1 each</td><td>Prototyping platform and connections.</td></tr><tr><td>Optional 10 nF capacitor + 1 kΩ resistor</td><td>2 each</td><td>Zobel stability network from output to ground.</td></tr></tbody></table></section>
<section class="section" id="schematics"><div class="section-head"><div><h2>03 / Read the circuit</h2><p class="section-intro">Build the right channel, then duplicate it for left. Ground is common; signal paths stay separate.</p></div></div><div class="diagram"><svg viewBox="0 0 1000 390" role="img" aria-label="stereo LM386 schematic"><defs><style>.w{stroke:#55d6ff;stroke-width:3;fill:none}.p{stroke:#ffc857;stroke-width:3;fill:none}.g{stroke:#7ee2a8;stroke-width:3;fill:none}.t{fill:#e8f0fa;font:15px system-ui}.s{fill:#9bb0c8;font:12px system-ui}.chip{fill:#12243a;stroke:#55d6ff;stroke-width:2}</style></defs><text x="20" y="25" class="t">LEFT CHANNEL</text><text x="515" y="25" class="t">RIGHT CHANNEL</text><g transform="translate(20 45)"><rect class="chip" x="280" y="90" width="135" height="140" rx="8"/><text class="t" x="315" y="165">LM386</text><path class="w" d="M0 125h280M415 160h80l35 0"/><path class="p" d="M350 90V25H220"/><path class="g" d="M350 230v45H220m130 0h150"/><path class="p" d="M530 160v-45h55"/><path class="g" d="M575 160v65h-45"/><path class="w" d="M575 160h65v45"/><text class="s" x="4" y="119">L IN → 10µF → pin 3</text><text class="s" x="220" y="20">+5–9V → pin 6</text><text class="s" x="270" y="300">pin 4 → common GND</text><text class="s" x="535" y="108">220µF +</text><text class="s" x="625" y="155">8Ω SPK</text><text class="s" x="5" y="175">pin 2 → GND</text></g><g transform="translate(510 45)"><rect class="chip" x="280" y="90" width="135" height="140" rx="8"/><text class="t" x="315" y="165">LM386</text><path class="w" d="M0 125h280M415 160h80l35 0"/><path class="p" d="M350 90V25H220"/><path class="g" d="M350 230v45H220m130 0h150"/><path class="p" d="M530 160v-45h55"/><path class="g" d="M575 160v65h-45"/><path class="w" d="M575 160h65v45"/><text class="s" x="4" y="119">R IN → 10µF → pin 3</text><text class="s" x="220" y="20">+5–9V → pin 6</text><text class="s" x="270" y="300">pin 4 → common GND</text><text class="s" x="535" y="108">220µF +</text><text class="s" x="625" y="155">8Ω SPK</text><text class="s" x="5" y="175">pin 2 → GND</text></g></svg><p class="diagram-caption"><span style="color:var(--cyan)">Cyan = signal</span> · <span style="color:var(--amber)">amber = +V</span> · <span style="color:var(--green)">green = ground</span>. Pin 5 is output; pin 6 +V; pin 4 ground. Leave pins 1 and 8 open for gain 20.</p></div><div class="diagram" style="margin-top:18px"><svg viewBox="0 0 1000 285" role="img" aria-label="breadboard wiring map"><defs><style>.r{fill:#162b43;stroke:#385a78;stroke-width:2}.i{fill:#0b111b;stroke:#55d6ff;stroke-width:2}.a{stroke:#ffc857;stroke-width:4}.c{stroke:#55d6ff;stroke-width:4}.n{stroke:#7ee2a8;stroke-width:4}.t{fill:#e8f0fa;font:14px system-ui}.s{fill:#9bb0c8;font:12px system-ui}</style></defs><text class="t" x="20" y="23">ONE CHANNEL · mirror for the second channel</text><rect class="r" x="25" y="50" width="950" height="32" rx="5"/><rect class="r" x="25" y="225" width="950" height="32" rx="5"/><text class="s" x="42" y="71">RED RAIL +5–9V</text><text class="s" x="42" y="246">BLUE RAIL 0V / GND</text><rect class="i" x="385" y="105" width="210" height="65" rx="7"/><path d="M490 105v65" stroke="#55d6ff" stroke-dasharray="4 4"/><text class="t" x="448" y="138">LM386</text><text class="s" x="420" y="157">center trench / notch ↑</text><path class="a" d="M410 105V66M570 170v71M490 105V66"/><path class="n" d="M430 170v71M550 170v71"/><path class="c" d="M385 122H230M595 145H760"/><text class="s" x="55" y="120">pot wiper → 10µF → pin 3</text><text class="s" x="765" y="149">pin 5 → 220µF → speaker +</text><text class="s" x="390" y="195">pins 2, 4 → GND rail</text><text class="s" x="740" y="215">speaker − → GND</text></svg><p class="diagram-caption">Each five-hole strip is connected internally; the center trench isolates IC sides. Keep input wire away from output wire.</p></div></section>
<section class="section" id="build"><div class="section-head"><div><h2>04 / Assemble, in order</h2><p class="section-intro">Unplug the battery while wiring. Complete and test one channel, then copy it.</p></div></div><div class="steps"><article class="step"><div><h3>Place the IC</h3><p>Bridge the center trench. With the notch up, pins number counter-clockwise: left side 1–4 top-to-bottom, right side 5–8 bottom-to-top. Verify your exact package datasheet.</p><code class="pinmap">1 GAIN · 2 IN− · 3 IN+ · 4 GND · 5 OUT · 6 VS · 7 BYPASS · 8 GAIN</code></div></article><article class="step"><div><h3>Establish rails and decouple</h3><p>Connect red battery lead to + rail and black to blue only at the end. Pin 6 → +V; pin 4 → GND. Place 100 nF ceramic and 100 µF electrolytic directly between rails, with electrolytic + to +V. Tie both channels to common rails.</p></div></article><article class="step"><div><h3>Add volume and input</h3><p>Each 10 kΩ pot: outer lug to source signal, other outer lug to GND, wiper to the positive leg of 10 µF. Capacitor negative → pin 3. Audio jack sleeve → GND; tip = left, ring = right. Mono source may feed both pots.</p></div></article><article class="step"><div><h3>Wire output</h3><p>Pin 5 → positive leg of 220 µF; negative leg → speaker +. Speaker − → common GND. Leave pins 1, 7, and 8 open. Optional stability: pin 5 → 10 nF → 1 kΩ → GND.</p></div></article><article class="step"><div><h3>Inspect, then power</h3><p>Turn both pots fully counter-clockwise. Check rail shorts, capacitor polarity, IC orientation, and one common ground. Connect battery, start source volume low, then raise slowly.</p></div></article></div></section>
<section class="section" id="test"><div class="section-head"><div><h2>05 / Test & troubleshoot</h2><p class="section-intro">A multimeter and a methodical pause beat guesswork. Disconnect power before moving a jumper.</p></div></div><div class="checks"><article class="card"><h3>✓ Before power</h3><p>Continuity-check ground. With power disconnected, verify red-to-blue is not a dead short. Confirm pin 6 → +V and pin 4 → GND. Inspect every polarized capacitor.</p></article><article class="card warn"><h3>! No sound / hum</h3><p>Check source ground, pot ground, pin 4, and speaker returns. Verify tip/ring and that the wiper, not an outer lug, feeds the capacitor.</p></article><article class="card warn"><h3>! Distortion or heat</h3><p>Lower source volume. Check 8 Ω impedance, reversed electrolytics, and output-to-input contact. Never connect a speaker directly to pin 5 without 220 µF coupling.</p></article><article class="card"><h3>✓ Voltage sanity check</h3><p>Powered with no audio, measure pin 6 to pin 4: 5–9 V. Pin 5 should sit near half the supply DC; near 0 V or +V means power down and inspect.</p></article></div><div class="notice"><strong>Feedback loop warning:</strong> keep speaker wires and pin 5 away from input wiring. If it squeals, power down, shorten leads, add the Zobel, and separate input/output routes.</div></section>
</main><footer class="footer">AMP LAB 01 · Low-voltage educational prototype · Verify pinouts against the datasheet for your exact LM386 package.</footer>`;
};
// ── entry ──
__require("src/main.ts");
})();
</script>
</body>
</html>
<!-- agent-meta {"model":"openai/gpt-5.6-luna-pro","provider":"openrouter","persona":"typescript","sessionId":"1acd1cbd-36ec-4a5a-aff5-9179847f0c63","tokensIn":214852,"tokensOut":15876,"tokensTotal":230728,"turns":6,"toolCalls":9,"failedToolCalls":1,"timestamp":"2026-07-31T03:18:34.259Z"} -->