

The A4988 is a microstepping driver designed for controlling bipolar stepper motors. It enables precise control of motor position and speed, making it ideal for applications requiring high accuracy and smooth motion. The A4988 features adjustable current control, over-temperature protection, and a built-in translator, simplifying its integration with microcontrollers. This component is widely used in 3D printers, CNC machines, robotics, and other motion control systems.








The A4988 has 16 pins, which are described in the table below:
| Pin Name | Type | Description |
|---|---|---|
| VMOT | Power Input | Motor power supply (8 V to 35 V). Connect to the stepper motor power source. |
| GND | Power Ground | Ground connection for motor power supply. |
| VDD | Power Input | Logic voltage supply (3.3 V to 5 V). |
| GND | Power Ground | Ground connection for logic voltage supply. |
| 1A, 1B | Motor Output | Connect to one coil of the stepper motor. |
| 2A, 2B | Motor Output | Connect to the other coil of the stepper motor. |
| STEP | Logic Input | Receives step pulses to control motor movement. |
| DIR | Logic Input | Sets the direction of motor rotation. |
| ENABLE | Logic Input | Enables or disables the motor driver (active low). |
| MS1, MS2, MS3 | Logic Input | Microstepping mode selection pins. |
| RESET | Logic Input | Resets the driver (active low). |
| SLEEP | Logic Input | Puts the driver into low-power sleep mode (active low). |
| REF | Analog Input | Reference voltage for current control. Adjusted via the onboard potentiometer. |
| FAULT | Logic Output | Indicates fault conditions (e.g., over-temperature). |
Current Limit = VREF / (8 × RS)
where RS is the sense resistor value (typically 0.1 Ω).Below is an example of how to control a stepper motor using the A4988 and an Arduino UNO:
// Define control pins for the A4988 driver
#define STEP_PIN 3 // Pin connected to STEP
#define DIR_PIN 4 // Pin connected to DIR
void setup() {
pinMode(STEP_PIN, OUTPUT); // Set STEP pin as output
pinMode(DIR_PIN, OUTPUT); // Set DIR pin as output
digitalWrite(DIR_PIN, HIGH); // Set initial direction (HIGH = clockwise)
}
void loop() {
// Generate step pulses to move the motor
digitalWrite(STEP_PIN, HIGH); // Step pulse HIGH
delayMicroseconds(1000); // Wait 1 ms
digitalWrite(STEP_PIN, LOW); // Step pulse LOW
delayMicroseconds(1000); // Wait 1 ms
}
Motor Not Moving:
Overheating Driver:
Erratic Motor Movement:
FAULT Pin Active:
Q: Can the A4988 drive unipolar stepper motors?
A: No, the A4988 is designed for bipolar stepper motors only.
Q: How do I calculate the VREF voltage for a specific current limit?
A: Use the formula VREF = Current Limit × 8 × RS. For example, for a 1 A current limit and RS = 0.1 Ω, VREF = 0.8 V.
Q: What happens if I don't connect the ENABLE pin?
A: The ENABLE pin defaults to active (LOW), so the driver will be enabled unless explicitly set HIGH.
Q: Can I use the A4988 with a 12 V power supply?
A: Yes, the A4988 supports motor power supplies between 8 V and 35 V, so 12 V is within the acceptable range.