Arduino with stepper motors

I have seen multiple methods of implementing a arduino as a stepper motor controller/driver but these methods only seem to work on small size steppers. Anyone have any experience with larger steppers? Seems to me that using an external driver would work in which case the arduino would be used simply to provide the pulses for step/direction. The reason I am using an Arduino instead of directly connecting to a PC is that I can use the Arduino ethernet shield and provide control via TCP/IP. This would allow for stepper motor control without a dedicated PC.

I'm contemplating using the following driver and motor for the app:
R208 Stepper Motor Driver
http://www.linengineering.com/LinE/contents/stepmotors/R208.aspx
5618L-54S Stepper Motor

http://www.linengineering.com/line/contents/stepmotors/5618.aspx

Couple questions regarding this:

Any idea what sort of frequency I can get the Arduino to output pulses?

Stepper motors function best when provided with ramped pulses (triangular or sinusoidal is best). Any idea if the Arduino can be programmed to calculate and produce a ramped output?

Arduino runs at 16 Mhz, so i don't think puls speed is going to be an issue.

But i don't know about the ramping.

The ramping is mostly a matter of proper coding. My only concern is that the required math would bloat the code and my frequency would drop considerably. However, I bet the only way to really find out is to program it up!

I'll post what I find out?

Also, does anybody have code for running the arduino as a stepper controller (not driver)? Has anyone tried it?

Try to go through the RepRap site:

http://reprap.org/bin/view/Main/WebHome

They have done a lot of work, even using Arduino for 3 axis stepper control as far as i remember.

They also have some open source driver board designs that might be interesting for you.

I my app, I used the ED that used a single pulse to trigger a step, if your driver is the same way, it's fairly simple, this is code from my project that moves one of three motors either a specified # of steps, or until a stop request is received:

void run_manual_motor() {
      
      // this function performs a manual move of one of
      // our motors
      
 int motor_stp_pin = 0;
 int motor_dir_pin = 0;
 
       // determine which pins we're going to signal
      
 switch(manual_motor) {
       case 0:
             motor_stp_pin = TRUCK_STP_PIN;
            motor_dir_pin = TRUCK_DIR_PIN;
            break;
       case 1:
             motor_stp_pin = PAN_STP_PIN;
            motor_dir_pin = PAN_DIR_PIN;
            break;
       case 2:
             motor_stp_pin = TILT_STP_PIN;
            motor_dir_pin = TILT_DIR_PIN;
            break;
       default:
             return;
 }
 
       // set direction
      
 digitalWrite(motor_dir_pin, manual_dir);

 if( manual_steps > 0 ) {
       
       // if we have a specified # of steps
       
            // run for  total number of steps
            // bring step pin high, delay, and then bring it low
       for(int i = 0; i <= manual_steps; i++) {
             digitalWrite(motor_stp_pin,HIGH);
             delayMicroseconds(500);
             digitalWrite(motor_stp_pin,LOW);
       }
 }
 else {
             // if we're just supposed to run until
            // interrupted with a stop command (most
            // useful w/ truck motor)
            
       while( do_manual == true ) {
             digitalWrite(motor_stp_pin, HIGH);
             delayMicroseconds(500);
             digitalWrite(motor_stp_pin, LOW);
       }
 }

      // make sure that we don't just jump right back into here
      // from loop()
      
 do_manual = false;
 
 return;
}

All you'd have to add for ramping, would be something like:

  // take 10% ramp
 int max_delayUS = 1000;
 int min_delayUS  = 500;
 byte pct_shift         = 10;

 int delayUS = max_delayUS;

 ...

        while( do_manual == true ) {

                 delayUS = delayUS > min_delayUS ? delayUS - (delayUS/pct_shift) : min_delayUS;

             digitalWrite(motor_stp_pin, HIGH);
             delayMicroseconds(delayUS);
             digitalWrite(motor_stp_pin, LOW);
       }

BTW, mine runs 3 steppers just fine, and a camera, and it has plenty of time left to talk i2c to a remote control unit, etc. And that's without doing any optimization. So, yeah, you've got plenty of room - it's everything else you do that'll slow ya down grin

!c

Thanks for all the help. At this point I have managed to get the system up and running and it is doing everything I want. I have got the Arduino running an ethernet shield, two stepper motors, and a pair of force sensitive resistors (to detect when the tooling is interfacing).

One of the motors moves the tooling vertically while the other motor controls rotary motion. I have a pneumatic cylinder up on top which allows me to swtich tooling. The FSR's provide feedback. The system is used to interface with a pair of rings used for calibrating a device and adjust them. The arduino is able to select between the tools and either tighten or loosen the rings. The logic of an external VB6 program determines when and how much to adjust the rings.

So, thanks for all the help!