Documentation

ShillehTek Pre-Soldered A4988 Stepper Motor Driver + Heatsink for 3D Printer | ShillehTek Product Manual
Documentation / ShillehTek Pre-Soldered A4988 Stepper Motor Driver + Heatsink for 3D Printer | ShillehTek Product Manual

ShillehTek Pre-Soldered A4988 Stepper Motor Driver + Heatsink for 3D Printer | ShillehTek Product Manual

Overview

The A4988 is the workhorse stepper-motor driver used in 3D printers, CNC mills, laser engravers, and any project that needs precise rotational control. It accepts simple STEP and DIR signals from your microcontroller, then handles the complex bipolar coil switching, current limiting, and microstepping internally — turning a 200-step-per-revolution NEMA 17 motor into a 3200-step-per-revolution motor at 1/16 microstepping.

This pre-soldered module ships with a heatsink already attached to the IC, ready to handle the full ±2A per coil for hours of printing. The on-board current-limit potentiometer lets you trim VREF to your motor's rated current — a 30-second adjustment that prevents overheating and skipped steps.

Use it with RAMPS 1.4, Arduino, ESP32, Raspberry Pi, Pico, or any board that can produce step pulses. Standard 3D printer firmware (Marlin, Klipper, RepRapFirmware) drives it natively.

At a Glance

Driver IC
A4988
Coil Current
2A peak / 1.5A continuous
Motor Voltage
8V - 35V
Logic Voltage
3V - 5.5V
Microstepping
Full, 1/2, 1/4, 1/8, 1/16
Heatsink
Pre-attached

Specifications

Parameter Value
Driver IC Allegro A4988SETTR-T
Motor Voltage (VMOT) 8V to 35V
Logic Voltage (VDD) 3.0V to 5.5V
Coil Current (per phase) 2A peak, 1.5A continuous (with heatsink + airflow)
Microstep Modes Full, 1/2, 1/4, 1/8, 1/16
Current Adjustment VREF potentiometer on board
Step Frequency Up to 250 kHz (2 µs minimum step pulse)
Protections Over-current, thermal shutdown, UVLO
Compatible Motors Bipolar steppers (NEMA 8, 11, 14, 17, 23)
Pin Count 16 (8 per side)
Heatsink Pre-attached aluminum
Dimensions ~20 × 15 mm

Pinout Diagram

A4988 stepper motor driver pinout diagram showing left side EN, MS1, MS2, MS3, RST, SLP, STEP, DIR pins and right side VMOT, GND, 2B, 2A, 1A, 1B, VDD, GND pins, with the on-board VREF current-limit potentiometer in the center

Wiring Guide

Arduino Wiring

Minimum required wiring: VDD/GND for logic, VMOT/GND for motor power, 4 pins for the motor coils (1A/1B/2A/2B), and STEP/DIR for control. Tie RST and SLP together (both pulled high) to keep the driver enabled.

A4988 Pin Arduino Pin Notes
VMOT +12V (or motor PSU) Motor power, 8-35V
GND (motor side) Motor PSU GND Bottom right
2B, 2A, 1A, 1B Stepper coil wires Match coil pairs (test with multimeter)
VDD 5V Logic supply
GND (logic side) GND Bottom left
STEP Digital 3 Pulse to step
DIR Digital 4 HIGH/LOW = direction
RST Tied to SLP Both go to logic VDD
SLP Tied to RST Both go to logic VDD
EN GND or D5 LOW = enabled
MS1, MS2, MS3 Tied LOW or HIGH See microstep table
Warning: Always connect the motor to the driver BEFORE powering up. Disconnecting the motor while powered destroys the A4988 instantly.
Info: Add a 100 µF capacitor across VMOT and GND close to the driver. This smooths motor inrush spikes that can otherwise reset the chip.

ESP32 / Raspberry Pi Pico Wiring

Same as Arduino but with 3.3V VDD. The A4988 logic threshold is 0.7 × VDD, so a 3.3V GPIO HIGH (3.3V) easily satisfies it.

A4988 Pin ESP32 Pin Pico Pin
VDD 3.3V 3V3
STEP GPIO 18 GP15
DIR GPIO 19 GP14
EN GPIO 21 (optional) GP13 (optional)
VMOT External motor PSU (12V) External motor PSU (12V)
RST + SLP Tied to VDD Tied to VDD

Setting the Current Limit (CRITICAL)

Without setting the current limit first, the driver may overdrive the motor and overheat. Use a multimeter to measure VREF (the voltage on the trim pot wiper) and adjust until it matches your motor's rating.

Step Action
1 Power the driver (VMOT + VDD), motor disconnected.
2 Calculate target VREF: VREF = motor_current × 8 × Rs where Rs = 0.1Ω (most boards). For a 1A motor: VREF = 1 × 8 × 0.1 = 0.8V. For 1.5A: VREF = 1.2V.
3 Touch + lead of multimeter to the metal screwdriver tip and the trim-pot screw.
4 Touch − lead to GND on the board.
5 Slowly turn the trim pot until you read the calculated VREF voltage.
Warning: The trim pot is fragile — turn it slowly with a non-conductive (ceramic or plastic) screwdriver. Metal screwdrivers can short the wiper to the IC. Don't exceed VREF = 1.6V (which corresponds to 2A on Rs=0.1Ω boards).

Microstepping Selection

MS1, MS2, MS3 set the microstep resolution. Tying them to GND or VDD selects the mode. Most 3D printers run 1/16 microstepping.

