Cov txheej txheem:

Pi Catapult: 7 Kauj Ruam (nrog Duab)
Pi Catapult: 7 Kauj Ruam (nrog Duab)

Video: Pi Catapult: 7 Kauj Ruam (nrog Duab)

Video: Pi Catapult: 7 Kauj Ruam (nrog Duab)
Video: PTFS Roblox landing at Grater Rockford 2024, Kaum ib hlis
Anonim
Image
Image

Txhua xyoo nyob rau hnub Saturday kawg thaum Lub Kaum Hli, Cantigny Historical Museum tuav kev sib tw ua yeeb yam lom zem. Nov yog qhov kev sib tw zoo tshaj uas tso cai rau txhua tus tuaj tsim thiab tua phom loj thaum sib tw txog li 3 pawg sib txawv: nrug deb, tua pawg, thiab raug. Yog xav paub ntxiv txog kev sib tw thov mus saib lawv lub vev xaib ntawm https://www.fdmuseum.org/event/cantigny-catapult-c… Rau xyoo no kev sib tw kuv pab neeg, Pi Throwers, txiav txim siab siv Raspberry Pi los pab nrog tso ib feem ntawm peb pov.

Hauv peb qhov kev tsim qauv, peb muaj txheej txheej ntawm cov ntsuas tau saib xyuas los ntawm Raspberry Pi Zero Wireless. Tom qab nqa phom catapult thiab rub qhov tso tawm, Raspberry Pi tswj hwm thaum lub baseball yuav raug tso tawm. Siv cov txheej txheem yooj yim no, peb tuaj yeem nyob hauv qhov chaw thib ob nrog qhov deb ntawm 186 ko taw.

Cov Lus Qhia no yuav tham txog kev tsim qauv, kev txhim kho, thiab kev siv Raspberry Pi tus tswj hwm thiab cov khoom siv hluav taws xob cuam tshuam. Txawm hais tias kuv tsis npog lub tsev ntawm lub xyoo catapult no, saib rau kev qhia paub tom qab pib xyoo tshiab txog kev tsim qauv thiab tsim lub tsev xyoo tom ntej catapult.

Tsuas yog kev lom zem, Kuv tau suav nrog cov vis dis aus ntawm peb 186 ko taw. Kuv vam tias koj txaus siab.

Kuv kuj xav ua tsaug rau kuv cov phooj ywg sib koom xyoo no: Steven Bob thiab Gus Menoudakis.

Kauj Ruam 1: Zuag Qhia Tag Nrho

Zuag qhia tag nrho Tsim
Zuag qhia tag nrho Tsim

Hauv kev sib tw xyoo dhau los peb muaj teeb meem ncaj ncees ntawm teeb meem tau txais kev tso tawm zoo ib yam rau peb cov catapult. Ua tus coj zoo, raws li kuv tus poj niam, Kuv txiav txim siab siv kuv cov txuj ci nrog hluav taws xob thiab tus nqi qis heev ntawm Raspberry Pi Zero ($ 5) ntxiv rau kev tswj hwm lub computer.

Nov yog tag nrho cov txheej txheem ntawm kev tua catapult. Ua ntej, qhib Pi. Qhov thib ob, txuas rau Pi lub wireless kub chaw nrog kuv iPhone thiab pib kuv Catapult App. Tom ntej no, qhib lub catapult thiab teeb tsa qhov tso tawm. Ntsuas lub catapult thiab teeb tsa lub ntsuas. Caj npab catapult nrog app. Thaum koj npaj tua hluav taws catapult, rub qhov tso tawm. Tam sim no tus Pi, siv cov cim ntsuas hauv lub cev, tso tawm qhov ua rau lub sijhawm raug thiab lub pob raug tso tawm.

Kauj ruam 2: Raspberry Pi Zero Teeb

Raspberry Pi Zero Teeb
Raspberry Pi Zero Teeb

Muaj peb theem tseem ceeb xav tau los teeb tsa Raspberry Pi rau siv hauv catapult. Thawj yog ntxiv kev sib txuas rau lub hwj huam khoom nyob rau sab nraum qab ntawm Pi. Qhov thib ob yog teeb tsa Pi li qhov chaw kub. Kauj ruam kawg yog txhawm rau txhim kho txoj haujlwm hauv Python uas yuav cuam tshuam nrog kev tswj hwm app, nyeem cov cim ntsuas, thiab tua lub catapult thaum xav tau.

