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-controller

In 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/full-assembly.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.

# BLDC connected assembly — 18 November 2026

The main `index.tsx` exports `enclosed-system.circuit.tsx`: the populated 91 × 90 mm PCB, portable mechanical assembly and redesigned enclosure. The board-only entry remains `pcb.circuit.tsx`; `system.circuit.tsx` shows the connected assembly without the enclosure. See [enclosure hardware and fit notes](../enclosure/README.md). No components were moved to the underside; nuts and spacers are mechanical hardware.

## Screen

The display is now the BuyDisplay ER-OLED013A1-1W, a bare 1.3-inch SSD1306 panel. J21 is a surface-mount top-contact connector; the original short ribbon plugs in without user soldering. The printed enclosure holder supports the glass on its inactive border. The former through-hole module, header and four spacer/screw/nut stacks are removed. See [plug-in OLED electrical, assembly and first-fit details](plug-in-oled.md).

The glass sits between a locating ledge in the lid and a thin rear frame, with compliant strips on the inactive front/rear edges. Two local retainer bosses take M2 inserts; the M2 × 12 screws remain accessible above the lid so the holder can be released before the lid is lifted. It carries the panel weight independently of the stock 12 mm ribbon. Check the supplied panel, pad compression, flex and connector fit before closing the case. The automated checks establish nominal modeled clearances, not physical assembly qualification.

## Encoder choice and mounting

> Superseded on 1 December 2026: the AS5047P-TS_EK_AB adapter board is no longer stocked by the main distributors. The project now uses its own encoder board, holder and magnet cap, and the assembly file shows those. See [encoder board and snap-off fabrication](encoder-board.md). The text below describes the earlier study.

The proposed external encoder is **AS5047P-TS_EK_AB**, with a 6 × 2.5 mm diametrically magnetized magnet (AS5000-MD6H-2). This is a separate board at the motor, not a replacement for J20 or the SPEED dial. It sends A/B/index to the RP2040; the MCF8329A still runs sensorless FOC internally.

The manufacturer dimensions the board at 22 × 28 mm, four 2.6 mm mounting holes, 11 mm vertical hole spacing, a 0.5–3 mm magnet-to-package gap and ±0.5 mm centring tolerance. The model uses a 1.5 mm face gap. Horizontal hole spacing, sensor offset from the board edge and header offsets are scaled from the manual illustration and are **not verified production dimensions**.

A stationary open cradle uses the motor drawing's M3 mounting pattern (16/19 mm opposed pitches). Four 1 mm spacers and M2.5 × 8 nylon screws/nuts support the encoder PCB. A proposed nonmagnetic carrier places the magnet on the rear shaft axis. The motor reference establishes its body envelope but **does not dimension the rear shaft or guarantee that it can accept this carrier**. The carrier's bore/interface is deliberately not fabricated or specified. The gold-coloured bracket/carrier are a fit study, not approved print or machining files. Measure the motor, encoder board and maximum safe motor-screw insertion before finalizing them. Do not fasten the magnet to a stationary motor surface.

## Harness and electrical preparation

J20 is the side-entry JST PH 5-pin header S5B-PH-SM4-TB(LF)(SN), C265104, facing the right enclosure wall. Use PHR-5 and appropriate PH crimp contacts for the chosen wire. The model includes the horizontally seated mating housing, five 0.8 mm diameter wire envelopes and female contacts on the encoder header. Cable routes/lengths are representative; provide strain relief and route the harness away from motor phase wiring in the physical assembly.

| J20 pin | Board net | Encoder board label |
| --- | --- | --- |
| 1 | ENC_3V3 | 3V3 |
| 2 | GND | GND |
| 3 | ENC_A_EXT | A |
| 4 | ENC_B_EXT | B |
| 5 | ENC_Z_EXT | I/PWM, configured as index |

The manual's P1 numeric pin table and schematic disagree. Use the labels printed on the actual board and verify continuity before applying power. Colours are only a visual aid.

Configure the breakout for 3.3 V per its revision's manual (Rev.1.0: R1 unpopulated, R2 zero-ohm link, JP1 set for 3.3 V so VDD and VDD3V3 are supplied together). Verify this on the delivered board; do not feed J20's 3.3 V into a board left in 5 V regulator mode. Strap unused SPI inputs as specified by the sensor datasheet (CSn high, CLK/MOSI low, TEST grounded); these hand-assembly details are documented here, not represented as a fabricated auxiliary PCB. Keep SPI access available for configuration.

The IC's maximum supply current is 15 mA, below J20's provisional 20 mA allocation, but **voltage margin needs checking**. At 15 mA, F2's specified 15 Ω maximum post-trip resistance could drop 0.225 V, before harness and strap current. The encoder needs at least 3.0 V at its pins. Nominal 3.3 V alone does not establish worst-case compatibility. Measure the loaded voltage, including minimum source voltage and temperature; if inadequate, revise the supply design or use an independently regulated 3.3 V supply with J20 pin 1 disconnected and grounds joined. Do not back-feed J20.

Configure the ABI resolution through a separate SPI programmer; J20 does not carry SPI. The sensor supports a 25-pulse/revolution option: at its 28,000 rpm maximum this gives 11.7 kHz on A/B, below the board's provisional 20 kHz/channel qualification target. This is a proposed commissioning setting, not a validated operating rating. The factory/default 1024-pulse setting is unsuitable for assuming full-speed operation with that target. Volatile settings are lost on power cycling; a repeatable provisioning method or explicitly approved OTP configuration is still required. No OTP was programmed, and no new high-speed firmware is claimed. The existing diagnostic is for slow manual rotation only.

## Builds and validation

- `bun run build:pcb` builds `pcb.circuit.tsx` into `dist/pcb/circuit.json`, the independent populated-board baseline.
- `bun run assembly:test` checks native cables, endpoint ownership, live pin-to-net assignments, OLED support positions/clearances and the modeled magnet gap.
- `bun run assembly:build` audits the baseline and regenerates the editable assembly and portable `assets/connected-system.glb`.
- `bun run enclosure:build` and `bun run enclosure:verify` regenerate the native enclosure, STL files and modeled-clearance report.
- `bun run build:package` builds the main entrypoint and compares its PCB, schematic and electrical connection records against the baseline.
- `bun run assembly:preview` opens the detailed local inspection server. The same portable asset is used by the normal package 3D viewer.

Set `PCB_AUDIT_PYTHON` to an interpreter with Shapely 2. `assets/connected-system.provenance.json` records the board and asset hashes. Main-board CAD remains native; the added asset contains no duplicate main PCB. Existing adapter body dimensions and current rating, motor leads, and remote USB enclosures remain representative. No hardware was ordered, no assembly was physically fitted, and no motor/encoder firmware was commissioned by this CAD work.

## References

- [Exact motor listing](https://www.amazon.com/dp/B075DD16LK) and [motor dimension drawing](https://m.media-amazon.com/images/I/61prmpd-BOL._AC_SL1100_.jpg).
- [Manufacturer AS5047P adapter-board manual](https://www.mouser.com/datasheet/2/588/AS5047P-TS_EK_AB_Operation-Manual_Rev.1.0-775823.pdf), mounting p.5 and schematic p.9.
- [Official AS5047P datasheet](https://www.infineon.com/assets/row/public/documents/30/49/infineon-as5047p-datasheet-en.pdf).
- [JST PH series drawing](https://www.jst-mfg.com/product/pdf/eng/ePH.pdf).

Reference links belong to these notes and the preview, not the real schematic sheets.