Cov txheej txheem:

Securibot: Me Me Survelliance Drone rau Kev Ruaj Ntseg Hauv Tsev: 7 Kauj Ruam (nrog Duab)
Securibot: Me Me Survelliance Drone rau Kev Ruaj Ntseg Hauv Tsev: 7 Kauj Ruam (nrog Duab)

Video: Securibot: Me Me Survelliance Drone rau Kev Ruaj Ntseg Hauv Tsev: 7 Kauj Ruam (nrog Duab)

Video: Securibot: Me Me Survelliance Drone rau Kev Ruaj Ntseg Hauv Tsev: 7 Kauj Ruam (nrog Duab)
Video: Технический разговор TUDev с профессором Борой Озкан - Финтех и будущее финансов 2024, Hlis ntuj nqeg
Anonim
Securibot: Me Me Survelliance Drone rau Kev Ruaj Ntseg Hauv Tsev
Securibot: Me Me Survelliance Drone rau Kev Ruaj Ntseg Hauv Tsev

Nws yog qhov tseeb yooj yim uas neeg hlau yog txaus. Cov neeg hlau ruaj ntseg, txawm li cas los xij, zoo li yuav kim dhau rau tus neeg nruab nrab kom them taus lossis tsis raug cai tsis raug cai; Cov tuam txhab ntiag tug thiab cov tub rog nyiam khaws cov cuab yeej zoo li no rau lawv tus kheej, thiab vim li cas thiaj zoo. Tab sis dab tsi yog tias koj xav kom muaj tus neeg hlau ruaj ntseg tus kheej?

Nkag mus rau Securibot: Me me txhua lub log tsav neeg hlau uas tuaj yeem saib xyuas ib puag ncig qhov chaw koj xav tau thiab tawm tswv yim cov ntaub ntawv nrog ntau yam ntawm cov ntsuas. Nws me me, muaj zog thiab pheej yig, thiab yuav xav tau tsuas yog kev nkag siab tsawg ntawm kev thaiv thiab cov phiaj xwm thiaj li tsim tau.

Kauj Ruam 1: Sau Cov Khoom

Cov ntaub ntawv hauv qab no yuav tsum tau ua. Cov no yog cov khoom uas yuav tsum tau yuav thiab siv rau cov khoom lag luam zaum kawg, thiab yog li ntawd nws yuav zoo kom muaj cov ntaub ntawv thaub qab ntxiv thaum muaj xwm txheej tshwm sim. Tsuas yog nyem rau ntawm ib feem kom qhib lub tab tshiab yog tias koj yuav tsum yuav nws!

POWER MANAGEMENT

  • 9-Volt Roj teeb 4-Pob x1
  • AA Roj Teeb 8-Pob x1
  • 4-Qhov AA Roj Teeb Nrog x1
  • Txiv neej/Txiv neej Jumper Xov x1
  • Txiv neej/Poj Niam Jumper Xov x1
  • Poj niam/Poj niam Jumper Xov x1
  • Mini Breadboard x1
  • 1 k Resistor x1
  • 2 k Resistor x1
  • Liab/Dub Fais Fab Cables x1
  • Rocker Hloov x2

HARDWARE THIAB SENSORS

  • Arduino Uno Rev3 x1
  • ESP8266 Wi-nkaus Module w/ NodeMCU x
  • HCSR04 Ultrasonic Sensor x1
  • PIR Tsab ntawv tsa suab Sensor x1
  • Tsav Tsheb x1

CHASSIS

Makerfire Robot Smart Car Kit x1

Cov ntaub ntawv ntxiv*

  • Cov Tub Rog Hlau thiab Cov Tub Rog
  • Hlau Strippers
  • Hlau Cutters
  • 8 "Acrylic xim
  • Laser Txiav
  • Daim Kab Xev Hluav Taws Xob
  • Zipties
  • Ntsia Hlau Me Me & Ceev

*Cov ntaub ntawv no tsis xav tau, tab sis yeej ntxiv ib txheej ntxiv ntawm kev koom tes thiab kev tiv thaiv. Yog xaiv tau, lawv tuaj yeem pom ntau dua hauv cov khw muag khoom kho vajtse, thiab cov tshuab txiav laser yog qhov kev txiav txim siab ntau dua rau kev yuav ntau dua li tsuas yog qiv ib lossis muaj cov khoom xa tuaj.

Kauj ruam 2: Programming thiab Npaj

Programming thiab Npaj
Programming thiab Npaj

