4 zones · PN2222 low-side switch per zone · Arduino Uno R3 · 5V USB · townhouse_lights.ino
One +5V wire snakes past every fixture (shared by all zones).
Each zone has one return wire back to its transistor. Every LED just bridges the two nearest buses.
| Zone | Pin → 1kΩ → base | Transistor | LEDs (each +5V→LED→220Ω→collector) |
|---|---|---|---|
| GF_INT | D3 | Q1 (PN2222) | 2, living + kitchen ceilings |
| UP_INT | D5 | Q2 | 3, 2 bedroom ceilings, attic |
| EXT | D6 | Q3 | 5, porch A/B, entry, deck, balcony |
| FIRE | D9 | Q4 | 1, hearth · RED LED (flickers) |
| scene button | D2 → button → GND | , | cycles scenes / wakes |
| section button | D4 → button → GND | , | spotlight one zone: GF→UP→EXT→FIRE→off |
E→GND rail, C→that zone's LED bundle, base←pin through 1kΩ. Legs (flat face toward you): E · B · C.+5V, short leg (−) → its own 220Ω → the zone's collector. One resistor per LED.D2 = scene cycle, D4 = section spotlight (one zone at a time). Either wakes from idle.