A4988+arduino stepper motor

HI Guys,
i recently tried this project, uploaded everything and followed the sketches but it doesnt work, can someone help me? thanks
the stepper just wont move.

code=

const int stepPin = 3;  
const int dirPin = 4;   

void setup() { 
// Sets the two pins as Outputs 
pinMode(stepPin,OUTPUT);  
pinMode(dirPin,OUTPUT); 
} 

void loop() { 
digitalWrite(dirPin,HIGH); // Enables the motor to move in a particular direction 
// Makes 200 pulses for making one full cycle rotation 
for(int x = 0; x < 200; x++) { 
digitalWrite(stepPin,HIGH);  
delayMicroseconds(500);  
digitalWrite(stepPin,LOW);  
delayMicroseconds(500);  
} 
delay(1000); // One second delay  
digitalWrite(dirPin,LOW); //Changes the rotations direction 
// Makes 400 pulses for making two full cycle rotation 
for(int x = 0; x < 400; x++) { 
digitalWrite(stepPin,HIGH); 
delayMicroseconds(500); 
digitalWrite(stepPin,LOW); 
delayMicroseconds(500); 
} 
delay(1000); 
}

Hello.

From your picture and code, it looks like you are following this tutorial on Mechatronics.

Can you post close up pictures showing both sides of the stepper motor driver board you are using? Can you also post pictures of your setup that show how you have everything connected? What are you using for a power supply? What are the voltage and current ratings of your stepper motor? What current limit did you set the stepper motor driver to?

- Amanda

Dear AmandaS,
Thanks for replying me:)

here are the other photos: https://drive.google.com/folderview?id=0B74gTB-xO6UwQzd3Mm03cHFQcm8&usp=sharing

power supply 12V 20A
voltage at 1.2
amps i dont know how to set haha
thats all right? thanks again
Sincerely Gabriel

Hello, Gabriel.

From the pictures, it looks like the stepper motor driver you are using is not one of our A4988 carriers. (You can see all of the stepper motor drivers that we manufacture here.) I recommend contacting the manufacturer of that board for assistance and following their recommendations for setting the current limit to avoid the risk of damaging your stepper motor and driver.

- Amanda

Hey Amanda, my a4988 is very similar to the green one which you
manufacture, can I ask how you wire them up? Thanks
Sincerely Gabriel

You can look at the minimal wiring diagram for our A4988 Stepper Motor Driver Carrier under the “Using the driver” section on its product page, however, I do not think that it will help. Even though your stepper motor driver looks similar to one of ours, which many A4988 carrier boards manufactured by different companies do, that does not mean both boards will operate the same (e.g. current-limiting).

Again, I strongly recommend contacting the manufacturer (or supplier) and follow their wiring diagram that is made specifically for their board.

- Amanda

Ok ty:)

Dear Amanda, is it possible to get the programme for me to check the
current drawn from the stepper motor which is measured from the stepper
motor driver a4988, without the current constantly changing? thanks:)
also can i have a brief explanation of what is this?like what does JP1
mean, etc

thanks:)

Hello, Gabriel.

You might find this SparkFun “How to Read a Schematic” tutorial helpful. On our A4988 boards, it is possible to set the current limit without the board stepping, though we do not expect VREF to change as the motor is stepped. If you are measuring the current through the coils directly (using a multimeter connected in series with you motor), the current will only stop changing if you do not step the driver.

-Nathan

Hey Nathan,
Thanks for replying, I’ll get back to you when I have problems thanks
Sincerely Gabriel