Cov txheej txheem:

Popsicle Stick Robotic Arm (Lwm Hom): 6 Kauj Ruam
Popsicle Stick Robotic Arm (Lwm Hom): 6 Kauj Ruam

Video: Popsicle Stick Robotic Arm (Lwm Hom): 6 Kauj Ruam

Video: Popsicle Stick Robotic Arm (Lwm Hom): 6 Kauj Ruam
Video: 20 MOMENTS YOU WOULDN'T BELIEVE IF NOT FILMED 2024, Hlis ntuj nqeg
Anonim
Image
Image

Kawm paub tsim kom yooj yim Arduino-based robotic caj npab nrog tus tuav siv cov popsicle sticks thiab ob peb servos.

Khoom siv

  • 14 Popsicle Sticks
  • 4 Micro Servos (nrog lawv lub tshuab raj thiab ntsia hlau)
  • 4 Teb Potentiometers
  • 1 Ib nrab Loj Breadboard
  • 1 Arduino UAS
  • 16-Volt Roj Teeb Pob
  • 26 Jumper Cables
  • Kub Nplaum Rab phom + Kub nplaum nplaum
  • Cov ntsia hlau me me
  • Arduino IDE Cov
  • USB rau Arduino Cable

Kauj ruam 1: Calibrate Servos

Npaj cov Servos
Npaj cov Servos

Txuas lub tshuab raj (txuas cov tis dawb) rau cov servos los ntawm popping lawv nyob rau sab saum toj ntawm cov servos. Peb ntawm cov servos xav tau lub suab raj uas nthuav tawm hauv ob qho kev qhia thaum ib tus neeg pabcuam yuav xav tau lub suab raj uas txuas rau hauv ib qho nkaus xwb. Tig lub horn tig rov qab raws li qhov nws yuav mus. Tshem lub suab tawm thiab tom qab ntawd rov rau ntawm txoj haujlwm ntsuas. Ib qho ntawm servos nrog ob lub raj xa xov yuav tsum tau ntsuas ntsuas sib npaug rau servo thaum lwm tus peb yuav tsum tau muab tso rau ib sab rau cov servos. Ntsia lub tshuab raj siv lub ntsia hlau me me thiab tus ntsia hlau.

Kauj ruam 2: Npaj Servos

Npaj cov Servos
Npaj cov Servos

Rau cov servo uas tau ntsuas ntsuas kom lub suab sib luag mus rau qhov kev pabcuam, kub kua nplaum ib kawg ntawm cov popsicle lo rau sab tiaj ntawm lub suab. Rau ib qho ntawm ob txoj kev taw qhia horned servos uas tau ntsuas kom lub suab nrov nrov nyob ib puag ncig rau qhov kev pabcuam, kub kua nplaum ib kawg ntawm cov popsicle lo rau sab tiaj ntawm lub suab. Rau lwm qhov ob-kev taw qhia horned servo uas tau ntsuas kom lub horn tig mus rau qhov kev pabcuam, kub kua nplaum nruab nrab ntawm cov popsicle lo rau sab tiaj ntawm lub suab. Cov kauj ruam no txawv, lub popsicle lo nws tsis nyob rau sab tiaj ntawm lub suab raj. Rau qhov kev pabcuam nrog rau ib txoj kev taw qhia, kub kua nplaum ib qho kawg ntawm cov popsicle lo rau qhov nyias sab xis ntawm lub suab raj.

Kub nplaum 4 popsicle sticks ua ke kom lawv sib sau ua ke saum ib leeg. Kua nplaum sab tiaj ntawm pawg mus rau hauv qab ntawm servo uas tau ntsuas kom sib luag rau servo. Tua tawm cov kua nplaum ntau dhau ib ncig ntawm cov npoo kom cov pawg tuaj yeem tso ncaj.

Kauj Ruam 3: Sib Sau Cov Qauv

Sib Sau Cov Qauv
Sib Sau Cov Qauv
Sib Sau Cov Qauv
Sib Sau Cov Qauv
Sib Sau Cov Qauv
Sib Sau Cov Qauv