Securibot yog lub cuab yeej nyuaj dua ntawm kev thaiv thiab cov phiaj xwm uas yuav zoo li txaus ntshai thaum xub thawj, tab sis yog tias ua tiav hauv cov kauj ruam me me tuaj yeem ua tau yooj yim dua. Hauv qab no yog daim duab uas qhia tag nrho cov phiaj xwm thaiv. Txawm hais tias qhov no nyob ntawm no tam sim no, nws yuav tsis zoo rau xaim txhua yam vim tias tag nrho cov txheej txheem no yuav txuas rau tus neeg hlau. Nov yog qhov yooj yim ntawm no kom nkag siab zoo txog yuav ua li cas lub cuab yeej tau teeb tsa ntawm daim ntawv.

Txhawm rau tsim cov neeg hlau, peb yuav siv ob hom lus sib txawv: Python thiab C/C ++. Ib qho ntxiv, nws yog ib qho tseem ceeb kom nkag siab tias qhov no ua tau zoo tshaj plaws thaum ua haujlwm ntawm MacOS.

Ua ntej peb pib, lub cev txuas NodeMCU rau Pawg Tsav Xwm. Koj tuaj yeem ua qhov no los ntawm kev sib sau me me squiggle hauv qab nrog txhua lwm yam. Tsis txhob muab nws rov qab los yog nws yuav FRY!

Thaum koj tau txuas NodeMCU + Motorboard rau lub khoos phis tawj, qhib lub davhlau ya nyob twg, thiab pib sau cov kab no, tsis quav ntsej ntaus yam tom qab #.

ls /dev/tty.* #Finds qhov chaw nres nkoj NodeMCU tab tom mloog.

screen ls/dev/tty. 115200

#tom qab qhov no, ntaus nkag mus kom txog thaum koj pom >>>, tom qab ntawv ntaus cov hauv qab no:

ntshuam network

sta = network. WLAN (network. STA_IF)

ap = network. WLAN (network. AP_IF)

ap.active (Tseeb)

sta.active (Cuav)

Yog tias koj tau teeb tsa qhov no kom raug, tam sim no koj yuav tsum pom kev sib txuas rau MicroPython-xxxxxx (cov lej yuav txawv raws li ESP8266 siv) hauv koj li Wi-nkaus. Txuas rau nws, tus password rau nws yog micropythoN (raws nraim li tau sau)

Tam sim no, mus rau https://micropython.org/webrepl/ thiab nias "Txuas". Tsis txhob hloov tus IP. Qhov pib uas tau muab yog qhov xav tau. Koj yuav tsum tau hais kom nkag mus rau tus lej nkag; Tsuas nkag tus password.

Tom qab ntawd, peb yuav tsum tau txais txhua txoj cai siv hauv kev tswj hwm tus neeg hlau lub cav. Hauv no github chaw cia khoom, rub tawm crimsonbot.py. Koj tuaj yeem rub tawm lwm yam rau yav tom ntej yog tias xav tau. Tam sim no peb tuaj yeem pib ua haujlwm, tab sis ua li ntawd yuav nyuaj heev, yog li peb tau ua lwm qhov chaw cia khoom hloov chaw nyob ntawm no. Lob demo.py thiab muab tso rau hauv tib qhov chaw xws li crimsonbot.py.

Rov qab mus rau hauv webrepl thiab txuas dua. Nias "Txuas" thiab nkag mus nrog tus password dua. Ntawm sab xis, nyem "Xaiv Cov Ntaub Ntawv" thiab nrhiav qhov twg koj tso demo.py. Tom qab xaiv demo.py, xa nws los ntawm nias "Xa mus rau ntaus ntawv". Yog tias koj ua nws raug, koj yuav tsum muaj peev xwm ntaus ntshuam demo thiab tsis tau txais qhov yuam kev. Nrog koj zoo siab, koj muaj txhua lub software teeb tsa rau kev tswj hwm. Tam sim no nws yog lub sijhawm los dhos qhov no rau hauv tus neeg hlau nws tus kheej.

Kauj Ruam 3: Tsim Lub Hauv Paus

Tam sim no peb tau teeb tsa thawj feem ntawm software, peb tuaj yeem ua haujlwm ntawm kho vajtse. Qhib lub pob rau tus neeg hlau Makerfire chassis thiab sib sau ua ke raws li qhia hauv phau ntawv qhia suav nrog. Nws yuav tsum tau sau tseg tias cov xov hlau tsis tuaj yeem siv tau, yog li ceev faj ib txwm thaum ua haujlwm nrog ib qho. Thaum koj tau sib sau ua ke tag nrho cov neeg hlau raws li phau ntawv qhia tau muab, peb yeej tsis tas yuav muaj lub hauv paus rau tam sim no, yog li koj tuaj yeem tso tus pab rau tam sim no.

