ULN2003 Stepper Motor Driver

Mini Stepper driver adalah ukuran kecil dan mudah digunakan. Dulu ULN2003A untuk memperkuat sinyal kontrol dari Arduino. Tegangan drive sampai bisa untuk 15V.




fitur :
Modul yang paling mudah untuk belajar bagaimana mengontrol Stepper dan menyelesaikan proyek sederhana.

- Tegangan kontrol logika: 3 ~ 5.5V
- Motor Supply Voltage: 5 ~ 15V
- itu bisa tenggelam 500mA dari pasokan 50V, tapi sebaiknya membatasi tegangan driver di bawah 15V.
- Suhu operasi: -25 derajat Celcius ~ 90 derajat Celcius

CARA UNTUK MENGENDALIKAN STEPPER

Langkah motor untuk mesin untuk mengkonversi pulsa untuk sudut perpindahan. Jadi, jika Anda memberikan driver stepper sinyal pulsa tertentu, itu akan mendorong langkah motor untuk sudut tertentu. Anda dapat mengontrol sudut stepper bergerak dengan jumlah pulsa. Dan Anda juga dapat mengontrol kecepatan putar stepper dengan frekuensi denyut nadi. Gambar berikut adalah skema dari driver stepper.

Gambar berikut adalah sinyal kontrol untuk menggerakkan 28BYJ48 stepper untuk memutar 1/4096 lingkaran.



Jadi kita mendefinisikan time series dalam sebuah array



dan dalam penggunaan berikut akan berjalan, 

<br>byte CCW[8] = {0x09,0x01,0x03,0x02,0x06,0x04,0x0c,0x08};  //CouterClockWise
<br>byte CW[8]= {0x08,0x0c,0x04,0x06,0x02,0x03,0x01,0x09};    //ClockWise

dan kemudian Anda harus tahu cara mengemudi stepper.

Pemakaian

stepper Kontrol
penggunaan ini adalah untuk menggerakkan stepper 28BYJ. stepper berhenti ketika didorong stop_button tersebut. Hal ini juga dapat diubah untuk mengontrol stepper untuk berlawanan atau searah jarum jam berputar. Hubungkan 28BYJ langkah motor untuk mini stepper driver sebagai berikut:



Program Arduino sebagai berikut:

/***************************
This code is shared by elecrow.com
it is public domain, enjoy!
it is used to control 28BYJ stepper
it can be changed to control almost all the 4-wire or 5-wire stepper.
*************************/

/*
The time Series to control the stepper
--make your making more easy!
*/
byte CCW[8] = {0x09,0x01,0x03,0x02,0x06,0x04,0x0c,0x08};
byte CW[8] = {0x08,0x0c,0x04,0x06,0x02,0x03,0x01,0x09}; 

const int stop_key = 14;  //stop_button connect to Arduino-A0
byte  change_angle=64;  //change the parameter to change the angle of the stepper

void Motor_CCW()    //the steper move 360/64 angle at CouterClockwise 
{
  for(int i = 0; i < 8; i++)
  
    for(int j = 0; j < 8; j++)
    {
     if(digitalRead(stop_key)==0)
      {
      PORTB =0xf0;
      break;
      }
      PORTB = CCW[j];
      delayMicroseconds(1150);
    }    
}
void Motor_CW()  //the steper move 360/64 angle at Clockwise
{
  for(int i = 0; i < 8; i++)
  
    for(int j = 0; j < 8; j++)
    {
    if(digitalRead(stop_key)==0)
      {
      PORTB =0xf0;
      break;
      } 
      PORTB = CW[j];
      delayMicroseconds(1150);
    }
}

void setup()
{
  pinMode(stop_key,INPUT);
  digitalWrite(stop_key,HIGH);
  Serial.begin(57600);
  DDRB=0xff;
  PORTB = 0xf0;  
  for(int k=0;k<change_angle;k++) 
  {
  Motor_CCW();  
  }
 }

void loop()
{
 Motor_CCW();  //make the stepper to anticlockwise rotate
// Motor_LR(); //make the stepper to clockwise rotate
}

Stepper yang terhubung akan berputar dengan arah yang berubah untuk progam ini.

Sumber




Previous
Next Post »