From c21f804812b02441f7d6b5ada50a08b69192523c Mon Sep 17 00:00:00 2001 From: jessikitty Date: Fri, 25 Sep 2026 01:29:00 +1000 Subject: [PATCH] Lead with the separate-ground LED build Keeps the shared-rail version documented as the alternative, since that is what the current loom attempts, and links the new pinout reference. --- docs/WIRING.md | 49 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/docs/WIRING.md b/docs/WIRING.md index 5b40c6a..40563fe 100644 --- a/docs/WIRING.md +++ b/docs/WIRING.md @@ -2,6 +2,8 @@ ![Wiring pinout](wiring.svg) +Pin availability and limits: [ESP32-PINOUT.md](ESP32-PINOUT.md). + ## Board to board | Board A (esp32_bluepad32) | | Board B (esp32 2.0.17) | @@ -15,9 +17,34 @@ TX goes to RX, not TX to TX. The ground is a shared voltage reference so the two boards agree on what a logic 1 is — without it you get garbage or silence. It is not a return path for anything else, so do not hang LED current off it. -## LED circuits +## LED circuits — recommended build -Both live entirely on **board B**. Each is its own complete loop: +Each LED gets its own wire out and its own wire back to its own GND pin. Four +wires, no shared junction anywhere. + +![LED wiring with separate grounds](wiring-leds-separate.svg) + +``` +GPIO25 ──[220Ω]──▶|── RED pair ──── GND (a) +GPIO26 ──[100Ω]──▶|── GREEN pair ── GND (b) +``` + +GND (a) and GND (b) are different physical pins but the same net inside the +board. That is fine, and it is exactly what makes this safe: there is no shared +connection point to wire incorrectly. + +Both circuits live entirely on **board B**. LED long leg (anode) faces the +resistor and GPIO side. A reversed LED simply stays dark, so it looks like a +dead circuit rather than a wiring error. + +Resistor values are a starting point: roughly 220Ω for red, 100Ω for blue or +white. A pin is comfortable at about 12mA and hard-limited near 40mA. If a pair +draws more than ~20mA — which pre-wired "3V" LEDs sized for a coin cell often +do — drive it through a small NPN transistor or MOSFET instead of off the pin. + +## Shared ground rail — the other way + +Also valid, one wire fewer, but it has a junction that can be wired wrong: ``` GPIO25 ──[220Ω]──▶|── RED pair ────┐ @@ -25,13 +52,9 @@ GPIO25 ──[220Ω]──▶|── RED pair ────┐ GPIO26 ──[100Ω]──▶|── GREEN pair ──┘ ``` -The two returns meet **only at the ground rail**, and the rail goes straight to -a GND pin on board B. LED long leg (anode) faces the resistor and GPIO side. - -Resistor values are a starting point: roughly 220Ω for red, 100Ω for blue or -white. A pin is comfortable at about 12mA and hard-limited near 40mA. If a pair -draws more than ~20mA — which pre-wired "3V" LEDs sized for a coin cell often -do — drive it through a small NPN transistor or MOSFET instead of off the pin. +The two returns must meet **only at the ground rail**, and the rail goes +straight to a GND pin. See the failure mode below for what happens when that +junction lands in the wrong place. ## Known failure mode: LEDs wired in series @@ -57,12 +80,8 @@ identifies it as wiring. It must read 0V. Press Circle and measure again — if it rises above 0V, that wire is not ground. -**Simplest fix:** give each LED its own separate wire back to its own GND pin -on board B, with no shared return at all. Board B has several grounds, all -common internally. Slightly less tidy, and it removes the junction entirely. - -Worth checking polarity at the same time. A reversed LED simply stays dark, so -it looks like a dead circuit rather than a wiring error. +**Fix:** switch to the separate-ground build above. It removes the junction +entirely, so this cannot recur. ---