MustafaMulla29/rp2040-bldc-motor-controller
Hardware assembly metadata and PCB geometry for a controller board with a snap-off rotary-encoder section, plus four parallel 150 µF/50 V bulk electrolytic capacitors filtering the motor supply.
- Version
- 2.0.40
- License
- unset
- Stars
- 0
Use with the tscircuit CLI
tsci is the tscircuit CLI. Install it with npm install -g tscircuit.
tsci clone MustafaMulla29/rp2040-bldc-motor-controller # download the package files into ./rp2040-bldc-motor-controller
tsci add MustafaMulla29/rp2040-bldc-motor-controller # add it to your project as @tsci/MustafaMulla29.rp2040-bldc-motor-controllerIn 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/order-readiness.md
> 27 November 2026 main update: OLED power-loss circuitry and Molex 5034802400 / C122434 are promoted from the trial. This is an engineering-prototype publication, not an order approval. Ribbon/socket width and CAD conflicts, measured rail sequencing, C191 land acceptance and distributor-only sourcing remain open. See [current review](oled-shutdown-trial.md).
> Current revision — 27 November 2026: the main project now uses ER-OLED015-2W (1.54-inch SSD1309, native I²C), ER-CON24HB-1, a sequenced 12.5 V display supply, shallow lid mount and diagonal underside retainer screws. See [current design and qualification limits](oled154-design.md). The older display and manufacturing details below are historical; they do not qualify this revision.
# Order-readiness — replacement trial, 23 October 2026
**Replacements applied to main with user approval on 23 October 2026.** The fresh main-project package is for five PCBs: two assembled and three bare. Local builds and PCB checks pass; no factory approval or order has been obtained. See `manufacturing/CURRENT-REVISION.md`, `manufacturing/factory-review-request.md` and `dist/release-validation.json` for the current record. The replacements change Q1/Q2's footprint and local routing and the BOM choices for Q7/U12/D4/C71. Firmware source is unchanged. All 61 current BOM lines have public stock for population demand; factory allocation, minimums and loss allowances remain unconfirmed.
The candidate is 73 × 72 mm, four copper layers, 1.6 mm thick, with 157 fitted top-side parts and 16 bare service pads. J19 requests a selected 5/9/15/20 V / 3 A profile; cold startup defaults to 9 V. J1 is USB DATA. No battery is fitted.
Fresh generated evidence is in `assembly/dist/results/pcb-validation.json`, `dist/assembly-review/orientation-review.json`, `dist/assembly-review/native-stencil-review.json` and `dist/system/integration-check.json`. Each report identifies its exact checked input; stale reports are not evidence for a changed design. The main project's validation summary is in `manufacturing/CURRENT-REVISION.md`. Q7 now uses the importable DMT6009LFG-7 / C439728; `manufacturing/q7-replacement-review.json` verifies its exact supplier lands, pinout and CPL. The earlier C6540300 library limitation is resolved in main.
The available checks cover connectivity, specified copper widths/clearances, pad anchors, placement envelopes, source-isolation topology and native paste geometry. They do not measure operating current, thermal rise, PD negotiation, USB signal integrity, regeneration or component assembly quality. Firmware host tests use mocks. The knob/ARM runtime exists and passes host tests, but its motor-specific configuration, calibration and final protection settings remain uncommissioned. Factory stock, placement and process approval remain outstanding.
## Findings to resolve before hardware release
### 1. R81 Kelvin routing — corrected
SP and SN now have independent 0.20 mm top-layer routes to R81.1 and R81.2.
They share a paired corridor with 0.12–0.20 mm edge spacing, then fan out to the
two shunt terminals. SP is 10.97 mm and SN is 17.30 mm long; there are no sense
vias. This is an analog Kelvin pair, not a length-matched digital pair.
LSS has its own 0.40 mm return after the QFN escape. Its copper no longer touches
SP before the shunt land. The 1.50 mm motor-return entry is shifted within the
same R81 land to keep that land's outside edge clear for sensing. Two ground
vias and the DRVOFF signal via move locally. U7 AGND joins its exposed ground
pad directly. Top ground-pour outlines leave a clearance channel around SN;
the continuous inner1 ground reference remains unchanged.
`scripts/pcb-audit/audit-kelvin.py` checks the generated copper, including
same-net traces, vias, pads and pours. It rejects any extra contact at either
sense pin and any sense-track contact outside the intended shunt land. It is
part of `check:assembly-pcb`, so a clean ordinary DRC alone cannot hide a
regression. Full connectivity, clearance, width, placement and pad-anchor
checks also pass. No rule was weakened and no generated circuit was edited.
Reference: [TI motor-driver layout guidance, sections 7.5–7.9](https://www.ti.com/lit/an/slva959b/slva959b.pdf).
Actual current-sense noise and protection behavior still require bench testing.
### 2. The raw paste Gerbers are not an approved production stencil
Direct inspection of `board-gerbers.zip/F_Paste.gbr` found:
| Exposed pad | Copper size, PCB axes | Native paste flash | Paste/copper area |
| --- | --- | --- | --- |
| U7.37 | 3.650 × 2.650 mm | Six 1.050 × 1.150 mm rectangles | 74.90% |
| U11.15 | 2.590 × 2.600 mm | One 2.590 × 2.600 mm rectangle | 100% |
| U1.25 | 2.800 × 2.800 mm | One 1.960 × 1.960 mm rectangle | 49% |
| U5.57 | 3.100 × 3.100 mm | One 2.170 × 2.170 mm rectangle | 49% |
U11 is fixed at the footprint source using `solderPasteMargin={0}`. Its raw
native Gerber now matches the **2.60 × 2.59 mm component-axis** opening in TI's
PWP0014K example for a **0.125 mm** stencil. `check-native-stencil.mjs` parses the
actual exported aperture and fails if this regresses. The copper land is unchanged.
U7 uses six native `<solderpaste>` elements with core **0.0.2153**. The
continuous exposed copper pad suppresses only its automatic paste opening using
`solderPasteMargin={-2}`. The checker requires six correctly sized/positioned
Gerber flashes and rejects an extra central opening. No copper segmentation,
local core modification or Gerber postprocessing is used.
The native element currently supports rectangles and circles, so these six
windows have square corners (74.90% area). The factory instruction retains the
requested R0.05 corner rounding (~74.77% area) for process review; that rounding
is **not** claimed to be in the native Gerber. `native-stencil-review.json`
records this distinction. Factory approval of the final stencil remains open.
Have the factory approve the stencil process and review the remaining exposed
pads and small-pad release. Paste area alone is not final solder coverage.
The native bottom-paste file also contains 8 flashes corresponding to the USB connector
shell slots. The production process must omit ordinary THT paste, as
specified in the assembly instructions. There are no bottom fitted parts.
Do not silently patch Gerbers or treat the existing raw paste as stencil approval.
Reference: [TI TPS1H100-Q1 package/stencil drawing PWP0014K](https://www.ti.com/lit/ds/symlink/tps1h100-q1.pdf#page=46).
### 3. Qualify all four voltage profiles and current budgets
R142 is now **680 Ω / 1% (0603WAF6800T5E, C23228)**. U11's limit follows TI's
I = 1.233 V × 2000 / R142, so it is **3.63 A nominal**, above the 3 A PD contract.
U11 therefore only guards against inrush and short circuits and no longer caps the
motor. The earlier values did cap it: a field test with 2 kΩ stopped near
1.15–1.21 A input at about 5,900 RPM with a propeller (U11 limited, VMOTOR fell to
about 18 V and the app stopped the motor), and 1.2 kΩ only moved that limit to
2.055 A nominal (1.73–2.39 A).
The PD request rises to **3 A** (STUSB4500 LUT code 11) and F1 becomes the 4 A
Nano2 **0452004.MRL (C99551)**, same 2410 body and land as the former 3 A part.
The reproducible assumptions and results are in `manufacturing/current-budget.json`
and `dist/current-budget-review.json` (`bun run check:current-budget`).
TI specifies ±14% external current-limit accuracy at 1.6 A and above, for overloads
beyond 1.5× the setting. With a 2% resistor allowance that gives an illustrative
**3.06–4.22 A** interval, all of it above the 3 A request. Hardware no longer holds
an overload inside the contract: the firmware ceilings, the source's own protection,
U11's thermal protection and F1 do. Charging the 600 µF motor-bus capacitors through
U11 can draw up to that limit for about 3–4 ms at 20 V. These are engineering
allocations, not measured loads or a guaranteed transient cap.
Main-path copper at the ~2.6 A worst case (IPC-2221 estimates, 1 oz outer): J19→Q1
0.3 mm per pin pair ≈18 °C rise, PD_COMMON_S/PD_SWITCHED 0.8 mm ≈17 °C, 1 mm
sections ≈12 °C; no main-path segment is on the 0.5 oz inner layers. U11 dissipates
≤0.9 W at 2.34 A with its 166 mΩ hot R_ON (≈+37 °C at 41 °C/W). At the 2.7 A
motor-feed ceiling (about 2.9 A total input) the copper rises scale by about 1.3×
(≈23, 22 and 15 °C) and U11 dissipates ≤1.21 W (≈+50 °C); none of this is measured. **Confirm J19
(TYPE-C-31-M-12) is rated ≥3 A on VBUS** and measure board temperatures at full load.
U11 version A has an open-drain ST status pin, but it stays unconnected: all 30
RP2040 GPIO are assigned, and with DIAG_EN high ST also reports "open load" below
2–10 mA, while the MCF8329A sleeps at 3–5 µA when idle. Sharing MOTOR_FAULT_N would
therefore block arming. Firmware instead names the U11 limit from the input current
and the VBUS–VMOTOR drop (`power_policy.stop_reason`).
R13/INA180 measures the motor-feed branch; **VBUS_RAW → D2 → the logic regulator
bypasses R13**. The provisional motor-feed software ceilings are now **0.8 A at
5 V, 2.4 A at 9 V, 2.6 A at 15 V and 2.7 A at 20 V** (the 3 A contract minus the
logic allowance; edit `INPUT_LIMIT_MA` in `firmware/power_policy.py` to change them). The knob runtime applies these provisional ceilings only with a commissioned
profile; the shipped profile is None and keeps drive off. The unchanged 5 V headroom finding
still requires at least 4.5 V at the driver under actual cable/load conditions.
**Motor phase-current rating remains unassigned.** Input current under PWM is
not winding current. A commissioned MCF8329A profile must set current-sense gain,
current limiting, gate drive, startup and stopping behavior, then verify shunt
calibration, gate waveforms, phase current and heating. Lowering R142 does not
complete that qualification. No 30 A rating is claimed.
References: [TPS1H100-Q1 current-limit specification](https://www.ti.com/lit/ds/symlink/tps1h100-q1.pdf),
[MCT8329A configuration and layout requirements](https://www.ti.com/lit/ds/symlink/mct8329a.pdf).
### 4. Programming and motor firmware are incomplete qualifications
`firmware/power_manager.py` and `bringup.py` deliberately keep SPEED and ARM low.
The separate `knob_app.py` now implements knob/ARM control, PWM command ramps,
USB stop/PD selection and calibrated voltage/current supervision. It ships in
preview-only mode with `motor_setup.PROFILE=None`. A commissioned motor-specific
MCT configuration, measured calibration and physical validation remain missing.
Host tests exercise the runtime with simulated hardware, not a spinning motor.
See `knob-firmware.md`, including the lack of direct SW4 position feedback and
the need to verify behavior for rapid OFF/ON toggles.
This does not prevent buying development hardware after its hardware issues are
resolved, but it prevents promising a working controller on delivery.
Provision STUSB4500 NVM for 5 V startup and **9 V / 3 A default** using the documented
5 V-only setup before connecting an ordinary PD source. Cold-boot verification is
required. ST documents default higher-voltage PDOs, including 15 V and 20 V;
the schematic does not program the chip. Runtime 5/9/15/20 V selection must be checked on hardware, especially an explicit 5 V PDO2 contract and 20 V-to-5 V transitions. The manufacturing
package is currently for an **unprogrammed** assembly.
Reference: [STUSB4500 default startup configuration](https://www.st.com/resource/en/datasheet/stusb4500.pdf#page=22).
### 5. Factory and physical validation still required
Confirm the requested JLC04161H-3313 stack and actual USB geometry, factory
numbered-pad placement preview, exact part availability and mixed SMT/THT quote.
There are **five** fully through-hole parts (C93, J10–J12, RV1), plus J1/J19
soldered shell tabs. Old instructions saying 77 × 78 mm, center (0,0), and nine
THT components were corrected during this review; the built outline was already
73 × 72 mm and did not change.
The adapter model still uses illustrative body/insertion dimensions. Obtain and
check the actual motor bullets, adapters and sockets for mating, insulation,
retention and intended current. A 3D rendering does not establish those facts.
## Prototype versus production
Before a prototype order, obtain the factory's stencil/placement/stack review and
confirm the exact BOM and mixed SMT/THT quote against matching exports. U7 now
has native six-window support; stencil-process approval remains a factory task.
The prototype is for supervised bring-up with the motor initially disabled.
A phase-current rating and motor profile are still required before loaded operation. Then a small bring-up batch is the
appropriate next step; unfinished application firmware can be developed on it.
Before motor use, provision and verify PD, test logic-only/PD-only/both USB inputs,
and verify OFF/ARM/fault behavior. Start unloaded and without a propeller. Then
measure startup/inrush, bus voltage, input and phase currents, gate waveforms,
heating, USB operation and stopping/backdrive transients with the intended load.
U12 and Q7 block reverse current toward the USB source, but D4 is not a continuous energy
dump; configure and test the stopping/AVS strategy. These measurements require
hardware and have not been performed by CAD checks.
For sale or repeat production, complete tested firmware, programming/test-fixture
instructions and repeatable acceptance limits. No board has been ordered,
programmed or bench-tested as part of this review.
## USB DATA routing revision
The J1 → U10 → R41/R42 → U5 data paths now stay on L1, with no USB signal vias.
Their projected copper plus 0.10 mm on each side is covered by the L2 ground
pour, including its actual antipads. The main tracks are 0.15 mm; the two short
Type-C orientation bridges retain 0.125 mm necks to clear the connector lands.
Long parallel portions have 0.15 mm edge spacing; connector, ESD and resistor
fanouts differ. `scripts/pcb-audit/audit-usb.py` checks the generated geometry
and is part of the PCB audit suite. This fixes the earlier bottom-layer routing
without a nearby ground reference. It is not a 90 Ω field-solver certificate.
The factory must assess the actual geometry on JLC04161H-3313; USB enumeration,
traffic and both plug orientations still require prototype tests.
## Power-port capability correction
J19 has no USB data connection. PDO1's USB communications flag is now clear,
and STUSB4500 NVM byte 26 is 0x14 rather than 0x15. Runtime and NVM verification
reject the old flag. Previously provisioned units must be reprovisioned and
cold-boot checked using the 5 V-only setup in `connectors-and-firmware.md`.
The separate J1 USB data connection is unchanged.