Kev Sib Txuas Fais Fab

  1. Tua koj cov hlau phom.
  2. Lob ib txheej ntawm 16-18 ntsuas cua xaim rau lub zog txuas. Kuv ib txwm siv xaim liab rau qhov kev sib txuas zoo. Kuv kuj siv xaim uas muaj qhov txuas ntawm ib kawg kom kuv tuaj yeem tshem cov ntoo thuv los ntawm catapult.
  3. Seem me me ntawm cov xaim thiab tin qhov kawg.
  4. Pre-solder cov pawm qhov twg koj yuav txuas lub zog. Kuv tsis paub tus lej ncoo tab sis kuv tau qhia tias cov ntaub qhwv los siv hauv daim duab.
  5. Muab cov xov hlau txuas rau Pi. Kuv pom cov kauj ruam no yog qhov yooj yim yog tias koj ruaj ntseg Pi thiab tuav ib txoj hlua hla lub ncoo kom muab muag. Tom qab ntawd kuv thov cov hlau txuas rau cov hlau thaum nias ntawm lub ncoo. Thaum koj hnov cov laug ntawm cov hlau yaj, tso siab.
  6. Rov ua dua nrog xaim thib ob.
  7. Xyuas seb puas muaj luv. Ib qho luv luv yog tias cov xov hlau lossis cov kab laug sab los ntawm ob daim ntaub sib chwv ib leeg. Yog tias qhov no tshwm sim, ua kom sov cov laug, tshem cov xov hlau thiab sim dua.

Kub Chaw

Thaum kuv tuaj yeem hla txhua cov kauj ruam los teeb tsa qhov chaw kub muaj lwm tus uas tau ua haujlwm zoo dua. Kuv tau teev ob peb lub vev xaib nrog cov lus qhia ib qib zuj zus.

RaspberryPi.org

Frillip.com

Python Program

Ib txoj haujlwm Python tau siv los tswj kev teeb tsa thiab tua ntawm catapult. Txoj haujlwm, nyob hauv qab no, tau khiav ntawm Pi thiab tso cai rau koj teeb tsa thiab tswj cov catapult. Txoj haujlwm no tau ntxiv rau cov npe neeg siv hauv nroog thiab ua haujlwm txhua lub sijhawm Pi tau txhawb nqa los ntawm kev ntxiv kev nkag mus hauv /etc/rc.local. Txoj haujlwm no teeb tsa lub network server uas kuv txuas rau siv lub app tsim rau kuv iPhone. Koj tseem tuaj yeem siv telnet thiab txuas rau chaw nres nkoj 9999 ntawm Pi. Tom qab ntawd koj tuaj yeem siv cov lus txib kom zoo ib yam li kuv li app.

Node-Red Program

Ntxiv rau qhov program Python, Kuv tau tsim Node-Red program nrog rau kev ua haujlwm zoo sib xws tab sis nws siv lub vev xaib sib cuam tshuam. Txij li Rasbian, pom zoo OS rau Raspberry Pi, suav nrog Node-Red ua ib feem ntawm kev teeb tsa, Kuv xav tias qhov no yuav yog qhov zoo ntxiv. Luam cov ntsiab lus ntawm cov ntaub ntawv catapult.json rau hauv koj daim ntawv los teev cia, qhib Node-Red ntawm tus Pi uas koj npaj siab yuav siv rau koj tus catapult, xaiv Ntshuam-> Clipboard los ntawm cov ntawv qhia zaub mov ntawm sab xis, thiab muab cov chaws tso rau ntawd. Tam sim no txhua yam koj yuav tsum tau ua yog xa cov cai thiab txuas rau IP chaw nyob ntawm koj Pi rau tus neeg siv interface. Hauv kuv qhov xwm txheej nws yog https://192.168.1.103/1880/ui/#/0, koj tus IP chaw nyob yuav zoo heev.

Kauj Ruam 3: Txuas Cov Xeem

Txuas Cov Xeem
Txuas Cov Xeem
Txuas Cov Xeem
Txuas Cov Xeem
Txuas Cov Xeem
Txuas Cov Xeem

Txawm hais tias nws zoo li tsis meej, qhov kev thaiv qhov tseeb ntawm lub kaw lus yog ncaj ncaj rau pem hauv ntej. Qhov ua tsis tau zoo PowerPoint schematic qhia tag nrho cov kev sib txuas. Qhov xav tau yog teev hauv qab no.