Ua qhov siab tshaj plaws, tam sim no peb tuaj yeem txuas qee yam. Lob cov nplaum ntawm qhov koj xaiv thiab tso Cov Tsav Tsheb thiab ob lub roj teeb 9V nyob rau sab xub ntiag ntawm ntu xiav ntawm lub rooj tsavxwm. Nws mus yam tsis tau hais, tab sis koj tuaj yeem tshem tawm Pawg Tsav Tsheb kom ua qhov no.

Siv cov xaim hluav taws xob txuas lossis cov kais dej txuas, txuas ob lub roj teeb 9V ua ke, muab ib puag ncig 18V ntawm lub zog. Tam sim no siv ib kawg ntawm qhov ntawd thiab txuas nws mus rau qhov hloov chaw rocker. Tam sim no koj yuav tsum muaj qhov tsis zoo/positve kawg txuas rau tus rocker thiab ib qho txuas rau ib kawg. Nrog cov hlua hluav taws xob tshem tawm me ntsis ntawm cov hluav taws xob liab/dub los qhia qee yam tooj liab. Tam sim no koj tuaj yeem muab lawv tso rau hauv Motorboard ntawm ntu xiav los ntawm kev lo rau lawv. Siv lub Phillips ntswj ntswj me me los tsa thiab qis kom lawv nyob nyab xeeb. Cov hlau liab yuav txuas rau lub qhov hluav taws xob hu ua VIN thiab hauv av yuav txuas rau lub qhov hluav taws xob hu ua GND.

Tam sim no yog qhov nyuaj ntawm txoj kab. Tej zaum nws yog qhov nyuaj tshaj plaws txij li nws yog qhov nyuaj heev. Siv qhov kawg ntawm lub cav, txuas nws raws li hauv qab no:

Ob txoj hlua dub ntawm sab laug mus rau qhov hluav taws xob A-

Ob txoj kab liab liab ntawm sab laug mus rau qhov hluav taws xob A+

Ob txoj hlua dub ntawm sab xis mus rau qhov hluav taws xob B-

Ob txoj kab liab liab ntawm sab xis mus rau qhov hluav taws xob B+

Daim kab xev hluav taws xob thiab zipties yuav los tau yooj yim heev txhawm rau khaws cov khub ntawm cov xov hlau ua ke. Tam sim no uas tau sib sau ua ke, peb tuaj yeem sim yog tias lub cav ua haujlwm tau zoo.

Nkag mus thiab ua raws txhua ntu hauv Kauj Ruam 1 los ntawm kev pib webrepl rau thauj khoom demo.py. Tom qab koj tau ntaus hauv qhov demo ntshuam, ntaus ib qho ntawm cov lus txib hauv qab no:

demo.demo_fb () #Make tus neeg hlau mus tom ntej thiab thim rov qab.

demo.demo_rot () #Ua rau cov neeg hlau tig.

Cov no yuav ntsuas seb koj puas tuaj yeem txav mus tom ntej thiab tig rov qab. Yog tias lawv ob leeg ua haujlwm raws li lub hom phiaj, tshaj li zoo heev! Yog tias tsis yog, tom qab ntawv txheeb xyuas koj cov thaiv thiab xyuas kom koj lub roj teeb tau them tas. Txuas nrog qhov no yog cov vis dis aus me me ntawm qhov demo_fb () program thiab yuav ua li cas nws khiav lub log ua piv txwv. Daim ntawv ceeb toom tias cov no tsis muaj zog tag nrho, yog li peb yuav tsum xyuas kom siv lub multimeter seb lub zog puas txaus rau plaub lub cav.

Kauj Ruam 4: Xim Xim Qhov Zoo

Tam sim no peb tau tsim los tias peb tus bot tuaj yeem txav mus los, nws yog lub sijhawm kawg kom pib siv lub tshuab zoo.

Ntau npaum li cas tus neeg saib xyuas tau ua lub luag haujlwm saib xyuas thaj chaw ib ntus, tus neeg hlau tau teeb tsa txoj haujlwm siv tus lej hauv demo.py txhawm rau saib xyuas ib cheeb tsam los ntawm kev ua kab dub. Tus neeg sib tw zoo tshaj plaws rau kab no yog kab xev hluav taws xob dub.

Siv peb tus poj niam/poj niam jumper xov hlau, txuas rau tus pin hauv qab no ntawm ib qho ntawm cov xim xim: VCC (lub zog), GND (hauv av) thiab DAT (cov ntaub ntawv). Txuas lwm qhov kawg siv kuj yog tus pin ntawm kab 2-8 ntawm Pawg Tsav Xwm rau kev sib txuas hauv qab no:

