electro/full-wiring.html
2026-08-24 14:09:36 -04:00

331 lines
23 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<title>House Lighting, Full Wiring (transistor build)</title>
<style>
:root{ --bg:#faf8f4;--ink:#1c1a17;--muted:#6b6459;--card:#fff;--line:#3a352e;
--red:#c0392b;--grn:#2e7d32;--slate:#5b6b7a;--amber:#c98a1a;--rule:#d8d2c7; }
@media (prefers-color-scheme:dark){:root{--bg:#17150f;--ink:#eee7d9;--muted:#a49a88;
--card:#211e17;--line:#c9c2b4;--red:#e5675a;--grn:#6bbf70;--slate:#8fa3b5;--amber:#e0b24e;--rule:#3a352b;}}
:root[data-theme=light]{--bg:#faf8f4;--ink:#1c1a17;--muted:#6b6459;--card:#fff;--line:#3a352e;
--red:#c0392b;--grn:#2e7d32;--slate:#5b6b7a;--amber:#c98a1a;--rule:#d8d2c7;}
:root[data-theme=dark]{--bg:#17150f;--ink:#eee7d9;--muted:#a49a88;--card:#211e17;--line:#c9c2b4;
--red:#e5675a;--grn:#6bbf70;--slate:#8fa3b5;--amber:#e0b24e;--rule:#3a352b;}
body{background:var(--bg);color:var(--ink);
font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;margin:0;padding:24px;}
.wrap{max-width:1000px;margin:0 auto;}
h1{font-size:20px;margin:0 0 2px;} .sub{color:var(--muted);margin:0 0 18px;font-size:13px;}
.card{background:var(--card);border:1px solid var(--rule);border-radius:12px;padding:16px;margin-bottom:18px;}
.scroll{overflow-x:auto;}
svg{display:block;margin:0 auto;max-width:100%;height:auto;min-width:820px;}
text{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;fill:var(--ink);}
.lbl{font-size:12.5px;} .sm{font-size:10.5px;fill:var(--muted);} .zn{font-size:13px;font-weight:bold;}
.w5{stroke:var(--red);stroke-width:3;fill:none;}
.wg{stroke:var(--line);stroke-width:3.4;fill:none;}
.wire{stroke:var(--line);stroke-width:2;fill:none;}
.wsig{stroke:var(--slate);stroke-width:2;fill:none;stroke-dasharray:5 4;}
.node{fill:var(--line);} .chip{fill:var(--card);stroke:var(--line);stroke-width:2;}
table{border-collapse:collapse;width:100%;font-size:13px;margin-top:4px;}
th,td{border:1px solid var(--rule);padding:6px 9px;text-align:left;} th{background:rgba(128,128,128,.08);}
code{font-family:ui-monospace,Menlo,monospace;background:rgba(128,128,128,.12);padding:1px 5px;border-radius:4px;font-size:.9em;}
.key{display:flex;gap:16px;flex-wrap:wrap;font-size:12px;color:var(--muted);margin-top:10px;}
.key span{display:inline-flex;align-items:center;gap:6px;} .sw{width:20px;height:0;border-top:3px solid;}
ul{margin:6px 0 0;padding-left:18px;font-size:13.5px;} li{margin:2px 0;}
</style>
<div class="wrap">
<h1>House Lighting, full wiring (transistor build)</h1>
<p class="sub">4 zones · PN2222 low-side switch per zone · Arduino Uno R3 · 5V USB · <code>townhouse_lights.ino</code></p>
<div class="card scroll">
<svg viewBox="0 0 1000 640" role="img" aria-label="Full system wiring diagram">
<!-- ===== RAILS ===== -->
<line class="w5" x1="60" y1="70" x2="980" y2="70"/>
<text class="lbl" x="300" y="62" fill="var(--red)">+5V rail</text>
<line class="wg" x1="60" y1="590" x2="980" y2="590"/>
<text class="lbl" x="300" y="608">GND rail</text>
<!-- ===== POWER INPUT (top-left) ===== -->
<rect class="chip" x="40" y="120" width="96" height="30" rx="4"/>
<text class="sm" x="48" y="139">USB bank 5V</text>
<rect class="chip" x="40" y="162" width="96" height="26" rx="4"/>
<text class="sm" x="46" y="179">USB (bench)</text>
<!-- master switch on bank +line -->
<line class="w5" x1="136" y1="132" x2="160" y2="132"/>
<circle class="node" cx="160" cy="132" r="3"/><line class="w5" x1="163" y1="130" x2="182" y2="120"/>
<circle class="node" cx="185" cy="132" r="3"/><text class="sm" x="150" y="115">master sw</text>
<line class="w5" x1="185" y1="132" x2="208" y2="132"/>
<!-- diode OR -->
<polygon points="208,124 224,132 208,140" fill="none" stroke="var(--red)" stroke-width="2"/>
<line x1="224" y1="124" x2="224" y2="140" stroke="var(--red)" stroke-width="2"/>
<line class="w5" x1="224" y1="132" x2="250" y2="132"/>
<line class="w5" x1="136" y1="175" x2="208" y2="175"/>
<polygon points="208,167 224,175 208,183" fill="none" stroke="var(--red)" stroke-width="2"/>
<line x1="224" y1="167" x2="224" y2="183" stroke="var(--red)" stroke-width="2"/>
<line class="w5" x1="224" y1="175" x2="250" y2="175"/>
<line class="w5" x1="250" y1="132" x2="250" y2="175"/>
<circle class="node" cx="250" cy="132" r="3"/>
<line class="w5" x1="250" y1="132" x2="250" y2="70"/>
<text class="sm" x="196" y="200">MBR030 diode-OR → rail</text>
<!-- GND from bank -->
<line class="wg" x1="88" y1="150" x2="88" y2="590"/>
<circle class="node" cx="88" cy="590" r="3"/>
<line class="wg" x1="88" y1="188" x2="88" y2="200"/>
<!-- ===== ARDUINO ===== -->
<rect class="chip" x="40" y="250" width="120" height="230" rx="8"/>
<text class="lbl" x="70" y="242">Arduino Uno</text>
<!-- 5V/GND to rails -->
<text class="sm" x="50" y="285">5V</text>
<line class="w5" x1="160" y1="280" x2="180" y2="280"/><line class="w5" x1="180" y1="280" x2="180" y2="70"/>
<circle class="node" cx="180" cy="70" r="3"/>
<text class="sm" x="46" y="474">GND</text>
<line class="wg" x1="100" y1="480" x2="100" y2="590"/>
<circle class="node" cx="100" cy="480" r="3"/><circle class="node" cx="100" cy="590" r="3"/>
<!-- signal pins -->
<text class="sm" x="120" y="320">D3</text><circle class="node" cx="160" cy="315" r="3"/>
<text class="sm" x="120" y="350">D5</text><circle class="node" cx="160" cy="345" r="3"/>
<text class="sm" x="120" y="380">D6</text><circle class="node" cx="160" cy="375" r="3"/>
<text class="sm" x="120" y="410">D9</text><circle class="node" cx="160" cy="405" r="3"/>
<text class="sm" x="120" y="440">D2</text><circle class="node" cx="160" cy="435" r="3"/>
<text class="sm" x="120" y="468">D4</text><circle class="node" cx="160" cy="463" r="3"/>
<!-- ===== BUTTONS: D2 scene, D4 section ===== -->
<line class="wire" x1="160" y1="435" x2="210" y2="435"/>
<rect class="chip" x="210" y="424" width="34" height="22" rx="4"/><text class="sm" x="214" y="439">BTN</text>
<line class="wg" x1="244" y1="435" x2="270" y2="435"/>
<text class="sm" x="278" y="431">scene (D2)</text>
<line class="wire" x1="160" y1="463" x2="210" y2="463"/>
<rect class="chip" x="210" y="452" width="34" height="22" rx="4"/><text class="sm" x="214" y="467">BTN</text>
<line class="wg" x1="244" y1="463" x2="270" y2="463"/>
<text class="sm" x="278" y="467">section (D4)</text>
<line class="wg" x1="270" y1="435" x2="270" y2="590"/>
<circle class="node" cx="270" cy="463" r="3"/><circle class="node" cx="270" cy="590" r="3"/>
<!-- ===== ZONE STAGES ===== -->
<!-- each: 2 LED branches (rep) + count, transistor, base from pin via 1k -->
<!-- GF cx=430 D3 y315 Q1 -->
<g>
<!-- branches -->
<line class="w5" x1="414" y1="70" x2="414" y2="96"/><circle class="node" cx="414" cy="70" r="2.5"/>
<polygon points="404,96 424,96 414,116" fill="none" stroke="var(--amber)" stroke-width="2"/>
<line x1="404" y1="116" x2="424" y2="116" stroke="var(--amber)" stroke-width="2.3"/>
<line class="wire" x1="414" y1="116" x2="414" y2="132"/>
<rect class="chip" x="398" y="132" width="32" height="34" rx="3"/><text class="sm" x="401" y="153">220</text>
<line class="wire" x1="414" y1="166" x2="414" y2="360"/>
<line class="w5" x1="446" y1="70" x2="446" y2="96"/><circle class="node" cx="446" cy="70" r="2.5"/>
<polygon points="436,96 456,96 446,116" fill="none" stroke="var(--amber)" stroke-width="2"/>
<line x1="436" y1="116" x2="456" y2="116" stroke="var(--amber)" stroke-width="2.3"/>
<line class="wire" x1="446" y1="116" x2="446" y2="132"/>
<rect class="chip" x="430" y="132" width="32" height="34" rx="3"/><text class="sm" x="433" y="153">220</text>
<line class="wire" x1="446" y1="166" x2="446" y2="360"/>
<line class="wire" x1="414" y1="360" x2="446" y2="360"/>
<text class="zn" x="404" y="210">GF · Q1</text><text class="sm" x="404" y="226">×2 LEDs</text>
<!-- transistor -->
<line class="wire" x1="430" y1="360" x2="430" y2="392"/>
<circle class="chip" cx="430" cy="422" r="28"/><text class="sm" x="418" y="426">Q1</text>
<line class="wg" x1="430" y1="450" x2="430" y2="590"/><circle class="node" cx="430" cy="590" r="2.5"/>
<text class="sm" x="438" y="470">E</text><text class="sm" x="438" y="392">C</text>
<!-- base from D3 -->
<line class="wsig" x1="160" y1="315" x2="335" y2="315"/>
<line class="wsig" x1="335" y1="315" x2="335" y2="422"/>
<rect class="chip" x="360" y="412" width="34" height="20" rx="3"/><text class="sm" x="363" y="426">1kΩ</text>
<line class="wsig" x1="335" y1="422" x2="360" y2="422"/>
<line class="wsig" x1="394" y1="422" x2="402" y2="422"/>
</g>
<!-- UP cx=600 D5 y345 Q2 -->
<g>
<line class="w5" x1="584" y1="70" x2="584" y2="96"/><circle class="node" cx="584" cy="70" r="2.5"/>
<polygon points="574,96 594,96 584,116" fill="none" stroke="var(--amber)" stroke-width="2"/>
<line x1="574" y1="116" x2="594" y2="116" stroke="var(--amber)" stroke-width="2.3"/>
<line class="wire" x1="584" y1="116" x2="584" y2="132"/>
<rect class="chip" x="568" y="132" width="32" height="34" rx="3"/><text class="sm" x="571" y="153">220</text>
<line class="wire" x1="584" y1="166" x2="584" y2="360"/>
<line class="w5" x1="616" y1="70" x2="616" y2="96"/><circle class="node" cx="616" cy="70" r="2.5"/>
<polygon points="606,96 626,96 616,116" fill="none" stroke="var(--amber)" stroke-width="2"/>
<line x1="606" y1="116" x2="626" y2="116" stroke="var(--amber)" stroke-width="2.3"/>
<line class="wire" x1="616" y1="116" x2="616" y2="132"/>
<rect class="chip" x="600" y="132" width="32" height="34" rx="3"/><text class="sm" x="603" y="153">220</text>
<line class="wire" x1="616" y1="166" x2="616" y2="360"/>
<line class="wire" x1="584" y1="360" x2="616" y2="360"/>
<text class="zn" x="574" y="210">UP · Q2</text><text class="sm" x="574" y="226">×3 LEDs</text>
<line class="wire" x1="600" y1="360" x2="600" y2="392"/>
<circle class="chip" cx="600" cy="422" r="28"/><text class="sm" x="588" y="426">Q2</text>
<line class="wg" x1="600" y1="450" x2="600" y2="590"/><circle class="node" cx="600" cy="590" r="2.5"/>
<line class="wsig" x1="160" y1="345" x2="505" y2="345"/>
<line class="wsig" x1="505" y1="345" x2="505" y2="422"/>
<rect class="chip" x="530" y="412" width="34" height="20" rx="3"/><text class="sm" x="533" y="426">1kΩ</text>
<line class="wsig" x1="505" y1="422" x2="530" y2="422"/>
<line class="wsig" x1="564" y1="422" x2="572" y2="422"/>
</g>
<!-- EXT cx=770 D6 y375 Q3 (5 LEDs, draw 2 + note) -->
<g>
<line class="w5" x1="754" y1="70" x2="754" y2="96"/><circle class="node" cx="754" cy="70" r="2.5"/>
<polygon points="744,96 764,96 754,116" fill="none" stroke="var(--amber)" stroke-width="2"/>
<line x1="744" y1="116" x2="764" y2="116" stroke="var(--amber)" stroke-width="2.3"/>
<line class="wire" x1="754" y1="116" x2="754" y2="132"/>
<rect class="chip" x="738" y="132" width="32" height="34" rx="3"/><text class="sm" x="741" y="153">220</text>
<line class="wire" x1="754" y1="166" x2="754" y2="360"/>
<line class="w5" x1="786" y1="70" x2="786" y2="96"/><circle class="node" cx="786" cy="70" r="2.5"/>
<polygon points="776,96 796,96 786,116" fill="none" stroke="var(--amber)" stroke-width="2"/>
<line x1="776" y1="116" x2="796" y2="116" stroke="var(--amber)" stroke-width="2.3"/>
<line class="wire" x1="786" y1="116" x2="786" y2="132"/>
<rect class="chip" x="770" y="132" width="32" height="34" rx="3"/><text class="sm" x="773" y="153">220</text>
<line class="wire" x1="786" y1="166" x2="786" y2="360"/>
<line class="wire" x1="754" y1="360" x2="786" y2="360"/>
<text class="zn" x="744" y="210">EXT · Q3</text><text class="sm" x="744" y="226">×5 LEDs</text>
<line class="wire" x1="770" y1="360" x2="770" y2="392"/>
<circle class="chip" cx="770" cy="422" r="28"/><text class="sm" x="758" y="426">Q3</text>
<line class="wg" x1="770" y1="450" x2="770" y2="590"/><circle class="node" cx="770" cy="590" r="2.5"/>
<line class="wsig" x1="160" y1="375" x2="675" y2="375"/>
<line class="wsig" x1="675" y1="375" x2="675" y2="422"/>
<rect class="chip" x="700" y="412" width="34" height="20" rx="3"/><text class="sm" x="703" y="426">1kΩ</text>
<line class="wsig" x1="675" y1="422" x2="700" y2="422"/>
<line class="wsig" x1="734" y1="422" x2="742" y2="422"/>
</g>
<!-- FIRE cx=930 D9 y405 Q4 (1 LED) -->
<g>
<line class="w5" x1="930" y1="70" x2="930" y2="96"/><circle class="node" cx="930" cy="70" r="2.5"/>
<polygon points="920,96 940,96 930,116" fill="none" stroke="var(--red)" stroke-width="2"/>
<line x1="920" y1="116" x2="940" y2="116" stroke="var(--red)" stroke-width="2.3"/>
<line class="wire" x1="930" y1="116" x2="930" y2="132"/>
<rect class="chip" x="914" y="132" width="32" height="34" rx="3"/><text class="sm" x="917" y="153">220</text>
<line class="wire" x1="930" y1="166" x2="930" y2="360"/>
<text class="zn" x="906" y="210">FIRE · Q4</text><text class="sm" x="912" y="226">×1 LED</text>
<text class="sm" x="906" y="242" fill="var(--red)">RED · flicker</text>
<line class="wire" x1="930" y1="360" x2="930" y2="392"/>
<circle class="chip" cx="930" cy="422" r="28"/><text class="sm" x="918" y="426">Q4</text>
<line class="wg" x1="930" y1="450" x2="930" y2="590"/><circle class="node" cx="930" cy="590" r="2.5"/>
<line class="wsig" x1="160" y1="405" x2="845" y2="405"/>
<line class="wsig" x1="845" y1="405" x2="845" y2="422"/>
<rect class="chip" x="860" y="412" width="34" height="20" rx="3"/><text class="sm" x="863" y="426">1kΩ</text>
<line class="wsig" x1="845" y1="422" x2="860" y2="422"/>
<line class="wsig" x1="894" y1="422" x2="902" y2="422"/>
</g>
</svg>
<div class="key">
<span><span class="sw" style="border-color:var(--red)"></span>+5V</span>
<span><span class="sw" style="border-color:var(--line)"></span>wire / GND</span>
<span><span class="sw" style="border-color:var(--slate);border-top-style:dashed"></span>signal (PWM → base)</span>
<span><span class="sw" style="border-color:var(--amber)"></span>LED (warm white)</span>
<span><span class="sw" style="border-color:var(--red)"></span>FIRE = red LED</span>
<span>· crossing lines with no dot = not connected</span>
</div>
</div>
<div class="card scroll">
<strong>Running the wire, shared buses, not home-runs</strong>
<p class="sm" style="margin:6px 0 12px">One <code>+5V</code> wire snakes past every fixture (shared by all zones).
Each zone has one <code>return</code> wire back to its transistor. Every LED just bridges the two nearest buses.</p>
<svg viewBox="0 0 900 330" role="img" aria-label="Bus wiring: shared +5V, per-zone returns">
<!-- +5V bus -->
<line class="w5" x1="40" y1="50" x2="860" y2="50"/>
<text class="lbl" x="40" y="42" fill="var(--red)">+5V bus, shared by ALL fixtures</text>
<!-- GF return bus (green) -->
<line x1="40" y1="210" x2="660" y2="210" stroke="var(--grn)" stroke-width="3" fill="none"/>
<text class="sm" x="666" y="214" fill="var(--grn)">GF return → Q1</text>
<!-- EXT return bus (slate) -->
<line x1="40" y1="270" x2="800" y2="270" stroke="var(--slate)" stroke-width="3" fill="none"/>
<text class="sm" x="666" y="288" fill="var(--slate)">EXT return → Q3</text>
<!-- board hint -->
<text class="sm" x="40" y="305">(returns run back to the driver board)</text>
<!-- fixture template: EXT at 150,450,750 ; GF at 300,600 -->
<!-- EXT fixture 150 -->
<g>
<circle class="node" cx="150" cy="50" r="3.2" fill="var(--red)"/>
<line class="wire" x1="150" y1="50" x2="150" y2="76"/>
<polygon points="140,76 160,76 150,96" fill="none" stroke="var(--amber)" stroke-width="2"/>
<line x1="140" y1="96" x2="160" y2="96" stroke="var(--amber)" stroke-width="2.3"/>
<line class="wire" x1="150" y1="96" x2="150" y2="112"/>
<rect class="chip" x="134" y="112" width="32" height="30" rx="3"/><text class="sm" x="137" y="131">220</text>
<line class="wire" x1="150" y1="142" x2="150" y2="270"/>
<circle class="node" cx="150" cy="270" r="3.2" fill="var(--slate)"/>
<text class="sm" x="128" y="164">porch A</text>
</g>
<!-- GF fixture 300 -->
<g>
<circle class="node" cx="300" cy="50" r="3.2" fill="var(--red)"/>
<line class="wire" x1="300" y1="50" x2="300" y2="76"/>
<polygon points="290,76 310,76 300,96" fill="none" stroke="var(--amber)" stroke-width="2"/>
<line x1="290" y1="96" x2="310" y2="96" stroke="var(--amber)" stroke-width="2.3"/>
<line class="wire" x1="300" y1="96" x2="300" y2="112"/>
<rect class="chip" x="284" y="112" width="32" height="30" rx="3"/><text class="sm" x="287" y="131">220</text>
<line class="wire" x1="300" y1="142" x2="300" y2="210"/>
<circle class="node" cx="300" cy="210" r="3.2" fill="var(--grn)"/>
<text class="sm" x="280" y="164">GF living</text>
</g>
<!-- EXT fixture 450 (crosses GF bus, no dot) -->
<g>
<circle class="node" cx="450" cy="50" r="3.2" fill="var(--red)"/>
<line class="wire" x1="450" y1="50" x2="450" y2="76"/>
<polygon points="440,76 460,76 450,96" fill="none" stroke="var(--amber)" stroke-width="2"/>
<line x1="440" y1="96" x2="460" y2="96" stroke="var(--amber)" stroke-width="2.3"/>
<line class="wire" x1="450" y1="96" x2="450" y2="112"/>
<rect class="chip" x="434" y="112" width="32" height="30" rx="3"/><text class="sm" x="437" y="131">220</text>
<line class="wire" x1="450" y1="142" x2="450" y2="270"/>
<circle class="node" cx="450" cy="270" r="3.2" fill="var(--slate)"/>
<text class="sm" x="428" y="164">entry</text>
<text class="sm" x="458" y="205" fill="var(--muted)">← no dot: crosses</text>
<text class="sm" x="458" y="218" fill="var(--muted)">GF bus, not joined</text>
</g>
<!-- GF fixture 600 -->
<g>
<circle class="node" cx="600" cy="50" r="3.2" fill="var(--red)"/>
<line class="wire" x1="600" y1="50" x2="600" y2="76"/>
<polygon points="590,76 610,76 600,96" fill="none" stroke="var(--amber)" stroke-width="2"/>
<line x1="590" y1="96" x2="610" y2="96" stroke="var(--amber)" stroke-width="2.3"/>
<line class="wire" x1="600" y1="96" x2="600" y2="112"/>
<rect class="chip" x="584" y="112" width="32" height="30" rx="3"/><text class="sm" x="587" y="131">220</text>
<line class="wire" x1="600" y1="142" x2="600" y2="210"/>
<circle class="node" cx="600" cy="210" r="3.2" fill="var(--grn)"/>
<text class="sm" x="580" y="164">GF kitchen</text>
</g>
<!-- EXT fixture 750 -->
<g>
<circle class="node" cx="750" cy="50" r="3.2" fill="var(--red)"/>
<line class="wire" x1="750" y1="50" x2="750" y2="76"/>
<polygon points="740,76 760,76 750,96" fill="none" stroke="var(--amber)" stroke-width="2"/>
<line x1="740" y1="96" x2="760" y2="96" stroke="var(--amber)" stroke-width="2.3"/>
<line class="wire" x1="750" y1="96" x2="750" y2="112"/>
<rect class="chip" x="734" y="112" width="32" height="30" rx="3"/><text class="sm" x="737" y="131">220</text>
<line class="wire" x1="750" y1="142" x2="750" y2="270"/>
<circle class="node" cx="750" cy="270" r="3.2" fill="var(--slate)"/>
<text class="sm" x="726" y="164">porch B</text>
</g>
</svg>
<div class="key">
<span><span class="sw" style="border-color:var(--red)"></span>+5V bus (shared)</span>
<span><span class="sw" style="border-color:var(--grn)"></span>GF return</span>
<span><span class="sw" style="border-color:var(--slate)"></span>EXT return</span>
<span>· solid dot = tap/join · line crossing with no dot = not connected</span>
</div>
<ul>
<li><strong>Daisy-chain, don't home-run:</strong> tap the passing +5V and zone-return buses at each fixture, don't run separate pairs all the way back to the board.</li>
<li><strong>One +5V for the whole house</strong> + <strong>one return per zone</strong> (4 zones → 4 returns; 6 → 6). That's the total wire count out of the board.</li>
<li><strong>Different zones near each other</strong> share the +5V bus but must keep <em>separate</em> return wires, never let two zone returns touch, or they switch together.</li>
<li>Put each <strong>220Ω at the LED</strong> (heat-shrink it) so the buses stay clean two-conductor runs. Color-code: red = +5V, a distinct color per return.</li>
</ul>
</div>
<div class="card">
<table>
<tr><th>Zone</th><th>Pin → 1kΩ → base</th><th>Transistor</th><th>LEDs (each +5V→LED→220Ω→collector)</th></tr>
<tr><td>GF_INT</td><td><code>D3</code></td><td>Q1 (PN2222)</td><td>2, living + kitchen ceilings</td></tr>
<tr><td>UP_INT</td><td><code>D5</code></td><td>Q2</td><td>3, 2 bedroom ceilings, attic</td></tr>
<tr><td>EXT</td><td><code>D6</code></td><td>Q3</td><td>5, porch A/B, entry, deck, balcony</td></tr>
<tr><td>FIRE</td><td><code>D9</code></td><td>Q4</td><td>1, hearth · <b style="color:var(--red)">RED LED</b> (flickers)</td></tr>
<tr><td>scene button</td><td><code>D2</code> → button → GND</td><td>, </td><td>cycles scenes / wakes</td></tr>
<tr><td>section button</td><td><code>D4</code> → button → GND</td><td>, </td><td>spotlight one zone: GF→UP→EXT→FIRE→off</td></tr>
</table>
</div>
<div class="card">
<strong>Build & wiring rules</strong>
<ul>
<li>Every zone's transistor: <code>E</code>→GND rail, <code>C</code>→that zone's LED bundle, base←pin through 1kΩ. Legs (flat face toward you): <code>E · B · C</code>.</li>
<li>Every LED: long leg (+) → <code>+5V</code>, short leg () → its own 220Ω → the zone's collector. One resistor per LED.</li>
<li>Add more LEDs to a zone by hanging more of these branches in parallel on the same collector.</li>
<li><strong>FIRE zone uses a RED LED</strong>; all other zones warm-white/white. (Color is hardware only, the sketch just sets brightness.)</li>
<li><strong>Two buttons</strong>, each to GND (internal pull-ups, no resistor): <code>D2</code> = scene cycle, <code>D4</code> = section spotlight (one zone at a time). Either wakes from idle.</li>
<li><strong>Power:</strong> USB bank → master switch → diode-OR → +5V rail. Bench-test on computer USB alone. Only ONE 5V source live at a time (the diode-OR makes that safe if both are ever connected).</li>
<li>Common ground everywhere: bank , Arduino GND, all emitters share the one GND rail.</li>
</ul>
</div>
</div>