MS1 MS2 MS3 Resolution
LOW LOW LOW Full step
HIGH LOW LOW 1/2 step
LOW HIGH LOW 1/4 step
HIGH HIGH LOW 1/8 step
HIGH HIGH HIGH 1/16 step
Tip: Higher microstepping = smoother motion but lower torque per microstep. For 3D printers, 1/16 is the sweet spot. For pure speed, full-step gives the most torque.

Code Examples

Arduino — Simple Step Sequence

a4988_arduino.ino
// A4988 Stepper Driver - Arduino Example
// STEP = D3, DIR = D4, EN = D5
// Set VREF to your motor's rated current BEFORE first run.

#define STEP_PIN  3
#define DIR_PIN   4
#define EN_PIN    5

const int stepsPerRev = 200;       // NEMA 17 = 200 full steps/rev
const int microsteps  = 16;        // matching MS1/MS2/MS3 = HIGH/HIGH/HIGH
const int totalSteps  = stepsPerRev * microsteps;

void setup() {
  pinMode(STEP_PIN, OUTPUT);
  pinMode(DIR_PIN, OUTPUT);
  pinMode(EN_PIN, OUTPUT);
  digitalWrite(EN_PIN, LOW);   // enable driver
}

void loop() {
  digitalWrite(DIR_PIN, HIGH); // forward
  for (int i = 0; i < totalSteps; i++) {
    digitalWrite(STEP_PIN, HIGH);
    delayMicroseconds(500);    // tune for desired RPM
    digitalWrite(STEP_PIN, LOW);
    delayMicroseconds(500);
  }
  delay(500);

  digitalWrite(DIR_PIN, LOW);  // reverse
  for (int i = 0; i < totalSteps; i++) {
    digitalWrite(STEP_PIN, HIGH);
    delayMicroseconds(500);
    digitalWrite(STEP_PIN, LOW);
    delayMicroseconds(500);
  }
  delay(500);
}

Arduino — AccelStepper Library

a4988_accel.ino
// A4988 - Smooth motion with AccelStepper library
// Library: AccelStepper by Mike McCauley (Library Manager)

#include <AccelStepper.h>

#define STEP_PIN 3
#define DIR_PIN  4

AccelStepper stepper(AccelStepper::DRIVER, STEP_PIN, DIR_PIN);

void setup() {
  stepper.setMaxSpeed(1000);     // steps/sec
  stepper.setAcceleration(500);  // steps/sec^2
  stepper.moveTo(3200);          // one revolution at 1/16 microstepping
}

void loop() {
  if (stepper.distanceToGo() == 0) {
    stepper.moveTo(-stepper.currentPosition());   // reverse
  }
  stepper.run();
}

Raspberry Pi Pico (MicroPython)

a4988_pico.py
# A4988 - Pico MicroPython
# STEP = GP15, DIR = GP14

from machine import Pin
import time

step = Pin(15, Pin.OUT)
direction = Pin(14, Pin.OUT)

def step_motor(steps, dir_value, delay_us=500):
    direction.value(dir_value)
    for _ in range(steps):
        step.value(1)
        time.sleep_us(delay_us)
        step.value(0)
        time.sleep_us(delay_us)

while True:
    step_motor(3200, 1)   # forward 1 rev (16x microstepping)
    time.sleep(0.5)
    step_motor(3200, 0)   # reverse
    time.sleep(0.5)

Frequently Asked Questions

My motor is making noise but not turning. What's wrong?
Three usual culprits: (1) coil pair miswired — swap two adjacent wires (e.g., 1A↔1B) and try again. (2) Current limit too low — turn the VREF pot clockwise to increase. (3) Step pulses too fast — slow down delayMicroseconds() to 1000-2000 µs and confirm motion.
Why does the driver get hot?
Stepper drivers always get warm — they're switching power into inductive coils. With the included heatsink and modest current (under 1.5A), it should stay below 80°C. If it's too hot to touch, reduce current via VREF, add airflow with a small fan, or check that the heatsink is making good thermal contact with the IC.
How do I identify the motor's coil pairs?
Use a multimeter in continuity or low-ohms mode. The two wires of one coil show ~2-5 Ω between them; the wires of the other coil also show ~2-5 Ω; but a wire from coil 1 to coil 2 reads infinite resistance. Mark the pairs and connect coil 1 to A4988's 1A/1B, coil 2 to 2A/2B.
Do I need separate motor and logic power supplies?
Not separate, but they must share GND. VMOT (8-35V) is typically a 12V or 24V bench supply. VDD (3.3V or 5V) usually comes from your microcontroller or a small regulator. Both ground pins on the A4988 must connect to the same GND.
What's the difference between A4988 and DRV8825?
DRV8825 is a similar but more powerful drop-in replacement. It supports up to 2.5A coils, 45V motor voltage, and 1/32 microstepping. The A4988 is older but cheaper and well-supported in firmware. Both have identical pinout — you can swap them on most boards (Marlin's "DRV8825" config flag handles the per-step inversion difference).
Why does the motor lose steps at high speed?
As speed increases, back-EMF rises and the driver can't push current into the coils fast enough. Three fixes: (1) raise the motor voltage (12V → 24V), (2) lower the microstepping (1/16 → 1/8), or (3) accelerate gradually rather than starting at top speed (use AccelStepper).
What about Klipper or Marlin compatibility?
Both firmwares support the A4988 natively. In Klipper, set driver_config: a4988. In Marlin, set #define X_DRIVER_TYPE A4988 in Configuration.h. The A4988 is the default driver for many older 3D printer boards (RAMPS 1.4, Cheetah, etc.).

Related Tutorials