Unable to get Stepper Motor to Spin

Hi, I'm trying to get a SX17-1005LQCEF Stepper motor to spin using an Arduino Uno and an A4988 stepper motor driver. I am using this wiring diagram:

I have checked the Uno is working with the blinking program, the stepper motor is working by testing if it can power an LED with both coils, there is a voltage of 0.584 across the vmot and ground of the driver, I have also tried using code from other tutorials and it does not want to work. The code I am currently using is below:

// Stepper motor run code with a4988 driver
// by Superb

const int stepPin = 3; // define pin for step
const int dirPin = 4;  // define pin for direction


void setup() {
  pinMode(stepPin,OUTPUT); 
  pinMode(dirPin,OUTPUT);

}

void loop() {
 digitalWrite(dirPin, HIGH); // set direction, HIGH for clockwise, LOW for anticlockwise
 
 for(int x = 0; x<200; x++) { // loop for 200 steps
  digitalWrite(stepPin,HIGH);
  delayMicroseconds(500);
  digitalWrite(stepPin,LOW); 
  delayMicroseconds(500);
 }
delay(1000); // delay for 1 second
 
}

Pictures of the setup and power supply are in the comments hopefully. Thanks in advance if anyone can provide some help.




  • Watch the last 1/4 of this:

Starting at 36:40... https://youtu.be/0qwrnUeSpYQ?t=2200

  • You software guys are always ahead of the game :wink:

The 12V at 1.5A on your power supply seems high. Is your motor healthy?

When is this true:

Thank you, I will try this one out.

I can drop the amps down, the stepper driver is rated for up 2A and I had seen on other threads that slightly increasing the amps could make the motor move. I was measuring that voltage at the 12V, 1.5A.

The motor is rated for I^2R=1*5.9=5.9Watts per coil, or 12W for full power through both coils. 12V*1.5A=18W. Where's the 18Watts going?

Normally when using these drivers, as you turn the power supply voltage up, the current drops because its circuitry is delivering the same power to the stepper.

Is there any mechanical load on the shaft of the stepper? If you check the stepper coils with a DMM, are they close to 5.9 ohms? Is there a short somewhere?

Thanks for the response, I'll try and find one.

If the motor is unloaded, it shouldn't take anywhere near 1A to move them. What gets hot when you are putting 12Vx1.5A into the system?

The driver is the hottest component

Set the driver current to 1 Amp and try this modified loop():

void loop() {
 digitalWrite(dirPin, HIGH); // set direction, HIGH for clockwise, LOW for anticlockwise
 
 for(int x = 0; x<200; x++) { // loop for 200 steps
  digitalWrite(stepPin,HIGH);
  delayMicroseconds(2000);
  digitalWrite(stepPin,LOW); 
  delayMicroseconds(2000);
 }
delay(1000); // delay for 1 second
 
}
1 Like