VCC => V

GND => G

DAB => D

Nco ntsoov tias tag nrho cov no yuav tsum yog nyob hauv kab ua haujlwm. Cov kab ntawv tau sau rau sab ntawm Pawg Tsav Xwm. Rov ua dua qhov no ob zaug rau lub ntsuas thib ob, thiab teeb tsa lawv nyob rau hauv pem hauv ntej nrog qee qhov kev tsis txaus siab lossis txhua yam uas koj nyiam. Nco ntsoov tias cov xim xim yuav tsum nyob ze rau hauv av. Yog tias lawv tsis nyob ze txaus, lawv yuav tsis ua haujlwm zoo. Nco ntsoov tseem ua kom lawv sib npaug ntawm ob sab rau qhov xav tau.

Rov qab mus rau hauv webrepl, xa demo.py thiab ntshuam nws ib zaug ntxiv. Tom qab ntawd, tso nws rau ntawm qhov tsis yog xim dub thiab daim ntawv qhia kab ntawm kab hluav taws xob dub kab xev ib 'meter' lossis ob. Muab tus neeg hlau tso nrog txoj kab nruab nrab ntawm ob lub ntsuas cua. Ntaus cov lus txib hauv qab no tom qab lub zog:

demo.setup ()

demo.loop ()

Tam sim no Securibot yuav tsum ua raws kab thiab kho nws tus kheej thaum lub xim xim raug tsoo. Txoj cai ua haujlwm los ntawm kev tshuaj xyuas tus nqi yog dab tsi, lub ntsiab lus tsis yog xim dub, thiab thaum tus nqi ntawd nkag siab sib txawv, nws kho nws tus kheej. Nco tseg tias txij li txoj haujlwm tau ua haujlwm tsis muaj hnub kawg, tsuas yog txoj hauv kev los txwv tus neeg hlau yog kom tshem nws tawm. Xeem txoj hauv kev no ob peb zaug, thiab yog tias koj txaus siab tiag tiag, sim ua qee qhov nkhaus thiab tig.

Kauj Ruam 5: Tawm Suab

Suab Tawm
Suab Tawm

Daim duab saum toj no qhia tias yuav teeb tsa lub ntsuas ultrasonic li cas. Lub ntsuas hluav taws xob ua haujlwm los ntawm kev xa cov suab paj nruag ultrasonic ntawm lub suab, siab dua li ib tus tib neeg tuaj yeem hnov, thiab suav sijhawm ntev npaum li cas nws thiaj xav rov qab los. Nov yog qhov uas cov txiv neej/poj niam tab yuav ci nrog rau 1k thiab 2k resistors.

Txij ntawm no mus, vaj tsev yuav nyuaj rau kev tswj hwm, yog li tam sim no yuav yog lub sijhawm zoo los txuas lub tsheb sab saum toj. Txawm li cas los xij, nco ntsoov tias qhov grey TRIG xaim thiab dawb ECHO xaim yuav tsum txuas rau ob qhov sib cais D pins ntawm Lub Rooj Tsav Xwm Tsav Tsheb hauv qab, yog li nyiag lawv thiab txuas rau lawv. Yog tias koj yuav lub khob cij nrog rau hauv cov khoom siv, tom qab ntawd nws yuav muaj cov nplaum hauv qab uas tuaj yeem siv tau los ntawm tsuas yog tev daim ntawv tam sim ntawd. Muab qhov ntawd tso rau ntawm lub tsheb, thiab tom qab ntawd txuas lub roj teeb uas siv cov nplaum uas koj xav tau nyob tom qab ntawm lub tsheb.

Nws yuav tsum tau sau tseg tias cov xov tooj tooj liab uas tuaj nrog AA roj teeb pob tsis muaj poj niam xaus, yog li koj yuav tsum tau hle lub xaim tam sim ntawd ua ntej tso lawv rau hauv lub khob cij.

Cov cai rau lub ntsuas hluav taws xob ultrasonic yog qhov nyuaj me ntsis tab sis tseem tuaj yeem nkag tau los ntawm no github repo dua. Rub tawm HCSR04.py thiab motion_control.py thiab muaj lawv nyob hauv tib qhov chaw. Nrog rau cov no, koj tuaj yeem txheeb xyuas qhov deb ntawm lub sensor yog los ntawm txhua yam khoom. Qhov ntau ntawm ultrasonic yog nyob ib ncig ntawm ob txog peb metres.

