Im trying to get my stepper to spin faster then 1000 pps, and my torque curve on my stepper's datasheet is showing it being capable of that(https://www.omc-stepperonline.com/download/17HS19-2004S1_Torque_Curve.pdf) but when i try to spin it faster then 1000 pps, it vibrates violently and does't move.
I'm giving a drv8825 24V 2A max as the datasheet specifies, and the DRV8825 max pulses is 250 khz, which is significantly more then 1000 pps, so I think its a code problem.
My code:
int main() {
xEN = 0;
yEN = 0;
xDIR = 1;
yDIR= 0;
for(int i = 0; i < 1000; i++){
xSTP = 1;
wait(0.001);
xSTP = 0;
wait(0.001);
}
}
I've read stepper motors need to be accelerated towards higher RPM, but im not sure how to do that. Like, how would I achieve 3000 pps?
EDIT: This seems to spin incredibly quickly and loudly but anything in the middle of this seems to just vibrate violently
int main() {
xEN = 0;
yEN = 0;
xDIR = 1;
yDIR= 0;
for(int i = 0; i < 1000; i++){
xSTP = 1;
wait(0.0005);
xSTP = 0;
wait(0.0005);
}
}