Cov txheej txheem:
Video: Kub thiab Vaum Internet Logger Nrog Zaub Siv ESP8266: 3 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Kuv xav qhia ib qhov haujlwm me me uas kuv xav tias koj yuav nyiam. Nws yog qhov me me, ruaj khov siv internet siv ntsuas kub thiab av noo hauv internet logger nrog zaub. Qhov no teev rau emoncms.org thiab xaiv tau, ib qho hauv zos rau Raspberry PI lossis koj tus kheej emoncms server. Nws nta LOLIN (yav dhau los WEMOS) D1 Mini uas suav nrog ESP8266 core. Qhov ntsuas kub thiab av noo yog LOLIN DHT 3.0 I2C sensor. Lub software yog Arduino thiab ib txwm, qhib qhov chaw. Tam sim no kuv tau tsim 7 ntawm cov no thiab kuv tus phooj ywg xav tau 3 ntxiv.
Kuv tau kaw nws hauv "Systema" 200ml rooj plaub yas. Cov no muaj nyob hauv Australia rau ~ $ 2. Tag nrho tus nqi ntawm cov khoom siv, suav nrog USB micro cable yog <$ AU30 yog li koj yuav tsum tuaj yeem tsim qhov no hauv Asmeskas rau ~ $ 20
Daim ntawv teev npe ua tiav yog
- LOLIN DI Mini V3.1.0
- LOLIN DHT Shield 3.0 kub thiab av noo
- TFT 1.4 Shield V1.0.0 rau WeMos D1
- TFT I2C Connector Shield V1.1.0 rau LOLIN (WEMOS) D1 mini
- TFT Cable 10P 200mm 20cm rau WEMOS SH1.0 10P ob lub taub hau cable
- I2C Cable 100mm 10cm rau LOLIN (WEMOS) SH1.0 4P ob lub taub hau cable
- Cov ntaub yas - SYSTEMA 200ml - hauv Australia Coles/Woolies/KMart
- USB Micro rau USB-A fais fab cable
Txhua yam khoom siv nquag tuaj yeem yuav hauv LOLIN khw ntawm AliExpress.
Cov cuab yeej thiab lwm yam khoom siv kho vajtse
- Soldering hlau. Koj yuav tsum tau muab cov taub hau tso rau ntawm daim thaiv
- 1.5mm lub taub hau taub hau bolts ~ 1cm ntev thiab tus neeg tsav tsheb kom haum
- 1.5mm laum lossis reamer rau qhov ntsia liaj qhov rooj
- Hloov cov ntawv lossis Dremel los txiav qhov rau cov hlua
Kauj ruam 1: Sib dhos
Los ua ke yog ncaj nraim rau pem hauv ntej. Muaj 2 daim thaiv los sib sau ua ke txawm li cas los xij kuv nyiam kom muaj D1 daim ntaub thaiv raws li pawg thawj coj saib xyuas raws li txoj hauv kev tawm mus rau USB cable nruj dua thiab yooj yim los teeb tsa thaum koj kaw lub hau.
D1 tuaj txog nrog 3 lub taub hau ua ke
- Qhov (socket) thiab cov pins ntev
- Qhov (socket) thiab luv pins
- Luv tus pin nkaus xwb
Siv lub qhov (socket) ntev/tus pin ntev ua ke rau DI. Xyuas kom tseeb tias koj tau siv nws nrog txoj hauv kev raug. Nov yog qhov me me jig Kuv siv kom tau cov pins ua ke ncaj rau soldering.
Siv lub khob cij, tso ob kab ntawm Cov Kab Pin luv hauv kab B & Kuv ntev dua tus pin. Lawv yuav yaug nrog cov nplaim. Tom qab ntawd tso ob kab ntawm Qhov (Socket) thiab cov pins luv hauv kab A & J sab nraud ntawm lub taub hau luv luv.
Tom qab ntawd koj tuaj yeem tso tus pin taub hau ntev ntawm tus pin luv hauv pawg thawj coj saib thiab tom qab ntawd tso D1 npaj rau cov laug. Nco tseg: D1 tau ntxeev ntawm qhov no. Lub qhov (socket) USB thiab tus kav hlau txais xov nyob hauv qab lub rooj tsavxwm. Muab cov pins tso rau ntawm lub rooj tsavxwm. Sim tsis txhob siv cov laug ntau dhau vim tias ntau dhau yuav ua rau poob qis hauv D1 thiab tuaj yeem taug kev mus rau ntu ntu ntawm lub rooj tsavxwm. Koj yuav nug tias vim li cas kuv thiaj li tsis siv lub taub hau luv luv ntawm D1? Kuv muaj lwm cov phiaj xwm suav nrog Lub Sijhawm Tiag thiab SD daim npav rau lub sijhawm WiFi nkag tsis tau yog li kuv tau muab lwm cov ntaub thaiv npog los teeb tsa yog tias xav tau.
Cov kauj ruam tom ntej yog txhawm rau txhawm rau lub rooj sib txuas. Tshem lub qhov (socket) thiab tus pin headers los ntawm kab A & J thiab plam lawv ntawm tus tam sim no soldered D1 pins. Tam sim no koj tuaj yeem plam qhov txuas txuas ntawm cov pins no. Tsis txhob thawb lub qhov ntsaws kom tag, tsuas yog so lawv nyob saum. Vim li cas? Yog tias koj siv cov laug ntau dhau, nws yuav "ntsaws" thiab koj cov txuas yuav raug muab txuas mus tas li rau D1.
Xyuas kom meej tias qhov txuas txuas raug. Cov ntaub thaiv npog txuas yuav tsum yog "ntxeev" ntawm qhov no. Cov pinouts tau cim rau ntawm txhua lub rooj tsavxwm. Ua kom ntseeg tau tias lawv sib xws piv txwv li Tx Pin ntawm D1 ncaj qha hauv qab Tx pin hauv Connector board thiab lwm yam.
Tam sim no ua kom tiav. Tshem lub rooj tsavxwm los ntawm jig yog tias koj siv nws. Kaw lawv ua ke, rov kuaj xyuas qhov kev taw qhia. Tsis zoo li Arduino Uno cov laug cam, nws muaj peev xwm muaj ib lub rooj tsavxwm 180 degrees tawm. Ntawm qhov no koj tuaj yeem txuas I2C cable los ntawm lub rooj sib txuas txuas rau DHT thiab 10pin TFT cable rau TFT. Cov pins sab hauv me me heev yog li xyuas qhov kev taw qhia ua ntej tso.
Txuas lub USB micro cable rau D1 thiab lub teeb pom kev ntawm TFT yuav tsum pom. Tam sim no koj tau npaj los thauj cov duab Arduino.
Kauj ruam 2: Thauj khoom Firmware
Thauj khoom qhov tseeb Arduino IDE. Kuv muaj 1.8.5 khiav thaum lub sijhawm tsim txoj haujlwm no.
IDE yuav tsum tau teeb tsa los sau cov duab kos rau WEMOS (ESP8266). Txhawm rau ua qhov no koj xav tau pib IDE thiab mus rau Cov Ntaub Ntawv / Nyiam thiab tom qab ntawd nyem lub cim rau sab xis ntawm "Tus Thawj Saib Xyuas Ntxiv URLS". Tus editor yuav raug tso tawm. Muab tshuaj txhuam hauv qab no
arduino.esp8266.com/stable/package_esp8266c…
mus rau tus kws kho mob thiab nyem OK thiab tom qab ntawv OK txhawm rau kaw qhov kev nyiam editor. Koj yuav tsum kaw IDE thiab rov qhib nws dua. Arduino IDE yuav txuas thiab rub tawm qhov xav tau "cov cuab yeej cuab tam" thiab cov tsev qiv ntawv los tsim thiab suav sau cov duab kos rau ESP8266 uas D1 tau ua raws.
Koj tseem yuav xav tau AdaFruit cov tsev qiv ntawv rau TFT screen. Cov no tuaj yeem tau los ntawm
github.com/adafruit/Adafruit-ST7735-Library
& github.com/adafruit/Adafruit-GFX-Library
unzipped thiab khaws cia hauv koj lub tsev qiv ntawv khaws cia hauv koj li Arduino cov phiaj xwm phiaj xwm. Nco tseg: Github rub tawm ntau zaus ntxiv "-master" rau hauv daim nplaub tshev yog li koj yuav xav hloov npe.
Koj kuj xav tau LOLIN/WEMOS DHT 3.0 lub tsev qiv ntawv los ntawm
github.com/wemos/WEMOS_DHT12_Arduino_Library
Rub tawm IoTTemp_basic.ino cov ntaub ntawv thiab muab tso rau hauv Arduino cov haujlwm nplaub tshev hu ua "IOTTemp_basic".
Qhib cov duab kos hauv IDE thiab mus rau Cov Cuab Yeej / Pawg Thawj Coj thiab xaiv "Tus Thawj Saib Xyuas". Hauv "lim koj qhov kev tshawb nrhiav" tsuas yog muab "D1" thiab koj yuav tsum pom "esp8266 los ntawm ESP8266 Zej Zog" Ntaus "Ntau Cov Ntaub Ntawv" thiab koj yuav tsum tuaj yeem xaiv qhov tseeb version thiab "Install". Lub IDE yuav pib rub tawm cov cuab yeej txuas thiab cov tsev qiv ntawv cuam tshuam.
Thaum qhov no tau ua tiav, ntsaws koj IotTemp rau hauv koj lub computer thiab tom qab kuaj pom, xaiv qhov chaw nres nkoj uas lub cuab yeej tau teeb tsa hauv "cuab yeej/chaw nres nkoj". Tam sim no koj tau npaj los sau thiab thauj khoom.
Nyob rau sab saum toj ntawm daim duab, koj yuav tsum teeb tsa qee qhov kev hloov pauv kom haum rau koj ib puag ncig
const char* ssid = ""; // Koj lub WiFi SSID hauv zos
const char* lo lus zais = ""; // Lo lus zais rau lub zos
const char* tus tswv = "emoncms.org"; // puag URL rau EMONCMS nkag. Nco tseg TSIS YOG "https://"
const char* APIKEY = "<koj tus lej API"; // Sau tus lej API los ntawm emonCMS
const char* nodeName = "Chav Ua Noj"; // Lub npe piav qhia rau koj ntawm
Ntaus lub cim "zuam" txhawm rau txheeb xyuas cov cai thiab yog tias tsis muaj qhov yuam kev tseem ceeb koj yuav tsum ua li cas txhawm rau xa cov lej rau D1. Thaum qhov no tau ua tiav, nws yuav siv sijhawm ib lossis ob feeb, tam sim no koj yuav tsum pom lub TFT teeb nrog "TMP" thiab "R/H" (Txheeb Ze Vaum) qhov muaj nuj nqis.
Raws li peb tsis tau teeb tsa EMONCMS tus account thiab lwm yam, koj yuav pom "Kev sib txuas tsis tau tiav" nrog koj lub npe host.
Cov duab kos kuj tseem muaj cov lej tseem ceeb saib. Txuas siv Arduino tus saib xyuas txuas, Putty lossis lwm yam kev pabcuam hauv xov tooj cua rau cov ntaub ntawv ntxiv txog dab tsi tshwm sim sab hauv IoT Temp.
Kuv tinker nrog cov cai yog li koj tuaj yeem pom kuv tus lej kawg ntawm
github.com/wt29/IoTTemp_basic
Kauj Ruam 3: Rooj Sib Tham Kawg
Tam sim no koj npaj txhij los ua kom tiav lub rooj sib txoos. Qhov no suav nrog kev teeb tsa cov khoom sib txuas rau hauv lub thawv.
Pib los ntawm kev teeb tsa lub TFT sab hauv ntawm lub hau. Tshem tawm D1 los ntawm lub zog thiab tom qab ntawd txuas lub TFT los ntawm lub rooj sib txuas. Muab lub TFT nce mus rau lub hau sim tso lub TFT kom ze rau sab saum toj ntawm lub hau kom ntau li ntau tau. Qhov no yuav ua rau koj tshem tawm tau zoo dua rau D1/Connector board. Kuv siv tus ntse reamer thawb lub cim me me rau hauv cov yas, tshem tawm TFT thiab tom qab ntawd rov ua lub qhov me me. Lub qhov tso rau TFT yog qhov me me ntawm 1.5mm. Kuv muaj sau los ntawm lub hau taub hau taub hau uas haum tab sis tsis muaj txiv ntoo kom haum. Kuv thawb lub hau taub hau los ntawm sab xub ntiag, ntswj lawv hla thiab yas thiab tom qab ntawd kuv tsuas yog siv cov kua kub kub kub kom ruaj ntseg TFT rau hauv lub qhov taub.
Mount DHT sensor rau sab nraum lub hau. Txhawm rau cais cov ntsuas los ntawm daim ntaub thaiv (qhov "ntaub thaiv npog" tsis siv), tig DHT rov qab thiab ntsuas tus isthmus (qhov me ntsis) nrog rab riam nyiam. Tom qab ntawd lub sensor yuav rub tawm dawb ntawm daim ntaub thaiv.
Yuav luag kawg cov kauj ruam kawg yog txiav lub pob nyem nyob hauv qab ntug ntawm lub hau thiab lub hauv paus kom haum rau USB cable thiab txuas rau DHT. Kuv siv Dremel tab sis nws tuaj yeem yooj yim mus rau tsiaj qus yog li siv koj lub sijhawm. Lub SystemA lub thawv muaj lub silicon foob hauv lub hau uas koj tsis tas yuav txiav.
Sib sau chav nyob hauv lub thawv. Kev kov ntawm qhov kub tsis txias ua kua nplaum hauv qab lub rooj sib txuas pab nrhiav nws hauv lub thawv. Khiav lub USB thiab DHT cov xov hluav taws xob tawm ntawm lub qhov thiab muab dab dab kub kua nplaum tso rau sab saum toj ntawm ob kab.
Ruaj ntseg DHT mus rau sab nraum lub thawv nrog lub luv 1.5 hli ntsia liaj qhov rooj. Siv kua nplaum kub me ntsis hauv qab nws yog tias koj xav tau - Kuv tsis thab.
Txuas koj lub IOT Temp rau 5V lub zog thiab qhuas koj txoj haujlwm.
Pom zoo:
Yuav Ua Li Cas Vaum Thiab Kub Tiag Tiag Cov Ntaub Ntawv Teev Npe Nrog Arduino UNO thiab SD-Card - DHT11 Cov ntaub ntawv-logger Simulation hauv Proteus: 5 Cov Kauj Ruam
Yuav Ua Li Cas Vaum Thiab Kub Tiag Tiag Cov Ntaub Ntawv Teev Npe Nrog Arduino UNO thiab SD-Card | DHT11 Cov ntaub ntawv-logger Simulation hauv Proteus: Taw qhia: nyob zoo, qhov no yog Liono Maker, ntawm no yog YouTube txuas. Peb tab tom tsim txoj haujlwm muaj tswv yim nrog Arduino thiab ua haujlwm ntawm cov kab ke. Cov ntaub ntawv-Logger: Cov ntaub ntawv logger (tseem cov ntaub ntawv-logger lossis cov ntaub ntawv kaw) yog cov cuab yeej siv hluav taws xob uas sau cov ntaub ntawv dhau sijhawm
Yuav Ua Li Cas Siv DHT11 Kub Sensor Nrog Arduino thiab Luam Kub Kub thiab Vaum: 5 Kauj Ruam
Yuav Ua Li Cas Siv DHT11 Kub Sensor Nrog Arduino thiab Luam Kub Kub thiab Vaum: Lub DHT11 sensor tau siv los ntsuas kub thiab av noo. Lawv yog cov khoom siv hluav taws xob nrov tshaj plaws.Qhov DHT11 cov av noo thiab ntsuas kub ua rau nws yooj yim ntxiv cov av noo thiab ntsuas kub rau koj li DIY cov phiaj xwm hluav taws xob. Nws yog rau
Kub thiab Vaum Sensor Nrog Arduino thiab Lcd Zaub: 4 Cov Kauj Ruam
Kub thiab Vaum Sensor Nrog Arduino thiab Lcd Zaub: Nyob zoo cov neeg, Txais tos rov qab rau Artuino. Raws li koj tau Pom Kuv tau pib Ib qho Kev Qhia Paub Hnub no peb tab tom yuav Ua Kom Kub & Cov av noo nrog DHT11 tus qauv. Cia peb pib Xav txog Subscribing thiab nyiam cov vis dis aus
Kub thiab Vaum Zaub thiab Sau Cov Ntaub Ntawv Nrog Arduino thiab Ua: 13 Kauj Ruam (nrog Duab)
Kub thiab Vaum Zaub thiab Sau Cov Ntaub Ntawv Nrog Arduino thiab Ua: Intro: Qhov no yog Txoj Haujlwm uas siv Arduino board, Sensor (DHT11), lub khoos phis tawj Windows thiab Kev Ua Haujlwm (rub tawm dawb) program los tso saib Kub, Cov ntaub ntawv vaum hauv digital thiab bar kab ntawv, tso tawm lub sijhawm thiab hnub tim thiab suav lub sijhawm suav
Tswj Koj Cov Khoom Siv Hluav Taws Xob Nrog Koj Lub Tv Remote (ir Remote) Nrog Kub thiab Vaum Zaub: 9 Kauj Ruam
Tswj Koj Cov Khoom Siv Hluav Taws Xob Nrog Koj Lub Tv Chaw Taws Teeb (ir Chaw Taws Teeb) Nrog Kub thiab Vaum Zaub: nyob zoo Kuv yog Abhay thiab nws yog kuv thawj blog ntawm Kev Qhia thiab hnub no kuv yuav qhia koj li cas tswj koj cov khoom siv hluav taws xob nrog koj lub TV tej thaj chaw deb los ntawm kev tsim qhov no txoj haujlwm yooj yim. ua tsaug rau atl lab rau kev txhawb nqa thiab muab cov khoom siv