Kauj Ruam 6: Kub Kos Npe

Kub Kos Npe
Kub Kos Npe

Tam sim no peb muaj lwm qhov sib dhos ua ke, peb tuaj yeem tsom mus rau siv Arduino Uno nrog Passive Infrared Sensor (PIR) txhawm rau txheeb xyuas cov cua sov.

Ua ntej tshaj plaws, nco ntsoov rub tawm IDE kawg rau Arduino. Txuas cov kab uas xav tau los ntawm koj lub USB qhov hluav taws xob mus rau Uno. Tej zaum koj yuav raug hais kom lees paub kev nyab xeeb rau qhov no, hais "Yog" rau txhua tus. Nco ntsoov tias nws lees paub qhov no los ntawm kev tshuaj xyuas hauv Cov Cuab Yeej> Pawg Thawj Coj> Arduino/Genuino Uno thiab Cov Cuab Yeej> Chaw Nres> dev/cu. Bluetooth-Tuaj-Port. Thaum cov ntawd tau nce mus, mus rau Cov Cuab Yeej> Tau Txais Cov Ntaub Ntawv Cov Ntaub Ntawv thiab pom tias cov ntaub ntawv hauv pawg thawj coj saib tuaj.

Tam sim no peb tuaj yeem siv cov cai rov qab rau qhov qub qub github repo txhawm rau txhawm rau txheeb xyuas cov cua sov. Rub tawm.ino cov ntaub ntawv hauv qhov chaw cia khoom thiab qhib nws nrog Arduino IDE. Nyem "Txheeb Xyuas" txhawm rau sau cov cai thiab thawb nws mus rau Uno siv lub pob nyob ib sab ntawm nws.

Tam sim no peb yuav tsum siv lub cev xaim Arduino Uno. Ua raws daim duab saum toj no kom ua tau li ntawd, thiab thaum txuas PIR rau lub tsheb, siv qee cov kua nplaum super los txuas nws rau saum lub sensor ultrasonic. Ib qho nplaum yuav tsum txuas ntxiv 9V, hloov thiab Uno.

Kauj Ruam 7: Tuaj Ua Ke

Tam sim no txhua yam nyob hauv qhov chaw, ntsaws tag nrho cov cai rau hauv cov laug cam. Thaum ua tiav thiab koj tau ua tiav demo.loop (), tus neeg hlau yuav tuaj yeem ua raws cov kab dub thiab cov ntsuas yuav tsum nqa cov ntaub ntawv ntawm lawv lub qhov rooj qhov rai. Nrog koj zoo siab, tam sim no koj muaj koj tus kheej tus kheej Securibot!

Nyob rau hauv cov ntaub ntawv koj xav kawm logistics ntawm tus neeg hlau, tom qab ntawv ntu no yog cov ntaub ntawv ntxiv ntawm yuav ua li cas software ua haujlwm. Qhov tseem ceeb, tus neeg hlau yuav txuas ntxiv ua raws kab hauv lub voj thiab lub ntsuas hluav taws xob ultrasonic thiab passive yuav pom qhov deb thiab kev txav ntawm cov khoom ncaj qha pem hauv ntej ntawm lub tsheb.

Yog tias koj xav ntxiv cov txheej txheem ntxiv rau nws, ntawm no yog cov peev txheej ntxiv uas koj yuav siv tau txhawm rau ua kom lub tsheb muaj software lossis kho vajtse zoo dua. Txij li Securibot yog qhov yooj yim me ntsis, nws ua haujlwm ua lub platform rau koj hloov kho rau koj lub siab cov ntsiab lus. Tsim laser txiav cov cuab yeej tiv thaiv, cov phiaj xwm nrhiav kom tau zoo ntxiv, ntxiv rau kom ua rau koj tus kheej cov neeg hlau sib ntaus; Lub peev xwm tsis muaj qhov txwv nrog qhov koj tuaj yeem ua nrog Securibot!

Yog tias koj xav ntxiv cov cuab yeej acrylic ntau los ua kom lub chassis zoo dua qub, peb twb tau ua rau lawv ntawm github chaw cia khoom raws li.pdfs uas tuaj yeem thauj mus rau lub tshuab txiav laser. Cov ntaub ntawv yog armor-side.pdf, pem hauv ntej-rov qab-daim hlau-tsau.pdf, thiab pob khawm-kho.pdf. Yog xav paub ntau ntxiv txog yuav ua li cas txiav laser, mus rau https://www.troteclaser.com/en/knowledge/do-it-yourself-samples/ kom paub ntau qhov kev txiav cov phiaj xwm.

Pom zoo: