Go Down

Topic: Motor Unipolar ST28. What's wrong ? (Read 4197 times) previous topic - next topic

miniduino

Hi.

I'm triing to mount a motor unipolar ST28 mingjong 12Vc 320mA with this conection :



And datasheet secuence to turn motor. But it don't turn. Someone knows what it's wrong ?

I'm triing this code too as a similiar conection motor too but motor don't move.

Code: [Select]

const int ledPin = 13;

const int motorPin1 = 8;   // Pin Orange
const int motorPin2 = 9;   // Pin Yellow
const int motorPin3 = 10;  // Pin Pink
const int motorPin4 = 11;  // Pin Blue
int delayTime = 500; // Delay que determina la velocidad de giro

void setup() {

  pinMode(ledPin, OUTPUT);
  // ConfiguraciĆ³n de los PIN-es como salida digital
  pinMode(motorPin1, OUTPUT);
  pinMode(motorPin2, OUTPUT);
  pinMode(motorPin3, OUTPUT);
  pinMode(motorPin4, OUTPUT);

  // Los pongo todos a Cero
  digitalWrite(motorPin1, HIGH);
  digitalWrite(motorPin2, HIGH);
  digitalWrite(motorPin3, HIGH);
  digitalWrite(motorPin4, HIGH);
  delay(delayTime);
 
  // Los pongo todos a Cero
  digitalWrite(motorPin1, LOW);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin4, LOW);
  delay(delayTime);
}

void blink() {
 digitalWrite(ledPin,HIGH);
 delay(10);
 digitalWrite(ledPin,LOW);
}


void loop() {
 
 digitalWrite(motorPin1, LOW); // Primer paso
 digitalWrite(motorPin2, LOW);
 digitalWrite(motorPin3, LOW);
 digitalWrite(motorPin4, HIGH);
 blink();
 delay(delayTime);
 
 digitalWrite(motorPin1, LOW); // Segundo paso
 digitalWrite(motorPin2, LOW);
 digitalWrite(motorPin3, HIGH);
 digitalWrite(motorPin4, HIGH);
 blink();
 delay(delayTime);
 
 digitalWrite(motorPin1, LOW); // Tercer paso
 digitalWrite(motorPin2, LOW);
 digitalWrite(motorPin3, HIGH);
 digitalWrite(motorPin4, LOW);
 blink();
 delay(delayTime);
 
 digitalWrite(motorPin1, LOW); // Cuarto paso
 digitalWrite(motorPin2, HIGH);
 digitalWrite(motorPin3, HIGH);
 digitalWrite(motorPin4, LOW);
 blink();
 delay(delayTime);
 
 digitalWrite(motorPin1, LOW); // Quinto paso
 digitalWrite(motorPin2, HIGH);
 digitalWrite(motorPin3, LOW);
 digitalWrite(motorPin4, LOW);
 blink();
 delay(delayTime);

 digitalWrite(motorPin1, HIGH); // Sexto paso
 digitalWrite(motorPin2, HIGH);
 digitalWrite(motorPin3, LOW);
 digitalWrite(motorPin4, LOW);
 blink();
 delay(delayTime);

 digitalWrite(motorPin1, HIGH); // Septimo paso
 digitalWrite(motorPin2, LOW);
 digitalWrite(motorPin3, LOW);
 digitalWrite(motorPin4, LOW);
 blink();
 delay(delayTime);

 digitalWrite(motorPin1, HIGH); // Octavo paso
 digitalWrite(motorPin2, LOW);
 digitalWrite(motorPin3, LOW);
 digitalWrite(motorPin4, HIGH);
 blink();
 delay(delayTime);
}



pd: Dip is an ULN2003A
diagram
and finally I connected motor to (550W) ATX power. (Yellow, Black)
http://arduinadas.blogspot.com/

MarkT

What is the chip on the breadboard?  What is the power supply for the motor?  Schematic? Decoupling?
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

miniduino

The chip on the breadboard is an ULN2003A and de power supply is an ATX. Conected at pin 12v and ground.
http://arduinadas.blogspot.com/

Grumpy_Mike

The red wire should be at the 12V.

Do you see or feel the motor become stiff and does it make a buzzing noise when you try and drive it?

If so you should slow down the speed you are trying to drive it and try swapping the coil motor wires around to get the sequence right.

justone

You will also need to hookup pin 9 of the ULN2003 to de power (plus side of course) or you will blow out the drivers (which you may already have).

Pin 9 is the common return for the internal diodes. Google will ...

Go Up