Cov txheej txheem:
- Kauj Ruam 1: Daim Kab Xaim
- Kauj Ruam 2: Daim Ntawv Teev Npe
- Kauj ruam 3: Txoj kev xav
- Kauj Ruam 4: Kev tsim kho
- Kauj Ruam 5: Txhim Kho Software
- Kauj Ruam 6: Xeem
- Kauj Ruam 7: Zaub
Video: Dual Sensor Echo Locator: 7 Cov Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Cov lus qhia no piav qhia yuav ua li cas txhawm rau txheeb xyuas qhov chaw ntawm cov khoom siv Arduino, ob lub ntsuas hluav taws xob ultrasonic, thiab Heron tus qauv rau cov voos peb sab. Tsis muaj qhov txav chaw.
Heron tus qauv tso cai rau koj suav thaj tsam ntawm ib daim duab peb sab uas txhua sab tau paub. Thaum koj paub thaj tsam ntawm daim duab peb sab, tom qab ntawd koj tuaj yeem suav qhov haujlwm ntawm ib yam khoom (txheeb ze rau lub hauv paus paub) siv trigonometry thiab Pythagoras.
Qhov tseeb yog zoo heev. Cov chaw kuaj pom loj tuaj yeem siv tau ntau zaus muaj HC-SR04, lossis HY-SRF05, cov ntsuas ultrasonic.
Kev tsim kho yog yooj yim… txhua yam koj xav tau yog rab riam ntse, ob qho kev xyaum ua, ib rab hlau, thiab ntoo pom.
Duab
- Cov vis dis aus qhia txog chav ua haujlwm.
- Daim duab 1 qhia txog kev sib sau ua ke "echo locator"
- Duab 2 qhia pom ib txwm pom. Cov khoom yog qhov liab (flashing) teev.
- Daim duab 3 qhia txog teeb tsa kev sim video. Nws yog qhov tsim nyog los teeb tsa ob lub HY-SRF05 ultrasonic sensors 50cm hauv qab lub hauv paus kom ua tiav "teeb" thaj chaw kuaj pom nrog lub suab.
Kauj Ruam 1: Daim Kab Xaim
Daim duab 1 qhia txog daim duab kab xev rau “dual sensor echo locator”.
Sensor B tau ua "passive" los ntawm kev tso ob peb txheej ntawm daim kab xev npog hla tus xa (T) tus hloov pauv. Daim kab xev no thaiv lub suab ultrasonic uas yuav txwv tsis pub tso tawm.
Kauj Ruam 2: Daim Ntawv Teev Npe
Raws li qhia hauv daim duab 1, yuav tsum muaj ob peb ntu kom ua tiav txoj haujlwm no:
Cov hauv qab no tau txais los ntawm
- 1 tsuas yog Arduino Uno R3 ua tiav nrog USB cable
- 2 tsuas yog HY-SRF05, lossis HC-SR04, ultrasonic transducers
Cov hauv qab no tau txais hauv zos:
- 1 tsuas yog txiv neej arduino header strip
- 2 tsuas yog poj niam arduino header strips
- 2 tsuas yog cov seem ntawm txhuas
- 2 tsuas yog ntoo me me xwb
- 2 tsuas yog cov ntsia hlau me me
- 3 tsuas yog cov hlua txuas
- 4 tsuas yog qhov ntev yas yas coated hlau (ntau yam xim) [1]
Nco tseg
[1]
Tag nrho qhov ntev ntawm txhua cov hlau yuav tsum sib npaug qhov xav tau ntawm nruab nrab ntawm cov ntsuas hluav taws xob ntxiv rau qhov me me rau cov laug. Cov xov hlau tom qab ntawd sib txuas ua ke los ua ib qho cable.
Kauj ruam 3: Txoj kev xav
Nqaj Qauv
Daim duab 1 qhia txog cov qauv nqaj sib tshooj rau transducer A thiab transducer B.
Sensor A yuav tau txais ncha los ntawm ib yam khoom hauv "thaj chaw liab".
Sensor B tsuas yuav tau txais lub ncha yog tias cov khoom nyob hauv "thaj chaw mauve". Sab nraum thaj chaw no nws tsis tuaj yeem txiav txim siab ua haujlwm ntawm ib yam khoom. [1]
Loj "mauve" qhov chaw kuaj pom muaj peev xwm ua tau yog cov ntsuas pom dav dav.
Xauv
Nrog rau daim duab 2:
Thaj tsam ntawm ib daim duab peb sab twg tuaj yeem suav los ntawm cov mis:
luas = base*height/2 ………………………………………………………………………………. (1)
Rearranging equation (1) muab rau peb qhov siab (Y-koom tes):
qhov siab = thaj tsam*2/puag ………………………………………………………………………………. (2)
Txog tam sim no zoo heev … tab sis peb yuav suav thaj tsam li cas?
Cov lus teb yog rau qhov chaw ob lub transducers ultrasonic paub nrug deb sib nrug (hauv paus) thiab ntsuas qhov nrug txhua qhov ntsuas yog los ntawm qhov khoom siv ultrasound.
Duab 2 qhia txog qhov no ua tau li cas.
Transducer A xa cov mem tes uas tawm ntawm cov khoom hauv txhua qhov kev qhia. Qhov mem tes no tau hnov los ntawm ob qho kev hloov pauv A thiab transducer B. Tsis muaj mem tes xa los ntawm transducer B… nws tsuas yog mloog.
Txoj kev rov qab los rau transducer A yog pom liab. Thaum faib los ntawm ob thiab qhov nrawm ntawm lub suab yog qhov sib txawv, peb tuaj yeem suav nrug "d1" los ntawm cov qauv: [2]
d1 (cm) = sijhawm (microseconds)/59 ……………………………………………… (3)
Txoj hauv kev rau transducer B tau qhia hauv xiav. Yog tias peb rho nrug deb "d1" los ntawm txoj kev ntev no peb tau txais nrug "d2". Cov mis rau laij “d2” yog: [3]
d2 (cm) = sijhawm (microseconds/29.5 - d1 …………………………………….. (4)
Peb tam sim no muaj qhov ntev ntawm peb sab ntawm daim duab peb sab ABC… nkag mus rau “Heron”
Heron tus qauv
Heron tus qauv siv qee yam hu ua "ib nrab ib puag ncig" uas koj ntxiv txhua ntawm peb sab ntawm daim duab peb sab thiab faib qhov txiaj ntsig los ntawm ob:
s = (a+b+c)/2 ……………………………………………………………………………………………………. (5)
Tam sim no thaj tsam no tuaj yeem suav nrog siv cov qauv hauv qab no:
luas = sqrt (s*(s-a)*(s-b)*(s-c)) ……………………………………………………. (6)
Thaum peb paub thaj chaw peb tuaj yeem suav qhov siab (Y-kev sib koom tes) los ntawm qhov sib npaug (2) saum toj no.
Pythagoras
Tam sim no X-kev sib koom tes tam sim no tuaj yeem suav los ntawm kev xa ib txoj kab ncaj nraim los ntawm daim duab peb sab mus rau lub hauv paus kom tsim tau ib lub kaum sab xis. Tam sim no X-koom tes tam sim no suav nrog siv Pythagoras:
c1 = sqrt (b2 - h2) ……………………………………………………………………………….. (7)
Sau ntawv
[1]
Cov phiaj xwm hauv cheeb tsam tuaj yeem ua tiav "teeb pom kev zoo" nrog lub suab los ntawm kev tso lub ntsuas hluav taws xob hauv qab lub hauv paus.
[2]
Tus nqi ntawm 59 rau qhov tsis tu ncua tau muab raws li hauv qab no:
Qhov nrawm ntawm lub suab yog kwv yees li 340m/S uas yog 0.034cm/uS (centimeters/microsceond).
Qhov sib txig sib luag ntawm 0.034cm/uS yog 29.412uS/cm uas, thaum sib tw los ntawm 2 kom tso cai rau txoj kev rov qab los, sib npaug 58.824 lossis 59 thaum sib npaug.
Tus nqi no tuaj yeem hloov kho nce/nqis kom suav nrog huab cua kub, av noo, thiab siab.
[3]
Tus nqi ntawm 29.5 rau qhov tas li yog muab los raws li hauv qab no:
Tsis muaj txoj hauv kev rov qab yog li peb siv 29.5 uas yog ib nrab tus nqi siv hauv [2] saum toj no.
Kauj Ruam 4: Kev tsim kho
Mounting nkhaus
Ob txoj hlua txuas tau tsim los ntawm 20 daim ntawv txhuas daim ntawv siv txoj hauv kev piav qhia hauv kuv cov lus qhia
Qhov ntev rau kuv cov kab zauv tau qhia hauv daim duab 1.
Ob lub qhov cim "hauv paus" yog txhawm rau txuas ib txoj hlua rau txhua qhov ntsuas. Tsuas yog khi txoj hlua ntawm qhov xav tau sib nrug kom yooj yim teeb tsa.
Sensor qhov (socket)
Cov ntsuas qhov ntsuas (daim duab 2) tau ua qauv los ntawm tus qauv Arduino lub taub hau ntsaws.
Txhua tus pins uas tsis xav tau tau rub tawm thiab 3mm qhov drilled los ntawm cov yas.
Thaum siv cov khoom sib txuas ua tib zoo saib xyuas kom tsis txhob xaim xov rau aluminium bracket.
Nyuaj nyem
Ib qho me me ntawm cov cua sov-ntsws tubing ntawm txhua qhov kawg ntawm txoj hlua tiv thaiv cov xov hlau los ntawm kev tawg.
Cov hlua txuas tau siv los tiv thaiv kev tsis xav tau cable txav.
Kauj Ruam 5: Txhim Kho Software
Txhim kho cov cai hauv qab no hauv qhov kev txiav txim no:
Arduino IDE Cov
Rub tawm thiab teeb tsa Arduino IDE (kev txhim kho ib puag ncig ib puag ncig) los ntawm https://www.arduino.cc/en/main/software yog tias tsis tau teeb tsa.
Ua 3
Rub tawm thiab teeb tsa Kev Ua 3 los ntawm
Arduino Sketch
Luam cov ntsiab lus ntawm cov ntawv txuas, "dual_sensor _echo_locator.ino", rau hauv Arduino "kos duab", txuag, tom qab ntawd xa nws mus rau koj Arduino Uno R3.
Kaw Ardino IDE tab sis tawm ntawm USB cable txuas.
Ua Sketch
Luam cov ntsiab lus ntawm cov ntawv txuas, "dual_sensor_echo_locator.pde" rau hauv Kev Ua "Sketch".
Tam sim no nyem rau sab laug-laug "Khiav" khawm … lub vijtsam duab yuav tsum tshwm ntawm koj lub vijtsam.
Kauj Ruam 6: Xeem
Txuas Arduino USB cable rau koj lub PC
Khiav “dual_sensor_echo_locator.pde” los ntawm txhaj rau “sab saum toj-sab laug” khiav khawm ntawm koj Kev Ua 3 IDE (ib puag ncig kev txhim kho ib puag ncig).
Cov lej, sib cais los ntawm tus lej yuav tsum pib ntws hauv koj lub vijtsam raws li qhia hauv daim duab 1.
Cov lus yuam kev thaum pib
Koj tuaj yeem tau txais cov lus yuam kev thaum pib.
Yog li hloov pauv [0] hauv kab 88 ntawm daim duab 1 kom phim tus lej cuam tshuam nrog koj "COM" chaw nres nkoj.
Ntau qhov "COM" cov chaw nres nkoj tuaj yeem teev nyob ntawm koj lub kaw lus. Ib tus lej yuav ua haujlwm.
Hauv daim duab 1 tus lej [0] cuam tshuam nrog kuv "COM4".
Tso koj cov sensors
Qhov chaw koj lub ntsuas cua nrug 100cm sib nrug nrog cov khoom 100cm nyob rau hauv ntej.
Tig ob lub ntsuas kom maj mam tig mus rau kab pheeb ces kaum ntawm qhov xav tau 1 meter square.
Thaum koj tig lub ntsuas cua, koj yuav pom txoj haujlwm uas lub teeb liab liab tshwm ntawm daim duab duab.
Cov ntaub ntawv ntxiv tseem yuav tshwm sim (daim duab 2) thaum cov ntsuas tau nyob ntawm koj lub hom phiaj:
- nrug 1
- nrug 2
- lub hauv paus
- offset
- ib nrab puag ncig
- thaj tsam
- X koom tes
- Y koom tes
Kauj Ruam 7: Zaub
Cov zaub tau sau sau siv Kev Ua 3… ib 100cm lub hauv paus tau qhia.
Hloov lub hauv paus
Cia peb hloov peb lub hauv paus ntawm 100cm txog 200cm:
Hloov "float Baseline = 100;" hauv Kev Ua Haujlwm header kom nyeem "float Baseline = 200;"
Hloov cov ntawv "50" thiab "100" hauv Kev Ua "kos_grid ()" niaj zaus nyeem "100" thiab "200".
Hloov qhov offset
Cov cheeb tsam loj dua yuav raug saib xyuas yog tias peb tso cov ntsuas hauv qab lub hauv paus.
Qhov sib txawv "Offset" hauv Kev Ua Lub Taub Hau yuav tsum raug hloov yog tias koj xaiv ua qhov no.
Nyem qhov no mus saib kuv lwm cov ntawv qhia.
Pom zoo:
IoT Dual Kub Cov Ntaub Ntawv Kub: 12 Cov Kauj Ruam (nrog Duab)
IoT Dual Kub Cov Ntaub Ntawv Kub: Qhov no yog kuv thawj zaug sau ntawv Qhia thiab yog li thov mus yooj yim rau kuv! Yog tias koj xav tias qhov no tsis phem heev, thov thov pov npav rau kuv hauv Thawj Thawj Tus Kws Sib Tw Qhov no yog kuv qhov Kev Xauv-Hauv qhov project txhawm rau saib xyuas 2 qhov kub thiab txias hauv lub tsev cog khoom
Cov Duab Duab Duab thiab Cov Duab 1: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Cubes thiab Cov Duab 1: Thaum sim nrog qee cov ntoo ntoo thiab cov duab los qhia, kuv pom ob peb txoj hauv kev los ua cov voos thiab lwm yam duab los ntawm cov khoom siv yooj yim. Los ntawm kev muab cov no los ua Cov Ntawv Qhia, Kuv vam tias yuav txhawb nqa kev ua si thiab kev kawm. Kev hloov pauv ntawm qhov kev qhia no
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: Nov yog txoj hauv kev yooj yim heev thiab tus nqi qis mus rau cov duab thav duab digital - nrog qhov zoo ntawm kev ntxiv /tshem cov duab hla WiFi ntawm 'nyem thiab luag' siv (pub dawb) xa cov ntaub ntawv . Nws tuaj yeem siv tau los ntawm qhov me me £ 4.50 Pi Zero. Koj tseem tuaj yeem hloov pauv
Tsim kom muaj Dual 15V Cov Khoom Siv Hluav Taws Xob Siv Tawm Cov Txee Modules rau Hauv $ 50: 10 Cov Kauj Ruam (nrog Duab)
Tsim kom muaj Dual 15V Lub Hwj Huam Siv Tawm Tawm Cov Qauv Qauv rau Hauv $ 50: Taw Qhia: Yog tias koj yog tus nyiam ua haujlwm uas cuam tshuam nrog suab, koj yuav paub nrog cov khoom siv hluav taws xob ob tog. Feem ntau cov hwj huam suab qis xws li pre-amps xav tau qhov twg los ntawm +/- 5V txog +/- 15V. Muaj lub zog siv hluav taws xob ob zaug ua rau nws tsuas yog
Rov Qab Siv Cov Duab Duab Nrog Virtual Asistent: 7 Cov Kauj Ruam (nrog Duab)
Rov Qab Siv Cov Duab Duab Nrog Virtual Asistent: Nyob zoo txhua tus! Cov lus qhia no tau yug los ntawm lub laptop faib ua ib nrab, yuav los ntawm ib tus phooj ywg. Thawj qhov kev sim ntawm txoj haujlwm no yog kuv Lego Digital Photo Frame, txawm li cas los xij, yog ib tus neeg mob siab rau Siri thiab Google Tam sim no, Kuv txiav txim siab coj nws mus rau qhov tshiab