A4988 stepper driver 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 | Enable, active LOW. Leave unconnected to keep it on |
| MS1 | Not wired to the ESP32 | — | Microstep select |
| MS2 | Not wired to the ESP32 | — | Microstep select |
| MS3 | Not wired to the ESP32 | — | Microstep select |
| RST | Input (the ESP32 drives it) | D26 | Tie to SLP to keep the driver running |
| SLP | Input (the ESP32 drives it) | D27 | Tie to RST to keep the driver running |
| STEP | Input (the ESP32 drives it) | D32 | One pulse = one step |
| DIR | Input (the ESP32 drives it) | D33 | Direction |
| VMOT | Not wired to the ESP32 | — | Motor supply 8 to 35 V from a separate supply. Add a 100 µF capacitor |
| GND_MOT | Ground | GND | Motor supply ground |
| 2B | Not wired to the ESP32 | — | Motor coil 2 |
| 2A | Not wired to the ESP32 | — | Motor coil 2 |
| 1A | Not wired to the ESP32 | — | Motor coil 1 |
| 1B | Not wired to the ESP32 | — | Motor coil 1 |
| VDD | Power | 3V3 | Logic supply: 3V3 |
| GND | Ground | GND |
Suggested wiring for the 30-pin ESP32 DevKit, avoiding flash, input-only and strapping pins. BoardPilot checks it for you as you wire.
Sources
- Allegro A4988 datasheet, Logic supply 3 to 5.5 V; motor supply 8 to 35 V
- Pololu A4988 stepper driver carrier, Pinout and minimal wiring (RST to SLP)
Try it in 3D in BoardPilot
Related parts
18650 Li-ion cell in holder28BYJ-48 stepper + ULN2003 driver433 MHz transmitter (FS1000A)74HC595 shift registerActive buzzerAMS1117-3.3 regulator module
Part data: CC BY 4.0, free to reuse with credit to BoardPilot.