Daim ntawv teev npe

  1. Raspberry Pi Zero Wireless - $ 5
  2. 16 GB micro SD daim npav - $ 8-10
  3. Uxcell DC12V 25N Force 2 -Wire Rub Push Solenoid, Electromagnet, 10 mm Actuator - $ 18
  4. eBoot 6 Pob LM2596 DC rau DC Buck Converter 3.0-40V rau 1.5-35V Lub Hwj Huam Muab Cov Nqis Nqis Nqis-$ 2
  5. Floureon 2 Pob 3S 11.1V 1500mAh 35C RC Lipo Roj teeb nrog XT60 Plug rau RC Tsheb, Skylark m4 -fpv250, Mini Shredder 200, Qav250, Vortex, Drone thiab FPV (2.91 x 1.46 x 1.08 Nti) - $ 27
  6. Toggle hloov - $ 2-10 rau kev hloov pauv, Kuv muaj qhov qub uas kuv tau siv
  7. Finware 6 Pairs XT60 XT -60 Txiv neej Poj Niam Cov Hluav Taws Xob Cov Hluav Taws Xob Cov Hluav Taws Xob Hluav Taws Xob Hluav Taws Xob nrog Cov Tshav Kub Kub Txo rau RC Lipo Roj Teeb - $ 7.50
  8. Cylewet 15Pcs Reed Hloov nrog Gilded Lead Qhib (N/O) Sib Nqus Induction Hloov Hluav Taws Xob rau Arduino (Pob ntawm 15) CYT1065 - $ 10
  9. Tolako 5v Relay Module rau Arduino ARM PIC AVR MCU 5V Qhov Taw Qhia Teeb LED 1 Channel Relay Module Ua Haujlwm nrog Raug Cai Raug Cai - $ 6. Koj tuaj yeem tau txais kev xa rov qab uas ua haujlwm ntawm 3.3v thiab hla dhau NPN transistor, Kuv yuav muaj yog tias kuv tau xaj kom raug qhov tseeb kom pib nrog.
  10. 100 x 2N2222 NPN TO-92 Plastic-Encapsulate Power Transistors 75V 600mA-$ 2
  11. Cov hlau thiab lwm yam - qhov no suav nrog qee qhov 20mm hlau nplaum.

Kev sib txuas

Raws li koj tuaj yeem pom los ntawm kuv daim duab hluav taws xob txaus ntshai, kev sib txuas rau cov khoom siv hluav taws xob yog qhov yooj yim dua. Koj yuav xav tsis thoob vim li cas thiaj muaj NPN transistor cuam rau hauv, nws tau ua nrog kev xa xov ntawm 5 volts thiab Pi khiav ntawm 3.3v. Yog, muaj 5V tus pin ntawm Pi, tab sis lawv tsis yog txuas rau GPIO pins. Nug kuv li cas kuv thiaj paub …

Qhov koj txuas cov khoom sib xyaw ua ke yog qhov koj xaiv. Kuv siv cov qub RC servo txuas raws li lawv muaj qhov sib txawv kom siv rau GPIO tus pin ntawm Raspberry Pi thiab kuv tau sau ntau ntawm lawv. Yog tias koj xav tau, koj tuaj yeem tso cov laug txuas rau lub qhov/pins ntawm Pi. Koj tsuas yog yuav tsum ua kom ntseeg tau tias kev sib txuas muaj kev nyab xeeb thiab tsis zoo li yuav cais thaum lub sijhawm ua phem uas yog kev tua phom loj.

Kauj Ruam 4: Luam Tshooj

Muaj peb yam khoom uas kuv yuav tsum luam tawm rau txoj haujlwm no thiab lawv tau teev tseg hauv qab no.

  1. Cov ntaub ntawv hluav taws xob
  2. Solenoid cov ntaub ntawv
  3. Baseball tuav caj npab

Kuv tau suav nrog STL cov ntaub ntawv rau txhua ntu uas kuv yuav tsum luam tawm. Thaum luam tawm caj npab, Kuv pom zoo kom koj siv tus nqi sau ntawm 25-50%. Qhov no yog kom ntseeg tau tias lub caj npab tsis tawg vim qhov kev nyuab siab nws raug thaum lub sijhawm tua.

Kauj Ruam 5: Cov Hlau nplaum thiab Reed Hloov

Hlau nplaum thiab Reed Hloov
Hlau nplaum thiab Reed Hloov

Ib qho tseem ceeb tshaj plaws ntawm kev tsim qauv yog txiav txim siab qhia yuav ua li cas qhia caj npab nyob qhov twg thaum lub sij hawm tua catapult. Muaj ob peb qhov kev xaiv sib txawv, Hall Effect sensors, reed keyboards, thiab accelerometers tsuas yog ob peb. Thaum xub thawj kuv tau npaj yuav siv Hall Effect sensors tab sis pom tias lawv tsis ua haujlwm tas li yog li kuv tau hloov mus rau reed keyboards. Yog tias koj xaiv siv tus lej reed, ib lo lus ntawm kev ceev faj, reed keyboards yuav tsum tau taw qhia kom lawv nyob ib puag ncig rau lub zog centrifugal. Txwv tsis pub nws muaj peev xwm hais tias cov hloov pauv reed yuav raug yuam qhib/kaw los ntawm kev sib tw ntawm caj npab.

