Motor is working with direct current (DC), does not have brush and is compact construction, is resistant and economical.
We usually found in small power and dimensions like printers, scanner, solenoids, CNC machines,and elsewhere.
The name of it : "stepper" comes from the way it operates, giving DC voltage without changing its polarity a single angle step is made . A typical number is 200 steps for a full rotation.
To control the motor we necessary need driver circuitry having the necessary electronics to supply and connecting the two coils, who usually have, in the stator in the fixed portion.The coils can be in the middle of the motor , what is commonly called a rotor.
Usually the control drivers have two separate power sources, one for the logical partition, usually in a 5 volt and one to power the motor, usually from 12 to 50 volts The control program is usually micro controller
The video shows a stepper motor controlled by arduino and dual full-bridge PWM motor driver AM2170 board of AMtek.
The motor and controller dismantled by faulty printer.
//_________________________________________________________________
// From the arduino serial monitor the control environment we delay (in msec) among the four steps.
// A negative value changes the direction.
// Set pin of AM2170 connected to arduino uno
#define I01 5
#define I11 6
#define phase1 7
#define I02 8
#define I12 9
#define phase2 10
int xronos = 230; //msec.
int xrono;
int peristrofi = 1;
void setup()
{
Serial.begin(9600);
// Outputs
pinMode(I01, OUTPUT);
pinMode(I11, OUTPUT);
pinMode(I02, OUTPUT);
pinMode(I12, OUTPUT);
pinMode(phase1, OUTPUT);
pinMode(phase2, OUTPUT);
// Initialization
digitalWrite(I01, HIGH);
digitalWrite(I11, HIGH);
digitalWrite(I02, HIGH);
digitalWrite(I12, HIGH);
digitalWrite(phase1, LOW);
digitalWrite(phase2, LOW);
}
void loop()
{
if (Serial.available() > 0)
{
xronos = Serial.parseInt();
if (xronos > 0)
{
Serial.println(xronos);
peristrofi = 1;
}
else
if (xronos == 0) // not 0 allowed
{
xronos = 1;
peristrofi = 1;
Serial.println(xronos);
}
else
{
peristrofi = -1;
Serial.println(xronos);
}
}
if (peristrofi==1)
{
// The four steps of the one-way
digitalWrite(I01,LOW);
digitalWrite(I02,HIGH);
digitalWrite(phase1,HIGH);
digitalWrite(phase2,LOW);
delay(xronos);
digitalWrite(I01,HIGH);
digitalWrite(I02,LOW);
delay(xronos);
digitalWrite(I01,LOW);
digitalWrite(I02,HIGH);
digitalWrite(phase1,LOW);
digitalWrite(phase2,HIGH);
delay(xronos);
digitalWrite(I01,HIGH);
digitalWrite(I02,LOW);
delay(xronos);
}
else
{
xrono=abs(xronos);
// The 4 steps of other direction
digitalWrite(I01,HIGH);
digitalWrite(I02,LOW);
digitalWrite(phase1,LOW);
digitalWrite(phase2,HIGH);
delay(xrono);
digitalWrite(I01,LOW);
digitalWrite(I02,HIGH);
delay(xrono);
digitalWrite(I01,HIGH);
digitalWrite(I02,LOW);
digitalWrite(phase1,HIGH);
digitalWrite(phase2,LOW);
delay(xrono);
digitalWrite(I01,LOW);
digitalWrite(I02,HIGH);
delay(xrono);
}
}
No comments:
Post a Comment