This code is quoted from here. May I know how to increase the speed of the NEMA 17 stepper motor further? I tried to increase the step speed to 2000rpm but it does not even work. It only works for less than 300rpm in my case. The max rpm of the Nema 17 should be 5000rpm I googled. I used a 20V power supply lithium ion battery on the L298N motor driver. How do I solve this problem so that the Nema 17 can be faster? I believe the problem its with the code.
Thank you for reading and have a nice day :)
#include <Stepper.h>
const int stepsPerRevolution = 100; // change this to fit the number of steps per revolution
// for your motor
// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);
void setup() {
// set the speed at 60 rpm:
myStepper.setSpeed(300);
// initialize the serial port:
Serial.begin(9600);
}
void loop() {
// step one revolution in one direction:
Serial.println("clockwise");
myStepper.step(stepsPerRevolution);
//delay(500);
}
I tried to increase the step speed to 2000rpm
... how did you do that?