Cov txheej txheem:
- Kauj Ruam 1: Cov Npe Khoom
- Kauj Ruam 2: Yuav Ua Li Cas Txuas thiab Ua Haujlwm Node01 thiab Node02 (Cov Chaw Qhev)
- Kauj Ruam 3: Yuav Ua Li Cas Txuas thiab Program Node00 (Master Station)
- Kauj Ruam 4: WifiWebServer (NodeMCU hauv Master Station)
- Kauj ruam 5: Los ntawm Pib …
Video: Sensor Stations Network rau Teeb Pom Kev Zoo thiab Kev Ruaj Ntseg: 5 Cov Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Nrog lub ntsuas hluav taws xob no lub network teeb tsa hauv tus tswv/qhev hom, koj yuav tuaj yeem ua teeb pom kev zoo thiab tswj kev nyab xeeb hauv koj lub tsev. Cov chaw nres tsheb sensor (Node01, Node02 hauv qhov haujlwm no) txuas nrog lub chaw nres tsheb loj (Node00) txuas nrog koj lub network wifi hauv zos. Kuv tau teeb tsa Node01 hauv kuv chav khaws khoom thiab Node02 hauv kuv lub nkas -las tswj teeb thiab ua haujlwm. Tus tswv chaw nres tsheb tau teeb tsa hauv peb chav dinig txuas nrog peb lub router wifi. Kuv tau teeb tsa lub tswb nyob hauv qhov chaw nres tsheb thiab lub suab nrov me me hauv tus tswv chaw nres tsheb kom nrov thaum lub suab pom los ntawm qee qhov chaw nres tsheb sensor hauv lub network.
Cov yam ntxwv tseem ceeb ntawm lub network yog:
- Nws muaj peev xwm teeb tsa lub network nrog ntau dua ob lub chaw nres tsheb sensor (chaw qhev) (Node01, Node02, Node03, ….)
- Vim hais tias kev siv wireless transceivers nrog kav hlau txais xov, lub network muaj peev xwm npog thaj tsam dav
- Koj tuaj yeem tswj hwm tag nrho lub network los ntawm lub xov tooj ntawm tes
- Xa email (Gmail account) thaum kuaj pom lub suab thiab lub tswb hom tau qhib. Yog li yog tias koj ua kom Gmail thawb cov ntawv ceeb toom hauv koj lub xov tooj ntawm tes koj yuav paub thaum pom kev txav chaw hauv koj lub network
rau lub hom phiaj domotic:
- Hloov ntawm lub teeb thaum pom lub suab txav / hloov ib txwm ntawm lub teeb (rau tag nrho cov network lossis rau txhua qhov chaw qhev)
- Hloov lub sijhawm hauv feeb feeb lub teeb tau qhib tom qab tau pom lub zog rau txhua qhov chaw qhev
rau kev ruaj ntseg lub hom phiaj:
- Pab thiab lov tes taw lub tswb hom
- Txhua qhov chaw nres tsheb qhev tuaj yeem xa lub teeb liab mus rau lub chaw nres tsheb tseem ceeb (Node00) thaum lub tswb hom tau qhib thiab pom lub suab
- Tus tswv chaw nres tsheb tuaj yeem qhib lub tswb thiab xa email thaum ib qho ntawm cov teeb liab no tau txais los ntawm ib qho chaw nres tsheb qhev thiab lub tswb hom tau qhib. Tus tswv chaw nres tsheb (Node00) txuas nrog internet siv kev sib txuas wifi los tswj tag nrho cov kab ke siv xov tooj ntawm tes. Nws tau teeb tsa zoo li WifiWebServer
Kauj Ruam 1: Cov Npe Khoom
Cov npe khoom siv uas kuv tau siv los tsim Node01 thiab Node02 (cov chaw qhev) yog cov hauv qab no:
- Mega 2560 R3 pawg thawj coj saib
- Kev txhawb nqa yas rau MEGA 2560 R3
- HC-SR501 PIR sensor
- Kev txhawb nqa yas rau HC-SR501
- 5V Kev Tshaj Tawm
- Wireless Transceiver Module 2.4G 1100m NRF24L01+PA+LNA nrog Kav hlau txais xov LKY67
- 8Pin NRF24L01 adapter (txhawm rau txhim kho cov yam ntxwv ntawm NRF24L01)
- HLK-PM01 AC DC 220V rau 5V Cov Khoom Siv Hluav Taws Xob
Cov npe khoom siv los tsim Node00 (tus tswv tsev) yog cov hauv qab no:
- Mega 2560 R3 pawg thawj coj saib
- Kev txhawb nqa yas rau MEGA 2560 R3
- WiFi module NodeMCU Lua Amica V2 ESP8266
- Wireless Transceiver Module 2.4G 1100m NRF24L01+PA+LNA nrog Kav hlau txais xov LKY67
- 5v-3.3v VCC adapter board rau NRF24L01 (txhawm rau txhim kho cov yam ntxwv ntawm NRF24L01)
- Adapter AC-DC, 9V, 1A (2, 1 mm x 5, 5mm)
Ntxiv mus kuv tau siv cov ntaub ntawv hauv qab no:
- 2 Pin 5 hli PCB txuas
- Jumper xov hlau
- Breadboard MB-102 (800 tus neeg hu)
- Mini Solderless Breadboard 170 hu
- Teeb ntawm leds thiab resistences
- PCB cov laug cam
- Tin Soldering Hlau Khoom
- Phom phom
- Pob tshab methacrylate
- Tswb
Kauj Ruam 2: Yuav Ua Li Cas Txuas thiab Ua Haujlwm Node01 thiab Node02 (Cov Chaw Qhev)
Txhawm rau tsim cov duab kos "SlaveSation.ino" Kuv xav tau RF24 lub tsev qiv ntawv thiab RF24 Network tsev qiv ntawv.
Hauv daim phiaj ntws saum toj no koj tuaj yeem pom lub logic ntawm lub chaw nres tsheb sensor thiab cov lus sib pauv ntawm tus qhev sensor chaw nres tsheb thiab tus tswv.
Ua ntej koj thauj cov duab kos koj yuav tsum teeb tsa qhov chaw nyob ntawm tus qhev nyob ntawm hom octal
const uint16_t this_node = 01; // Chaw nyob ntawm peb cov node nyob rau hauv hom octal (qhev): 01, 02, 03…
Lub ntsiab lus ntawm kev coj hauv txhua qhov chaw qhev yog cov hauv qab no:
- Xiav coj. Nws yuav nyob thaum PIR sensor tus pin siab.
- Ntsuab coj. Nws yuav nyob thaum lub tswb txuas nrog.
Kauj Ruam 3: Yuav Ua Li Cas Txuas thiab Program Node00 (Master Station)
Hauv Node00 chaw nres tsheb peb tuaj yeem pom ob lub rooj sib txawv:
- MEGA 2560 R3 pawg thawj coj saib. Cov cuab yeej no tau siv los txais cov lus los ntawm chaw nres tsheb qhev thaum lub suab pom tau siv kev sib txuas lus wireless. Nws yuav qhib lub tswb thaum pom lub zog thiab lub tswb txuas nrog. Txhawm rau nres lub tswb tsuas yog txuas lub tswb hom. Ntxiv mus nws xa mus rau cov qhev chaw nres tsheb cov lus los ntawm NodeMCU txhawm rau pab lossis lov tes taw nrhiav kom pom, tig ib txwm nyob ntawm lub teeb, kom ib txwm tua lub teeb, …
- NodeMCU Lua Amica V2 ESP8266 board. Nws ua haujlwm zoo li Wifi Web Server kom xa thiab tau txais cov lus txib los ntawm qhov chaw nyob deb uas siv lub Vev Xaib hauv lub xov tooj ntawm tes. Ntxiv mus xa e-mail lus thaum pom lub suab thiab lub tswb hom tau qhib.
Ob lub cuab yeej tau npaj rau kev sib tham nrog ib leeg hauv tus Xib Hwb (NodeMCU)/Qhev (MEGA) teeb tsa los ntawm I2C synchronous serial raws tu qauv siv Wire Library. I2C cov txheej txheem cuam tshuam nrog siv ob kab xa thiab txais cov ntaub ntawv: tus lej xov tooj txuas (SCL) thiab tus lej xov tooj (SDA) uas cov ntaub ntawv raug xa ntawm ob lub cuab yeej.
Raws li koj tuaj yeem pom hauv kev kos duab, ob tus pin rau I2C kev sib txuas lus hauv MEGA 2560 R3 pawg thawj coj yog:
- SDA -> pin 20 SDA
- SCL -> pin 21 SCL
thiab lwm qhov hauv NodemMCU yog:
- SDA -> digital pin 1
- SCL -> tus lej digital 2
Ua ntej koj thauj khoom kos duab rau ESP8266 koj yuav tsum teeb tsa ESP8266 lub rooj tsavxwm. Txhawm rau ua qhov no koj yuav tsum nkag mus "https://arduino.esp8266.com/stable/package_esp8266com_index.json" mus rau "Tus Thawj Saib Xyuas Haujlwm Ntxiv URLs" nyob rau hauv lub qhov rai nyiam hauv Arduino IDE. Tom qab ntawd koj yuav tsum qhib tus thawj tswj hwm pawg thiab teeb tsa "esp8266"
Kuv siv cov khoom siv hluav taws xob sab nraud (9V, 1A) rau MEGA 2560 R3 board (DC fais fab nkaus, 2, 1mm x 5, 5 mm) thiab kuv txuas NodeMCU board rau 3V3 tus pin hauv MEGA board.
Kauj Ruam 4: WifiWebServer (NodeMCU hauv Master Station)
Cov duab kos nkag rau hauv NodeMCU (Node00 lossis tus tswv chaw nres tsheb) tau teeb tsa zoo li WebServer txuas nrog koj lub network wifi hauv tsev. Nws muaj peev xwm nkag mus tau deb yog tias koj teeb tsa chaw nres nkoj xa mus hauv koj lub router.
Ua ntej koj thauj khoom WifiWebServerV3.ino kos duab rau NodeMCU koj yuav tsum ua cov hauv qab no:
- Hloov kho qhov chaw nres nkoj koj yuav teeb tsa hauv koj lub router (chaw xa khoom xa mus) kom nkag mus tau deb ntawm NodeMCU
- Hloov kho tus neeg siv thiab tus lej nkag mus nkag rau koj lub network wifi hauv tsev
- Hloov kho tus ID nkag mus thiab tus lej zais ntawm koj tus lej Gmail kom xa e-mail thaum pom cov lus tsa suab thiab lub tswb txuas nrog
- Hloov kho e-mail chaw nyob uas koj yuav tau txais e-mail
Txhawm rau hloov tus neeg siv, tus password thiab chaw nres nkoj tus neeg rau zaub mov yuav siv los mloog, koj yuav tsum tshawb nrhiav cov cai hauv qab no hauv WifiWebServerV3.ino kos duab thiab hloov kho nws:
const char*ssid = "*** koj ssid ***";
const char*password = "*** koj tus password ***"; WiFiServer server (80);
Txhawm rau hloov chaw nyob e-mail uas koj yuav tau txais e-mail koj yuav tsum tshawb nrhiav cov cai hauv qab no thiab hloov kho nws:
const char*to_email = "*** e-mail chaw nyob uas koj yuav tau txais cov lus ***";
Txhawm rau hloov tus neeg siv thiab tus lej zais ntawm koj tus lej Gmail kom tau txais e-mail koj yuav tsum tshawb nrhiav cov cai hauv qab no hauv cov ntawv "Gsender.h" thiab hloov kho nws:
const char*EMAILBASE64_LOGIN = "*** koj li e-mail chaw nyob encode hauv BASE64 ***";
const char*EMAILBASE64_PASSWORD = "*** koj tus password nkag rau hauv BASE64 ***"; const char*FROM = "*** koj li email chaw nyob ***";
Txhawm rau nkag los lossis txiav txim cov ntaub ntawv hauv BASE64 Kuv tau siv www.base64encode.org
Yog tias koj xav tau cov ntaub ntawv ntau ntxiv txog kev xa thiab tau txais e-mail nrog ESP8266 muaj "Qhia" txog nws ntawm no
Thaum koj tuaj yeem ua nws, koj tuaj yeem sim qhov kev sib txuas hauv koj lub router. Yog tias lub cuab yeej txuas nrog koj yuav tsum tseg tus IP chaw nyob rau lub cuab yeej no. Ntxiv mus nws yog lub tswv yim zoo los tham nrog koj tus muab kev pabcuam Is Taws Nem txhawm rau teeb tsa tus IP zoo li qub ntawm koj lub router.
Txhawm rau nkag mus rau nplooj ntawv web ze ntawm koj lub router wifi, tsuas yog ntaus tus IP chaw nyob uas tau muab los ntawm koj lub router tom qab qhov chaw nres nkoj koj tab tom siv hauv lub web navigator. Piv txwv li: 192.168.40.15:800. Yog tias koj sim nkag mus nyob deb koj yuav tsum ntaus tus IP chaw nyob ntawm koj lub router tom qab qhov chaw nres nkoj koj siv zoo li saum toj no.
Lub vev xaib kuv qhia koj hauv cov duab yog programmed los tswj lub network nrog ob lub chaw haujlwm qhev.
Thawj qhov teeb tsa tau teeb tsa los tswj 5 qhov chaw qhev ntau tshaj plaws, tab sis koj tuaj yeem hloov kho nws. Tsuas yog tshawb nrhiav cov cai hauv qab no hauv WifiWebServerV3.ino thiab SlaveStation.ino
#define tus lej_max_slaves 5
Lub vev xaib pib tau muab faib ua 4 ntu:
- Ntu "Xeev" qhov twg nws qhia koj yog tias lub tswb txuas nrog lossis tsis yog
- Tshooj "Lub tswb ceeb toom" qhov twg nws qhia koj tus lej ntawm kev txav mus los hauv txhua lub chaw haujlwm qhev
- Ntu "Tswb" qhov twg koj tuaj yeem txuas lossis tshem tawm (txuas txuas lub tswb/DISCONNECT ALARM) lub tswb thiab rov pib lub tswb tswb (RESET COUNTERS)
-
Ntu "Teeb Pom Kev" qhov twg koj tuaj yeem tswj teeb ntawm txhua lub chaw haujlwm qhev. Koj tuaj yeem tswj cov hauv qab no:
- Hloov lub teeb nyob rau txhua qhov chaw qhev / hloov ntawm lub teeb tsuas yog thaum pom cov lus tsa suab nyob hauv txhua qhov chaw qhev (NETWORK YUAV TSUM ON / NETWORK thaum txav)
- Hloov lub sijhawm hauv feeb cov teeb tau qhib rau txhua qhov chaw qhev (NODExx ON 1 MINUTE/NODEXX ON 2 MINUTE)
- Hloov lub teeb rau txhua lub chaw haujlwm qhev (NODExx ib txwm nyob)
- Hloov lub teeb rau txhua lub chaw haujlwm qhev tsuas yog thaum pom cov lus tsa suab (NODExx_MOV)
Koj tsis tas yuav hloov dab tsi vim tias nws yuav ua haujlwm txawm lub npe ntawm cov chaw qhev koj teeb tsa. Ntxiv mus nws yuav cia li txheeb xyuas tus naj npawb ntawm qhev chaw sib txuas hauv lub network.
Tau kawg, koj tuaj yeem rub tawm daim duab thiab yooj yim los hloov cov cai tsim nyog los qhia koj tus kheej lub vev xaib tswj hwm nplooj ntawv.
Kauj ruam 5: Los ntawm Pib …
Nov koj yog cov kauj ruam uas koj yuav tsum ua raws los tsim koj lub network:
- Yuav tag nrho cov khoom siv hauv qab cov npe kuv muab rau koj hauv "Kauj Ruam 1"
- Txuas cov khoom hauv qab cov duab koj tuaj yeem rub tawm hauv "Kauj Ruam 2" thiab "Kauj Ruam 3"
- Tsim cov thawv rau txhua lub chaw haujlwm qhev thiab tus tswv chaw nres tsheb. Kuv tau tsim cov thawv methacrylate.
-
Txhim kho txhua qhov chaw qhev:
Rub tawm thiab thauj cov duab "SlaveStation.ino" hauv ib qho MEGA 2560 R3 board. Koj tsuas yog yuav tsum hloov kho cov duab kos thiab hloov chaw nyob ntawm chaw nres tsheb qhev raws li koj tuaj yeem pom hauv "Kauj Ruam 2"
-
Teeb tsa tus tswv chaw nres tsheb:
- Rub tawm thiab thauj cov duab "SlaveStation.ino" hauv ib qho MEGA 2560 R3. Koj tsis tas yuav hloov dab tsi txawm tias muaj pes tsawg tus qhev ntawm koj lub network. Thaum pib daim duab tau teeb tsa rau qhov siab tshaj ntawm 5 tus qhev chaw nres tsheb.
- Rub tawm thiab thauj cov duab kos "WifiServerV3.ino" hauv NodeMCU. Koj yuav tsum hloov kho cov duab kos tom qab kev teeb tsa hauv "Kauj Ruam 4"
- Kho koj lub router kom nkag tau mus rau NodeMCU (chaw nres nkoj xa mus, IP zoo li qub …)
Pom zoo:
ESP8266 - Lub Sijhawm thiab Chaw Taws Teeb Tswj (Cov Neeg Ruaj Ntseg Ruaj Ntseg): 6 Cov Kauj Ruam
ESP8266 - Lub Sij Hawm thiab Cov Chaw Taws Teeb Tswj (Cov Neeg Ruaj Ntseg Ruaj Ntseg): Cov ntaub ntawv: Lub rooj sib tham no yog kev tshuaj xyuas kom tsis txhob muaj cua sov, hluav taws kub thiab raug xwm txheej thaum tsis nco qab siv cov khoom siv (feem ntau yog cov neeg laus nrog Alzheimer's). Tom qab khawm tau pib, lub qhov (socket) tau txais 110/220 VAC rau 5 feeb (lwm qhov
DIY Cheep/Cov Dej Ruaj Ruaj Ruaj Ruaj Ruaj Ruaj Ruaj Ruaj Zoo rau Tsiaj: 7 Kauj Ruam
DIY Cheep/Cov Dej Rhaub Dej Zoo rau Cov Tsiaj Tsiaj: Yog li koj tab tom khaws aub/luav/miv/… sab nraum thiab lawv cov dej ua kom khov thaum lub caij ntuj no. Tam sim no ib txwm koj yuav coj lawv mus sab hauv lossis yuav cov tais diav ua kom sov, tab sis cov tsiaj no tej zaum muaj ntxhiab tsw, koj tsis muaj chav nyob, thiab koj tsis tuaj yeem them $ 4
Tsho Ruaj Ntseg Ruaj Ntseg: Kev Ruaj Ntseg Ris Tsho LED Tsho: 11 Cov Kauj Ruam (nrog Duab)
Ris tsho Ruaj Ntseg Ruaj Ntseg: Kev Ruaj Ntseg Zoo LED Jacket: Txhim kho lub teeb yuag thiab siv tau cov khoom siv hluav taws xob tau qhib qhov muaj peev xwm tshiab rau kev siv thev naus laus zis mus rau hauv lub tebchaws thiab siv nws los ua kom muaj kev nyab xeeb ntawm cov neeg tshawb nrhiav. Txog rau qhov haujlwm no, Kuv kos kuv tus kheej kev paub nrog kev tawm sab nraud
Lub Teeb Pom Kev Pom Kev Pom Zoo/ Handheld Photograpy Teeb: 7 Cov Kauj Ruam (nrog Duab)
Intimate Video Light/ Handheld Photograpy Light: Kuv paub koj xav li cas. Los ntawm "intimate," Kuv txhais tau tias teeb pom kev nyob ze rau qhov xwm txheej teeb pom kev nyuaj-tsis tas yuav rau "xwm txheej zoo." (Txawm li cas los xij, nws tuaj yeem siv rau qhov ntawd ib yam nkaus …) Raws li New York City tus kws yees duab-lossis
Teeb pom kev pom lub teeb pom kev zoo (LED) Nrog C Stamp Microcontroller: 5 Kauj Ruam
Teeb pom kev rau lub teeb pom kev zoo (LED) Nrog C Stamp Microcontroller: Nov yog Thawj Qhov Kev Tsim Qauv thiab Kev Ua Haujlwm los ntawm CS310XXX (μ C 101) Cov Ntawv Qhia Qhia Los ntawm A-WIT Technologies, Inc. Hauv qhov kev qhia no, peb yuav pom Lub Teeb Emitting Diode (LED) nrog C Stamp Microcontroller. Cov C & n