From the following link:
I have the following components:
MOTOR 1
STP-MTRH-34127 (NEMA 34 Stepper Motor)
STP-DRV-80100 (Suitable Driver)
STP-PWR-7005 (Suitable Power Supply)
MOTOR 2
STP-MTR-23055 (NEMA 23 Stepper Motor)
STP-DRV-4850 (Suitable Driver)
STP-PWR-7005 (Suitable Power Supply)
I am running these components through an Arduino Uno with the following code:
int dirpin = 8;
int steppin = 9;
int dirpin1 = 6;
int steppin1 =7;
void setup()
{
pinMode(dirpin, OUTPUT);
pinMode(steppin, OUTPUT);
pinMode(dirpin1, OUTPUT);
pinMode(steppin1, OUTPUT);
/////////////////////////// System starts by going to the right//////////////////////////////////////////////////
/////////////////////////// Top X-Directional Speed with current settings is 850 Microseconds delay/////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////// Section below controls X_RIGHT
}
void loop(){
int j;
int i;
int c;
int k;
digitalWrite(dirpin, LOW); // Set the direction. Shouldn't have to change.
delay(500);
for (j = 0; j<10; j++) //Controls amount of rotations forward
for (i = 0; i<200; i++) //Corresponds to how many steps it takes for for one revolution.
//Current setting is 200 steps/rev
{
digitalWrite(steppin, LOW); // This LOW to HIGH change is what creates the
digitalWrite(steppin, HIGH); // "Rising Edge" so the easydriver knows to when to step.
delayMicroseconds(800); // This delay time is close to top speed for the current settings.
// This delay basically controls the speed of the motor. Shorter delay==>faster speed.
}
digitalWrite(dirpin, HIGH); // Change direction.
//delay(1000); // Delay time to change direction. Not needed
///////////////////////////////////////////////////////////////////////////////////////////////////////////////// Section below controls Y_UP
digitalWrite(dirpin1, LOW); // Set the direction. Shouldn't have to change
delay(500);
for (k = 0; k<10; k++) //Controls amount of rotations forward
for (i = 0; i<200; i++) //Corresponds to how many steps it takes for for one revolution.
//Current setting is 200 steps/rev
{
digitalWrite(steppin1, LOW); // This LOW to HIGH change is what creates the
digitalWrite(steppin1, HIGH); // "Rising Edge" so the easydriver knows to when to step.
delayMicroseconds(1000); // This delay time is close to top speed for the current settings.
} // This delay basically controls the speed of the motor. Shorter delay==>faster speed.
digitalWrite(dirpin, HIGH); // Change direction.
delay(500); // Delay time to change direction
///////////////////////////////////////////////////////////////////////////////////////////////////////////////// Section below controls X_LEFT
for (c = 0; c<10; c++) //Controls amount of rotations in reverse
for (i = 0; i<200; i++) //Corresponds to how many steps it takes for for one revolution.
//Current setting is 200 steps/rev.
{
digitalWrite(steppin, LOW); // This LOW to HIGH change is what creates the
digitalWrite(steppin, HIGH); // "Rising Edge" so the easydriver knows to when to step.
delayMicroseconds(800); // This delay time is close to top speed for the current settings.
// This delay basically controls the speed of the motor. Shorter delay==>faster speed.
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Section below controls Y_DOWN
digitalWrite(dirpin1, LOW); // Set the direction.
delay(500);
for (k = 0; k<10; k++) //Controls amount of rotations forward
for (i = 0; i<200; i++) //Corresponds to how many steps it takes for for one revolution.
//Current setting is 200 steps/rev.
{
digitalWrite(steppin1, LOW); // This LOW to HIGH change is what creates the
digitalWrite(steppin1, HIGH); // "Rising Edge" so the easydriver knows to when to step.
delayMicroseconds(1000); // This delay time is close to top speed for the current settings.
} // This delay basically controls the speed of the motor. Shorter delay==>faster speed.
digitalWrite(dirpin, HIGH); // Change direction.
delay(500);
}
Right now, I have the setting of 200 steps per revolution. I can only get the MicrosecondDelay down to about 750 before the motor begins to grind. This is without any applied load so it is obviously capable of more since this is only around 400 RPM. The X-Directional motor is capable of close to 1200 RPM's.
Does anyone have any suggestions as to why I am peaking out with my output frequency at about 1333.33 steps per second? l
Appreciate any help. Thanks
Jordan