Cov txheej txheem:

Mecanum Omni Log Robot Nrog GRBL Stepper Motors Arduino Shield: 4 Kauj Ruam
Mecanum Omni Log Robot Nrog GRBL Stepper Motors Arduino Shield: 4 Kauj Ruam

Video: Mecanum Omni Log Robot Nrog GRBL Stepper Motors Arduino Shield: 4 Kauj Ruam

Video: Mecanum Omni Log Robot Nrog GRBL Stepper Motors Arduino Shield: 4 Kauj Ruam
Video: NAMLA Autonomous Omni-Directional Mobile Robot 2024, Kaum ib hlis
Anonim
Mecanum Omni Log Neeg Hlau Nrog GRBL Stepper Motors Arduino Shield
Mecanum Omni Log Neeg Hlau Nrog GRBL Stepper Motors Arduino Shield
Mecanum Omni Log Neeg Hlau Nrog GRBL Stepper Motors Arduino Shield
Mecanum Omni Log Neeg Hlau Nrog GRBL Stepper Motors Arduino Shield
Mecanum Omni Log Neeg Hlau Nrog GRBL Stepper Motors Arduino Shield
Mecanum Omni Log Neeg Hlau Nrog GRBL Stepper Motors Arduino Shield

Mecanum Neeg Hlau - Ib qhov haujlwm kuv xav tsim txij li thaum kuv pom nws ntawm Dejan's gread mechatronics blog: howtomechatronics.com

