

The A4988 is a microstepping driver designed for controlling bipolar stepper motors. Manufactured by Adafruit under the part ID "Stepper Driver," this component enables precise control of motor position and speed. It supports up to 2A per phase with adjustable current control, making it ideal for applications requiring fine motor control. The A4988 also includes built-in protection features such as over-temperature and short-circuit protection, ensuring reliable operation.








The A4988 has 16 pins, which are described in the table below:
| Pin Name | Type | Description |
|---|---|---|
| VMOT | Power Input | Motor power supply (8V to 35V). Connect a decoupling capacitor close to this pin. |
| GND | Power Ground | Ground connection for motor power supply. |
| VDD | Power Input | Logic power supply (3.3V or 5V). |
| GND | Power Ground | Ground connection for logic power 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 | Controls the step signal. A rising edge triggers a step. |
| DIR | Logic Input | Controls the direction of motor rotation. |
| ENABLE | Logic Input | Enables or disables the driver (active low). |
| MS1, MS2, MS3 | Logic Input | Selects the microstepping resolution. |
| RESET | Logic Input | Resets the driver (active low). |
| SLEEP | Logic Input | Puts the driver into low-power sleep mode (active low). |
| REF | Analog Input | Sets the current limit via an external potentiometer. |
| FAULT | Logic Output | Indicates a fault condition (active low). |
Power Connections:
Motor Connections:
Control Signals:
Current Adjustment:
Decoupling Capacitors:
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 // 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 = clockwise)
}
void loop() {
// Rotate the motor one step at a time
digitalWrite(STEP_PIN, HIGH); // Generate a step pulse
delayMicroseconds(1000); // Wait for 1ms
digitalWrite(STEP_PIN, LOW); // End the step pulse
delayMicroseconds(1000); // Wait for 1ms
// Repeat the loop to continue stepping
}
Motor Not Moving:
Driver Overheating:
Erratic Motor Movement:
FAULT Pin Active (Low):
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 calculate the current limit using the REF pin?
A: The current limit is approximately VREF / (8 * R_sense), where R_sense is the value of the sense resistor (typically 0.1Ω).
Q: What happens if I exceed the maximum current rating?
A: The driver may overheat or enter a fault condition. Always set the current limit below the motor's rated current.
Q: Can I control multiple A4988 drivers with one Arduino?
A: Yes, you can control multiple drivers by assigning separate STEP and DIR pins for each driver.
By following this documentation, you can effectively use the A4988 stepper driver in your projects.