Teem 3 popsicle sticks rau hauv ib qho kev qhia thiab 3 popsicle sticks perpendicular rau thawj 3 los tsim kab sib chaws. Kub nplaum txhua daim ua ke. Kua nplaum hauv qab ntawm servo uas muaj nruab nrab ntawm cov popsicle lo txuas rau lub hauv paus koj nyuam qhuav tsim. Taw qhia qhov servo nrog pawg ntawm popsicle sticks txuas kom lub popsicle lo txuas rau lub tshuab raj tuaj yeem tig mus rau saum huab cua. Kua nplaum sab ntawm popsicle stick pawg rau popsicle stick ntawm lub hauv paus servo. Kua nplaum qhov kawg servo nrog ob-taw qhia rau lub popsicle stick ntawm cov servo yav dhau los kom cov popsicle stick tig mus deb ntawm qhov chaw ntawm neeg hlau. Kua nplaum sab ntawm qhov kawg servo (raws li tawm tsam rau hauv qab) rau popsicle lo ntawm cov servo yav dhau los yog li thaum qhov servo tig, qhov kawg ntawm ob lub popsicle sticks yuav kaw thiab ua raws li tus tuav.

Kauj ruam 4: Kev thaiv kab

Thaiv
Thaiv

Tsim lub Circuit Court qhia. Tom qab kev teeb tsa Arduino, qhov no yuav tso cai rau koj los tswj txhua qhov kev pabcuam nrog rau lub zog sib luag.

Kauj ruam 5: Code

#suav nrog

Servo tsav 1; // Servo Servo servo2; Servo tsav 3; Servo tsav 4; const int pot1 = A0; // Txuas cov potentiometers const int pot2 = A1; const int pot3 = A2; const int pot4 = A3; teeb tsa tsis muaj dab tsi () {// Teeb tsa txhua yam thiab yuav khiav ib zaug servo1.attach (6); // Txuas cov servos thiab piav qhia tus pin hom servo2.attach (9); servo3.attach (10); cov. servo4.attach (11); Serial.begin (9600); // Pib lub arduino/loop} void loop () {// muab koj cov cai tseem ceeb ntawm no, kom rov ua dua: int pot1Value = analogRead (pot1); // Nyeem qhov tseem ceeb ntawm cov potentiometers int pot2Value = analogRead (pot2); int pot3Value = analogRead (pot3); int pot4Value = analogRead (pot4); int pot1Angle = daim ntawv qhia (pot1Value, 0, 1023, 0, 179); // Qhia qhov tseem ceeb ntawm cov peev txheej ntsuas (0-1023) rau cov ces kaum uas servo tuaj yeem nyeem (0-179 degrees) int pot2Angle = daim ntawv qhia (pot2Value, 0, 1023, 0, 179); int pot3Angle = daim ntawv qhia (pot3Value, 0, 1023, 0, 179); int pot4Angle = daim ntawv qhia (pot4Value, 0, 1023, 0, 179); servo1.write (pot1Angle); // Ua rau servos txav mus rau lub kaum ntse ntse mapped servo2.write (pot2Angle); servo3.write (pot3Angle); servo4.write (pot4Angle); }

Kauj ruam 6: Troubleshooting

Tsis muaj dab tsi txav mus: Nco ntsoov tias lub roj teeb tau qhib thiab Arduino tau ntsaws.

Lub Servo tsis ua haujlwm: Sim nias lub pob pib dua ntawm Arduino. Qee lub sij hawm servo nres ua haujlwm yog tias nws raug thawb mus dhau. Cov servo tuaj yeem tuag, sim hloov cov xov hlau nrog cov xov ntawm cov servo ua haujlwm los saib seb qhov servo no ua haujlwm li cas.

Lub Servo yog Jittery: Lub servo yuav ua rau hnyav ntau dhau. Sim ntxiv lub capacitor rau qhov thaiv ntawm servo.

Pom zoo: