I have a unipolar stepper motor 1.8 degree running at 5v. connected to arduino using the uln 2003 as shown in the attachment.
Im using the follwoing code
#include <Stepper.h>
const int stepsPerRevolution = 20;
// 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(1500);
// initialize the serial port:
Serial.begin(9600);
}
void loop() {
// step one revolution in one direction:
Serial.println("clockwise");
myStepper.step(stepsPerRevolution);
}
i usually run the motor at myStepper.setSpeed(1500) which is the maximum it can go. Today I've tried to run the motor at 1500 but it doesn't! rather the shaft turn a step clockwise and then retains original position and does this as long as the program is running! sometimes it rotates 45 degrees and then stops in its position and the motor vibrates a lot!
I've decreased the rpm and it can run smoothly only at a max of 1000, if i put 1001 the motor stops and vibrates! not only the rpm but also the steps. I guess the max is 200 steps but i can give up to 2M steps in
Stepper myStepper(stepsPerRevolution, 8,9,10,11);
and it runs at the same speed as if its running at 20 steps!
does anybody have any explanation of what is really going on! Im really so desprate now! My project really depends on it and if i cant run the motor at 1500 its all over!
pls any help pls!
regards
