MustafaMulla29/usb-pd-motherboard
4-layer USB-C PD hub motherboard with 20 V USB-C input, Linux T113-S3 computer, CH338F USB hub, four individually controlled 5–20 V PD outputs, USB data/camera ports, regulated rails, and hardware watchdog/E-stop safety interlock.
- Version
- 1.0.24
- License
- unset
- Stars
- 0
Use with the tscircuit CLI
tsci is the tscircuit CLI. Install it with npm install -g tscircuit.
tsci clone MustafaMulla29/usb-pd-motherboard # download the package files into ./usb-pd-motherboard
tsci add MustafaMulla29/usb-pd-motherboard # add it to your project as @tsci/MustafaMulla29.usb-pd-motherboardIn a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.
docs/pending-fixes-2026-11-27.md
# Wiring fixes found 2026-11-27 — all three APPLIED in 1.0.6 (complete upload: 1.0.7)
Build: ROUTING_REPLAY_ONLY=1, 0 errors; GND/VIN_SYS/V5V0 planes one piece each; new routes clearance-checked
(tools/freemap.py). Hub routes: phase 17 HUBFIX (routing/HUBFIX.hand.json, tools/gridroute2.py --rips 0);
GND vias + small pours for the new pull-downs in circuit/power-copper.json (zone "hub"); spots found with
tools/find-pd-space.py. Note: RHUBLED3 route is 16 mm with 4 vias (static strap, DC only).
## 1. CH224Q asks for 9 V instead of 28 V (confirmed in datasheet)
Source: WCH CH224 datasheet V2.0 (Chinese), Table 5-2 and section 6.1.1 (CH224Q/CH224A reference schematic).
- Now: RPDCFG1 = 0 ohm (CFG1 to GND) -> I/O-level mode; RPDCFG2/3 = 100k to GND -> CFG 0/0/0 = **9 V**.
- Reference: single-resistor mode, Rset CFG1 to GND, CFG2/CFG3 left floating (they have internal pull-ups).
Table 5-1: 6.8k = 9 V, 24k = 12 V, 56k = 15 V, 120k = 20 V, **210k = 28 V**.
- Fix (no copper change): `RPDCFG1` v="210k"; `RPDCFG2` and `RPDCFG3` keep their pads but `doNotPlace`
(add a `dnp` prop to `R` in lib/common.tsx -> `doNotPlace`). Update the comment in circuit/power-input.tsx.
## 2. CH224Q VBUS pin must be shorted to VHV (confirmed in datasheet)
Pin table: VBUS (pin 8) "电压检测输入,需要短接至VHV" = "voltage-sense input, must be shorted to VHV".
Reference 6.1.1: connector VBUS goes straight to VHV and VBUS pins, 1 uF to GND, no series resistor.
- Now: pin 8 on VBUS_IN, VHV behind RPDVHV 1k.
- Fix (no copper change): `RPDVHV` v="0" -> VHV = VBUS_IN = pin 8, same as the reference.
## 3. USB2517I strap pins share one net (HUB_STRAP)
SCL/CFG_SEL0, SDA/NON_REM1, CFG_SEL2, HS_IND/CFG_SEL1, SUSP_IND/NON_REM0, LED_B3_N/GANG_EN all on HUB_STRAP
with one 10k pull-down (RHUBSTRAP). HS_IND, SUSP_IND and LED_B3_N drive outputs after reset -> they fight.
- Fix: keep SCL/SDA/CFG_SEL2 on HUB_STRAP + RHUBSTRAP; give HS_IND, SUSP_IND, LED_B3_N each its own 10k
pull-down (3 new nets, 3 new 0402 resistors). Needs PCB placement + re-routing in the dense hub area.
- Pad positions (board mm): HS_IND (-5.55, 2.75), SUSP_IND (-5.55, 4.25), LED_B3_N (-5.55, -1.25),
SCL (-5.55, 2.25), SDA (-5.55, 1.75), CFG_SEL2 (-14.45, -0.25), RHUBSTRAP (-16.4, -2.6).
- The active HUB_STRAP copper is in routing/RIPUP.hand.json (net source_net_27, 6 routes); FIX copper for it is
filtered out because HUB_STRAP is in rip-nets.
- Net IDs follow the key order of data/net-phases.json, so **append** new nets at the end and keep old keys,
or every saved route's net ID shifts.
- Route with tools/gridroute2.py (see ROUTING.txt, RIPUP section) after a dumpPhase build; cap build time.
After the fixes: schematic-only build (~50 s, tools/build-schematic.ts) for 1+2. Fix 3 needs a full build,
then the checks in ROUTING.txt, then push 1.0.6.