Source: https://mokxi.com/parts/a4988
Updated: 2026-11-10

Part

# Stepper driver, A4988

STEP and DIR in, two coil currents out, and it does nothing until RST is tied to SLP.

See every part

- 16 pins
- 2 settings
- In 8 projects
- In 3 lessons

Drawn live by the editor's own code, at the size you see it.

At a glance

## The Stepper driver, A4988 in brief

What it is, and every setting the properties panel gives it.

The A4988 is the 16-pin StepStick carrier for a bipolar stepper such as a NEMA 17: two H bridges, a current chopper and a translator, so a sketch only sets DIR and pulses STEP. VMOT takes 8 to 35 V for the motor, VDD 3 to 5.5 V for the logic, and 1A, 1B, 2A and 2B go to the coils. On an Uno any two digital pins do; on an ESP32 power VDD from 3.3 V, because the inputs switch at 0.7 of VDD and a 3.3 V high never steps a driver whose VDD is on 5 V, which Mokxi reproduces. MS1 to MS3 are pulled low, full step, and select 1/2, 1/4, 1/8 or 1/16; EN is active low and pulled low. The current limit is VREF / (8 x 0.1 ohm), 1 A at the default 0.8 V. Coming out of sleep it ignores STEP for 1 ms. The classic mistake is leaving RST unwired: it floats, a floating reset is a reset, and nothing moves, hence the link from RST to SLP. The chopper’s ripple, inductance, thermal shutdown and the 2 A rating are not modeled.

Family

Outputs

Pins

16

vref

0.8

the voltage on the current-limit trimmer, 0.8 V on the A4988 and 0.5 V on
the DRV8825 by default.

rsense

0.1

the sense resistors, 0.1 ohm. The current limit
is VREF / (8 x RSENSE) on the A4988 and VREF / (5 x RSENSE) on the DRV8825,
which is 1 A for both defaults. The board shows the limit it works out.

Pins

## 16 pins

Named as the editor names them, so a wire lands where you expect it.

Pin

What it does

EN

Active low enable. Pulled low, so left alone the outputs are on.

MS1

Step resolution. Pulled low: full step.

MS2

Step resolution. Pulled low: full step.

MS3

RST

Active low reset. Floats on the carrier.

SLP

Active low sleep. Pulled up on the carrier, so left alone it is awake.

STEP

One step on each rising edge.

DIR

Which way the steps go.

VMOT

Motor supply: 8 to 35 V (A4988), 8.2 to 45 V (DRV8825).

GNDM

Motor ground. The two grounds are one plane on the board.

2B

2A

The two coils.

1A

The two coils.

1B

The two coils.

VDD

GND

Logic ground.

How to use it

## How to use the A4988 stepper driver with an Arduino

STEP to pin 3 and DIR to pin 4, VMOT to 12 V, VDD to 5 V, both grounds to the Uno’s GND, and the motor’s coils on 1A and 1B and on 2A and 2B. Then link RST to SLP. RST floats on the carrier and a floating reset holds the driver off, so a board with nothing on RST does nothing at all.

Each rising edge on STEP is one step of the current resolution. In this project MS1, MS2 and MS3 are all on 5 V, which is 1/16 step, so the 3200 pulses the sketch sends turn the top motor once; the DRV8825 below gets the same pulses and, at 1/32 with the same three pins high, turns half as far. The current limit is VREF / (8 x 0.1 ohm): the default 0.8 V is 1 A, and the vref property changes it.

Part pin

Board pin

STEP

Pin 3

DIR

Pin 4

VDD

5 V

VMOT

12 V supply

GND

GND

MS1, MS2, MS3

5 V

RST

SLP

On an ESP32 power VDD from 3.3 V. The inputs switch at 0.7 of VDD, so a 3.3 V pin driving an A4988 whose VDD is on 5 V never steps it.

Click to open it in the editor

This is the simulator itself, running here. Click anything to open it in the editor.

Open this project in the editor Read the full tutorial

One turn at 1/16 step, from the steppers sketch

How it is modeled

## What is true about the Stepper driver, A4988, here

In its help article’s own words: what the simulation gets right, and where it stops.

### Modeled

