PCB Connectivity Audit and Fix


  1. U5 3V3 regulator — U5 = AP2112K-3.3TRG1, Diodes Inc. AP2112 3.3 V LDO, pins: VIN → VBAT_SW, VOUT → 3V3, EN → VBAT_SW, GND → GND; caps: C4 4.7 µF VIN-GND, C5 4.7 µF VOUT-GND, plus C3 10 µF bulk on 3V3 — VERDICT: PROBLEM. Datasheet: AP2112 is 600 mA min output, VIN 2.5–6.0 V, dropout typ/max: 125/200 mV at 300 mA and 250/400 mV at 600 mA. It can supply ESP32-C3 peak current by current rating, but cannot guarantee 3.3 V regulation from a LiPo at 3.3–3.4 V during 350–500 mA RF bursts; it needs roughly 3.3 V + dropout, i.e. about 3.5–3.7 V worst-case depending current. This is the highest-risk design issue.
  2. U2 charger — U2 = TP4056, PROG pin → R4 2.4 kΩ → GND, VCC → VBUS, BAT → BATT_PLUS, TEMP → VBUS, CE → VBUS, EP/GND → GND — VERDICT: CORRECT with caveat. Datasheet: RPROG = 1100 / IBAT; 2.4 kΩ sets about 458 mA. That is ~0.9 C for 500 mAh, within the user’s requested 250–500 mA range but near the upper end. Caveat: TP4056 datasheet says disabling temperature sensing normally ties TEMP to GND; this schematic ties TEMP to VBUS, which is also within the “not too hot/not too cold” voltage window but is not the datasheet’s stated no-NTC connection.
  3. Battery protection U3 + Q1 — U3 = DW01A; VDD → DW_VDD via R12 from BATT_PLUS, VSS → BATT_MINUS, OD → Q1 G1, OC → Q1 G2, CSI → R13 → GND; Q1 = FS8205A, S1 → BATT_MINUS, S2 → GND, common drains Q1 pins 2/5 → PROTECT_FET_COMMON_DRAIN — VERDICT: CORRECT. Datasheet: DW01A typical single-cell protection uses VDD through resistor/cap to cell positive, VSS to cell negative, OD/OC to the back-to-back MOSFET gates, and CSI sensing pack negative/load negative through a resistor. FS8205A is a dual N-MOSFET intended for battery protection.
  4. 3V3 / ESP32 decoupling — C3 10 µF bulk on 3V3, C1 100 nF ESP32 3V3 decoupling, C5 4.7 µF LDO output cap, C4 4.7 µF LDO input cap — VERDICT: CORRECT. Datasheet: ESP32-C3-MINI-1 typical peripheral schematic shows 10 µF + 0.1 µF on VDD33; AP2112 requires at least 1 µF input/output caps and is stable with ceramic caps.
  5. EN — U1 EN → EN net; R1 10 kΩ from EN → 3V3; C2 1 µF from EN → GND — VERDICT: CORRECT. Datasheet: ESP32-C3-MINI-1 says EN must not float and recommends RC delay, usually R = 10 kΩ, C = 1 µF.
  6. ESP32-C3 strapping — GPIO9/U1 IO9 → GPIO9_BUTTON → SW2 pin1 + C12 pin1; SW2 pin2 + C12 pin2 → GND; no external pull-up resistor found on GPIO9; GPIO2/U1 IO2 has no external pull-up found; GPIO8/U1 IO8 has no external pull-up found — VERDICT: PROBLEM. Datasheet: ESP32-C3 boot mode uses GPIO2, GPIO8, GPIO9; SPI boot requires GPIO2=1, GPIO9=1; Joint download boot requires GPIO2=1, GPIO8=1, GPIO9=0. Datasheet says GPIO9 has an internal weak pull-up, and GPIO2 is recommended pulled up due to glitches. For robust production, add external pull-ups for at least GPIO9 and GPIO2, and ensure GPIO8 is high when requesting USB-Serial-JTAG download. Nothing in the schematic forces UART0 boot instead of USB-Serial-JTAG, but the lack of explicit strap pull-ups is a production risk.
  7. SW2 BOOT button — SW2 = TS-1088-AR02016, footprint/package SW-SMD_L3.9-W3.0-P4.45, schematic pins only 1 and 2; pin1 → GPIO9_BUTTON, pin2 → GND; C12 100 nF across same two nodes — VERDICT: CORRECT in schematic, but hardware symptom suggests footprint/pad mapping must be physically probed. Datasheet/library source identifies it as a normally-open SPST switch where terminal 1 connects to terminal 2 when pressed. If your fabricated board does not pull GPIO9 low, the most likely causes are footprint pad numbering mismatch, unsoldered/misaligned side-actuated switch, or wrong substituted switch orientation—not the schematic netlist.
  8. USB D+/D- — USB_DP net: J1 DP1/DP2 + D1 I/O1 pins 1/6 + U1 IO19; USB_DN net: J1 DN1/DN2 + D1 I/O2 pins 3/4 + U1 IO18; D1 = USBLC6-2SC6, VBUS → VBUS, GND → GND — VERDICT: CORRECT. Datasheet: ESP32-C3-MINI-1 maps GPIO18 = USB_D-, GPIO19 = USB_D+; USBLC6-2SC6 is a 2-line low-capacitance USB 2.0 ESD protector, 3.5 pF max, intended for USB data lines and should not block native USB.
  9. MPU-6050 I2C — U4 SDA → I2C_SDA → U1 IO4 + R6 4.7 kΩ to 3V3; U4 SCL → I2C_SCL → U1 IO3 + R5 4.7 kΩ to 3V3 — VERDICT: CORRECT. Datasheet: MPU-6050 SDA/SCL are open-drain bidirectional I2C lines and need pull-ups to the logic rail; max I2C speed 400 kHz.
  10. MPU-6050 support pins — U4 CPOUT → C10 2.2 nF → GND; U4 REGOUT → C11 100 nF → GND; U4 VLOGIC → 3V3 + C9 10 nF → GND; U4 VDD → 3V3 + C8 100 nF → GND; U4 AD0 → GND; also CLKIN, FSYNC, and pin 25 tied to GND — VERDICT: CORRECT. Datasheet: typical circuit uses CPOUT 2.2 nF, REGOUT 0.1 µF, VDD 0.1 µF, VLOGIC 10 nF; AD0 low selects I2C address 0x68.
  11. LEDs — green: U1 IO6 → GREEN_LED_GPIO → R7 330 Ω → GREEN_LED_A → LED1 anode, LED1 cathode → GND; blue: U1 IO7 → BLUE_LED_GPIO → R8 330 Ω → BLUE_LED_A → LED2 +, LED2 - → GND — VERDICT: CORRECT. At 3.3 V, 330 Ω limits current to a few mA depending LED Vf, comfortably below ESP32 GPIO limits.
  12. Motor driver — U1 IO5 → MOTOR_GPIO → R9 1 kΩ → MOTOR_GATE → Q2 gate; R10 100 kΩ gate pulldown to GND; Q2 = AO3400A, source → GND, drain → MOTOR_MINUS; J3 P1 → VBAT_SW, J3 P2 → MOTOR_MINUS; D2 = B5819W, K → VBAT_SW, A → MOTOR_MINUS — VERDICT: CORRECT. Datasheet: AO3400A is a logic-level N-MOSFET with RDS(on) specified at VGS 2.5 V and 4.5 V; B5819W is a 40 V, 1 A Schottky suitable as a flyback diode for a small vibration motor. Motor is powered from VBAT_SW, not 3V3.
  13. Tip connector J4 — J4 = B3B-PH-SM4-TB(LF)(SN); pin1 → VBAT_SW; pin2 → GND; pin3 → TIP_DATA; U1 IO10 → TIP_DATA_GPIO → R11 330 Ω → TIP_DATA → J4 pin3 — VERDICT: CORRECT with strap caveat. GPIO10 is not double-used elsewhere in the schematic. It is free for the tip data signal, but note it is near the ESP32-C3 strap cluster; avoid external circuitry on J4 that can back-power or clamp the pin during boot.
  14. USB-C CC1/CC2 — J1 CC1 → CC1 → R2 5.1 kΩ → GND; J1 CC2 → CC2 → R3 5.1 kΩ → GND — VERDICT: CORRECT. USB-C UFP/device mode requires Rd pull-downs, nominally 5.1 kΩ, on both CC pins.
