Cov txheej txheem:
- Khoom siv
- Kauj Ruam 1: Npaj Arduino Ib puag ncig rau ESP8266
- Kauj Ruam 2: suav nrog Cov Tsev Qiv Ntawv Yuav Tsum Tau
- Kauj Ruam 3: Kho Tus Qauv Piv Txwv Sketch
- Kauj ruam 4: Upload Web UI
- Kauj Ruam 5: Ntxiv BME680 Sensor
- Kauj Ruam 6: Ntxiv PMS5003 Sensor
- Kauj Ruam 7: Ntxiv Qee Qhov Network
- Kauj Ruam 8: Ntxiv Qee Qhov Logging
- Kauj ruam 9: Kev ua
- Kauj Ruam 10: Cov Duab thiab Kho Cov Ntaub Ntawv
Video: Tsim kom muaj Lub Tsev IoT Huab Cua Zoo Sensor Tsis Muaj Huab Cua Xav Tau: 10 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Qhov zoo ntawm huab cua sab hauv lossis sab nraum zoov nyob ntawm ntau qhov chaw muaj kuab paug thiab los ntawm huab cua.
Cov cuab yeej no ntes qee qhov ib txwm muaj thiab qee qhov tsis txaus ntseeg tshaj plaws los ntawm kev siv 2 lub cim ntiv tes.
- Kub
- Vaum
- Siab
- Cov Pa Roj
- Micro-Particles
Cov cuab yeej siv ntawm no yog BME680 kom tau txais qhov kub thiab txias, siab thiab qhov tseem ceeb ntawm cov pa roj carbon monoxide thiab PMS5003 kom tau txais qhov ntom ntawm cov khoom me me.
Los ntawm kev siv HomeDing lub tsev qiv ntawv nws yooj yim los tsim cov khoom siv uas txuas nrog koj lub Tsev Network nkaus xwb thiab tuaj yeem ncav cuag thiab tswj tau los ntawm ib lub browser hauv lub network. Nws los nrog xaiv ntawm Cov ntsiab lus uas tso cai siv cov khoom siv ntau tshaj plaws, cov cuab yeej thiab lwm yam kev pabcuam.
Nws kuj tseem ua tiav qhov kev daws teeb meem rau kev tuav lub vev xaib sab hauv sab hauv lub cuab yeej siv tsis siv huab raws kev daws teeb meem los tso saib cov ntaub ntawv ntsuas thiab cuam tshuam nrog lub cuab yeej.
Khoom siv
Txhua yam koj xav tau los tsim txoj haujlwm no yog ESP8266 raws lub rooj tsavxwm zoo li nodemcu pawg thawj coj thiab teeb tsa lub ntsuas ntsuas ntsuas huab cua zoo. Tsev qiv ntawv HomeDing siv hauv txoj haujlwm no txhawb qee yam ntawm cov khoom siv sib xws rau qhov kub, av noo, siab thiab zoo. Nov yog siv BMP680 nti.
- USB ntsaws thiab lub micro-usb cable rau lub hwj chim.
- 1 nodemcu board nrog ESP8266 CPU.
- 1 BME680 sensor tawg pawg thawj coj saib.
- 1 PM2.5 huab cua particle laser sensor hom PMS5003
Nws yog qhov yooj yim los pauv lub BME680 sensor nrog DHT22 sensor vim lawv kuj tseem txhawb nqa los ntawm lub tsev qiv ntawv ntawm ntau lwm tus.
Kauj Ruam 1: Npaj Arduino Ib puag ncig rau ESP8266
- Txhim kho qhov tseeb version ntawm Arduino IDE (tam sim no version 1.8.2).
- Siv Tus Thawj Saib Xyuas Haujlwm los teeb tsa kev teeb tsa esp8266 kev txhawb nqa. Cov lus qhia ntxaws tuaj yeem nrhiav tau ntawm no:
- Teeb tsa pawg thawj coj xaiv rau NodeMCU 1.0 nrog 1MByte SPIFFS Cov Ntaub Ntawv Txheej Txheem raws li pom hauv lub vijtsam
Kauj Ruam 2: suav nrog Cov Tsev Qiv Ntawv Yuav Tsum Tau
Tsev Qiv Ntawv HomeDing tso siab rau qee lub tsev qiv ntawv ntxiv rau cov ntsuas thiab ntsuas kom ua haujlwm.
Thaum koj teeb tsa HomeDing lub tsev qiv ntawv koj yuav pom cov popup nrog cov tsev qiv ntawv xav tau no uas tuaj yeem teeb tsa tau ncaj qha tso rau hauv daim duab thiab nws yooj yim rau nruab lawv txhua qhov.
Qee zaum (nrog qhov laj thawj tsis paub) kev teeb tsa lub tsev qiv ntawv ua tsis tiav yog li txhua lub tsev qiv ntawv xav tau yuav tsum tau teeb tsa ntawm tus kheej.
Xav paub ntau ntxiv txog cov tsev qiv ntawv xav tau tuaj yeem nrhiav tau ntawm lub vev xaib cov ntaub ntawv ntawm
Nov yog cov npe ntawm cov tsev qiv ntawv xav tau tam sim no:
- Adafruit NeoPixel
- LiquidCrystal_PCF8574.h
- ESP8266 thiab ESP32 Oled Driver rau SSD1306 zaub
- RotaryEncoder
- DHT sensor tsev qiv ntawv rau ESPx
- OneWire
Lub PMS5003 huab cua huab cua ua pa laser sib txuas lus siv 9600 baud serial kab teeb liab. Lub teeb liab no tau txais los ntawm kev siv SoftwareSerial lub tsev qiv ntawv uas los nrog kev teeb tsa ESP8266 cov cuab yeej. Nco ntsoov tsis txhob muaj cov ntawv qub teeb tsa ua lub tsev qiv ntawv.
Kauj Ruam 3: Kho Tus Qauv Piv Txwv Sketch
Tus Qauv Piv txwv twb suav nrog qee qhov kev ntsuas ntau dua li cov ntsiab lus yog li tsuas yog qee qhov kev teeb tsa yuav xav tau.
Qhov no siv rau BME680 sensor uas tau txhawb los ntawm BME680 Element.
PMS5003 sensor tsis tshua muaj tshwm sim thiab xav tau qhib los ntawm suav nrog PMS Element rau hauv lub khoos phis tawj. Qhov no ua tiav los ntawm kev txhais #define HOMEDING_INCLUDE_PMS hauv ntu ntu sau npe ntawm daim duab
#define HOMEDING_INCLUDE_BME680#txhais HOMEDING_INCLUDE_PMS
Txhawm rau yooj yim ntawm kev ntxiv cov cuab yeej tshiab rau hauv lub network koj tuaj yeem ntxiv SSID thiab cov kab lus luv ntawm koj lub tsev WiFi hauv cov lus zais.h nyob ib sab ntawm tus qauv.ino kos duab. Tab sis koj kuj tseem tuaj yeem siv Tus Thawj Saib Xyuas WiFi txuas ntxiv rau lub cuab yeej rau hauv lub network yam tsis muaj qhov teeb tsa nyuaj.
Tam sim no txhua yam hais txog kev ua tiav ntawm daim duab kos tau ua tiav thiab cov firmware tuaj yeem suav ua ke thiab rub tawm.
Kauj ruam 4: Upload Web UI
Tus qauv piv txwv los nrog cov ntaub ntawv tais ceev tseg uas muaj txhua cov ntaub ntawv rau web UI.
Ua ntej koj rub cov ntawv no koj yuav xav ntxiv env.json thiab teeb tsa.json cov ntawv koj tuaj yeem pom nrog kab lus no vim qhov no yuav ua rau yooj yim dua.
Cov ntsiab lus ntawm cov ntaub ntawv no yog dab tsi ua rau IoT ntaus ntawv tshwj xeeb thiab coj tus yam ntxwv zoo li huab cua. Nws tau piav qhia ntxaws hauv zaj dab neeg no.
Kev siv ESP8266 cov ntaub ntawv tso cai tso tawm thiab tso tag nrho cov ntaub ntawv. Nws xav tau kev rov pib dua kom qhib kev teeb tsa.
Kauj Ruam 5: Ntxiv BME680 Sensor
BME680 Sensor tab tom sib tham nrog lub rooj tsavxwm uas siv I2C npav.
Raws li qhov no muaj peev xwm sib qhia nrog lwm qhov txuas ntxiv zoo li lwm lub ntsuas pa lossis cov lus qhia tau teeb tsa ntawm qib ntaus ntawv hauv env.json ua ke nrog lub npe network ntawm lub cuab yeej. Nov yog cov qauv rho tawm ntawm lub cuab yeej thiab I2C teeb tsa:
"ntaus ntawv": {
"0": {"name": "airding", "description": "Air Quality Sensor", … "i2c-scl": "D2", "i2c-sda": "D1"}}
Ntawm daim ntawv qhia zaub mov koj tuaj yeem pom cov kab txuas sib txuas rau lub ntsuas: 3.3V = liab, GND = dub, SCL = daj, SDA = xiav
Kev teeb tsa rau BME680 tuaj yeem siv hauv config.json:
"bme680": {
"bd": {"chaw nyob": "0x77", "sijhawm nyeem": "10s"}}
Peb yuav ntxiv qhov ua tom qab.
Txhawm rau sim teeb tsa tsuas yog siv browser thiab qhib https://airding/board.htm thiab koj yuav pom qhov txiaj ntsig tiag ntawm lub ntsuas pom thiab lawv yuav raug hloov kho tshiab txhua 10 vib nas this:
Kauj Ruam 6: Ntxiv PMS5003 Sensor
Kuv tsis tau txais lub ntsuas hluav taws xob nrog lub khob cij txuas tus phooj ywg yog li kuv yuav tsum txiav ib qho ntawm cov txuas ntawm kab siv kuv cov hlau txuas kom ncaj qha txuas nws mus rau pawg thawj coj saib nodemcu. Koj tuaj yeem pom nws tseem nyob ntawm cov duab kawg.
Lub zog rau lub ntsuas ntsuas no yuav tsum tau muab los ntawm Vin uas ib txwm siv los ntawm USB npav. GND zoo ib yam tab sis kuj muaj nyob ib sab ntawm Vin tus pin.
Cov ntaub ntawv los ntawm lub ntsuas hluav taws xob tau hloov pauv hauv tus qauv 9600 baud serial format yog li rx thiab tx pins thiab sijhawm nyeem ntawv yuav tsum tau teeb tsa:
"pwm": {
"pm25": {"piav qhia": "pm25 particle sensor", "pinrx": "D6", "pintx": "D5", "readtime": "10s"}}
Peb yuav ntxiv qhov ua tom qab.
Txhawm rau sim teeb tsa dua tsuas yog rov pib dua lub cuab yeej thiab siv browser thiab qhib https://airding/board.htm thiab koj yuav pom qhov tseeb pm35 tus nqi ntawm lub ntsuas pom thiab lawv yuav raug hloov kho tshiab txhua 10 vib nas this tab sis tus nqi no yog ib txwm tsis hloov ntau zaus.
Koj tuaj yeem tau txais qhov txiaj ntsig siab dua los ntawm kev tso lub tswm ciab teeb nyob ib sab ntawm lub ntsuas pa vim lub tswm ciab ua ntau yam ntawm cov khoom no.
Tam sim no koj tuaj yeem tso txhua yam rau hauv vaj tsev zoo vim tias txhua qhov kev teeb tsa thiab txawm tias hloov kho software tuaj yeem ua tiav nyob deb.
Kauj Ruam 7: Ntxiv Qee Qhov Network
Cov teeb tsa hauv qab no rho tawm hauv env.json tau ua kom zoo
- hloov kho lub firmware dhau ntawm huab cua
- tso cai txheeb xyuas lub network siv SSDP network raws tu qauv thiab khaws lub sijhawm tam sim no los ntawm ntp server.
{
… "Ota": {"0": {"port": 8266, "passwd": "123", "description": "Mloog rau 'dhau cua' OTA Hloov Kho tshiab"}}, "ssdp": {"0" ": {" Chaw tsim tshuaj paus ":" yourname "}}," ntptime ": {" 0 ": {" readtime ":" 36h "," zone ": 2}}}
Koj yuav tsum kho lub sijhawm sijhawm rau koj qhov chaw nyob. Yog tias koj tsis ntseeg koj tuaj yeem siv lub vev xaib https://www.timeanddate.com/ kom tau txais qhov txiaj ntsig los ntawm UTC/GMT. "2" yog txoj cai rau lub caij ntuj sov hauv tebchaws Yelemes.
Koj kuj tseem tuaj yeem kho tus lej ota tom qab nyeem cov lus qhia txog kev txuag hom hauv cov ntaub ntawv ntawm
Tom qab rov pib dua koj tuaj yeem pom lub tshuab cua txias ntawm lub network thiab tom qab tau txais lus teb los ntawm ntp server lub sijhawm muaj nyob hauv.
Kauj Ruam 8: Ntxiv Qee Qhov Logging
Tsuas yog qhov txiaj ntsig tiag tiag yuav tsis muab txaus yog li qee cov ntsiab lus tuaj yeem siv tau.
Txog zaj dab neeg no Log lub caij thiab NPTTime Element tau siv los sau keeb kwm ntawm qhov ntsuas qhov ntsuas hauv cov ntaub ntawv teev cia thiab Web UI daim npav rau lub ntsiab lus no tuaj yeem pom nws ua duab.
Cov teeb tsa hauv qab no tsim 2 lub log cav rau cov pa thiab cov khoom:
{
"log": {"pm": {"description": "Log ntawm pm25", "filename": "/pmlog.txt", "filesize": "10000"}, "aq": {"description": " Log ntawm cov pa roj zoo "," npe npe ":" /aqlog.txt "," filesize ":" 10000 "}}}
Kauj ruam 9: Kev ua
Tam sim no peb yuav tsum tau hloov qhov txiaj ntsig tiag tiag rau cov ntsiab lus cav los ntawm kev siv ua. Cov kev ua yog siv tus cim URL kom dhau tus kay thiab tus nqi rau lub hom phiaj. Ntau Cov Txheej Txheem txhawb nqa kev ua ntawm qee yam xwm txheej uas tshwm sim zoo li ntes tus nqi sensor tshiab.
Kev nqis tes ua tau teeb tsa ntawm lub hauv paus uas tso tawm cov kev ua 2 nkag yuav tsum tau:
- Pms/p25 qhov tshwm sim muaj txiaj ntsig xa tus nqi tiag rau lub cav/teev caij siv tus nqi nqis tes ua.
- Qhov kev tshwm sim bme680/bd ongas xa tus nqi tiag rau lub cav/teev caij siv tus nqi nqis tes ua.
{
"pms": {"pm25": {… "onvalue": "log/pm? value = $ v"}}, "bme680": {"bd": {… "ongas": "log/aq? value = $ v "}}}
Tam sim no txhua lub ntsiab lus tau teeb tsa.
Kauj Ruam 10: Cov Duab thiab Kho Cov Ntaub Ntawv
Nov yog qee cov duab ntawm kuv qhov kawg IoT Air Quality sensor.
Cov ntaub ntawv teeb tsa rau rub tawm yuav tsum tau hloov pauv mus rau *.json (tsis muaj. Txt) ua ntej rub tawm.
Txuas thiab cov neeg ua tim khawv
- HomeDing Source Code Repository:
- Cov ntaub ntawv:
- Tus Qauv Piv Txwv:
- BME680 Element:
- PMS Element:
- Lub cav nkag:
- NtpTime Element:
Pom zoo:
Lub kaus mom tsis yog lub kaus mom - Cov kaus mom rau cov neeg uas tsis tau hnav lub kaus mom tiag tiag, tab sis xav tau lub kaus mom kev paub: 8 Kauj Ruam
Lub kaus mom tsis yog lub kaus mom rau cov tib neeg uas tsis tau hnav lub kaus mom tiag tiag, tab sis xav tau lub kaus mom kev paub: Kuv ib txwm xav tias kuv tuaj yeem yog tus neeg lub kaus mom, tab sis tsis tau pom dua lub kaus mom uas ua haujlwm rau kuv. Qhov no "Hat Not Hat," lossis fascinator raws li nws tau hu ua yog txheej txheej sab saum toj rau kuv cov teeb meem lub kaus mom uas kuv tuaj yeem koom nrog Kentucky Derby, vacu
Kev Tswj Lub Suab Hauv Tsev Automation (zoo li Alexa lossis Google Tsev, tsis xav tau Wifi lossis Ethernet): 4 Cov Kauj Ruam
Kev Tswj Lub Suab Hauv Tsev Automation (zoo li Alexa lossis Google Tsev, tsis xav tau Wifi lossis Ethernet Xav Tau): Nws yog qhov yooj yim SMS raws li arduino tswj kev xa xov nrog google tus pabcuam teeb tsa xa cov lus ntawm kev qhia lub suab. Nws yooj yim heev thiab pheej yig thiab ua haujlwm zoo li Alexa tshaj tawm nrog koj cov khoom siv hluav taws xob uas twb muaj lawm (yog tias koj muaj Moto -X ntse
Retrofit BLE Kev Tswj kom Muaj Lub Hwj Huam Muaj Zog - Tsis Xav Tau Kev Txuas Ntxiv: 10 Kauj Ruam (nrog Duab)
Retrofit BLE Kev Tswj kom Muaj Lub Hwj Huam Muaj Zog - Tsis Xav Tau Cov Hluav Taws Xob Ntxiv: Hloov tshiab: Lub Xya Hli Tim 13, 2018 - ntxiv 3 -lub davhlau ya nyob twg tswj rau cov khoom siv hluav taws xob Cov lus qhia no suav nrog BLE (Bluetooth Tsawg Zog) tswj ntawm kev thauj khoom tam sim no hauv thaj tsam 10W rau > 1000W. Lub zog tau hloov pauv nyob deb ntawm koj li Android Txawb ntawm pfodApp. Tsis muaj
HRV (Lub Tsev Huab Cua Hloov Chaw) Arduino Tus Tswj Nrog Huab Cua Huab Cua: 7 Cov Kauj Ruam (nrog Duab)
HRV (Lub Tsev Huab Cua Hloov Chaw) Arduino Tus Tswj Nrog Air Economizer: HRV Arduino Tus Tswj Nrog Air Economizer Yog li kuv keeb kwm nrog txoj haujlwm no yog kuv nyob hauv Minnesota thiab kuv lub rooj tsav xwm hluav taws xob kib ntawm kuv LifeBreath 155Max HRV. Kuv tsis xav them $ 200 rau qhov tshiab Kuv ib txwm xav tau qee yam nrog kev lag luam huab cua kev ua txhaum
Yuav Ua Li Cas Tau Txais Cov Nkauj Los Ntawm Txhua Qhov (Haha) Lub Vev Xaib (Ntev Li Koj Tau hnov Nws Koj Yuav Tau Txais Nws Ok Zoo Yog Nws Tau Ntxig Hauv Flash Koj Yuav Tsis Muaj Peev Xwm) EDITED !!!!! Ntxiv Info: 4 Cov Kauj Ruam
Yuav Ua Li Cas Tau Txais Cov Nkauj Los Ntawm Txhua Qhov (Haha) Lub Vev Xaib (Ntev Li Koj Tau hnov Nws Koj Yuav Tau Txais Nws … Ok Zoo Yog Nws Tau Ntxig Hauv Flash Koj Yuav Tsis Muaj Peev Xwm) EDITED !!!!! Ntxiv Cov Lus Qhia: yog tias koj tau mus rau lub vev xaib thiab nws ua nkauj nkauj uas koj nyiam thiab xav tau nws ntawm no yog cov lus qhia rau koj tsis yog kuv qhov txhaum yog tias koj cuam tshuam qee yam (tsuas yog txoj hauv kev nws yuav tshwm sim yog tias koj pib tshem cov khoom yam tsis muaj laj thawj. ) Kuv tuaj yeem tau txais cov nkauj rau