TMC2209 silent stepper driver (StepStick) with ESP32
Supply 3.3-5 V
Bus GPIO
Pins and ESP32 wiring
| Pin | Role | ESP32 pin | Notes |
|---|---|---|---|
| EN | Input (the ESP32 drives it) | D25 | Pin order varies between boards: match by the printed label. Enable, active LOW. Connect to GND to keep it on |
| MS1 | Not wired to the ESP32 | — | Microstep select. With UART: address bit 0 |
| MS2 | Not wired to the ESP32 | — | Microstep select. With UART: address bit 1 |
| UART | Not wired to the ESP32 | — | Single-wire UART (optional, via a 1 kΩ resistor for TX) |
| PDN | Not wired to the ESP32 | — | Power down / UART. Leave unconnected for STEP/DIR use |
| CLK | Not wired to the ESP32 | — | Clock input. Connect to GND (internal clock) |
| STEP | Input (the ESP32 drives it) | D26 | One pulse = one (micro)step |
| DIR | Input (the ESP32 drives it) | D27 | Direction |
| VM | Not wired to the ESP32 | — | Motor supply 5.5 to 28 V from a separate supply. Add a 100 µF capacitor |
| GND_MOT | Ground | GND | Motor supply ground |
| B2 | Not wired to the ESP32 | — | Motor coil B |
| B1 | Not wired to the ESP32 | — | Motor coil B |
| A1 | Not wired to the ESP32 | — | Motor coil A |
| A2 | Not wired to the ESP32 | — | Motor coil A |
| VIO | Power | 3V3 | Logic supply: 3V3 |
| GND | Ground | GND | |
| DIAG | Output (the part drives it) | D32 | Stall / error output (StallGuard). Optional |
| INDEX | Output (the part drives it) | D33 | Index pulse output. Optional |
Suggested wiring for the 30-pin ESP32 DevKit, avoiding flash, input-only and strapping pins. BoardPilot checks it for you as you wire.
Sources
- Trinamic TMC2209 datasheet, VM 4.75 to 29 V; VIO 3 to 5 V; UART address set by MS1/MS2; DIAG, INDEX
Try it in 3D in BoardPilot
Related parts
18650 Li-ion cell in holder28BYJ-48 stepper + ULN2003 driver433 MHz transmitter (FS1000A)74HC595 shift registerA4988 stepper driverActive buzzer
Part data: CC BY 4.0, free to reuse with credit to BoardPilot.