Help for moving a bipolar step motor!

hello, can i have help for using a bipolar stepped motor ?

i am trying to use a bipolar stepped motor for the first time with this materials :
a bipolar stepped motor, 12v, 1.6A, 416 0z-in geared bipolar stepped motor réf : RB-Phi-132
a microcontroller fez cobra 1 réf : RB-Ghi-12 (or with an arduino uno)
a pololu 2A single bipolar stepper motor driver A4988 réf : RB-Pol-176
a 25w adjustableswitching regulator réf : DE-SWADJ 3A

I have tried with arduino uno the pololu schematic given like this:
Vmot and gnd to motor power supply (dc 12v)
1a (black) 2a(red) 1b(green) 2b(blue) to the stepped bipolar motor
Enable, Step and Dir to the microcontroller arduino (on d13, d12 , d11)

I tried as well to used the d-swadj regulator with a 12v battery, but the motor did not moved.
Here is the code i used :
/*
Test moteur PAP (pas entier)
Carte Pololu avec puce A4988 + régulateur de tension > http://www.pololu.com/catalog/product/1183
Ch.Aubert Déc.2011
/
/
************* Définition des E/S *************************/
const int dirPin = 11; // DIR
const int stepPin = 12; // STEP
const int enablePin = 13; // ENABLE

void setup()
{
pinMode(enablePin, OUTPUT); // broche Enable en sortie
digitalWrite(enablePin, HIGH); // ensuite on met un niveau haut sur Enable pour relacher le moteur
pinMode(stepPin, OUTPUT); // Dir et Step en sortie
pinMode(dirPin, OUTPUT);
calibrate(); // lance le stall moteur Ampérage max !
//test(); // lance le test !!
}
void loop()
{
// rien pour l’instant !
}
void calibrate() // Stall moteur Ampérage max !
{
digitalWrite(enablePin, LOW); // active le moteur (il ne sera plus possible de le tourner à la main et l’ampérage sera à son MAX !!
}
void test() // faire tourner le moteur 200 pas
{
int j;
digitalWrite(enablePin, LOW); // active le moteur (il ne sera plus possible de le tourner à la main et l’ampérage sera à son MAX !!
delayMicroseconds(2); // on donne un très court délais par précaution avant de tourner
digitalWrite(dirPin, HIGH); // Tourner à droite (selon branchements !)
for(j=0; j<=199; j++) { // ajuster le nb. de pas (ici 200 pas soit un tour. On compte le zéro !)
delay(200); // ajuster le tempo entre chaque pas (plus le délais est court, plus le mouvement est fluide ! On peut aussi supprimer ce délais !)
digitalWrite(stepPin, LOW);
delayMicroseconds(10); // à ajuster selon moteur, on peut essayer de diminuer à 2 us
digitalWrite(stepPin, HIGH);
delayMicroseconds(1000); // fréquence à ajuster selon moteur (contrôle la vitesse et le couple)
}
digitalWrite(enablePin, HIGH); // On relache le moteur (on peut le tourner à la main)
}


/*
Test moteur PAP (pas entier)
Carte Pololu avec puce A4988 + régulateur de tension > http://www.pololu.com/catalog/product/1183
Ch.Aubert Déc.2011
*/
/************** Définition des E/S *************************/
const int dirPin = 11; // DIR
const int stepPin = 12; // STEP
const int enablePin = 13; // ENABLE

void setup()
{
pinMode(enablePin, OUTPUT); // broche Enable en sortie
digitalWrite(enablePin, HIGH); // ensuite on met un niveau haut sur Enable pour relacher le moteur
pinMode(stepPin, OUTPUT); // Dir et Step en sortie
pinMode(dirPin, OUTPUT);
calibrate(); // lance le stall moteur Ampérage max !
//test(); // lance le test !!
}
void loop()
{
// rien pour l'instant !
}
void calibrate() // Stall moteur Ampérage max !
{
digitalWrite(enablePin, LOW); // active le moteur (il ne sera plus possible de le tourner à la main et l'ampérage sera à son MAX !!
}
void test() // faire tourner le moteur 200 pas
{
int j;
digitalWrite(enablePin, LOW); // active le moteur (il ne sera plus possible de le tourner à la main et l'ampérage sera à son MAX !!
delayMicroseconds(2); // on donne un très court délais par précaution avant de tourner
digitalWrite(dirPin, HIGH); // Tourner à droite (selon branchements !)
for(j=0; j<=199; j++) { // ajuster le nb. de pas (ici 200 pas soit un tour. On compte le zéro !)
delay(200); // ajuster le tempo entre chaque pas (plus le délais est court, plus le mouvement est fluide ! On peut aussi supprimer ce délais !)
digitalWrite(stepPin, LOW);
delayMicroseconds(10); // à ajuster selon moteur, on peut essayer de diminuer à 2 us
digitalWrite(stepPin, HIGH);
delayMicroseconds(1000); // fréquence à ajuster selon moteur (contrôle la vitesse et le couple)
}
digitalWrite(enablePin, HIGH); // On relache le moteur (on peut le tourner à la main)
}

thank 's to have shown me how to use 101010 for code

i put reset and sleep on high level on the pin 3.3v of the arduino

i have not tried to put manually in high/low the step/dir pin directly on the motor driver. How do you do this?

In fact i havé Follow a program who the aim is to adjust the current limit of the driver motor. I Will try tomorow to test what you advice me to do.

I am not sure about when you said without the arduino? i think i have to try the code and use analogic entry for Step and dir pin. Am i right?

yes, that’s what i am trying to do.

i tried an the one revolution stepped motor example from the arduino library and one motor is turning two direction a little bit, and the other stepped motor is making noise but not really turning…
do you think i have burn it??

So without the driver pololu i can see one stepped working, now i am looking for a new really simple code and a new shema with the material i have to test my stepped motor. I would like to make them turning on full step.

Can somebody give me more help!!

how can i put in high and low level with arduino or fez cobra?
do i use another circuit or use the vdd and gnd’s driver?

do i branch directly to the batterry (12v) vmot and gnd + a 100microfarad condo ?

sorry i wanted to say:
how can i put in high and low level without arduino or fez cobra?

In arduino? There’s another forum for that.

In Fez-land, we simply have a GPIO pin defined as output, and set it’s value to TRUE to set a HIGH, and to FALSE to set it to LOW - technically it sets it to 3v3 and to GND respectively.

I’m sorry but it seems like you haven’t stepped through the basics. We are all here to help but there are some of the “foundation” things you should learn on your own - and there’s a great guide on the support page, http://www.ghielectronics.com/support/dotnet-micro-framework and you’re looking for the beginners guide to the .net micro framework, http://www.ghielectronics.com/support/dotnet-micro-framework that will step you through the basics and get you past this.

Hi,

In one of the messages you mention that the motor is making noise and another one is rotation a bit. This is good news. This means that the stepper motors are activated.
If I read your code I believe you’re pulsing too fast. The period time between pulses approx. 1000usec + 200usec = 1.2msec. A typical stepper motor makes 180 steps for one revolution and maximum rotation speed is not more then 4 or 5 revolutions / second. This makes maximum pulse speed 5 x 180 = 600 pulses / second which equals to 1.6 msec. Try increasing the loop time from 1000usec to 10000usec.

Let me know if this solves the problem.