so im using a RTELLIGENT Nema 17 stepper motor and a DRV8825 Stepper Motor Driver Module connected to 12v power supply. Im also using the accelstepper library. if I set the setspeed to 1000 it spins fine, however if i set the motor to spin a lot slower it sounds like it binds up any thoughts on how to get it spinning a lot slower but smoothly. here is the code /*Example sketch to control a stepper motor with DRV8825 stepper motor driver, AccelStepper library and Arduino: continuous rotation. More info: https://www.makerguides.com */
// Include the AccelStepper library: #include <AccelStepper.h>
// Define stepper motor connections and motor interface type. Motor interface type must be set to 1 when using a driver: #define dirPin 2 #define stepPin 3 #define motorInterfaceType 1
// Create a new instance of the AccelStepper class:
AccelStepper stepper = AccelStepper(motorInterfaceType, stepPin, dirPin);
void setup() {
// Set the maximum speed in steps per second:
stepper.setMaxSpeed(1000);
stepper.setSpeed(100);
}
void loop() {
// Set the speed in steps per second:
// Step the motor with a constant speed as set by setSpeed():
stepper.runSpeed();
}
The motor may be experiencing resonance. I have motors that stall and stop moving at 200 steps per second and no microstepping. They work fine 100 steps on either side of 200. Are you using microstepping? Try 4x or more and see if it helps.
Please post a link to your specific motor. There are many RTELLIGENT Nema 17 motors. And did you adjust the motor current correctly for your type of motor?
That sets the driver to x32 microstepping. So it takes 6400 steps (pulses) to turn 1 turn on a 200 pulse per rev (nominal) motor. You need to step it a lot more to make the motion visible. Do you have a flag on the motor shaft or some other way of, clearly, seeing the motion? And at 100 steps per second it will take 64 seconds to complete 1 revolution. Need to speed it up, too.
To get half steps, set M0 to 5V, M1 and M2 to ground. See the table.
Though if the motor works at high speed but not at low speed I would think that the current is not the problem. And the current setting should not effect the working with microstepping.