Common problem with multiple A4988 + Arduino UNO?

Hi,

I’m working with a robot project which need to drive 3 NEMA 17 stepper motors. First of all, I bought 3 A4988 drivers (green ones with Pololu logo) and hooked up to the Arduino uno as the provided scheme. Everything works fine until… 2 days ago.

Now to the problem. 1 of the drivers is not working anymore, seem dead. I checked all the connection, measure the voltages, everything is matching with the working ones except 1A, 1B, 2A, and 2B. Bought a new one, exactly the same problem, worked fine the first test, took the breadboard with everything home and back to the school the day after. 1 dead again. It doesn’t get hot either like the working ones.

I never disconnect or connect motors when power is on. Always hooked up the driver with VDD and GND first to adjust the to the right current. 12V battery is the last thing I toggle on to power up.

With the provided motors specs, code and picture of the breadboard, have I missed something? Am I doing something wrong?

Motor specs:
Holding torque: 0.41 Nm
Phase: 2 (bipolar)
Angle: 0.9 degrees
Voltage: 3V
Current: 1.7A
Form: NEMA 17

/*
 * With A4988 driver
 */

const int motor1_dir_pin = 4;
const int motor1_stepper_pin = 5;
const int motor2_dir_pin = 8;
const int motor2_stepper_pin = 9;
const int motor3_dir_pin = 10;
const int motor3_stepper_pin = 11;
int K1;

void setup() {
  
  Serial.begin(9600);
  pinMode(motor1_dir_pin, OUTPUT); // motor 1
  pinMode(motor1_stepper_pin, OUTPUT);
  pinMode(motor2_dir_pin, OUTPUT); // motor 2
  pinMode(motor2_stepper_pin, OUTPUT);
  pinMode(motor3_dir_pin, OUTPUT); // motor 3
  pinMode(motor3_stepper_pin, OUTPUT);
  pinMode(2, INPUT);
  
}

void motorpair_step(bool motor1_dir, bool motor2_dir, int motor1_steps) {
  digitalWrite(motor1_dir_pin, motor1_dir);
  digitalWrite(motor2_dir_pin, motor2_dir);
  delay(50);
  
  for(int i=0; i<motor1_steps; i++) {
    digitalWrite(motor1_stepper_pin, HIGH);
    digitalWrite(motor2_stepper_pin, HIGH);
    delayMicroseconds(500);
    digitalWrite(motor1_stepper_pin, LOW);
    digitalWrite(motor2_stepper_pin, LOW);
    delayMicroseconds(500);
  } 
}

void motor2_step(bool motor3_dir, int motor3_steps) {
  digitalWrite(motor3_dir_pin, motor3_dir);
  delay(50);

  for(int i=0; i<motor3_steps; i++) {
    digitalWrite(motor3_stepper_pin, HIGH);
    delayMicroseconds(1500);
    digitalWrite(motor3_stepper_pin, LOW);
    delayMicroseconds(1500);
  } 
}

void loop() {
  K1 = digitalRead(2);
  delay(10);
  
  if(K1==1){
    motorpair_step(false, false, 100);
    delay(2000);
    motorpair_step(true, true, 100);
    delay(2000);
    motor2_step(true, 300);
    delay(4000);
    motor2_step(false, 300);
    delay(4000);
  }
}

Hello.

Thank you for posting that picture. It is difficult for me to follow all of your power connections, but in general, it seems like you are connecting the correct pins.

Which of those 3 boards are you having problems with? What are you setting the current limit to? Some of your soldered connections look like they might not be fully wetting the pads on the board and if the initial connection is poor, it might fail as the circuit is used. Also, a connection failing while the board is in use could damage the board.

Could you look at the “Common soldering problems” section of the Adafruit Guide To Excellent Soldering and retouch any connections that are suspect, and then post pictures of those connections on the boards that do not work? Can you connect those boards using the minimum wiring diagram on the product page and test to see if there is voltage on the VREF pad and any of the output pins?

-Nathan

Hi Nathan,

Thanks for the reply, I’ve found the problem. It was the breadboard… Luckily it didn’t kill the drivers.

1 Like

I am glad to hear you got them working. Thanks for letting us know.

-Nathan