Raws li koj tuaj yeem pom los ntawm daim duab, kuv tau siv plaub lub hlau nplaum thiab ob lub reed keyboards. Txhua tus hlau nplaum tau teeb tsa 90 degrees sib nrug. Qhov no, ua ke nrog 135 qib kev teeb tsa rau lub reed keyboards, tso cai 8 sensor nyeem ib lub kiv puag ncig. Nrog lub ntsuas hluav taws xob, ob qho tib si ntawm lub ntsuas cua yuav tsis hla cov hlau nplaum tib lub sijhawm uas tso cai rau peb zoo ib yam nkaus li kev siv tib lub reed hloov thiab 8 hlau nplaum. Hauv ob qho xwm txheej twg, txhua 45 degrees uas txhais caj npab tig Pi yuav tau txais ib qho mem tes nkaus xwb.

Txhua tus hlau nplaum tau muab tso rau hauv lub hauv paus txhawb nqa rau sab caj npab. Kuv siv 7/8 nti forstner ntsis thiab tho hauv li 6 hli kom haum cov hlau nplaum qhov siab uas kuv muaj ntawm tes. Tom qab ntawd kuv ntxiv me ntsis kub kua nplaum rau hauv lub qhov thiab nias cov hlau nplaum hauv qhov chaw. Txhua tus hlau nplaum yuav tsum tau yaug nrog cov hauv paus ntawm lub hauv paus.

Txog qhov hloov pauv reed, kuv xub txuas cov hloov pauv mus rau xov hlau uas tom qab ntawd kuv yuav txuas rau Pi's GPIO pins. Tom qab ntawd kuv tau drilled qhov rau reed hloov ntawm sab hauv qab ntawm caj npab pov. Lub qhov no yuav tsum muaj qhov me me kom npog tag nrho koj lub reed hloov. Tom qab ntawd kuv tau nqus lub qhov los ntawm caj npab ntawm qhov kawg ntawm lub qhov. Lub qhov no yog yuav ua li cas xaim thiab reed hloov tau xov los ntawm caj npab yog li nws yuav tsum loj txaus los lis ob qho tib si. Kuv mam li txuas cov xaim txuas mus rau reed hloov thiab ua kua nplaum hloov mus rau hauv lub qhov uas tau tsim rau nws. Txij li thaum kuv siv ntoo rau kuv txhais caj npab pov tseg, Kuv tau ntim qhov chaw nyob hauv lub qhov ntoo qhib qhov qhib nrog cov muab ntoo. Nov yog ib txoj hauv kev kom ntseeg tau tias lub reed hloov tau nyab xeeb thiab tsis tuaj yeem rub rau ntawm lub hauv paus.

Kauj Ruam 6: Xeem

Kev xeem yog txoj kev lom zem. Nws yog qhov uas koj mus rau qee qhov uas koj yuav tsis ua phem rau tib neeg lossis ua rau cov khoom puas thiab saib yog tias koj cov khoom ua haujlwm. Kuv vam tias kuv tau ua li ntawd. Ntawm peb thawj qhov kev sim muab caj npab tso lig dhau thiab kuv tau caij nkoj ntaus pob hla kuv lub tsheb, txog li 100 feet deb. Tom qab kho lub sijhawm tso tawm, peb tau sim dua. Lub sij hawm no ntaus pob ntaus kuv lub log tsheb thiab ntaus rov qab rau peb. Kuv tsiv kuv lub tsheb.

Tom qab ob peb zaug ntxiv peb tau txav mus rau qhov twg cov hlua tau txuas rau ntawm caj npab kom lub caj npab nres 90 degrees CCW los ntawm qhov ncaj. Qhov no tso cai rau peb tua cov duab zoo nkauj ncaj nraim rau ntawm lub kaum sab xis 45 degree. Zoo dua Thaum peb tau tso qhov kev hu xov tooj tuaj, peb hloov qhov hnyav thiab hloov kho pob khawm ob peb zaug kom tau txais peb cov txiaj ntsig zoo tshaj plaws.

Kauj Ruam 7: Kev Xav Thaum Kawg

Kuv xav ua tsaug rau txhua tus neeg uas tau pab rau xyoo no catapult. Steven Bob thiab Gus Menoudakis, kuv cov phooj ywg. Kuv tus poj niam, uas txhua xyoo nug yog vim li cas kuv yuav tsum tsim kev tsim qauv sib txawv rau ib qho catapult. Thiab Cantigny kom muaj kev sib tw hauv thawj qhov chaw. Nws yog qhov tawg thiab tiag tiag yuav tsum muaj cov neeg coob coob.

Ua tsaug rau koj lub sijhawm thiab qhia rau kuv paub yog tias koj muaj lus nug.

Pom zoo: