Another DRV8825 Won't Work Thread, Stationary and Squealing

Hello, I have a DRV8825 and when powered, it makes a squealing sound that gets higher and higher in pitch and the shaft doesn’t move. Sometimes it does a slight clicking noise, but never actually moves.

I have this motor:17HD48002H-22B

I have read many topics about this driver. Here is what I’ve done:
1) Set the current limit. I tested 508mV on the driver’s potentiometer.
2) Checked for the coils. I know that red and blue are together, and black and green are together. (2.4 ohms each).
3) Ensured the step pin and direction pin are properly enabled/labeled in the code.
4) Powered the sleep and reset pins on the driver via the 5V output pin on the Arduino.

Here is the code I am using (by Robin2):

// testing a stepper motor with a Pololu A4988 driver board or equivalent
// on an Uno the onboard led will flash with each step
// this version uses delay() to manage timing

byte directionPin = 8;
byte stepPin = 9;
int numberOfSteps = 100;
byte ledPin = 13;
int pulseWidthMicros = 20;  // microseconds
int millisbetweenSteps = 250; // milliseconds - or try 1000 for slower steps


void setup() { 

  Serial.begin(9600);
  Serial.println("Starting StepperTest");
  digitalWrite(ledPin, LOW);
  
  delay(2000);

  pinMode(directionPin, OUTPUT);
  pinMode(stepPin, OUTPUT);
  pinMode(ledPin, OUTPUT);
  
 
  digitalWrite(directionPin, HIGH);
  for(int n = 0; n < numberOfSteps; n++) {
    digitalWrite(stepPin, HIGH);
    delayMicroseconds(pulseWidthMicros); // this line is probably unnecessary
    digitalWrite(stepPin, LOW);
    
    delay(millisbetweenSteps);
    
    digitalWrite(ledPin, !digitalRead(ledPin));
  }
  
  delay(3000);
  

  digitalWrite(directionPin, LOW);
  for(int n = 0; n < numberOfSteps; n++) {
    digitalWrite(stepPin, HIGH);
    // delayMicroseconds(pulseWidthMicros); // probably not needed
    digitalWrite(stepPin, LOW);
    
    delay(millisbetweenSteps);
    
    digitalWrite(ledPin, !digitalRead(ledPin));
  }
}

void loop() { 
}

Lastly, here is my setup: I am copying the minimal one from Pololu’s website. Also, my power supply for the motor is 2 9V batteries in series. They measured ~15.5V together.

Thank you for all of your help, I hope I followed the correct forum rules.

jt_3232:
Also, my power supply for the motor is 2 9V batteries in series.

What sort of 9v batteries?

If they are the little PP3 type intended for small radios they will be completely useless for a stepper motor - they can't provide enough current.

...R

Put your meter on the motor power input and monitor the battery output voltage as you actuate the motor. 9V batteries just cannot supply enough current to run a stepper motor. They would be pressed to supply 300mA, let alone 1.7A. You need a supply that can supply 12V and 3 to 5A.

OP photo

It was certainly the power supply. The motor seems to run as expected.

One last question: how fast can I expect this motor to run?

Thank you so much guys! I have been racking my brain trying to figure out the possible problems.

One last question: how fast can I expect this motor to run?

That is a hard question to answer. What is the motor supply voltage? Are you running microstepping? What is the load? What is the mechanical arrangement that you are driving (belt, gears, lead screw)? I think that the max speed for your particular application is best found by experimenting. Increase speed till you start missing steps. Acceleration will be necessary.

Some reading.

The Accelstepper library.

Stepper motor basics

Simple stepper program for testing

Thanks. I have not looked far enough into the application of my motor yet. So I'm not sure how fast it will go. Thanks for the links.

The motor won’t normally be the main limit the speed, the driver and its supply voltage are what limit the speed.

Expect upto 2000 rpm with high voltage supply, but note that torque always falls greatly with speed
with steppers.

1000rpm is a more reasonable target to aim for.

The higher the supply voltage, the lower the motor winding impedance (principally inductance),
the faster you can get a stepper to go.

If you select a motor with 10 times the hold-in torque compared to the dynamic torque you desire,
you’ve got a reasonable amount of headroom for high performance (ie high speed) use.

Resonance is an issue to watch out for, especially with leadscrew systems (which have very little
natural damping).