A4988 stepper driver with ESP32

Supply 3.3-5 V Bus GPIO
ENMS1MS2MS3RSTSLPSTEPDIRVMOTGND_MOT2B2A1A1BVDDGND

Pins and ESP32 wiring

PinRoleESP32 pinNotes
ENInput (the ESP32 drives it)D25Enable, active LOW. Leave unconnected to keep it on
MS1Not wired to the ESP32—Microstep select
MS2Not wired to the ESP32—Microstep select
MS3Not wired to the ESP32—Microstep select
RSTInput (the ESP32 drives it)D26Tie to SLP to keep the driver running
SLPInput (the ESP32 drives it)D27Tie to RST to keep the driver running
STEPInput (the ESP32 drives it)D32One pulse = one step
DIRInput (the ESP32 drives it)D33Direction
VMOTNot wired to the ESP32—Motor supply 8 to 35 V from a separate supply. Add a 100 µF capacitor
GND_MOTGroundGNDMotor supply ground
2BNot wired to the ESP32—Motor coil 2
2ANot wired to the ESP32—Motor coil 2
1ANot wired to the ESP32—Motor coil 1
1BNot wired to the ESP32—Motor coil 1
VDDPower3V3Logic supply: 3V3
GNDGroundGND

Suggested wiring for the 30-pin ESP32 DevKit, avoiding flash, input-only and strapping pins. BoardPilot checks it for you as you wire.

Sources

Try it in 3D in BoardPilot

BoardPilot Part data (JSON)

Related parts

Part data: CC BY 4.0, free to reuse with credit to BoardPilot.