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/schematic-layout-review.md
# Schematic arrangement review — 2026-11-17
All 13 native tscircuit sheets have been reviewed and arranged by function using the references below. The review gallery links each sheet to its reference and opens the full-resolution SVG. This is a drawing cleanup; it does not qualify the hardware or change the board's electrical design.
## Sheet-by-sheet review
| Sheet | Reference used | Arrangement and review |
| --- | --- | --- |
| 1 — Connection guide | Project connector and firmware documentation | Separate power and control flows, correct sheet references, explicit encoder-to-RP2040 and re-arm roles. This is a project overview, not a manufacturer reference circuit. |
| 2 — USB PD | [STUSB4500 Figure 10](https://www.st.com/resource/en/datasheet/stusb4500.pdf), [INA180 typical application](https://www.ti.com/lit/ds/symlink/ina180.pdf) | Connector at the left, CC pairs on the controller's left, supplies above, grounds below. Five host pull-ups connect directly above their signal branches. Separated reverse-blocking switch, current shunt/amplifier, reset pull-down, voltage divider and service pads. |
| 3 — Logic power and switch | [AP63203 Figure 1, p. 2](https://www.diodes.com/assets/Datasheets/AP63200-AP63201-AP63203-AP63205.pdf#page=2), [TPS1H100 Figure 45, p. 32](https://www.ti.com/lit/ds/symlink/tps1h100-q1.pdf#page=32) | Input/bypass on the left, switching node and inductor to the right, bootstrap above and feedback below. Separate switch bias, two-pole POWER switch, current-limit resistor and discharge path. |
| 4 — Reverse isolation | [LM74700-Q1 Figure 10-1, p. 16](https://www.ti.com/lit/ds/symlink/lm74700-q1.pdf#page=16) | Fuse and MOSFET in the power path above the controller. GATE points upward to Q7; anode and cathode sensing follow input and output. Local input/charge-pump capacitors, transient clamp and voltage divider are distinct. |
| 5 — USB/debug | [USBLC6-2 application](https://www.st.com/resource/en/datasheet/usblc6-2.pdf), [RP2040 Figure 11, p. 13](https://datasheets.raspberrypi.com/rp2040/hardware-design-with-rp2040.pdf#page=13) | Aligned D+/D− protection channels and 27-ohm series resistors. Kept physical package pins distinct. Separate CC pull-downs, cable detection, SWD pads, BOOTSEL and RESET. |
| 6 — RP2040 | [RP2040 Figure 11, p. 13](https://datasheets.raspberrypi.com/rp2040/hardware-design-with-rp2040.pdf#page=13) | Signals grouped by interface, supplies above/below, compact core/IO bypass banks, flash and crystal at the left, RGB and ADC supply filter at the right. Bypass notes identify their loads. |
| 7 — FOC driver | [MCF8329A Figure 8-1, p. 189](https://www.ti.com/lit/ds/symlink/mcf8329a.pdf#page=189) | Charge-pump and three bootstrap capacitors adjacent to their pin pairs. Bootstrap returns connect to the corresponding phases. Regulator bypass, input defaults, I2C/status pull-ups and service points are grouped separately. |
| 8 — Controls | [MCF8329A SPEED/DRVOFF functions and Figure 8-1](https://www.ti.com/lit/ds/symlink/mcf8329a.pdf#page=189) | Potentiometer/filter, ARM debounce, default-OFF driver enable and PD inhibit each read as local circuits. Control notes explain signal polarity and the re-arm cross-reference. These board-specific circuits are not copied from a complete manufacturer application. |
| 9 — Bridge | [MCF8329A Figure 8-1](https://www.ti.com/lit/ds/symlink/mcf8329a.pdf#page=189) | Three matching half bridges: VMOTOR above, gate resistors at the left, gate/source pull-downs below, common return and shunt beneath. Separate output connectors, reservoir and HF bypass banks. |
| 10 — User interface | [TMP102 Figure 7-1, p. 20](https://www.ti.com/lit/ds/symlink/tmp102.pdf#page=20), [RP2040 hardware guide](https://datasheets.raspberrypi.com/rp2040/hardware-design-with-rp2040.pdf) | OLED with direct I2C pull-ups, TMP102 with alert pull-up, four consistent key/debounce circuits in one row, buzzer with low-side driver and clamp. Compact, labelled bypass bank. |
| 11 — Encoder connector | [TPD4E05U06 simplified schematic and Table 4-2](https://www.ti.com/lit/ds/symlink/tpd4e05u06.pdf#page=4) | Separate fused sensor supply, isolated pull-up supply, connector and ESD channels. Retained all pin numbers and no-connect marks. Fuse reference remains horizontal when its symbol is vertical. |
| 12 — Encoder inputs | [SN74LVC3G17 Figure 4, p. 10](https://www.ti.com/lit/ds/symlink/sn74lvc3g17.pdf#page=10) | Three repeated resistor/pull-up/capacitor filters face the buffer's matching inputs. Local supply/ground stubs avoid cross-channel rail wiring. Output notes identify RP2040 pins. Matching labels connect the filter and buffer sections. |
| 13 — Re-arm | [TLV803 Figure 9-3](https://www.ti.com/lit/ds/symlink/tlv803.pdf#page=11), [SN74LVC1G14 Figure 7-1](https://www.ti.com/lit/ds/symlink/sn74lvc1g14.pdf#page=12), [74LVC1G74 pinning/functions](https://assets.nexperia.com/documents/data-sheet/74LVC1G74.pdf#page=3) | Supervisor/reset filter and ARM clock source at the left, permission latch in the middle, inhibit transistor at the right. Shared names connect these local circuits. Bypass capacitors and MCU default pull-down are separate. |
Manufacturer references determine pin grouping and signal-flow conventions. The project's selected parts, connections and values are retained, including differences from typical applications. Matching net names join sections and sheets.
## Verification
- Full local build: passed.
- TypeScript: passed.
- Native netlist check: 0 errors, 0 warnings.
- Invariant comparison: all 704 named pin-to-net mappings, 230 component records and 5,883 PCB records unchanged from the validated baseline.
- Saved-routing guard: retained; its geometry, connectivity and rule checks have not been weakened.
- Native PCB placement DRC: 0 errors, 0 warnings. The placement optimizer separately reports eight existing orientation suggestions; this schematic-only edit does not rotate the routed PCB parts.
- Routed DRC: 0 errors; the existing 97 metadata/routing-style warnings remain.
- Schematic checks and the final review summary are recorded in `.tscircuit/checks/schematic-layout-review.json`.
The CLI still logs that it cannot serialize some autorouting paths with ambiguous port selection. The build succeeds and the project's authored routing plan remains valid; this cleanup does not claim to fix that CLI path-export warning.
## Remaining native schematic suggestions
Seven style suggestions remain in two specific categories:
1. **Four diode/resistor alignment suggestions:** D1/R4 on sheet 2 and D7/R141 on sheet 3 are parallel branches, with the diode and resistor sharing both end nets. The checker requests that both endpoint pairs face one another as if they were series components. The side-by-side parallel arrangement is retained.
2. **Three pull-down flip suggestions:** R93, R97 and R101 on sheet 9 point from their gate nodes down to the shared LS_RETURN rail. The checker pairs them with MOSFET source endpoints on that rail, including endpoints in another phase. Rotating the resistors would spoil the consistent gate-to-return arrangement.
These are reviewed drawing heuristics, not waived electrical errors. Native warnings remain visible and the strict `bun run check` wrapper is unchanged; it still rejects any schematic suggestion. There is no claim of a warning-free check run or a bench-validated design.
## Reproduce
```sh
bun run typecheck
bun scripts/check-saved-routing.mjs
bunx tsci check netlist scripts/checks.circuit.tsx
bunx tsci check schematic-placement scripts/checks.circuit.tsx
bunx tsci check placement scripts/checks.circuit.tsx
bun --smol node_modules/@tscircuit/cli/dist/cli/main.js build index.tsx --disable-parts-engine --svgs
bun scripts/check-schematic-invariants.mjs BEFORE_CIRCUIT_JSON dist/index/circuit.json
bun scripts/check-routed.mjs
bun scripts/render-schematic.mjs dist/index/circuit.json
bun scripts/check-schematic-wires.mjs dist/index/circuit.json
```
Use a full routed build for invariant comparison; the schematic-only renderer deliberately omits PCB records. Open `.tscircuit/schematics/index.html` for the sheet and reference gallery. These changes have not been published.