Mundarija:

GRBL Stepper Motors Arduino Shield bilan Mecanum Omni Wheels Robot: 4 qadam
GRBL Stepper Motors Arduino Shield bilan Mecanum Omni Wheels Robot: 4 qadam

Video: GRBL Stepper Motors Arduino Shield bilan Mecanum Omni Wheels Robot: 4 qadam

Video: GRBL Stepper Motors Arduino Shield bilan Mecanum Omni Wheels Robot: 4 qadam
Video: How to Control Stepper Motors with Arduino using a GRBL CNC Shield! 2024, Noyabr
Anonim
Mecanum Omni Wheels robot GRBL Stepper Motors Arduino Shield bilan
Mecanum Omni Wheels robot GRBL Stepper Motors Arduino Shield bilan
Mecanum Omni Wheels robot GRBL Stepper Motors Arduino Shield bilan
Mecanum Omni Wheels robot GRBL Stepper Motors Arduino Shield bilan
Mecanum Omni Wheels robot GRBL Stepper Motors Arduino Shield bilan
Mecanum Omni Wheels robot GRBL Stepper Motors Arduino Shield bilan

Mecanum roboti - Men loyihani Dejanning gech -mexatronika blogida ko'rganimdan buyon qurmoqchi edim: howtomechatronics.com

Dejan haqiqatan ham uskuna, 3D bosib chiqarish, elektronika, kod va Android ilovasining barcha jihatlarini qamrab olgan holda yaxshi ish qildi (MIT ilovasi ixtirochisi)

Bu ishlab chiqaruvchining barcha ko'nikmalarini yangilaydigan ajoyib ta'mirlash loyihasi.

Loyihalarga ozgina o'zgartirish kiritishim kerak edi

Men u ishlatgan maxsus tenglikni ishlatishni xohlamadim, lekin menda eski GRBL qalqoni bor edi.

Men BlueTooth -dan foydalanmoqchi edim

Shunday qilib:

Ta'minotlar

Arduino Uno + GRBL qalqoni

Bosqichli motorlar

HC-06 BlueTooth moduli

12V Lipo batareyasi

1 -qadam: Uskuna

Uskuna
Uskuna
Uskuna
Uskuna

G'ildiraklarni bosib chiqargan va ularni shu erda yig'ilgan:

Shassiga 4 qadamli dvigatel ulangan (mening holatimda ishlatilmagan tortmasining tepa qismi pastga)

Kabellarni robotning yuqori qismiga o'tkazdi.

2 -qadam: elektronika

Elektronika
Elektronika
Elektronika
Elektronika
Elektronika
Elektronika

Men HC-06 BT modulidan foydalandim, Eng qiyin narsa GRBL qalqonini 4 Stepper dvigatellari bilan ishlashga o'rnatish edi, chunki buning uchun yaxshi ko'rsatma yo'q, Qo'shilgan rasmda ko'rinib turganidek, o'tish moslamasini qalqonning "vosita" chiqishi, shuningdek, step motorini boshqarish uchun qo'yish kerak. Shuningdek, "Enable" jumper -ni qo'yish kerak

4 qadamli simlarni ulash va bu.

Men, shuningdek, 12V batareyalardan quvvat oldim - ikkita stes - biri Arduino uchun, ikkinchisi GRBl Shield uchun.

3 -qadam: Arduino kodi

/* === Arduino Mecanum Wheels Robot === Smartfonni Bluetooth orqali Dejan, www. HowToMechatronics.com kutubxonalari: RF24, www. HowToMechatronics.com AccelStepper, Mayk Makkoli: www. HowToMechatronics.com

*//* 2019-11-12 Gilad Meller (https://www.keerbot.com - GRBL arduino dvigatel qalqoni bilan ishlash uchun kodni o'zgartiring qalqondagi step motorlari (qadam/yo'nalish) sifatida xaritaga kiritilgan: 2/5 3 /6 4/7 12/13, A4988 drayveri 12V yordamida

Dejan kodi SoftwareSerial -dan foydalanadi, meniki esa Arduino Uno -ning standart RX, TX pinlarini (0, 1) ishlatadi Eslatma: Arduino -ga eskizni yuklashda RX TX -pinlarini echib oling.

*/ #qo'shing

// AccelStepper LeftBackWheel (1, 2, 5) ishlatadigan qadam motorlari va pimlarini aniqlang; // (Turi: haydovchi, STEP, DIR) - Step1 AccelStepper LeftFrontWheel (1, 3, 6); // Step2 AccelStepper RightBackWheel (1, 4, 7); // Stepper 3 AccelStepper RightFrontWheel (1, 12, 13); // qadam 4

int incomingByte = 0, c; // kiruvchi ketma -ket ma'lumotlar uchun int wheelSpeed = 100;