The translator: a position round one electrical cycle, moved one step of the
current resolution by each rising edge on STEP, and two coil currents set to its
cosine and sine times the current limit. At rest it sits at the datasheets' home
position, both coils at 70.7 percent. Full step visits only those 45 degree
points, so switching into full step from a microstep goes to the nearest one.

The current limit, including the case people meet: the chopper cannot push more
than the supply allows, so a winding whose resistance times the limit is more than
VMOT just gets VMOT. That is why these want 12 V or 24 V to run a motor rated
at 3.

The pins nobody wires. RST floats on the carrier and a floating reset is a
reset, so a driver with nothing on RST does nothing at all: every wiring diagram
has a link from RST to SLP for this reason. EN high lets go of the coils
while the translator keeps counting steps, as the datasheets say. Coming out of
sleep, STEP is ignored for 1 ms (1.7 ms on the DRV8825).

Logic levels. The A4988's inputs switch at 0.3 and 0.7 of VDD, so a 3.3 V board
driving an A4988 whose VDD is on 5 V is out of spec: 3.3 V never reaches the
3.5 V a high needs, and here it never steps. Power VDD from 3.3 V and it does.
The DRV8825 switches at fixed 0.7 V and 2.2 V, so any board drives it.

### Not modeled

The chopper as a circuit: its off time, its decay modes, the ripple they leave on
the current, and the whine of a slow decay at low speed. The model gives each coil
exactly the table's current, worked out from the winding's resistance as the rest
of the circuit shows it. Coil inductance, so the current never lags. The 2 A and
2.2 A ratings, thermal shutdown and over-current protection, so FLT never pulls
low. The minimum STEP pulse widths (1 and 1.9 microseconds), which no sketch gets
near. The A4988 mode combinations its datasheet does not list are read as full
step. The pull resistors on the carrier are the Pololu layout; clones vary.

From A4988 and DRV8825 stepper drivers, in full.

Projects

## See the Stepper driver, A4988 in a project

8 built-in projects use it. Each opens in the editor, already wired.

Lessons

## Where it turns up in a lesson

3 lessons place it in their own circuits.

### Learn articles

3 lessons

- DIY Stream Deck and Camera Slider With Arduino
- Arduino A4988 and NEMA 17 Stepper: Wiring and Code
- A4988 Pinout: Pins, Microstep Table and Vref

Boards

## The boards it is shown on

Each of these 2 boards has a built-in project with the Stepper driver, A4988 in it.

- Arduino Uno R3
- Arduino Nano

Libraries

## Arduino libraries for the Stepper driver, A4988

Built in, so the sketch compiles with nothing to install. Each page has the calls, the wiring and an example to run.

- AccelStepper
- FastAccelStepper

More parts

## The rest of the bench

Every one of these is drawn and simulated the same way.

Full-size breadboard

A real 0.1 inch grid with the rails and the center channel, 63 columns wide.

Jumper wires

Drag from any pin or hole to any other. Corners snap, and you can drag them.

Power

A supply rail at the voltage you choose.

Ground

The other end of every circuit.

LED

Lights when current flows. Five colors, and the brightness is what your eye would see.

Filament lamp

A tungsten bulb in a holder: an inrush when it is switched on cold, tens of milliseconds to warm up, and dim on half its voltage.

Resistor

Any value you like, with the color bands drawn to match.

ESP32-C3-DevKitM-1

A RISC-V board that runs your firmware at 160 MHz on the real memory map.

Pushbutton

A 12 mm tactile switch. Hold it while the simulation runs.

Raspberry Pi Pico

The RP2040 board on our own Cortex-M0+ core. Pick a program and press Run.

Raspberry Pi Pico W

Raspberry Pi Pico W (RP2040). The same board and the same pinout as a Pico, with the CYW43439 on it. The WiFi is simulated (no radio; real internet through the Cloud panel’s switch), and the on-board LED, which hangs off that chip rather than off GP25, is driven through the same path. Everything else is the Pico.

Raspberry Pi 4 Model B

Raspberry Pi 4 Model B: the 40-pin header, driven by main.py with RPi.GPIO or gpiozero.

See every part

## Wire up the Stepper driver, A4988

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.

Start building free Open the editor
