Hello all,
I was hoping someone could take a look at my setup and give me some help. This is my first project with electronics/arduino--I have a basic understanding of circuits and programming.
I have a monster moto shield (pair of VNH2SP30 full-bridge drivers), bipolar.
I also have a 6 wire stepper.
Links for both:
I am using this sample code:
/*************************************************************
Motor Shield Stepper Demo
by Randy Sarafan
For more information see:
http://www.instructables.com/id/Arduino-Motor-Shield-Tutorial/
*************************************************************/
int delaylegnth = 30;
void setup() {
//establish motor direction toggle pins
pinMode(12, OUTPUT); //CH A -- HIGH = forwards and LOW = backwards???
pinMode(13, OUTPUT); //CH B -- HIGH = forwards and LOW = backwards???
//establish motor brake pins
pinMode(9, OUTPUT); //brake (disable) CH A
pinMode(8, OUTPUT); //brake (disable) CH B
}
void loop(){
digitalWrite(9, LOW); //ENABLE CH A
digitalWrite(8, HIGH); //DISABLE CH B
digitalWrite(12, HIGH); //Sets direction of CH A
analogWrite(3, 255); //Moves CH A
delay(delaylegnth);
digitalWrite(9, HIGH); //DISABLE CH A
digitalWrite(8, LOW); //ENABLE CH B
digitalWrite(13, LOW); //Sets direction of CH B
analogWrite(11, 255); //Moves CH B
delay(delaylegnth);
digitalWrite(9, LOW); //ENABLE CH A
digitalWrite(8, HIGH); //DISABLE CH B
digitalWrite(12, LOW); //Sets direction of CH A
analogWrite(3, 255); //Moves CH A
delay(delaylegnth);
digitalWrite(9, HIGH); //DISABLE CH A
digitalWrite(8, LOW); //ENABLE CH B
digitalWrite(13, HIGH); //Sets direction of CH B
analogWrite(11, 255); //Moves CH B
delay(delaylegnth);
}
I THINK my problems are in the wiring. I am using a 9V power supply, supplied to motor board only at + and - terminals, and connect these pins from the arduino to the motor board: 3, 11, 9, 8, 12, 13. The arduino is powered via usb during the program. I'm waiting on soldering gun + solder, hence the individual connections. If there are no other obvious problems, it is totally possible that my crappy hook + electrical tape connections just aren't quite doing the trick. Advice/suggestions?