The A4988 Stepper Motor Driver (Red) is a compact and versatile driver module designed for controlling bipolar stepper motors. It features adjustable current control, microstepping capabilities, and built-in over-temperature and short-circuit protection. This module is widely used in applications requiring precise motor control, such as 3D printers, CNC machines, robotics, and automation systems. Its ability to operate in full-step, half-step, quarter-step, eighth-step, and sixteenth-step modes makes it ideal for achieving smooth and accurate motor movements.
Pin Name | Pin Number | Description |
---|---|---|
VMOT | 1 | Motor power supply (8V to 35V). Connect to the stepper motor's power source. |
GND | 2, 3 | Ground connection for motor and logic power supplies. |
VDD | 4 | Logic power supply (3.3V or 5V). |
STEP | 5 | Step input. A rising edge on this pin advances the motor by one step. |
DIR | 6 | Direction input. High or low determines the motor's rotation direction. |
ENABLE | 7 | Enable input. Pull low to enable the driver; pull high to disable it. |
MS1 | 8 | Microstepping mode selection pin 1. |
MS2 | 9 | Microstepping mode selection pin 2. |
MS3 | 10 | Microstepping mode selection pin 3. |
RESET | 11 | Reset input. Pull low to reset the driver. |
SLEEP | 12 | Sleep mode input. Pull low to put the driver into low-power mode. |
OUT1A | 13 | Output 1A. Connect to one coil of the stepper motor. |
OUT1B | 14 | Output 1B. Connect to the other end of the same coil. |
OUT2A | 15 | Output 2A. Connect to the second coil of the stepper motor. |
OUT2B | 16 | Output 2B. Connect to the other end of the second coil. |
Power Connections:
Motor Connections:
Control 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 |
Adjusting Current Limit:
Enable and Sleep Modes:
// A4988 Stepper Motor Driver Example Code
// This code demonstrates basic control of a stepper motor using the A4988 driver.
#define STEP_PIN 3 // Connect to the STEP pin of the A4988
#define DIR_PIN 4 // Connect to the DIR pin of the 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 step pulse
digitalWrite(STEP_PIN, HIGH); // Set STEP pin HIGH
delayMicroseconds(1000); // Wait for 1ms (adjust for speed control)
digitalWrite(STEP_PIN, LOW); // Set STEP pin LOW
delayMicroseconds(1000); // Wait for 1ms (adjust for speed control)
}
Motor Not Moving:
Motor Vibrates but Does Not Rotate:
Driver Overheating:
Motor Moves Erratically:
Can I use the A4988 with a unipolar stepper motor? No, the A4988 is designed for bipolar stepper motors only.
What happens if I exceed the current limit? The driver will enter thermal shutdown or over-current protection mode to prevent damage.
Can I control multiple A4988 drivers with one Arduino? 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 Motor Driver (Red) for precise and reliable stepper motor control.