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/power-budget.md
# Power budget
Rewritten 2026-12-01 for the board as it is now: 60 W input (EPR / 28 V was dropped on 2026-11-27) and the
Allwinner T113-S3 (the STM32MP1 / STPMIC1 version is gone). All numbers are design estimates from the circuit
values and datasheet figures, not measurements.
## Input (PD IN)
The CH224Q asks the charger for **20 V** (RPDCFG1 = 120k, WCH Table 5-1; `circuit/power-input.tsx`).
| Charger and cable | Contract | Input power |
| --- | --- | --- |
| Normal USB-C PD charger, normal (3 A) cable | 20 V × 3 A | **60 W** (design budget) |
| A 5 A e-marked cable with a 100 W charger | 20 V × up to 5 A | not counted on: the supervisors cannot read the contract's current, only the voltage (VIN_SNS) and the actual input current (IIN_MON) |
Input protection: TPS16630 eFuse, 5.45 A current limit, UVLO 7.9 V, OVP 31.1 V, IMON 0.5 V/A to supervisor A;
SMBJ30A TVS. Supervisor A can switch the input eFuse off (QINKILL).
## System load (everything except PD OUT 1–4)
| Load | Typical | Max | Source |
| --- | --- | --- | --- |
| T113 core 0.95 V | 0.3 W | 0.8 W | TLV62569 (BCORE); datasheet max 800 mA |
| T113 DRAM 1.5 V (DDR3 in package) | 0.3 W | 0.6 W | TLV62569 (BDRAM); max 400 mA |
| 3.3 V: T113 I/O, microSD, CH338F hub (up to 140 mA = 0.46 W with all ports at high speed), 1.8 V LDO | 0.7 W | 2 W | TLV62569 (B33) |
| CAM 5 V | 1 W | 5 W | SY6280, 1 A limit (RSET 6.8k) |
| USB 1–4 5 V | 0.5 W | 10 W | SY6280, 0.5 A limit each (RSET 13.7k); each port's 5 V is off until Linux turns it on |
| Supervisors, interlock logic, LEDs (3V3_AON) | 0.2 W | 0.4 W | AP2112K |
| Converter losses (bucks ~85–90 %) | 0.5 W | 3 W | |
| **Total from VIN_SYS** | **≈ 3.5 W** | **≈ 22 W** | TPS54560B 20 V → 5.1 V, 5 A |
The maximum only happens with a 1 A camera and four 0.5 A USB devices all at full current.
## PD OUT 1–4
Each port: TPS55288 buck-boost (I2C, 5 / 9 / 12 / 15 / 20 V), 10 mΩ output current sense, TPS25947 eFuse
(trips at about 3.5 A, R_ILM 953 Ω; OVLO 22.8 V), USB-C PD source on one STM32G0 UCPD. One port alone can deliver
20 V × 3 A = 60 W, so **the ports must share the input**:
```
P_out_total ≈ 0.95 × (60 W − P_system) (buck-boost efficiency ≈ 95 %)
≈ 53 W with a typical system load, ≈ 36 W with the worst-case system load
```
| Example (the explainer video) | Port | Load (example) |
| --- | --- | --- |
| Motor controller (rp2040-bldc-motor-controller) | PD OUT 1, 15 V | its motor feed is limited to about 2 A, typical test load lower |
| LED light | PD OUT 2, 12 V | ≈ 6 W |
| Phone | PD OUT 3, 9 V | ≤ 18 W |
| Thrust sensor | USB 2 (5 V) | < 0.5 W |
The supervisors are meant to enforce the share (firmware, not written yet): each port advertises PDOs whose
current fits the remaining budget, the TPS55288 current limit is set to match, and supervisor A watches the real
input current on IIN_MON and lowers or switches off ports if VIN_SYS sags. The hardware stop chain
(`circuit/safety.tsx`) works without any firmware: it switches all four PD OUT eFuses off together.