void setup () {Serial.begin (9600); // ketma -ket portni ochadi, ma'lumotlar tezligini 9600 bps ga o'rnatadi // LeftFrontWheel.setMaxSpeed (600) stepperlari uchun dastlabki urug 'qiymatlarini o'rnating; LeftBackWheel.setMaxSpeed (600); RightFrontWheel.setMaxSpeed (600); RightBackWheel.setMaxSpeed (600);

}

void loop () {if (Serial.available ()> 0) {// kiruvchi baytni o'qing: incomingByte = Serial.read ();

c = kiruvchi bayt; switch (c) {71 -holat: Serial.println ("Men o'ngga aylantirish V ni oldim"); rotateRight (); tanaffus; 65 -holat: Serial.println ("Men chapga burish Q -ni oldim"); aylantirishLeft (); tanaffus; 1 -holat: Serial.println ("Men BK/LFT oldim"); moveRightBackward (); tanaffus; 2 -holat: Serial.println ("Men BKni oldim"); moveBackward (); tanaffus; 3 -holat: Serial.println ("Men BK/RT oldim"); moveRightBackward (); tanaffus; 4 -holat: Serial.println ("Men QOLGANman"); moveSidewaysLeft ();

tanaffus; 5 -holat: Serial.println ("STOP oldim"); stopMoving (); tanaffus; 6 -holat: Serial.println ("Men RT oldim"); moveSidewaysRight (); tanaffus; 7 -holat: Serial.println ("Men FWD/LFT oldim"); moveLeftForward (); tanaffus; 8 -holat: Serial.println ("Men FWD oldim"); Oldinga yurish(); tanaffus; 9 -holat: Serial.println ("Men FWD/RT oldim"); moveRightForward (); tanaffus; standart: Serial.print ("Buyruq emas"); Serial.println (incomingByte, DEC); tanaffus; }} // moveBackward (); moveRobot ();

}

bo'sh harakatlanishRobot () {LeftBackWheel.runSpeed (); LeftFrontWheel.runSpeed (); RightFrontWheel.runSpeed (); RightBackWheel.runSpeed (); }

void moveForward () {LeftFrontWheel.setSpeed (wheelSpeed); LeftBackWheel.setSpeed (wheelSpeed); RightFrontWheel.setSpeed (wheelSpeed); RightBackWheel.setSpeed (wheelSpeed); } void moveBackward () {LeftFrontWheel.setSpeed (-wheelSpeed); LeftBackWheel.setSpeed (-wheelSpeed); RightFrontWheel.setSpeed (-wheelSpeed); RightBackWheel.setSpeed (-wheelSpeed); } void moveSidewaysRight () {LeftFrontWheel.setSpeed (wheelSpeed); LeftBackWheel.setSpeed (-wheelSpeed); RightFrontWheel.setSpeed (-wheelSpeed); RightBackWheel.setSpeed (wheelSpeed); } void moveSidewaysLeft () {LeftFrontWheel.setSpeed (-wheelSpeed); LeftBackWheel.setSpeed (wheelSpeed); RightFrontWheel.setSpeed (wheelSpeed); RightBackWheel.setSpeed (-wheelSpeed); } void rotateLeft () {LeftFrontWheel.setSpeed (-wheelSpeed); LeftBackWheel.setSpeed (-wheelSpeed); RightFrontWheel.setSpeed (wheelSpeed); RightBackWheel.setSpeed (wheelSpeed); } void rotateRight () {LeftFrontWheel.setSpeed (wheelSpeed); LeftBackWheel.setSpeed (wheelSpeed); RightFrontWheel.setSpeed (-wheelSpeed); RightBackWheel.setSpeed (-wheelSpeed); } void moveRightForward () {LeftFrontWheel.setSpeed (wheelSpeed); LeftBackWheel.setSpeed (0); RightFrontWheel.setSpeed (0); RightBackWheel.setSpeed (wheelSpeed); } void moveRightBackward () {LeftFrontWheel.setSpeed (0); LeftBackWheel.setSpeed (-wheelSpeed); RightFrontWheel.setSpeed (-wheelSpeed); RightBackWheel.setSpeed (0); } void moveLeftForward () {LeftFrontWheel.setSpeed (0); LeftBackWheel.setSpeed (wheelSpeed); RightFrontWheel.setSpeed (wheelSpeed); RightBackWheel.setSpeed (0); } void moveLeftBackward () {LeftFrontWheel.setSpeed (-wheelSpeed); LeftBackWheel.setSpeed (0); RightFrontWheel.setSpeed (0); RightBackWheel.setSpeed (-wheelSpeed); } void stopMoving () {LeftFrontWheel.setSpeed (0); LeftBackWheel.setSpeed (0); RightFrontWheel.setSpeed (0); RightBackWheel.setSpeed (0); }

4 -qadam: Appinventor

Har xil va sodda funksionallikka ega yangi appinventor ilovasi (Yozuvlar yo'q)

Iltimos, xabar yuboring va men sizga yuboraman - yuklamalar muvaffaqiyatsiz tugadi.

Qayg'urmoq; o'zini ehtiyot qilmoq.

Tavsiya: