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
manufacturing/CURRENT-REVISION.md
# Configurable-PD main project — 16 October 2026
**Applied to main with explicit user approval on 16 October 2026. The 5 V operating limitation awaits maintainer review. This is an engineering prototype, not hardware-qualified or approved for ordering.**
The reviewed configurable-PD PCB, firmware, full assembly and validation artifacts
were transferred from the isolated copy. The existing TPS1H100-Q1 U11 remains
fitted; none of the rejected replacement candidates was installed. The startup
default remains 9 V. The diagnostic firmware still keeps motor drive OFF.
A rollback archive and file-hash manifest are retained outside the package in
`work/a80-configurable-pd` within the workspace.
Main verification: the PCB and integrated-system builds pass. Root and assembly
TypeScript checks, 21 firmware host tests, 10 assembly tests (196 assertions),
netlist and PCB-placement checks pass. All seven independent PCB audits pass,
including 98 required-width paths and 539 pad anchors. The schematic analyzer
still reports the same 16 reviewed style advisories; the strict aggregate check
is not warning-free. No hardware operation has been qualified by this transfer.
The rebuilt circuit records exactly match the reviewed copy except for
`source_project_metadata.source_filesystem_md5_hash`; no electrical or geometry
records differ. The prior trial PCB SHA-256 was
`0907f64837a81c76fd91abba39a8306b7f281d6e73f990f544efe0b5e23183b6`.
## U11 replacement evaluation — 16 October
**Outcome: a U11-only replacement is insufficient to guarantee the reviewed
5 V / 0.8 A motor-feed case. No hardware substitution was made.**
The reproducible screening calculation is `bun scripts/evaluate-u11.mjs`,
with results in `dist/u11-evaluation.json`. It checks the compiled board hash,
reproduces the previous estimates, and compares 15 candidate/scenario combinations.
This is a DC calculation, not SPICE or measured motor operation.
With a 4.75 V source, 0.25 ohm cable loop, 0.8 A motor feed and assumed
0.1 A logic input, the existing upstream components leave **4.4216 V at U11's
input**. Therefore even a theoretical zero-loss U11 cannot maintain U7's
4.5 V minimum in this scenario. No protection-bypass circuit is proposed.
| Option screened | Estimated driver voltage in this case | Disposition |
| --- | --- | --- |
| Existing TPS1H100-Q1, elevated-loss estimate | 4.262 V | Baseline limitation remains |
| TPS259470L | 4.386 V | Insufficient margin; transient protection must also change |
| TPS259480L | 4.397 V | Insufficient margin; transient protection must also change |
| TPS26630 | 4.379 V arithmetic only | Its input is already below its own 4.5 V operating minimum; output is not guaranteed |
| Ideal zero-loss U11 | 4.422 V | Mathematical upper bound for this substitution scope |
[TPS25947](https://www.ti.com/lit/ds/symlink/tps25947.pdf) and
[TPS25948](https://www.ti.com/lit/ds/symlink/tps25948.pdf) offer active current
limiting and an active-high enable that could preserve physical OFF control
with redesigned support circuitry. Both have a 28 V absolute maximum;
the present SMBJ22A's 35.5 V rated pulse-clamp specification does not establish
protection for these parts. This does not assert that every motor stop reaches
35.5 V. Input OVLO alone cannot protect an output pin driven by motor energy.
They are not pin-compatible replacements, and neither has been approved for
installation. The calculations include a simple forward-regulation floor;
they do not qualify the candidate at the exact load or prove current-limit,
inrush, short-circuit, reverse-current or thermal behavior.
[TPS2663](https://www.ti.com/lit/ds/symlink/tps2663.pdf) has a useful 60 V
operating range and adjustable limiting, but a 4.5 V minimum input. It does not
solve this low-voltage case. Its shutdown/support circuitry and footprint
also differ from U11.
The favorable short-cable case improves with lower-loss candidates, so this
does not rule out restricted-load 5 V operation. It does rule out claiming
the existing proposed envelope is guaranteed by replacing U11 alone.
The remaining options are a defined and tested reduced-load/cable envelope,
or a broader design using a lower-minimum-voltage driver or a regulated motor
supply. No larger redesign or firmware completion is claimed by this review.
The scenario excludes PCB/contact losses and startup dynamics, and uses nominal
cold fuse resistance and 25 C input-MOSFET resistance. It is a sensitivity
case, not a complete worst-case rating. Maximum-resistance candidate data use
each part's individual temperature/test conditions, not a common temperature.
All 98 compiled power/control pin checks pass on the unchanged board;
all 189 baseline main-project file hashes were unchanged at the time of that
evaluation. The subsequent user-authorized transfer to main is recorded above.
No circuit, footprint, route or assembly source was altered by the U11 evaluation.
The board accepts selected **5, 9, 15 or 20 V** fixed USB-PD profiles, with a **9 V cold-start default**. Each motor contract requests 2 A from an appropriate source. The same example motor and complete motor/adapter/USB assembly are retained; higher profiles need a suitably rated motor.
## PCB changes and purpose
| Change | Purpose |
| --- | --- |
| Q1/Q2 → Si4427BDY, D1 → 8.2 V clamp | Guaranteed MOSFET resistance at the gate drive available in 5 V operation |
| D3 → U12 LM74700 + Q7 DMT6007, C145/C146 | Reduce forward drop while blocking motor energy from returning to USB |
| Q10–Q15 → 60 V AOD2610E | More voltage headroom for the 20 V setting and switching transients |
| D4 → SMBJ22A; C71/C93 → 50 V parts | Accommodate the higher operating voltage; C93 is 12.5 × 20 mm with 5 mm lead pitch |
| R11/R30 → 220 kΩ, lower resistors 15 kΩ | Keep voltage measurements in the ADC range; conversion is 235/15 |
| R140/R141 → 10 kΩ / 22 kΩ | Keep motor-switch enable above its specified threshold at low supply voltage |
| Local placements and routes | Fit the new parts and larger capacitor without changing the 73 × 72 mm outline |
| Native Q7 paste windows | Exportable stencil geometry over unchanged continuous drain copper; factory process approval required |
The PCB remains four copper layers, 1.6 mm thick, with **155 fitted top-side components** and **16 bare service pads**. Power traces stay on outer copper. The new gate/ground connections add four necessary vias: **479 total**, with zero single-layer/dead-end vias reported. No battery is fitted.
## Verification evidence
Checked main PCB SHA-256: `9624c2af30f72cd8f88fb44195608d76f9d5e7d21d233b82b938ddbb5a3e0536`.
- Normal PCB build and saved-routing guard: pass. No guard was weakened and no generated copper/DRC records were edited.
- Native DRC: **0 errors**. The DRC report has **57 warnings**: 50 non-45-degree trace segments and seven IC power/ground metadata advisories on discrete-device wrappers. The raw build has **63 warnings** in total: it also includes four reference-prefix advisories on Q1/Q2/Q7/Y1, one larger connection-guide sheet, and the existing synthetic SW4 pin4 advisory. These are retained in the raw output; this is not a warning-free claim.
- Independent physical connectivity: zero disconnected nets or floating copper.
- Selected manufacturing clearance checks: zero findings.
- Width checks: **98/98** required paths pass. These prove configured copper dimensions, not a measured current/thermal rating.
- Pad anchors: **539/539** pass. Component courtyards and mounting screw envelopes pass; native placement reports no issues.
- Existing R81 Kelvin topology: pass. Main power remains off the inner reference plane.
- Component selection/divider checks: pass, including CAD registration of Q7 to its catalog datum. The follow-up check verifies **98 compiled power/control pin connections** against the intended nets; four temporary wrong-net fault injections were rejected.
- Numbered supplier-pad orientation review: **155** fitted components, all top-side. Factory library preview is still required. Q7 uses its catalog datum; larger AOD2610E lands are checked to contain the catalog lands.
- Native paste export: U7 six windows, U11 2.59 × 2.60 mm aperture, Q7 eight rectangular windows (71.86% drain area). Q7 windows are independently checked inside copper and nonoverlapping. Factory stencil thickness/release/rounding approval remains open.
- Firmware: **21 host tests pass**, covering four profiles, current-field interpretation, readback failure, stale/fallback contracts, energized bus, interrupted negotiation and no automatic restart during selection. Added independent PDO byte vectors from ST UM2650, failures at every profile-write step, corrupted readback and reserved-bit/reset ordering. These use mocks and do not run a motor.
- Root TypeScript check: pass. Nine schematic sheets render and the wire-interior check reports zero crossings through IC/connector boxes. The new U12 spacing warning is fixed. **16 previously reviewed schematic style suggestions remain** (the baseline minus removed D3). Consequently the unchanged strict `bun run check` command still exits nonzero. See `docs/validation.md`; do not describe this as all automated checks passing.
The complete assembly is rebuilt from this PCB hash: one board, three motor leads, three rigid adapters and two USB cables. Ten assembly tests (196 assertions) and the assembly TypeScript check pass. Package integration is checked against this same PCB and schematic; see `assets/connected-system.provenance.json` and `dist/system/integration-check.json`.
## What still needs physical qualification
1. Confirm explicit 5 V PDO2 negotiation/POWER_OK2 behavior on actual STUSB4500 hardware and all four source profiles, including cold boot and downward changes. No assumption that a charger's 5 V fallback is a valid motor contract.
2. At 5 V, measure cable and PCB voltage drop. U7 requires at least 4.5 V locally; the 0.8 A feed ceiling and 4.65 V stop threshold are provisional. Calibrate voltage readings. Worst-case cables may cause shutdown even at reduced load.
3. Measure current and temperature at every profile and include the separate logic branch in the 2 A budget. The 1.5 A higher-profile feed ceiling is provisional and is not a winding-current rating.
4. Qualify 20 V inrush, bus overshoot, current limiting, coast stopping and faults. The TVS is not a continuous braking-energy sink. Complete motor-specific firmware/tuning before claiming a working controller.
5. Confirm parts sourcing, factory placement preview, USB stackup/impedance, stencil process and through-hole assembly. U12 catalog stock was unavailable at selection; confirm an authorized supply before ordering.
Runtime selection is available in the diagnostic USB console (`voltage 5`, `9`, `15`, `20`) with SW4 OFF and the motor bus discharged. It deliberately keeps motor drive OFF at every voltage. The new firmware does not claim completed knob/ARM motor operation.
## Follow-up verification — 16 October
At the trial follow-up, the PCB hash was unchanged from that trial build. Fresh physical audits pass, and the native
schematic analyzer reproduces the same 16 suggestions: five box-padding,
four parallel diode/resistor alignment, four horizontal supply-path orientation,
and three shared-return resistor-flip suggestions. The affected rendered sheets
were reviewed again. The existing dispositions in `docs/validation.md` still
apply; the strict checker remains nonzero and has not been weakened.
**PD configuration is supported by documentation, not yet measured on this board.**
[ST DS12499 Rev 8](https://www.st.com/resource/en/datasheet/stusb4500.pdf),
section 3.3, allows 5–20 V in PDO2/3. Tables 4 and 6 describe the PDO-specific
POWER_OK2 and VBUS_EN_SNK signals. [ST UM2650 Rev 3](https://www.st.com/resource/en/user_manual/um2650-the-stusb4500-software-programing-guide-stmicroelectronics.pdf),
sections 1.3–1.5, confirms the register addresses and Soft_Reset sequence used.
The selected 5 V PDO2 arrangement preserves the explicit-contract hardware
interlock; an ordinary 5 V fallback is not accepted as motor permission.
**5 V load capability is not guaranteed.** `dist/pd-electrical-review.json`
records transparent DC sensitivity cases. At 0.8 A motor-feed current with an
assumed 0.1 A logic input, the estimates are 4.720 V at the driver for a 5.0 V
source/0.10-ohm cable loop, and 4.262 V for a 4.75 V source/0.25-ohm cable loop
with a hot power switch. The latter is below the MCT8329A's 4.5 V minimum.
These estimates exclude copper/connector/dynamic losses, use nominal cold
fuse resistance, and are neither a complete thermal model nor measured results.
Even the 4.65 V indicated stop threshold needs calibration: divider/reference
tolerances alone can make it correspond to approximately 4.522 V physically,
before ADC error, ripple and firmware reaction delay.
**Motor-control firmware is still a separate open implementation.**
`power_manager.py` is a PD diagnostic console and always drives SPEED/ARM low.
`motor_permitted()` is a tested policy helper, not an active motor-control loop.
It does not currently implement motor-specific MCT8329A setup/tuning, knob/ARM
operation, current-limit response, calibrated voltage supervision or latched
fault/restart behavior for a running motor. Host tests cannot close those items.
No prototype or measurement instrument was available to this session. Actual
negotiation, loaded voltages, temperatures, stopping and fault response remain
**NOT TESTED**. The copy remains on hold; main has not been updated.