รหัสสินค้า | AG00262 |
หมวดหมู่ | Motor Drive / Shield |
ราคา | 55.00 บาท |
สถานะสินค้า | พร้อมส่ง |
จำนวน | ชิ้น |
Stepper Motor ขนาด 5V + ไดร์เวอร์บอร์ด ULN2003 Driver Board สำหรับ Arduino/AVR/ARM 5V 4-Phase 5-Wire
Step motor is to a machine to convert pulse to angle displacement. So if you give stepper driver a certain pulse signal, it will drive step motor to a certain angle. you can control the angle the stepper moved by the number of the pulse. And you also can control the speed of the stepper rotate by the frequency of the pulse. The following picture is the schematic of the stepper driver.
The following picture is the control signal to drive a 28BYJ48 stepper to rotate 1/4096 circle.
line | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
---|---|---|---|---|---|---|---|---|
red | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
orange | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
yellow | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 |
pink | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 |
blue | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 |
So we defined the time series in a array
byte CCW[8] = {0x09,0x01,0x03,0x02,0x06,0x04,0x0c,0x08}; //CouterClockWise
byte CW[8]= {0x08,0x0c,0x04,0x06,0x02,0x03,0x01,0x09}; //ClockWise
and in the following usage it will run, and then you must know how to drive a stepper.
This usage is to drive a 28BYJ stepper. The stepper stopped when pushed the stop_button. It also can be changed to control the stepper to counterclockwise or clockwise rotate. Connect 28BYJ step motor to mini stepper driver as below:
โค้ดตัวอย่างการใช้งานอุปกรณ์กับบอร์ด Arduino
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;kvoid loop() {
Motor_CCW(); //make the stepper to anticlockwise rotate
// Motor_LR(); //make the stepper to clockwise rotate
}
The connected stepper would rotate with a changing direction for this progam.
เอกสารเพิ่มเติม
- Aansluitschema
- Datasheet
- Voorbeeld code
- Aansluitschema Arduino
- Aansluitschema 2 Arduino
ชำระเงินค่าสินค้าโดยการโอนเงินเข้าบัญชีธนาคาร KBANK, SCB, BBL,TMB
กรุณาเก็บหลักฐานการโอนเงินของท่านไว้เพื่อแจ้งการชำระเงินด้วยค่ะ
ท่านสามารถแจ้งการชำระเงินผ่านระบบอัตโนมัติได้โดย Click Link ข้างล่างค่ะ
https://www.arduitronics.com/informpayment
หน้าที่เข้าชม | 15,375,394 ครั้ง |
ผู้ชมทั้งหมด | 5,878,472 ครั้ง |
เปิดร้าน | 21 พ.ค. 2556 |
ร้านค้าอัพเดท | 6 ก.ย. 2568 |