seveibar/nema17-rp2040-stepper-controller

A tscircuit package created by seveibar.

Version
0.3.1
License
unset
Stars
0

Files

README.md

# NEMA 17 RP2040 stepper controller — single-sided assembly revision D

A 42 × 42 mm, four-layer controller with four mounting holes on 31 mm centers. Based on imrishabh18/rp2040-motor-controller v1.0.48. The compact revision retains the RP2040, DRV8825, CH224K USB-PD input, current/temperature telemetry. All populated components are on the top side. The underside AS5600 encoder and its two bypass capacitors and two pull-up resistors are unpopulated. The PCB remains four copper layers; insulated mounting clearance is still required below the PCB.

| Connection | Intended behavior |
|---|---|
| DATA only | Laptop supplies logic power and USB programming; motor remains unpowered. |
| PWR+DATA only | One cable supplies USB data and power when the source is a USB host with appropriate PD output. |
| DATA host + PWR charger | DATA has USB priority; PWR supplies the motor and logic. |

Both ports share ground. There is no galvanic isolation. Two reverse-blocking Schottky branches feed the 3.3 V buck from DATA VBUS or the protected motor rail without joining their VBUS rails. A small transistor detects DATA VBUS and gives that host priority. Two CH9442Q switches select data and put the overvoltage-protected XA/XB pins toward the PWR connector; low-voltage ESD protection stays behind that guard. CH224K handles PD only. No USB proxy firmware is needed.

The larger revision B isolation module, USB isolator, optocoupler, and isolation gap have been removed. USB connector courtyards are inside the 42 mm outline. Cable plugs extend outward in use.

## Status

Revision D is fully routed with 124 populated top-side components and the encoder/support parts DNP. The build and native checks report zero errors; all 10 USB/fit tests (535 assertions), schematic style checks, independent four-layer copper connectivity/clearance audit, exported-Gerber clearance and thermal-via checks, outer-layer motor-routing check, and Kelvin-connection audit pass. Trace-width/style and component pin-metadata warnings remain; see the validation reports. This is an engineering prototype, not a fabrication release. Bench checks remain necessary for input current/inrush, USB enumeration, port handover, USB signal integrity, PD transitions, reverse leakage/backfeed, faults and motor transients. Shared ground does not protect against ground-potential faults. Motor operation requires a suitable motor voltage; ordinary laptop 5 V supports programming only.

## Reproduce

```sh
bun install
bun run verify
bunx tsci build index.circuit.tsx --site --disable-parts-engine
```

The generated viewer is `dist/index.html`. Validation reports are in `reports/`.

Compact alarm: MLT-5020 (C94598), 5.2 mm body, 3 V externally driven magnetic buzzer. Use approximately 4 kHz PWM; do not leave the coil continuously driven. Existing MOSFET and flyback diode are retained.