Final findings
  • Pin double-booking: none found on the functional GPIOs checked. GPIO3/4 are I2C, GPIO5 motor, GPIO6/7 LEDs, GPIO9 boot button, GPIO10 tip data, GPIO18/19 USB.
  • Schematic-connected but unrouted in layout: none reported by the layout connectivity checks; no airwire/dangling-trace issues were returned.
  • Wrong / risky values or topology:
    1. Major: AP2112 LDO will not guarantee 3.3 V regulation from a low LiPo at ESP32 RF burst current. Use a buck-boost or lower-voltage system threshold, or specify operation only above ~3.6–3.7 V under load.
    2. Production robustness: ESP32-C3 strapping lacks explicit pull-ups on GPIO2 and GPIO9, and download mode depends on GPIO8 being high. Add external strap resistors for 100-unit reliability.
    3. Hardware debug: SW2 schematic is correct, but your real-board symptom strongly suggests a footprint/pad/solder/substitution issue; probe SW2 pads directly for continuity while pressed and compare against pad numbers.
Fix power issues
Choose regulator
Add strap resistors
Debug boot button
Create production checklist

Project Specification — Harry Potter Wand Mainboard
Project Overview
Production-intent long/narrow mainboard for a Harry-Potter-style magic wand handle. Status: Draft implementation in progress.
Intended Use
Battery-powered wand electronics with USB-C charging/flashing at the base, motion sensing, status LEDs, vibration feedback, and an external tip LED module.
What the Device Should Do
  • Run from a single-cell LiPo or USB-C.
  • Charge and protect the LiPo cell.
  • Program/flash the ESP32-C3-MINI-1 over the same USB-C port.
  • Sense motion with a bare MPU-6050 over I2C.
  • Drive green/blue status LEDs, a vibration motor, and a VBAT-powered external SK6812-compatible tip LED board.
