บอร์ดขับมอเตอร์ DRV8825 Drive stepper Motor
กดเพื่อขยายขนาด |
|
บอร์ดขับมอเตอร์ DRV8825
Drive stepper Motor
- กระแสสูงสุด 2.5A
- option การปรับ Step full step, half step, 1/4-step1/8-step1/16-step, 1/32-step
- ไฟเลี้ยงบอร์ด 3.3V - 5V
- ไฟเลี้ยงสำหรับจ่ายมอเตอร์ สูงสุด 45V
โค๊ดตัวอย่างสำหรับ Drive Stepper Motor
#define EN 8
#define X_DIR 5
#define Y_DIR 6
#define Z_DIR 7
#define X_STP 2
#define Y_STP 3
#define Z_STP 4
void step (boolean dir, byte dirPin, byte stepperPin, int steps)
{
digitalWrite (dirPin, dir);
delay (50);
for (int i = 0; i <steps; i++)
{
digitalWrite (stepperPin, HIGH);
delayMicroseconds (800);
digitalWrite (stepperPin, LOW);
delayMicroseconds (800);
}
}
void setup () // The stepper motor used in the IO pin is set to output
{
pinMode (X_DIR, OUTPUT); pinMode (X_STP, OUTPUT);
pinMode (Y_DIR, OUTPUT); pinMode (Y_STP, OUTPUT);
pinMode (Z_DIR, OUTPUT); pinMode (Z_STP, OUTPUT);
pinMode (EN, OUTPUT);
digitalWrite (EN, LOW);
}
void loop ()
{
step (false, X_DIR, X_STP, 200); // X axis motor reverse 1 ring, the 200 step is a circle.
step (false, Y_DIR, Y_STP, 200); // y axis motor reverse 1 ring, the 200 step is a circle.
step (false, Z_DIR, Z_STP, 200); // z axis motor reverse 1 ring, the 200 step is a circle.
delay (1000);
//step (true, X_DIR, X_STP, 200); // X axis motor forward 1 laps, the 200 step is a circle.
//step (true, Y_DIR, Y_STP, 200); // y axis motor forward 1 laps, the 200 step is a circle.
//step (true, Z_DIR, Z_STP, 200); // z axis motor forward 1 laps, the 200 step is a circle.
//delay (1000);
}
Share
Stepper motor (สเต็ปปิ้ง มอตเตอร์) NEMA 17 42HB34F08AB 42HB34F08AB 350.00 บาท |
step motor (สเต็ป มอเตอร์) Nema 17 2A 0.48N step motorNema 17 2A 350.00 บาท |
Stepper motor (สเต็ปปิ้ง มอตเตอร์) DSH40EX24A2K51001 Step DSH40EX24A2K5 120.00 บาท |
smoother stepper บอร์ดลดความสั่น Step Motor เสียงเงียบขึ้น smoother stepper 50.00 บาท |
ความคิดเห็น: คำแนะนำ: HTML จะไม่ถูกแปลง!
ความนิยม: แย่ ดี
ป้อนรหัสในกล่องข้างล่างนี้: