Cov txheej txheem:

[Arduino Robot] Yuav Ua Li Cas Ua Lub Suab Ntaus Neeg Hlau - Thumbs Neeg Hlau - Servo Tsav - Source Code: 26 Cov Kauj Ruam (nrog Duab)
[Arduino Robot] Yuav Ua Li Cas Ua Lub Suab Ntaus Neeg Hlau - Thumbs Neeg Hlau - Servo Tsav - Source Code: 26 Cov Kauj Ruam (nrog Duab)

Video: [Arduino Robot] Yuav Ua Li Cas Ua Lub Suab Ntaus Neeg Hlau - Thumbs Neeg Hlau - Servo Tsav - Source Code: 26 Cov Kauj Ruam (nrog Duab)

Video: [Arduino Robot] Yuav Ua Li Cas Ua Lub Suab Ntaus Neeg Hlau - Thumbs Neeg Hlau - Servo Tsav - Source Code: 26 Cov Kauj Ruam (nrog Duab)
Video: Jean-Michel Jarre - Fourth Rendez-Vous 2024, Hlis ntuj nqeg
Anonim
Image
Image
[Arduino Robot] Yuav Ua Li Cas Ua Lub Suab Ntaus Neeg Hlau | Thumbs Neeg Hlau | Servo Tsav | Qhov Code
[Arduino Robot] Yuav Ua Li Cas Ua Lub Suab Ntaus Neeg Hlau | Thumbs Neeg Hlau | Servo Tsav | Qhov Code

Thumbs Neeg Hlau. Siv lub hwj chim ntawm MG90S servo motor. Nws lom zem heev thiab yooj yim! Cov cai yog yooj yim heev. Nws tsuas yog nyob ib ncig ntawm 30 kab. Nws zoo li kev txav txav.

Thov tawm ib lo lus nug lossis lus teb!

[Qhia]

  • Source Code
  • 3D luam ntawv cov ntaub ntawv

[Txog tus tsim]

Youtube

Kauj ruam 1: ARDUINO XEEM

ARDUINO XAUS
ARDUINO XAUS
ARDUINO XAUS
ARDUINO XAUS
ARDUINO XAUS
ARDUINO XAUS

Nruab Arduino IDE

https://www.arduino.cc/en/Main/Software

Nruab CH340 Tsav Tsheb (rau Suav version)

https://www.wch.cn/download/CH341SER_ZIP.html

DOWNLOAD - qhov chaws

  • https://github.com/happythingsmaker/ThumbsRobot
  • Raws li koj tuaj yeem pom muaj zip file. Luam tag nrho cov ntawv thiab nyem ob npaug rau qhov chaws cov ntaub ntawv.

Xaiv board / Processor / Com chaw nres nkoj

  • Arduino Nano Cov
  • ATmega328P (Laus Bootloader)

Txuas koj arduino nano

Txuas lub USB cable thiab qhov chaw nres nkoj tshiab yuav tshwm sim

Nrhiav / xaiv qhov chaw tawm tshiab com

  • Nyem rau qhov chaw nres nkoj tshwm thiab ntaus lub pob upload
  • Ntaus lub pob upload

Kauj Ruam 2: 3D Luam Ntawv Xeem

3D XEEV XEEM
3D XEEV XEEM

Rub tawm 3d qauv ua cov ntaub ntawv los ntawm Thingiverse

https://www.thingiverse.com/thing2844993

Luam tawm txhua qhov ntawm ib qho

Kauj Ruam 3: Tshooj Circuit

Tshooj Circuit
Tshooj Circuit

Siv Arduino Nano Expansion Board. Vim tias Arduino Nano nws tus kheej tsis muaj ntau tus pin, koj yuav tsum tau siv lub rooj nthuav dav nthuav dav.

Thaum koj saib cov xov txuas nrog lub cav, koj tuaj yeem pom peb xim. Daj, Liab thiab Xim av. Xim av yuav tsum txuas nrog G (Hauv av).

Hauv cov theem hauv qab no, peb yuav saib nws zoo dua.

Kauj Ruam 4: HARDWARE PART - Npaj Txhua Qhov

HARDWARE PART - Npaj Txhua Qhov
HARDWARE PART - Npaj Txhua Qhov

[Qhov Chaw]

  • 1 x Arduino Nano
  • 1 x Arduino Nano Expansion Board
  • 6 x Servo Tsav
  • 2 x Qho khoom ua si qhov muag
  • 12 x Ntsia Hlau Bolts (2 * 6mm)

[Cuab Yeej]

  • 3d tshuab luam ntawv (Anet A8)
  • Cov ntsiab lus rau 3d luam ntawv (PLA 1.75mm)
  • Hlau Nipper
  • Hlau Stipper
  • Kub yaj kua nplaum phom
  • Ntsia Hlau Tsav (+)
  • Daim kab xev hluav taws xob
  • Cov Cuab Yeej Cuab Yeej (Hakko)
  • Soldering Hand
  • Ntsia Hlau Ntsia Hlau

Kauj Ruam 5: Hloov kho 3 Servo Motors rau hauv Txoj Haujlwm Sensor

Cov kauj ruam hauv qab no qhia koj yuav hloov kho lub cav servo mus rau qhov chaw sensor li cas. feem ntau cov servo motors muaj lub hwj chim los yog tus lej nkag rau qhov tau txais tus nqi.

Peb yuav siv lub hwj chim ntawd tus kheej. peb yuav tsum qhib rooj plaub, tshem tawm lub rooj tsavxwm thiab rov tsim dua.

Kauj Ruam 6: Ntsia Hlau 4 Lub Taub Hau ntawm Sab Nrauv thiab Qhib Lub Hauv Paus

Ntsia 4 Ntsia Hlau rau Sab Nrauv thiab Qhib Lub Hauv Paus Case
Ntsia 4 Ntsia Hlau rau Sab Nrauv thiab Qhib Lub Hauv Paus Case
Ntsia 4 Ntsia Hlau rau Sab Nrauv thiab Qhib Lub Hauv Paus Case
Ntsia 4 Ntsia Hlau rau Sab Nrauv thiab Qhib Lub Hauv Paus Case

Koj yuav xav tau tus tsav tsheb me me vim tias lawv tsawg dhau. Lub cav muaj 3 ntu - pem hauv ntej, lub cev thiab nraub qaum.

Thaum koj qhib sab xub ntiag, koj yuav pom lub zog. Qhov tseeb, peb tsis siv lub cav no ua "lub cev muaj zog". Yog li, lub zog tsis tsim nyog ntxiv raws kev xav. Tab sis peb yuav siv qee feem ntawm lawv kom lub kaum sab xis ua haujlwm tseem muaj kev txwv ntawm kev sib hloov.

Kauj Ruam 7: Tshem lub Gear thib 3

Tshem lub iav thib 3
Tshem lub iav thib 3
Tshem lub iav thib 3
Tshem lub iav thib 3
Tshem tawm qhov iav thib 3
Tshem tawm qhov iav thib 3

Potentiometer hauv servo motor muaj qhov txwv tsis pub tshaj uas yog nyob ib puag ncig 180 degree. Lub potentiometer muaj nws tus kheej txwv cov txheej txheem tab sis nws tsis muaj zog. Nws yooj yim tawg ntau zaus. Txhawm rau tiv thaiv nws, lub iav muab lwm lub tshuab. Thawj lub iav muaj lub yas yas uas yuav tiv tauj nrog lub iav thib ob.

Peb yeej xav tau thawj lub iav rau lub thav duab tag nrho, lub iav thib ob xav tau rau qhov kev txwv. Yog li, peb tsis tuaj yeem tshem ntawm lawv. Hloov chaw ntawm lawv, peb tuaj yeem tshem lub iav thib peb.

Koj yuav xav tsis thoob vim li cas peb thiaj xav tshem lub iav. Peb lub cav servo no yuav siv los nrhiav cov ntaub ntawv kaum. Yog tias muaj lub zog nyob hauv lawv, lub zog yuav txhav. Yog li, peb yuav tsum tshem tawm ib qho ntawm cov iav los ntawm lawv.

Kauj Ruam 8: Rov txuas dua / Soldering

Re-thaiv / Soldering
Re-thaiv / Soldering

Txiav cov xov hlau uas txuas nrog lub cav.

