

The A4988 is a microstepping driver designed for controlling bipolar stepper motors. It is widely used in applications requiring precise motor control, such as 3D printers, CNC machines, and robotics. The A4988 supports microstepping resolutions of full step, half step, quarter step, eighth step, and sixteenth step, enabling smooth and accurate motor operation. Additionally, it features adjustable current control, thermal shutdown, and overcurrent protection, making it a reliable choice for various projects.








The A4988 is a compact and versatile stepper motor driver with the following key specifications:
| Parameter | Value |
|---|---|
| Motor Type Supported | Bipolar stepper motors |
| Operating Voltage (Vcc) | 8V to 35V |
| Logic Voltage (Vdd) | 3.3V or 5V |
| Maximum Current per Phase | 2A (with sufficient cooling) |
| Microstepping Modes | Full, 1/2, 1/4, 1/8, 1/16 |
| Current Control | Adjustable via potentiometer |
| Protection Features | Overcurrent, thermal shutdown |
| Step Frequency | Up to 500 kHz |
The A4988 has 16 pins, each serving a specific function. Below is the pinout and description:
| Pin Name | Type | Description |
|---|---|---|
| VMOT | Power | Motor power supply (8V to 35V). Connect to the stepper motor's power source. |
| GND | Power | Ground connection for motor power supply. |
| VDD | Power | Logic voltage supply (3.3V or 5V). |
| GND | Power | Ground connection for logic voltage supply. |
| 1A, 1B | Output | Connect to one coil of the stepper motor. |
| 2A, 2B | Output | Connect to the other coil of the stepper motor. |
| STEP | Input | Pulse signal to control motor steps. |
| DIR | Input | Direction control signal. |
| ENABLE | Input | Enables or disables the driver (active low). |
| MS1, MS2, MS3 | Input | Microstepping resolution selection pins. |
| RESET | Input | Resets the driver (active low). |
| SLEEP | Input | Puts the driver into low-power sleep mode (active low). |
| REF | Input | Reference voltage for current control. Adjusted via the onboard potentiometer. |
| FAULT | Output | Indicates fault conditions (e.g., overcurrent, thermal shutdown). |
Below is an example code to control a stepper motor using the A4988 and Arduino UNO:
// Define control pins
#define STEP_PIN 3 // Connect to STEP pin on A4988
#define DIR_PIN 4 // Connect to DIR pin on A4988
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 or LOW)
}
void loop() {
// Generate a pulse to move the motor one step
digitalWrite(STEP_PIN, HIGH); // Set STEP pin HIGH
delayMicroseconds(1000); // Wait for 1 ms
digitalWrite(STEP_PIN, LOW); // Set STEP pin LOW
delayMicroseconds(1000); // Wait for 1 ms
}
Motor Not Moving:
Driver Overheating:
Motor Vibrates but Doesn't Rotate:
FAULT Pin Active:
Q: Can I use the A4988 with a unipolar stepper motor?
A: No, the A4988 is designed for bipolar stepper motors only.
Q: How do I select the microstepping mode?
A: Use the MS1, MS2, and MS3 pins to configure the microstepping mode as shown below:
| MS1 | MS2 | MS3 | Microstepping Mode |
|---|---|---|---|
| LOW | LOW | LOW | Full Step |
| HIGH | LOW | LOW | Half Step |
| LOW | HIGH | LOW | Quarter Step |
| HIGH | HIGH | LOW | Eighth Step |
| HIGH | HIGH | HIGH | Sixteenth Step |
Q: What happens if I exceed the current limit?
A: The A4988 has built-in overcurrent protection and will shut down to prevent damage. Reduce the current limit or improve cooling to resolve the issue.