Dejan tau ua tiav txoj haujlwm zoo npog txhua yam los ntawm kho vajtse, 3D luam ntawv, khoom siv hluav taws xob, code thiab Android app (MIT's App inventor)

Nov yog qhov haujlwm zoo tshaj uas rov ua dua txhua qhov txuj ci ntawm tus tsim khoom.

Kuv tau hloov pauv me ntsis los ua cov haujlwm

Kuv tsis xav siv qhov kev cai ua PCB nws siv, tab sis qub GRBL daim thaiv uas kuv muaj hauv tsev.

Kuv xav siv BlueTooth

Yog li:

Khoom siv

Arduino Uno + GRBL Shield

Stepper lub cev muaj zog

HC-06 BlueTooth module

12V Lipo Roj Teeb

Kauj ruam 1: Kho vajtse

Kho vajtse
Kho vajtse
Kho vajtse
Kho vajtse

Luam cov log thiab sib sau ua ke raws li hauv qab no:

Txuas 4 Stepper lub cev muaj zog rau lub chassis (hauv kuv qhov teeb meem uas tsis siv lub tub rau khoom sab saud)

Rhais cov cables mus rau saum tus neeg hlau.

Kauj ruam 2: Electronics

Electronics
Electronics
Electronics
Electronics
Electronics
Electronics

Kuv siv kuv qhov HC-06 BT module, Qhov nyuaj tshaj plaws yog teeb tsa GRBL daim ntaub thaiv kom ua haujlwm nrog 4 Stepper lub cev muaj zog vim tias tsis muaj cov lus qhia zoo rau qhov ntawd, Tsis tas yuav tsum tau tso Jumpers raws li tuaj yeem pom hauv daim duab txuas, txhawm rau ua kom "Cov cuab yeej" tso tawm ntawm daim ntaub thaiv kom tswj hwm lub tshuab hluav taws xob. kuj yuav tsum tau muab "Pab kom" Jumper

thaiv lub 4 steppers thiab yog nws.

Kuv kuj tau muab lub zog los ntawm 12V roj teeb - ob lub stes - ib qho rau Arduino thiab ib qho rau GRBl Shield

Kauj Ruam 3: Arduino Code

/* === Arduino Mecanum Log Robot === Smartphone tswj ntawm Bluetooth los ntawm Dejan, www. HowToMechatronics.com Libraries: RF24, www. HowToMechatronics.com AccelStepper los ntawm Mike McCauley: www. HowToMechatronics.com

*//* 2019-11-12 Gilad Meller (https://www.keerbot.com - hloov kho txoj cai los ua haujlwm nrog GRBL arduino lub cev muaj zog tiv thaiv Stepper lub cev muaj zog hauv daim ntaub thaiv tau teeb tsa raws li (kauj ruam/kev qhia): 2/5 3 /6 4/7 12/13 siv A4988 tsav 12V

Dejan txoj cai siv SoftwareSerial thiab kuv yuav siv tus txheej txheem RX, TX pins (0, 1) ntawm Arduino Uno Nco tseg: Nco ntsoov rov txhim kho RX TX pins thaum ntxiv cov duab kos rau arduino lossis rub tawm yuav ua tsis tiav.

*/ #suav nrog

// Txheeb xyuas lub tshuab hluav taws xob stepper thiab tus pin tus yuav siv AccelStepper LeftBackWheel (1, 2, 5); // (Hom: tsav tsheb, KAUJ RUAM, DIR) - Stepper1 AccelStepper LeftFrontWheel (1, 3, 6); // Stepper2 AccelStepper RightBackWheel (1, 4, 7); // Stepper3 AccelStepper RightFrontWheel (1, 12, 13); Stepper4

int khoomByte = 0, c; // rau cov ntaub ntawv xov xwm nkag mus logSpeed = 100;

teeb tsa tsis muaj dab tsi () {Serial.begin (9600); // qhib qhov chaw nres nkoj txuas, teeb tsa cov ntaub ntawv tus nqi rau 9600 bps // Teeb tsa thawj qhov tseem ceeb rau cov steppers LeftFrontWheel.setMaxSpeed (600); LeftBackWheel.setMaxSpeed (600); RightFrontWheel.setMaxSpeed (600); RightBackWheel.setMaxSpeed (600);

}

void loop () {yog (Serial.available ()> 0) {// nyeem cov khoom nkag byte: incomingByte = Serial.read ();

c = incomingByte; hloov (c) {rooj plaub 71: Serial.println ("Kuv tau txais txoj cai tig W"); tigRight (); tawg; rooj plaub 65: Serial.println ("Kuv tau txais Rotate laug Q"); tigLeft (); tawg; rooj plaub 1: Serial.println ("Kuv tau txais BK/LFT"); moveRightBackward (); tawg; rooj plaub 2: Serial.println ("Kuv tau txais BK"); moveBackward (); tawg; rooj plaub 3: Serial.println ("Kuv tau txais BK/RT"); moveRightBackward (); tawg; rooj plaub 4: Serial.println ("Kuv tau txais LEFT"); moveSidewaysLeft ();

tawg; rooj plaub 5: Serial.println ("Kuv tau txais STOP"); stopMoving (); tawg; rooj plaub 6: Serial.println ("Kuv tau txais RT"); moveSidewaysRight (); tawg; rooj plaub 7: Serial.println ("Kuv tau txais FWD/LFT"); moveLeftForward (); tawg; rooj plaub 8: Serial.println ("Kuv tau txais FWD"); txav mus rau tom ntej (); tawg; rooj plaub 9: Serial.println ("Kuv tau txais FWD/RT"); moveRightForward (); tawg; default: Serial.print ("Tsis yog hais kom ua"); Serial.println (incomingByte, DEC); tawg; }} // moveBackward (); txavRobot ();

}

tsis muaj dabtsis moveRobot () {LeftBackWheel.runSpeed (); LeftFrontWheel.runSpeed (); RightFrontWheel.runSpeed (); RightBackWheel.runSpeed (); }

tsis muaj dabtsis moveForward () {LeftFrontWheel.setSpeed (wheelSpeed); LeftBackWheel.setSpeed (wheelSpeed); RightFrontWheel.setSpeed (wheelSpeed); RightBackWheel.setSpeed (wheelSpeed); } tsis muaj dabtsis moveBackward () {LeftFrontWheel.setSpeed (-wheelSpeed); LeftBackWheel.setSpeed (-wheelSpeed); RightFrontWheel.setSpeed (-wheelSpeed); RightBackWheel.setSpeed (-wheelSpeed); } tsis muaj dabtsis moveSidewaysRight () {LeftFrontWheel.setSpeed (wheelSpeed); LeftBackWheel.setSpeed (-wheelSpeed); RightFrontWheel.setSpeed (-wheelSpeed); RightBackWheel.setSpeed (wheelSpeed); } tsis muaj dabtsis moveSidewaysLeft () {LeftFrontWheel.setSpeed (-wheelSpeed); LeftBackWheel.setSpeed (wheelSpeed); RightFrontWheel.setSpeed (wheelSpeed); RightBackWheel.setSpeed (-wheelSpeed); } tsis muaj dab tsi rotateLeft () {LeftFrontWheel.setSpeed (-wheelSpeed); LeftBackWheel.setSpeed (-wheelSpeed); RightFrontWheel.setSpeed (wheelSpeed); RightBackWheel.setSpeed (wheelSpeed); } tsis muaj dab tsi rotateRight () {LeftFrontWheel.setSpeed (wheelSpeed); LeftBackWheel.setSpeed (wheelSpeed); RightFrontWheel.setSpeed (-wheelSpeed); RightBackWheel.setSpeed (-wheelSpeed); } tsis muaj dabtsis moveRightForward () {LeftFrontWheel.setSpeed (wheelSpeed); LeftBackWheel.setSpeed (0); RightFrontWheel.setSpeed (0); RightBackWheel.setSpeed (wheelSpeed); } tsis muaj dabtsis 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); } tsis muaj dabtsis stopMoving () {LeftFrontWheel.setSpeed (0); LeftBackWheel.setSpeed (0); RightFrontWheel.setSpeed (0); RightBackWheel.setSpeed (0); }

Kauj ruam 4: Appinventor

Tus tshiab appinventor app nrog kev ua haujlwm sib txawv thiab yooj yim dua (Tsis Muaj Cov Kaw)

Thov xa msg thiab kuv xa tuaj rau koj - cov uploads tsis ua.

Saib xyuas.

Pom zoo: