

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 driver supports microstepping resolutions of full-step, half-step, quarter-step, eighth-step, and sixteenth-step, allowing for fine-tuned motor control. Additionally, the A4988 features adjustable current control, over-temperature protection, and short-circuit protection, ensuring reliable operation in various environments.








The A4988 driver module has 16 pins. Below is the pinout and description:
| Pin Name | Type | Description |
|---|---|---|
| VMOT | Power Input | Motor power supply (8V to 35V). Connect to the stepper motor power source. |
| GND | Power Ground | Ground connection for motor power supply. |
| VDD | Power Input | Logic power supply (3.3V to 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 | Pulse signal to control motor steps. |
| DIR | Logic Input | Direction control signal. |
| ENABLE | Logic Input | Enables or disables the driver (active low). |
| MS1, MS2, MS3 | Logic Input | Microstepping resolution 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. |
The microstepping resolution is determined by the MS1, MS2, and MS3 pins:
| 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 |
Power Connections:
Motor Connections:
Control Signals:
Microstepping Configuration:
Current Adjustment:
Cooling:
Below is an example of how to control a stepper motor using the A4988 and an Arduino UNO:
// Define pin connections
#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 step pulses
digitalWrite(STEP_PIN, HIGH); // Step pulse HIGH
delayMicroseconds(500); // Wait 500 microseconds
digitalWrite(STEP_PIN, LOW); // Step pulse LOW
delayMicroseconds(500); // Wait 500 microseconds
}
Motor Not Moving:
Motor Vibrates but Does Not Rotate:
Driver Overheating:
Motor Skipping Steps:
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 reference voltage (VREF) for my motor?
A: Use the formula ( V_{REF} = I_{max} \times 8 \times R_{sense} ). For example, if ( I_{max} = 1A ) and ( R_{sense} = 0.1Ω ), then ( V_{REF} = 0.8V ).
Q: What happens if I exceed the maximum current rating?
A: The A4988's over-temperature protection will activate, but prolonged overcurrent can damage the driver. Always set the current limit appropriately.
Q: Can I control multiple stepper motors with one Arduino?
A: Yes, you can control multiple A4988 drivers with separate STEP and DIR pins for each motor. Ensure the Arduino has enough GPIO pins and processing power for your application.