README.md
# NEMA8 20 mm dual-USB-C stepper controller
Four-layer 20 mm × 20 mm controller for the StepperOnline
[8HS15-0604S](https://www.omc-stepperonline.com/nema-8-bipolar-1-8deg-4ncm-5-7oz-in-0-6a-6v-20x20x38mm-4-wires-8hs15-0604s)
bipolar stepper motor (0.60 A/phase, 11 Ω, 5.5 mH).
## Architecture
- CH32X035F8U6 controller/USB-PD MCU and TMC2209-LA-T stepper driver.
- Two matching top-entry/vertical USB-C receptacles: one dedicated to power/PD and one to USB data/programming.
- Each PWR / PD CC pin has its own 5.1 kΩ Rd pull-down to ground (R_PD_CC1 and R_PD_CC2, JLCPCB C25905), while both CC lines remain connected to the CH32X035 for PD negotiation.
- Both top-entry USB-C receptacles, the edge-facing motor connector, and the TMC2209 are on the top side; the MCU is on the bottom side.
- PWR / PD, DATA / PROG, BOOT, motor phase order, and motor current limit are marked in silkscreen.
- Four 2.2 mm mounting holes on the motor's specified 15.4 mm square M2 pattern, with components kept outside a 2.10 mm screw-head radius on both board sides.
- Four copper layers with only full-stack plated through-vias; blind and buried vias are disabled.
- 0.30 mm via drills and 0.45 mm via pads.
- Default tscircuit autorouter and explicit JLCPCB/LCSC identifiers for fitted parts.
- 40 V-rated HT7533-1 3.3 V regulator on the logic rail, providing headroom above the 15 V USB-PD motor supply and its switching transients.
- TMC2209 exposed-pad thermal-via field, 1.1 A resettable fuse, reverse-current diode, TVS clamp, and local bulk/decoupling capacitance.
- TMC2209 UART control permits firmware adjustment of run/hold current. The 12 kΩ/10 kΩ VREF divider produces about 2.27 V; with 330 mΩ sense resistors this limits full-scale RMS current to about 0.60 A for the selected motor.
## Verification
Run the release checks from this directory:
```sh
npm run typecheck
npm run build
bunx tsci check
bunx tsci check shorts index.circuit.tsx --mode pcb
bunx tsci check shorts index.circuit.tsx --mode gerber
```
The generated board must report zero DRC failures and zero shorts before a release is pushed. The board definition fixes the outline at 20 mm × 20 mm, disables blind/buried vias, and requires 0.30/0.45 mm through-vias.
## Production notes
- The four-hole mounting pattern matches the 8HS15-0604S drawing: 15.4 ± 0.15 mm centers and M2 threaded holes. Placement reserves a 2.10 mm radius at every hole for the specified Ø4.0 mm M2 screw head plus 0.10 mm radial hole play. Use spacers/standoffs because the design has bottom-side components.
- Both USB-C receptacles use the same compact 12-contact, 48 V/5 A top-entry USB 2.0 part (JLCPCB/LCSC C5815189); cables plug perpendicular to the PCB.
- Both receptacles face upward from the top side. The DATA connector's 180° setting is only an in-plane pin rotation; it does not change the cable-entry direction.
- The four USB-C CC pull-down resistors use the same fitted 0402 JLCPCB/LCSC part C25905: R_PD_CC1/R_PD_CC2 on PWR / PD and R_DATA_CC1/R_DATA_CC2 on DATA / PROG.
- This design targets the bare 8HS15-0604S motor. The motor connector order is A−, A+, B+, B−; confirm the harness colors and phase order before energizing the first article.
- TMC2209 DIAG/INDEX are intentionally not routed in this dense revision; STEP, DIR, ENN, STDBY, and single-wire UART are connected to the MCU.
- The autorouter uses short neck-downs at fine-pitch pads. The longest power runs retain their requested widths, but the generated trace-width advisories must be reviewed with the Gerbers before production.
- USB-PD negotiation firmware, regeneration clamping, USB signal integrity, assembly rotations, driver thermals, and the 0.60 A current limit still require first-article validation.
- The USB-C source cannot absorb motor regeneration. Avoid aggressive deceleration until VM transients have been measured on hardware.