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/review-validation.md
# Encoder and maintainer review — local engineering revision
Date: 13 November 2026. Based on the canonical package's 2.0.0 source. These
changes are local and unpublished; no order or factory submission was made.
13 November validated native artifact (preserved locally in
`.tscircuit/review/system-diagram-baseline/circuit.json`):
SHA-256: `6c833d2c5a13ae9887d6db061edbee27ca8fb3b22cc3e5c6d25879c1d2f6a240`.
The board remains 91 × 90 mm, four copper layers, with 214 fitted components
on the top side and 16 fabricated test pads. The four corner mounting holes,
upward-actuated POWER switch, horizontal navigation row, screen, temperature
sensor, buzzer and four 150 µF / 50 V capacitors are retained.
## Review dispositions
| Finding | Implemented change | Remaining evidence required |
| --- | --- | --- |
| No encoder/Hall connection | J20 provides 3V3 OUT, GND, A/H1, B/H2, Z/H3; three protected Schmitt-buffer inputs reach RP2040 GP20/21/7. | Confirm the actual sensor, cable and electrical interface; test signal integrity and powered/unpowered behavior. |
| OFF→ON might restart without fresh ARM | SW4's second pole clears a hardware latch. Startup/brownout supervision also clears it. Only a new physical ARM edge sets permission; MCU and PD inhibits remain independent. | Real switch bounce, reset timing, held-button, brownout and motor fault-injection tests. |
| Long resistor-to-MOSFET gate paths | All six have direct 0.4 mm top-layer paths, 2.583–2.690 mm, with no vias in those sections. | Scope all six gates and their source returns under the intended load. Driver-to-resistor routing still uses layer transitions; this is not a claim that the complete gate loops have no vias. |
| Temperature and buzzer | Existing TMP102 near the bridge and transistor-driven buzzer retained; compiled connections checked. | Board sensor calibration and thermal thresholds; it does not measure motor winding temperature. |
| Unqualified current rating | Provisional motor-feed ceilings are 0.8 A at 5 V and 2.4/2.6/2.7 A at 9/15/20 V (raised on 2 December 2026, when R142 became 680 Ω); allocate 20 mA auxiliary encoder power plus logic overhead. | Validate input/phase current, current-limit tolerances and thermal behavior. The MOSFET's 46 A headline is not the board rating. |
| MCF firmware unfinished | Physical adapter rejects the legacy MCT configuration and leaves motor drive disabled. A slow manual-spin encoder diagnostic is included. | Implement and commission MCF8329A configuration/control, calibrated monitoring and protection. High-speed PIO counting, Hall processing and an outer motion loop are separate work. |
| Manufacturing and availability | Refreshed native Gerbers, 214-part BOM/CPL review, supplier pad references and MCF exposed-pad stencil metadata. Public stock screen saved for 75 BOM lines. | Factory library/stencil review, parts allocation, OLED mounting assembly and motor/cable compatibility. Shortages below remain unresolved. |
J20 feeds the RP2040; the MCF8329A continues to perform **sensorless** FOC.
This connector does not add encoder-angle commutation to the MCF. It supports
one single-ended A/B/Z encoder **or** three Hall inputs, not both simultaneously.
See `encoder-and-rearm.md` for pinout, voltage limits, power allocation and tests.
## Checks completed
- Native `tsci build index.tsx --disable-parts-engine --pcb-png --schematic-png
--svgs --autorouter-timeout 120m`: exit 0. No embedded DRC errors.
- Fresh installed `@tscircuit/checks`: zero errors. 1,511 routed trace records,
757 vias; all vias use 0.30 mm drills / 0.45 mm pads. Saved-routing guard
rejects changed pads, outline, nets or routing rules.
- Independent copper geometry: zero disconnected nets and zero floating copper
groups. 104/104 required width/connectivity paths pass. Local supply-width
checks and via contact-layer checks pass.
- Kelvin sense paths isolated from other same-net copper until the shunt lands.
USB paths remain on top, with no signal vias and a continuous local L2 ground
reference. This does not certify impedance, EMC or USB operation.
- Layout audit: zero findings across 230 component courtyards, including the
test pads, screw envelopes and selected bypass-placement constraints.
- Fabrication geometry preflight: zero findings for its selected copper/drill/
edge rules, no missing manufacturer part numbers, no text below 1 mm.
Factory DFM and stencil processing are still required.
- Compiled pin checks: 94 existing V2 connections plus 88 new/interlock
connections pass. Six gate paths meet the 3 mm / top-only / 0.4 mm requirement.
- Seven ideal interlock scenarios pass: startup, quick OFF→ON, knob-zero changes,
held ARM, ARM while OFF, brownout, independent MCU/PD disable.
- TypeScript check passes. All 58 Python tests pass, including quadrature
direction/invalid-transition behavior and physical-adapter drive lockout.
- Native netlist, schematic-placement and PCB-placement checks were run. PCB
placement DRC reports zero errors/warnings. The three new schematic pages
were rendered and visually inspected; the independent wire-interior check
passes for 22 boxes with zero crossings.
- Reviewed assembly export has 214 top-side placements, zero bottom-side fitted
parts and zero native DRC errors. Supplier pad numbers and package orientation
are checked; this does not replace factory placement preview approval.
The native Gerber paste check passed: U7 exports six windows with 72.52% area
coverage over continuous MCF pad 37; U11 and the existing Q1/Q2/Q7 window
patterns also pass. The ZIP contains the report and preview. Native Gerbers
are not rewritten. Stencil thickness,
aperture rounding and solder transfer remain factory process decisions.
The OLED CPL uses the supplier's four-pin header datum, which is offset from
the module body center. Factory assembly must confirm header soldering, support
hardware and display height; the module is not treated as an ordinary bare SMT IC.
The native Gerber ZIP also contains generic BOM/PnP files. Its exporter warns
that supplier pin-1 rotation metadata is missing for several parts. Use the
review package's top-level `bom.csv` and `cpl-reviewed.csv`, which use the
independently checked supplier pad references, rather than the nested generic
`pick_and_place.csv`. Factory placement-preview review remains required.
## Tool advisories retained
The build still logs the nonfatal automatic route-cache message about selecting
a unique PCB port. The native cache serializer cannot represent some authored
branches/junctions as its port-to-port cache paths. The build exits successfully
and this project's guarded `circuit/route-plan.json` reproduces the copper.
No error record, generated circuit JSON, exported Gerber or checker was altered
to hide a failure.
Fresh DRC reports 80 trace-style and 17 component pin-metadata warnings.
Placement also suggests eight inherited two-terminal component flips based on
connection directions. These are not physical pad overlaps or shorts in the
completed routes. Schematic heuristics suggest tighter grouping/rail paths and
pin padding; several follow paths through passives to the opposite supply rail.
The native drawings were reviewed for readable symbols and wire crossings.
These advisories remain visible rather than being represented as zero warnings.
## Stock and commissioning still open
The public catalog check on 13 November 2026 at approximately 10:14 UTC covers
one board's population only, without factory attrition or reservation:
| Component | Supplier part | Catalog result |
| --- | --- | --- |
| U12 LM74700QDBVTQ1 | C2653623 | 0 available |
| Q7 DMT6009LFG-7 | C439728 | 0 available |
| U3 AP63203WU-7 | C780769 | 0 available |
| U15 74LVC1G74DP,125 | C458768 | Only 2 available |
| D9 TPD4E05U06DQAR | C138714 | Only 14 available |
Seventy-two of 75 BOM lines had enough public catalog stock for one board before
attrition. No substitutions were made. Stock can change; factory sourcing must
be resolved before an order. Raw results and URLs are in
`manufacturing/review-parts-availability.json` and its CSV.
Before motor operation: commission the MCF firmware with the intended motor,
verify the physical interlock, measure the six gate waveforms, calibrate current
and voltage readings, test 5 V headroom under load and all selected PD profiles,
and measure braking/backdrive bus rise, capacitor ripple and temperatures.
The blocking input path means USB cannot be assumed to absorb regenerative
energy. Sustained braking may require an additional energy-dissipation design.
Confirm the encoder cable, 3.5 mm female to 4 mm male motor adapters, and OLED
supports/header height. These are not resolved by a clean CAD build.
## 16 November: further routing review and native system diagrams
**The gate-loop layout review is still open.** The prior six short paths are
only the resistor-to-gate sections. Measuring the other parts of the loops
revealed larger detours that should be improved before a motor prototype is
considered ready for commissioning. No copper was changed in this follow-up.
Forty selected pin-to-pin paths were measured from the native routed copper:
| Path | Approximate planar path | Vias used | Assessment |
| --- | ---: | ---: | --- |
| U7 SHA → Q10 source, phase U | 69.25 mm | 6 | First priority: the endpoints are only 13.03 mm apart. The detouring `review_PHASE_U_1496` trace alone is 64.70 mm. |
| U7 LSS → Q11/Q13/Q15 low-side sources | 61.10 / 49.26 / 38.45 mm | 2 each | Review the shared source-return topology together with the gate routes. Preserve the separate Kelvin sensing connection. |
| U7 GLA/GLB/GLC → R92/R96/R100 | 26.15 / 24.10 / 31.22 mm | 3 / 2 / 2 | Shorten the complete low-side drive loops, potentially through power-stage placement changes. |
| U7 GHA/GHB/GHC → R90/R94/R98 | 17.59 / 5.92 / 16.25 mm | 2 each | Review jointly with the high-side source returns. |
| U7 SHC → Q14 source, phase W | 28.45 mm | 2 | Secondary high-side return improvement. |
| U7 BSTC / SHC → C76 | 7.42 / 10.09 mm | 0 | Bring the bootstrap capacitor and its complete loop closer; the return detours more than its direct distance. |
| U7 GVDD → C73 | 7.62 mm | 2 | Local gate-supply bypass placement/return deserves review. |
| U5 QSPI SD3 → U6 | 19.30 mm | 2 | Secondary digital cleanup; the other flash paths span 5.15–12.56 mm. These numbers alone do not establish a timing violation. |
| U7 AVDD/DVDD/VREG/PVDD → local capacitor | 1.53–1.98 mm | 0 | Already compact on the measured supply legs. |
| Crystal signal segments | 1.60–3.72 mm | 0 | Already compact. |
| Six gate resistors → MOSFET gates | 2.58–2.69 mm | 0 | Previous local improvement confirmed. |
TI asks for compact **complete gate loops**, close bootstrap/bypass capacitors
and wide, short gate-drive connections. A short final gate segment by itself
does not satisfy that layout objective. See the
[MCF8329A datasheet, section 10.1](https://www.ti.com/lit/ds/symlink/mcf8329a.pdf).
The table prioritizes layout work; it is not a claim of measured ringing or a
manufacturer-defined maximum trace length. Loop area, source-return pairing,
drive strength and the actual MOSFETs also matter.
The read-only estimator is `scripts/pcb-audit/audit-route-lengths.py`; results
are in `.tscircuit/review/route-lengths.json`. It constructs a graph of physical
wire centerlines and real pad/via contacts, accounts for branches, and reports
the shortest connected planar route between the selected pad centers. It
excludes vertical travel through the board and is not an inductance solver.
Ground-plane return paths are outside its scope. Six analytic fixtures cover
bends, branches, vias, layer isolation, overlaps and disconnected proximity.
The native CLI trace-length command fell back to straight-line source-net paths
for this authored routing, so those CLI values were not used as routed lengths.
Existing USB-reference and Kelvin-isolation checks remain relevant; shortening
those traces indiscriminately could damage their return-path arrangement.
Layout shortening still needs a new placement/routing pass, fresh clearance,
width and Kelvin checks, and then measurements on hardware.
Diagram-only baseline native artifact: `dist/index/circuit.json`, SHA-256
`602cec4b8d4213d38b08bc89277aed5f83a843c5a5c11a986bdbcd3efc64252c`.
The comparison in `.tscircuit/review/system-diagram-verification.json` confirms
that all electrical, PCB and schematic records are identical to the 13 November
baseline. Only system-diagram records and project metadata changed. TypeScript,
the native build, fresh DRC and both compiled hardware checks pass. The existing
97 DRC warnings remain; this is not a zero-warning build. Nineteen diagram
blocks resolve to real PCB component IDs across three pages.
The board now embeds three native `systemblock.page` diagrams: board overview,
encoder feedback, and POWER/OFF/re-arm. Blocks reference real PCB components;
external objects have no PCB reference. `bun run diagram` renders documentation
quickly, and `bun scripts/render-system-diagram.tsx dist/index/circuit.json`
renders the component-linked pages from the complete native build. Sources are
`circuit/system-diagram.tsx` and `system-diagram.circuit.tsx`; SVG/PNG outputs are
in `dist/system-diagram/`. The normal build also exports `system-*.svg` in
`dist/index/`. The installed tscircuit version already supports these primitives.
The diagrams describe the intended architecture, not commissioned motor
firmware. J20 is the new connector, U14 is the input buffer, and an actual
external encoder is still to be selected. No parts, placement, trace, net,
board-size or firmware change accompanies this diagram update. The previously
exported manufacturing ZIP remains the 13 November review snapshot.
## 16 November — gate-loop routing cleanup
The largest detours have been shortened in the authored routing plan and
rebuilt through native tscircuit. Measurements below come from actual compiled
copper, using the same independent estimator as the earlier audit.
| Path | Before | After | Vias before → after |
| --- | ---: | ---: | ---: |
| Phase-U source → U7 SHA | 69.25 mm | 20.70 mm | 6 → 0 |
| U7 LSS → Q11 source | 61.10 mm | 30.70 mm | 2 → 2 |
| U7 LSS → Q13 source | 49.26 mm | 39.30 mm | 2 → 2 |
| U7 LSS → Q15 source | 38.45 mm | 38.45 mm | 2 → 2 |
| U7 GLA → R92 | 26.15 mm | 25.95 mm | 3 → 3 |
| U7 GLB → R96 | 24.10 mm | 22.74 mm | 2 → 2 |
| U7 GLC → R100 | 31.22 mm | 29.00 mm | 2 → 2 |
The six resistor-to-MOSFET gate sections remain 2.58–2.69 mm, entirely on top
with no vias. Other measured bootstrap, supply, crystal and QSPI paths are
unchanged. This is a routing improvement, not a claim of optimal loop area or
validated switching behavior; the remaining bootstrap/GVDD/phase-W opportunities
in the earlier audit still deserve a later placement review.
**Provenance:** the local V1 package (0.3.101, MCT8329A) already contained the
long low-side gate runs and source-return bus. Its corresponding source returns
were 61.00 / 49.16 / 38.35 mm and low-side gate runs 26.05 / 24.00 / 31.12 mm.
The approximately 0.1 mm differences in the pre-cleanup V2 measurements reflect
the changed driver pad/escape geometry. Phase U was the significant V2 routing
regression: about 18.85 mm in V1 became 69.25 mm in the pre-cleanup V2 artifact.
Both original route reports are preserved in `.tscircuit/review/gate-loop-v1.json`
and `gate-loop-before.json`.
The source-return bus now has shorter 1.2 mm branches to Q11 and Q13, with
parallel vias at power-layer transitions. The original 1.5 mm Q15 return is
retained. R93/R97/R101 pull-down returns now connect locally to their respective
MOSFET sources. The SP/SN Kelvin pair remains separate and unchanged. C20/C22
ground routing uses the existing continuous inner1 ground plane to clear the
gate-drive corridor; a parallel ground via was added at C22. Neither ground
connectivity nor USB reference continuity was assumed: both were checked in the
regenerated pours. No non-ground track was added to inner1.
**Validation:** native build succeeds, fresh DRC reports zero errors and the
same 97 existing warnings (80 trace-style and 17 pin-metadata warnings).
Independent checks report zero shorts, disconnected nets, floating copper,
unused vias or fabrication-clearance findings. All 106 width/connectivity checks
pass, including the added C20/C22 ground-return checks, paired power vias and
the retained 1.5 mm phase-W return. Kelvin, USB reference, placement/courtyard,
compiled hardware/interlock and saved-routing checks pass. Seven selected route
length/via-count regression limits pass; these are project regression limits,
not manufacturer electrical ratings.
The netlist and placement DRC checks pass. The separate schematic-placement
heuristic still reports pre-existing spread/overlap advisories; the complete
schematic records are unchanged by this routing work. Partial CLI checks now
use `scripts/checks.circuit.tsx`, which renders the same board without PCB-linked
system diagrams because those partial checks disable PCB rendering. The normal
build continues to include all three component-linked diagrams.
Native artifact SHA-256: `ed9c157c39711d77c0e75ed33d532a7c73ed58c96e0b55324782238645dec9a0`.
The scope comparison in `.tscircuit/review/gate-loop-scope.json` confirms that
all electrical source, schematic, system-diagram, placement, pad, courtyard,
silkscreen and paste records match the pre-cleanup build. Only traces, vias,
pours and the expected source-filesystem metadata hash changed. Board size,
component placement and top-side assembly are unchanged.
The complete-path report is `.tscircuit/review/route-lengths.json`; the fresh
geometry reports are in `.tscircuit/review/audit-final/`. Run
`scripts/pcb-audit/audit-route-lengths.py` on the native circuit before
`scripts/pcb-audit/check-gate-loop-lengths.py`; the latter rejects stale reports.
The existing manufacturing review ZIP remains the earlier snapshot and must be
regenerated before reviewing fabrication files for this routing revision.
No package was pushed. Gate waveforms, switching transients, current, braking
voltage and temperature still require hardware measurements.
## Review artifacts
Run `bun run export:hardware-review` after the checks. It rejects stale check
reports and exports `dist/hardware-review/review-package.zip` containing the
native Gerbers, BOM, reviewed CPL, orientation/scope reports, stencil evidence,
independent copper reports, stock screen and these notes. This is an engineering
review package, not a production release.