Main Features
  • ESP32-C3-MINI-1 module, 3.3 V logic, native USB on GPIO18/GPIO19.
  • TP4056 charger, DW01A + FS8205A cell protection, load-sharing power path.
  • Low-dropout 3.3 V LDO for ESP32 and MPU-6050.
  • JST-PH plug-in connectors for LiPo, vibration motor, and tip LED cable.
  • Compact top-side SMD assembly, JLCPCB/LCSC-oriented parts.
System Architecture
USB-C provides VBUS to the charger and USB D+/D- to ESP32-C3 native USB. The LiPo feeds protection, a slide switch, the VBAT system rail, motor/tip LED power, and the 3.3 V LDO. ESP32 controls the MPU-6050, status LEDs, vibration MOSFET, and tip LED data.
Hardware Subsystems
  • Power/charging: USB-C VBUS, CC pull-downs, TP4056, load sharing, DW01A/FS8205A protection, slide switch, 3.3 V LDO.
  • MCU/radio: ESP32-C3-MINI-1 with EN pull-up/filter and antenna edge keepout.
  • USB: USB-C D+/D- to GPIO19/GPIO18 with low-capacitance ESD protection.
  • IMU: MPU-6050 QFN, I2C on GPIO4/GPIO3, AD0 grounded, required support capacitors.
  • UI: GPIO9 tactile button to GND with 100 nF debounce, green LED on GPIO6, blue LED on GPIO7.
  • Actuators/connectors: JST-PH motor connector switched by AO3400 low-side MOSFET; JST-PH 3-pin tip LED connector with VBAT/GND/DATA.
Interfaces and Connections
  • USB-C: VBUS, GND, CC1/CC2 5.1 kΩ pulldowns, USB D+/D-.
  • JST-PH 2-pin LiPo: BAT+ / BAT-.
  • JST-PH 2-pin motor: MOTOR+ / MOTOR-.
  • JST-PH 3-pin tip LED: LED+ = VBAT, GND, DATA via 330 Ω.
Power and Runtime Expectations
Battery assumed 500–1000 mAh LiPo. Charge current target 300–500 mA; selected nominal target is ~400 mA unless TP4056 thermal/layout constraints require lowering. Runtime depends strongly on tip LED brightness and motor duty cycle.
Power Tree and Power Budget
Estimated simultaneous peak load sizing case:
  • Tip LED feed: 300 mA brief burst from VBAT.
  • ESP32-C3 RF burst: ~350 mA worst-case allowance on 3.3 V rail.
  • MPU-6050: ~4 mA on 3.3 V rail.
  • Status LEDs: ~4–8 mA each depending LED Vf; budget 16 mA total.
  • Vibration motor: budget 100 mA from VBAT.
  • 3.3 V rail peak: ~370 mA. LDO target current rating: >=500 mA.
  • VBAT path peak: ~300 mA tip + 100 mA motor + ~370 mA LDO input = ~770 mA. Size switch/protection/connectors/traces for >=1 A with margin.
Manufacturing and Assembly Expectations
Top-side SMD production assembly. Use JLCPCB/LCSC assembly parts where available; use JST PH SMD connectors for external plug-in cabling. No end-user hand soldering.
Firmware-Relevant Hardware Requirements
Fixed GPIO map:
  • GPIO3 = I2C SCL
  • GPIO4 = I2C SDA
  • GPIO5 = motor MOSFET gate
  • GPIO6 = green LED
  • GPIO7 = blue LED
  • GPIO9 = button/download strap
  • GPIO10 = tip LED data
  • GPIO18 = USB D-
  • GPIO19 = USB D+
Physical Design Expectations
Board width <=18 mm hard limit, target length <=80 mm. USB-C at wand base short end. Button and green/blue LEDs on same long edge/face. ESP32 antenna placed at board edge with no copper under/beyond antenna region. Silkscreen labels for all connectors, switch, button, and LEDs.
Important Design Decisions
  • No 5 V boost for tip LEDs; external SK6812-compatible LED module runs from VBAT so 3.3 V data remains acceptable.
  • ESP32-C3 native USB eliminates USB-UART bridge.
  • Use load sharing so USB can run/flash board even with a flat battery.
  • Use 4-layer PCB because USB data, RF module, tight form factor, and power integrity benefit from continuous reference planes.
Assumptions
  • Vibration motor current is <=100 mA nominal/brief; connector and MOSFET are sized above that.
  • External tip LED module peak is limited to about 300 mA by firmware/pixel count.
  • TP4056 charge current target is about 400 mA using ~3 kΩ PROG resistor.
Change Notes
  • Initial specification captured from the final user requirements before schematic implementation.
  • Project Overview

  • Intended Use

  • What the Device Should Do

  • Main Features

  • System Architecture

  • Hardware Subsystems

  • Interfaces and Connections

  • Power and Runtime Expectations

  • Power Tree and Power Budget

  • Manufacturing and Assembly Expectations

  • Firmware-Relevant Hardware Requirements

  • Physical Design Expectations

  • Important Design Decisions

  • Assumptions

  • Change Notes