Programming ardumoto for stepper

I have an Ardumoto shield that I am planning use to run spark fun stepper SM-42BYG011-25.

I’m not clear on how to define the pins for the stepper function.

Stepper(steps, pin1, pin2, pin3, pin4)

The Ardumoto is using pins 3,11,12,13 but I don’t if the order of definition matters.

If any one has code for running a stepper from the Ardumoto that would be very helpfull

I could be wrong, but I believe the ardu-moto is for standard DC motors. You’d want a driver specifically for steppers, like the [EasyDriver.](EasyDriver - Stepper Motor Driver - ROB-12779 - SparkFun Electronics)

Ardumoto can drive a stepper, but you’ll have to program the signal sequence manually.

The SM-42BYG011-25 stepper is what they call a bipolar two-phase stepper motor. What this meas is that it has two sets of coils (i.e. phases), each of which can accept current in either direction (bipolar). So you connect one phase to the A output of Ardumoto, and the other phase to the B output. Then the DIRA and DIRB signals control the direction of current in each phase, and the PWMA and PWMB control the strength of the current (or rather, the voltage). If you’ll have a look at the Ardumoto shield, you’ll see that the pin assignments are: 3=PWMA, 11=PWMB, 12=DIRA, 13=DIRB.

I’m still waiting for my motors to arrive, so I don’t have a working sketch for you, but the idea is like this:

There are several different ways to drive a stepper motor: wave drive, full step, half step, and micro step (which is anything smaller than half step). I suggest you read about it in [wikipedia.

Full step is the simplest - you set both PWM signals to maximum (255), then flip the direction signals one at a time. Each step you flip the next signal (A, B, A, B, …). Wave drive and half step are similar, but you also need to turn the PWM on and off in the correct sequence. For micro-stepping you’ll need to play with the PWM values to get the positions you want.

There is a Stepper library that comes with Arduino, and a tutorial for it [here. I haven’t looked into it, so don’t know if it will work with Ardumoto, but maybe.](http://www.arduino.cc/en/Tutorial/Stepper)](Stepper motor - Wikipedia)

BUMP

Has anyone else used a Stepper with ARDUMOTO ?? 2 step bipolar motor(4 wires)

I’m looking for some examples to help get my stepper moving

Yup - several examples here :

http://www.schmalzhaus.com/EasyDriver/E … mples.html

The last two use the fantastic SmootStepper library, which will make your life much easier.

*Brian