Stepper motor step accuracy

jremington:
That power supply should work. However,

const int STEPS = 25; // 360 / stepAngle

// Initialize the Stepper class
Stepper myStepper(STEPS, dirA, dirB);
...
 myStepper.setSpeed(300);



STEPS is supposed to be the number of steps/revolution.
Can your stepper motor start from a standstill and rotate at 300 RPM? Try reducing the speed.

I've tried different amount of speeds (more and less )but still was same but when I go to lab tomorrow will try it from standstill to 300 rpm.

@groundfungus: great command, I was trying to understand that library today. Moreover tried some speed, acceleration values. But problem, it was vibrating stepper too much, couldn't understand why. Are you good at that library? Why do you think it's vibrating too much and what should be my accel and speed values,?

  stepper.setMaxSpeed(400);
  stepper.setSpeed(400);
  
  stepper.setAcceleration(300);
  //stepper.moveTo(distance);
  
  
}

void loop(){  
 if (stepper.distanceToGo() == 0) {
    stepper.run();                   // let the AccelStepper to disable motor current after stop
    delay(500);                     // wait 2 sec in final position 
    stepper.moveTo(stepper.currentPosition()+45);
  }
  stepper.run();
}

Here is my testing values with is library.