Kauj Ruam 9: Siv Cov Cuab Yeej Cuab Yeej thiab Tshem Tawm Pawg Thawj Coj

Siv Cov Cuab Yeej Cuab Yeej thiab Tshem Tawm Pawg Thawj Coj
Siv Cov Cuab Yeej Cuab Yeej thiab Tshem Tawm Pawg Thawj Coj
Siv Cov Cuab Yeej Cuab Yeej thiab Tshem Tawm Pawg Thawj Coj
Siv Cov Cuab Yeej Cuab Yeej thiab Tshem Tawm Pawg Thawj Coj

Kauj Ruam 10: Txiav Cov Hlau thiab Npaj rau Kev Siv Tshuaj Yej

Txiav ib Hlau thiab Npaj rau Kev Siv Tshuaj
Txiav ib Hlau thiab Npaj rau Kev Siv Tshuaj
Txiav ib Hlau thiab Npaj rau Kev Siv Tshuaj Yeeb
Txiav ib Hlau thiab Npaj rau Kev Siv Tshuaj Yeeb

thiab muab qee qhov muab tshuaj txhuam thiab muab qee cov hmoov txhuas tso rau ntawm kab ntawv

Kauj ruam 11: Solder Nws

Solder Nws
Solder Nws
Solder Nws
Solder Nws
Solder Nws
Solder Nws
Solder Nws
Solder Nws

los ntawm sab laug heev liab daj thiab xim av

Kauj Ruam 12: Muab qee Cov Kua nplaum rau nws

Muab Ib Leeg Kua Rau Nws
Muab Ib Leeg Kua Rau Nws
Muab Ib Leeg Kua Rau Nws
Muab Ib Leeg Kua Rau Nws

thiab rov qab nws sab nraub qaum

Peb xav tau 2 lub zog ntxiv. ua haujlwm tib yam rau ob lub cav

Kauj Ruam 13: Ua Thawj Qhov Hauv Paus Hauv Paus

Ua Thawj Qhov Hauv Paus Hauv Paus
Ua Thawj Qhov Hauv Paus Hauv Paus
Ua Thawj Qhov Hauv Paus Hauv Paus
Ua Thawj Qhov Hauv Paus Hauv Paus
Ua Thawj Qhov Hauv Paus Hauv Paus
Ua Thawj Qhov Hauv Paus Hauv Paus

Kuv siv lub rooj ua noj ua haus los ua qhov haujlwm no. nws yog pheej yig thiab ruaj khov los siv nws. Txhawm rau txhim kho tus ncej ntawm lub rooj tsavxwm, koj yuav tsum tau siv cov ntsia hlau uas muaj qhov ntse kawg. Nws ua qhov thiab xov tib lub sijhawm.

Muaj 6 lub cav. 3 lub cev muaj zog ntawm sab laug yog lub cav qub. ntawm qhov tod tes, muaj 3 lub cav uas tau hloov kho ua ntej cov kauj ruam.

Kauj Ruam 14: Ua Yaw Sib Koom

Ua Yaw Joint
Ua Yaw Joint
Ua Yaw Joint
Ua Yaw Joint

Koj yuav tsum tau siv M2 * 6mm ntsia hlau ntsia hlau.

Kauj Ruam 15: Sib Sau Yaw Sib Koom Nrog Thawj Lub Cev

Sib dhos Yaw Sib Koom Nrog Thawj Lub Cev
Sib dhos Yaw Sib Koom Nrog Thawj Lub Cev
Sib dhos Yaw Sib Koom Nrog Thawj Lub Cev
Sib dhos Yaw Sib Koom Nrog Thawj Lub Cev

Raws li koj tuaj yeem pom daim duab kawg, koj yuav tsum tau muab cov khoom sib dhos tso rau hauv kab rov tav. Thiab qhov chaw yuav tsum yog 90 degree ntawm ob lub cav thiab lub zog loj.

Hauv lwm lo lus, koj tuaj yeem tig cov yaw-sib koom 90 degree clockwise thiab counter clockwise los ntawm qhov chaw ntawd.

Kauj Ruam 16: Sib sau Arduino Nano Nrog Arduino Nano Expansion Board

