Hello
I have the setup as in the picture below:

The motor is a "Mercury Motor", this is the specification sheet: http://www.sparkfun.com/datasheets/Robotics/SM-42BYG011-25.pdf
Power comes in from a 12V battery.
When I try to run it, the motor goes back and forward, but does not move continuously in one direction.
I am initialising pins 3,11,12,13 as in:
Stepper myStepper(motorSteps, 3,11,12,13)
Can anyone please help me out? What am I doing wrong?
Thanks,
Peter
GaryP
#2
Did you try swapping one pair of wires from the motor?
Cheers,
Kari
I have this very simple code:
#include <Stepper.h>
Stepper myStepper(200, 3,11,12,13);
void setup() {
myStepper.setSpeed(1);
}
void loop() {
// Step forward 10 steps:
Serial.println("Forward");
myStepper.step(4);
delay(3000);
}
When it executes, the motor takes 4 steps (clockwise and anti-clockwise) in this order: cw, ccw, ccw, cw. So basicly it comes back where it started.
Peter
GaryP
#4
Did you look at the Reply #1? You didn't answer to the question.
Cheers,
Kari
Yes, I have tried that, with some ‘interesting’ results:
- swapping yellow / blue: ccw, cw, cw, cw
- swapping green / red: ccw, ccw, cw, ccw
- swapping yellow / blue + green / red: cw, cw, ccw, cw
GaryP
#6
Seems like someone else is having problems too; http://arduino.cc/forum/index.php?topic=82082.0
I hope you got your answer from somebody who has played with that shield!
Cheers,
Kari
system
#7
Hi!
I swapped pins to:
Stepper myStepper(stepsPerRevolution, 3,13,11,12);
I also changed the speed:
myStepper.setSpeed(100);
Now it moves but the positioning isn't accurate.
I'll look through the stepper library to see if I can make this motor run better.