MustafaMulla29/rp2040-bldc-motor-controller-new

A USB‑C PD–powered RP2040 BLDC motor controller PCB with 3.3 V logic, MCT8329A sensorless commutation, three MOSFET half-bridges, protected power switching, USB data, controls, and motor connectors.

Version
0.3.82
License
unset
Stars
0

docs/pd-only-design.md

# Configurable USB-PD power design — main project, 16 October 2026

Motor-power selections are **5, 9, 15 and 20 V**, requested through the existing STUSB4500 by RP2040 firmware. This is fixed-profile PD selection, not PPS or a continuously adjustable output. The source must advertise the selected voltage at at least 2 A. Cold startup defaults to 9 V. The existing example motor stays at the default; selecting a higher voltage requires a suitably rated motor and qualified tuning.

STUSB4500 has three sink slots. PDO1 remains 5 V / 0.5 A fallback. Runtime PDO2 is the selected motor voltage / 2 A; inactive PDO3 mirrors PDO2. POWER_OK2 and Q6 provide the existing ARM interlock for an explicit PDO2 contract. ST describes POWER_ONLY_ABOVE_5V in terms of explicit PDO2/PDO3 contracts, despite its name. **The duplicate 5 V PDO2 case still requires hardware confirmation.** Firmware also checks measured VBUS, the RDO and the policy-engine state. RDO operating current must match 2 A; its maximum-current field reports source capability and can be higher.

The power path is J19 → Q1/Q2 → R13 → F1 → U12/Q7 → U11 → VMOTOR. The legacy net name PD9 is retained to preserve routing identity; it carries the selected voltage. No battery or charger is fitted.

- Q1/Q2 are SI4427BDY-T1-E3 PMOS devices, with resistance specified at 2.5 V gate drive. D1 is an 8.2 V gate clamp, within their ±12 V gate rating. Their 30 V drain rating covers the intended 20 V input, not arbitrary USB faults.
- U12 LM74700 and Q7 DMT6007 replace the series Schottky drop with a controlled ideal diode. MOSFET source faces USB and drain faces the motor. C145 supports the charge pump; C146 bypasses the input. This blocks reverse current into USB.
- U11 TPS1H100 and SW4 retain motor-power switching and hardware ARM clamping. R140/R141 are 10 kΩ/22 kΩ so enable is valid at low input voltage; the 4.7 V clamp remains. R142 = 1.5 kΩ retains about 1.644 A nominal motor-feed limiting. This is not a precise whole-board current cap.
- D4 is SMBJ22A, C93 is 470 µF / 50 V (Panasonic EEUFR1H471), C71 is 10 µF / 50 V X7R, and Q10–Q15 are 60 V AOD2610E. Other retained parts still require the specified operating/thermal limits.
- R11/R30 = 220 kΩ and the lower resistors remain 15 kΩ. Voltage conversion is 235/15; meter calibration is required. R13 measures the motor-feed branch; the logic branch bypasses it.

At 5 V the MCT8329A still needs at least 4.5 V locally. Cable and PCB drops can consume that margin. A provisional 0.8 A motor-feed ceiling and a calibrated 4.65 V undervoltage stop are bring-up limits, not a guaranteed load rating. At 9/15/20 V the provisional motor-feed ceiling is 1.5 A. Phase current is different from input current. Worst-case 5 V cables/sources can still cause undervoltage shutdown; guaranteeing full load there would require voltage conversion or a different motor stage.

SW4 OFF forces U11 enable low and grounds ARM independently of firmware. USB logic remains powered through D2/D5 and the existing 3.3 V regulator. Runtime selection requires SW4 OFF and VMOTOR below 1 V, disarms before any I²C write, verifies a stable contract, and never starts the motor automatically. Motor application firmware is not completed by these PD changes.

D6 returns motor-bus transients to PD_LOAD and D4. U12/Q7 block their return to USB. The TVS and bulk capacitor are not a sustained braking-energy sink. Use coast stopping and qualify overshoot, inrush, thermal behavior and current limits with the intended motor/load. The 35.5 V nominal maximum TVS clamp figure is specified at a particular pulse and temperature; parasitic overshoot and temperature must be measured against the retained 40 V U11/diode limits.

Primary references: [STUSB4500](https://www.st.com/resource/en/datasheet/stusb4500.pdf), [LM74700](https://www.ti.com/lit/ds/symlink/lm74700-q1.pdf), [Si4427BDY](https://www.vishay.com/docs/72295/si4427bd.pdf), [TPS1H100-Q1](https://www.ti.com/lit/ds/symlink/tps1h100-q1.pdf), [MCT8329A](https://www.ti.com/lit/ds/symlink/mct8329a.pdf), [AOD2610E](https://www.aosmd.com/sites/default/files/res/datasheets/AOD2610E.pdf), [Panasonic C93](https://industrial.panasonic.com/ww/products/pt/aluminum-cap-lead/models/EEUFR1H471).