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/full-assembly.md
# USB-powered operating assembly
The preview shows the top-assembled PCB, Readytosky motor, three original motor leads with male bullet ends, three rigid adapters, a USB-C PD power cable plugged into J19 and a USB-C data cable plugged into J1. Source and computer enclosures are representative visual endpoints, not selected purchasable models. Their cables use native `assembly.cable` USB-C ends; motor leads use native cables and the existing upstream male/female bullet geometry. No adapter wires or battery are shown.
PCB connector insertion datums come from the actual compiled board. The preview's connection tests check endpoint ownership and J19 power / J1 data net mapping. The motor/socket geometry follows the supplier socket model and published motor envelope. Adapter length, insertion depth and lead dimensions still have the previously disclosed uncertainties.
## Standard package 3D view
Run `bun run dev`, select `system.circuit.tsx`, then **3D**. This is now the
package's configured main entrypoint, including the real populated PCB and the
entire connected assembly. The same entrypoint and asset are included by
`tsci push`; the published page changes only after a successful push.
`system.circuit.tsx` uses documented `assembly.device` and
`assembly.subassembly` elements. It imports the actual board from
`index.circuit.tsx` and the portable `assets/connected-system.glb`. The asset
contains **no PCB**: the package still has one live board, with its original
PCB and schematic views, copper, netlist and fabrication outputs.
The model is exported from the editable native `assembly.cable` authoring in
`assembly/full-assembly.tsx`, including the three motor leads, male bullets,
rigid male/female adapters and two USB cables. The package viewer loads that
GLB through standard CAD support; it does not need the authoring project's
local cable extensions. This changes packaging, not the modeled dimensions.
The authoring directory and generated build folders are excluded from the
registry upload and dev-server file scan; they remain in the local main project.
Only the portable asset and its small provenance file are needed by the viewer.
## Rebuild after a design change
`bun run build:all` rebuilds the board, audits its PCB, regenerates the assembly
and its portable asset, then builds and checks the integrated package.
`assets/connected-system.provenance.json` records the board and model hashes.
`bun run check:integration` rejects a stale model and confirms that the wrapper
has not changed any PCB records, schematic geometry or electrical connections.
`bun run build` compiles the PCB and integrated package using the included asset,
so it also works from the uploaded package without the local authoring runtime.
Its geometry hash ignores source-filesystem metadata and the viewer's CAD-cache
URL suffix, but includes PCB records and component CAD transforms. A changed
board geometry requires `bun run build:all` locally before publishing again.
For PCB-only fabrication use `bun run build:pcb` and `dist/index/circuit.json`.
The integrated output is `dist/system/circuit.json`. Manufacturing scripts
continue using the PCB-only build. `bun run assembly:preview` remains available
for the older detailed assembly inspection view.
The local standard viewer can also report existing schematic-property/style
warnings and optional supplier-lookup failures. These are separate from the
assembly integration and have not been hidden or rewritten.