So, I had this idea and decided to give Arduino a try, I have been playing with it for about a month now and think I have the bare basics, so here is what I want to attenpt to do...
A single Stepper motor, I have a Large 2phase stepper bi polar.
I have the Arduino Uno and Mega
I have several Motor control shields,
and limit switches
so in this project I would like to make the stepper motor spin one direction on a ball screw ( already setup)
I want it to hit a limit switch which will reverse the direction and send it back down the screw, once it hits the limit switch on that end, it will go back again, think of it as pong with a stepper motor.
other things I would like to figure out as well
specify how many cycles (back and forth per cycle)
adjust speed
maybe add a couple triggers based on cycles.
So yeah I may be biting off more than I can chew for my first project, but what the hell dive in right?
Many beginners run into trouble right away with stepper motors and "motor shields" (drivers), as many stepping motors draw too much current for the motor drivers and/or power supply.
Tell us what you have in the way of motor and driver and also what power supply you intend to use for the motor (i.e. its current and voltage ratings). Links to product pages or data sheets are almost always helpful.
That L293D-based driver can output only 600 mA motor current continuously and is totally inadequate for such a high current, very low resistance motor. In fact, there aren't any inexpensive motor drivers that can handle it.
The best on the hobby market is probably this one http://www.pololu.com/product/1207 but even then you have to make certain that the motor current limit is properly adjusted to 1.5 amperes/winding maximum.
Do NOT use an L293 type h-bridge to control a stepper motor. They are a very poor choice for stepper motors regardless of what the sales people might say.
Use a proper stepper motor driver board that can manage the current that the motor requires.
For motors that require about 2 amps or less you could use a Pololu A4988 or Pololu DRV8825. The Pololu website has a lot of useful information.
For a motor that requires more than 2 amps you will need to use one of the commercial stepper drivers which will be a bit more expensive. They all work in much the same way as the Pololu drivers.
The simple code in this demo will make a motor move if it is using a stepper driver that just needs step and direction signals.