Sib sau Arduino Nano Nrog Arduino Nano Expansion Board
Sib sau Arduino Nano Nrog Arduino Nano Expansion Board
Sib sau Arduino Nano Nrog Arduino Nano Expansion Board
Sib sau Arduino Nano Nrog Arduino Nano Expansion Board

Xyuas kom tseeb. Qhov chaw nres nkoj USB yuav zoo ib yam nrog DC nkaus.

Kauj Ruam 17: Thawj Txheej Txuas

Thawj Txheej Txuas
Thawj Txheej Txuas
Thawj Txheej Txuas
Thawj Txheej Txuas

Lub potentiometer txuas nrog Analog 0 tus pin ntawm Arduino. Koj yuav tsum ntsaws nws kom raug. Qhov Arduino Nano no muaj 8 channel ADC (Analog Digital Converter). Yeej, lub hwj chim muab qib analog lossis volatage. Koj tuaj yeem nyeem tus nqi hluav taws xob los ntawm kev siv ADC pins

Ib sab tes, servo motor txuas nrog Digital 9 ntawm Arduino. Servo motors tuaj yeem tswj tau los ntawm kev siv PWM (Pulse Width Modulation). Arduino Nano muaj 6 channel PWM tus pin (tus pin 9, 10, 11, 3, 5 thiab 6). Yog li, peb tuaj yeem siv txog 6 servo motors.

Hauv cov kauj ruam no, qhov chaws zoo li qhov no

#suav nrog

Servo servo [6]; tsis muaj teeb tsa teeb tsa () {pinMode (A0, INPUT); servo [0].attach (9);} int tempADC [3] = {0}; void loop () {tempADC [0] = analogRead (A0); servo [0].write (daim ntawv qhia (tempADC [0], 0, 1023, 0, 180));}

Kauj Ruam 18: Sib Sau Ob Txheej

Sib sau ua ob txheej
Sib sau ua ob txheej
Sib sau ua ob txheej
Sib sau ua ob txheej
Sib sau ua ob txheej
Sib sau ua ob txheej
Sib sau ua ob txheej
Sib sau ua ob txheej

Txheej thib ob kuj yooj yim ua. Dab tsi koj yuav tsum tau ceev faj txog yog muab nws tso rau qhov chaw raug thaum koj ntsaws lub cable rau hauv Arduino.

  • Sab laug Servomotor txuas nrog tus pin 10
  • Txoj cai potentiometer txuas nrog A1

#suav nrog

Servo servo [6]; tsis muaj teeb tsa teeb tsa () {pinMode (A0, INPUT); pinMode (A1, INPUT); servo [0].attach (9); servo [1].attach (10);} int tempADC [3] = {0}; void loop () {tempADC [0] = analogRead (A0); servo [0].write (daim ntawv qhia (tempADC [0], 0, 1023, 0, 180)); tempADC [1] = analogRead (A1); servo [1].write (daim ntawv qhia (tempADC [1], 0, 1023, 0, 180));}

Kauj Ruam 19: Sib sau Cov Txheej Txheej 3

Sib dhos Cov Txheej Txheej 3
Sib dhos Cov Txheej Txheej 3

Kauj Ruam 20: Sib dhos Tus Qauv Nrog Lub Cev Tsav Tsheb / Potentiometer thib ob

Sib dhos Cov Ncej Nrog 2nd Motor / Potentiometer
Sib dhos Cov Ncej Nrog 2nd Motor / Potentiometer
Sib dhos Cov Ncej Nrog 2nd Motor / Potentiometer
Sib dhos Cov Ncej Nrog 2nd Motor / Potentiometer
Sib dhos Cov Ncej Nrog 2nd Motor / Potentiometer
Sib dhos Cov Ncej Nrog 2nd Motor / Potentiometer
Sib dhos Cov Ncej Nrog 2nd Motor / Potentiometer
Sib dhos Cov Ncej Nrog 2nd Motor / Potentiometer

Kauj Ruam 21: Sib sau Lub Cev Tsav Tsheb thib 3 rau hauv Cov Kab Ke

