Stepper Motor Minimum Speed?

I have a stepper motor (http://www.phidgets.com/documentation/Phidgets/3317_1_Mechanical.pdf) which I am controlling via the Arduino. I am using this motor driver to bidirectionally rotate the motor (https://www.sparkfun.com/products/9670). The stepper motor board is fed by a 4A 12V regulated DC power supply.

Here is my Arduino sketch controlling the motor.

const int S1_EN1 = 3;
const int S1_EN2 = 6;
const int S1_BLACK = 4;
const int S1_GREEN = 2;
const int S1_RED = 7;
const int S1_BLUE = 5;

unsigned long delayTime = 1200;
int delayBetweenSteps = 20;

int stopStep = 350;

void setup()
{
  pinMode(S1_EN1, OUTPUT);
  pinMode(S1_BLACK, OUTPUT);
  pinMode(S1_GREEN, OUTPUT);
  pinMode(S1_RED, OUTPUT);
  pinMode(S1_BLUE, OUTPUT);
  
  digitalWrite(S1_EN1, HIGH);
  digitalWrite(S1_EN2, HIGH);
}

void loop()
{
  for(int i = 0; i < stopStep; i++)
  {
    step_motor_1();
    delay(delayBetweenSteps);
  }
}

void step_motor_1()
{
  digitalWrite(S1_BLACK,HIGH);
  digitalWrite(S1_GREEN,LOW);
  digitalWrite(S1_RED,HIGH);
  digitalWrite(S1_BLUE,LOW);
  delayMicroseconds(delayTime);
  digitalWrite(S1_BLACK,LOW);
  digitalWrite(S1_GREEN,HIGH);
  digitalWrite(S1_RED,HIGH);
  digitalWrite(S1_BLUE,LOW);
  delayMicroseconds(delayTime);
  digitalWrite(S1_BLACK,LOW);
  digitalWrite(S1_GREEN,HIGH);
  digitalWrite(S1_RED,LOW);
  digitalWrite(S1_BLUE,HIGH);
  delayMicroseconds(delayTime);
  digitalWrite(S1_BLACK,HIGH);
  digitalWrite(S1_GREEN,LOW);
  digitalWrite(S1_RED,LOW);
  digitalWrite(S1_BLUE,HIGH);
  delayMicroseconds(delayTime);
}

For my application, I need very slow rotation speeds. I'm running into issues when I set delayBetweenSteps too high, however. Once the value reaches 30ms or so, the LED's on the motor board just flash every half second or so instead of flashing once every 30ms. The power LED on the Arduino also varies in intensity on the same half second interval. It seems like something is drawing too much power and causing the Arduino to freak out, but I can't figure out what that would be since everything is within the required ratings.

Is there a minimum speed that a stepper motor can turn due to the inductance of the coils?

I've simplified my code a bit to better illustrate my point and reduce any variability between the two delay times.

const int S1_EN1 = 3;
const int S1_EN2 = 6;
const int S1_BLACK = 4;
const int S1_GREEN = 2;
const int S1_RED = 7;
const int S1_BLUE = 5;

int delayTime = 30;

void setup()
{
  // Setup motor 1
  pinMode(S1_EN1, OUTPUT);
  pinMode(S1_EN2, OUTPUT);
  
  pinMode(S1_BLACK, OUTPUT);
  pinMode(S1_GREEN, OUTPUT);
  pinMode(S1_RED, OUTPUT);
  pinMode(S1_BLUE, OUTPUT);
  
  digitalWrite(S1_EN1, HIGH);
  digitalWrite(S1_EN2, HIGH);
}

void loop()
{
  stepMotor1(HIGH,LOW,HIGH,LOW);
  stepMotor1(LOW,HIGH,HIGH,LOW);
  stepMotor1(LOW,HIGH,LOW,HIGH);
  stepMotor1(HIGH,LOW,LOW,HIGH);
}

void stepMotor1(int black,int green, int red, int blue)
{
  digitalWrite(S1_BLACK,black);
  digitalWrite(S1_GREEN,green);
  digitalWrite(S1_RED,red);
  digitalWrite(S1_BLUE,blue);
  delay(delayTime);
}

Once delayTime exceeds about 31 ms, it just goes jerk.... jerk..... jerk.... with the same behavior described above.

Despite the claims on the Sparkfun site, it is very well documented that the L298 driver cannot handle 2 amperes/winding. Your motor has very low resistance windings (1.6 ohms) and is trying to draw far more than that. The driver is undoubtedly overheating and shutting down.

You will have much better luck with a chopper driver like this one Pololu - DRV8825 Stepper Motor Driver Carrier, High Current but you will still have to set the current limit to something like 1.5 amps/winding to avoid overheating.

Not that I don't believe you (the heatsink gets very hot), but could you point me to this documentation? The datasheet for the L293N itself says that the peak DC output current is 2A per channel.

If I used a lower voltage supply, would I be able to get around this? I don't need much torque. These motor drivers were purchased for a project that is not funded by myself so I would really like to use them if possible.

I did find one way to get around it. By setting all of the pins back to low after the 4 step cycle, it keeps the current from building up to levels that cause the L293N to overheat. This should serve as a temporary solution.

See "The Motor Driver Myth" at The Motor Driver Myth — Rugged CircuitsRugged Industrial Arduino Microcontrollers

Note, these guys want to sell you their driver, but a bit of googling will reveal many other sites that arrive at the same conclusion. The power handling capabilities of the L298 are greatly exaggerated, and most people ignore the terrible inefficiency of this very old design. Until, like you, they realize that it just doesn't work in lots of situations.

The real problem is that the motor you have is designed to be used with industrial chopper drivers. If you don't need a lot of torque, just add a 6 ohm, 10 watt resistor in series with each motor winding. That will reduce the current draw (and the motor torque) to a level that the L298 can handle. The resistors will get quite hot, so you might want to but ones with metal casings that can be mounted on a heat sink. The "Jones on Stepper Motors" site is probably the best overall reference on theory and design considerations: Jones on Stepping Motors

Ugh, I hate delay().

the motor is 2.8 Volts not 28 and it takes 1.68 Amps so the motor is drawing a 16 amps at 24 volts
wow that is to much for all the connected things.
please stop stop and check the motor.
the rest of your program looks fine.

now for the delay
put the movement in a SUB
call this sub everywaittime by
loop
if millis()-waittime > lastime
lastime=millis()
call the SUB

when it is really slow i would stop every step and switch off after 100 ms the motor will not get hot
most shields can not cope with this low motor voltage so dont be surprised if motor stops because low voltage it is the shield that stops working.

As someone else stated, this motor really needs a chopper driver board like the Pololu A4988 based board.

dgreenheck:
I have a stepper motor (http://www.phidgets.com/documentation/Phidgets/3317_1_Mechanical.pdf) which I am controlling via the Arduino. I am using this motor driver to bidirectionally rotate the motor (https://www.sparkfun.com/products/9670). The stepper motor board is fed by a 4A 12V regulated DC power supply.

Well you've got entirely the wrong motor driver for this motor, its a low-impedance
bipolar stepper motor designed to be driven with constant-current via a chopper-drive
like the A4988 Pololu board. Its 1.7A rated and 1.65 ohms. Trying to use it from 12V
without a chopper driver is bound to burn something out.

The basic rule is it the winding resistance is only a few ohms you cannot power it from
a motor shield with H-bridge(s), you need a specific bipolar stepper motor driver using
a constant-current chopper circuit per winding.

If the winding resistance is more like 15 to 50 ohms is likely to drive nicely from an
H-bridge (or if 5/6/8 wire from an ULN2803 or similar in unipolar configuration).

Thanks all for the replies. I will invest in the correct board for these motors.