Sib sau ua ke lub cev muaj zog thib 3 rau hauv Cov Kab Ke
Sib sau ua ke lub cev muaj zog thib 3 rau hauv Cov Kab Ke
Sib sau ua ke lub cev muaj zog thib 3 rau hauv Cov Kab Ke
Sib sau ua ke lub cev muaj zog thib 3 rau hauv Cov Kab Ke

Kauj Ruam 22: Txuas Lub Cable rau hauv Arduino

Txuas lub Cable rau hauv Arduino
Txuas lub Cable rau hauv Arduino
Txuas lub Cable rau hauv Arduino
Txuas lub Cable rau hauv Arduino
  • Lub cev muaj zog thib 3 tau txuas nrog tus pin 11
  • Lub zog thib 3 txuas nrog A2

chaws zoo li no

#suav nrog Servo servo [6]; tsis muaj teeb tsa teeb tsa () {pinMode (A0, INPUT); pinMode (A1, INPUT); pinMode (A2, INPUT); servo [0].attach (9); servo [1].tach (10); servo [2].attach (11);} int tempADC [3] = {0}; void loop () {tempADC [0] = analogRead (A0); servo [0].write (daim ntawv qhia (tempADC [0], 0, 1023, 0, 180)); tempADC [1] = analogRead (A1); servo [1].write (daim ntawv qhia (tempADC [1], 0, 1023, 0, 180)); tempADC [2] = analogRead (A2); servo [2].write (daim ntawv qhia (tempADC [2], 0, 1023, 0, 180));}

Kauj Ruam 23: Sib sau Thumbs Frame

Sib dhos Thumbs Frame
Sib dhos Thumbs Frame
Sib dhos Thumbs Frame
Sib dhos Thumbs Frame

Kauj Ruam 24: Kuaj thiab Kho Lub Ntsej Muag

Kuaj thiab Kho Lub
Kuaj thiab Kho Lub
Kuaj thiab Kho Lub
Kuaj thiab Kho Lub
Kuaj thiab Kho Lub
Kuaj thiab Kho Lub

Muab lub USB cable tso rau hauv txhua lub hwj chim thiab tus neeg hlau yuav raug qhib sai sai. Lub kaum sab xis yuav txawv me ntsis. Kho lub kaum ib los ntawm ib qho.

Kauj Ruam 25: Ib Tus Neeg Hlau Ntxiv?

Ib Tus Neeg Hlau Ntxiv?
Ib Tus Neeg Hlau Ntxiv?
Ib Tus Neeg Hlau Ntxiv?
Ib Tus Neeg Hlau Ntxiv?

Yog tias koj xav ua ib tus neeg hlau ntxiv, koj tuaj yeem ua tau. Plug servos rau 3, 5 thiab 6.

#suav nrog Servo servo [6]; teeb tsa tsis muaj dab tsi () {pinMode (A0, INPUT); pinMode (A1, INPUT); pinMode (A2, INPUT); servo [0].attach (9); servo [1].tach (10); servo [2].attach (11); servo [3].attach (3); servo [4].attach (5); servo [5].attach (6);} int tempADC [3] = {0}; void loop () {tempADC [0] = analogRead (A0); servo [0].write (daim ntawv qhia (tempADC [0], 0, 1023, 0, 180)); servo [3].write (daim ntawv qhia (tempADC [0], 0, 1023, 0, 180)); tempADC [1] = analogRead (A1); servo [1].write (daim ntawv qhia (tempADC [1], 0, 1023, 0, 180)); servo [4].write (daim ntawv qhia (tempADC [1], 0, 1023, 0, 180)); tempADC [2] = analogRead (A2); servo [2].write (daim ntawv qhia (tempADC [2], 0, 1023, 0, 180)); servo [5].write (daim ntawv qhia (tempADC [2], 0, 1023, 0, 180));}

Kauj ruam 26: Ua tiav

Ua tiav!
Ua tiav!
Ua tiav!
Ua tiav!
Ua tiav!
Ua tiav!

Yog tias koj muaj lus nug, thov koj tso nws tseg:)

Kev sib tw Microcontroller
Kev sib tw Microcontroller
Kev sib tw Microcontroller
Kev sib tw Microcontroller

Khiav Tawm Hauv Kev Sib Tw Microcontroller

Pom zoo: