Cov txheej txheem:

IOT Tsev Automation DIY Project #1: 7 Cov Kauj Ruam
IOT Tsev Automation DIY Project #1: 7 Cov Kauj Ruam

Video: IOT Tsev Automation DIY Project #1: 7 Cov Kauj Ruam

Video: IOT Tsev Automation DIY Project #1: 7 Cov Kauj Ruam
Video: 20 MOMENTS YOU WOULDN'T BELIEVE IF NOT FILMED 2024, Kaum ib hlis
Anonim
Image
Image
Nqe lus piav qhia
Nqe lus piav qhia

# QHIA

Kev siv tshuab hauv tsev yog txheej txheem siv khoom siv hauv tsev zoo li AC, Ntxuam, Lub tub yees, teeb thiab cov npe txuas mus, kom lawv tuaj yeem tswj hwm nrog koj lub xov tooj, khoos phis tawj, lossis txawm tias nyob deb. Txoj haujlwm no cuam tshuam nrog esp2866 nodeMCU los tswj cov cuab yeej siv hauv peb lub tsev los ntawm peb lub network WiFi.

Kauj Ruam 1: Cov Khoom Siv

ESP 2866 NodeMCU

2. 5V dc qhov chaw / Arduino UNO rau 5V qhov chaw

3. DHT11 sensor

4. Qhov muag hluav taws xob

5. 5V Relay Module

6. Cov qhob cij

7. Jumper Wires (txiv neej-poj niam & txiv neej-txiv neej)

8. Smartphone nrog Blynk app ntsia

9. WiFi network.

Kauj ruam 2: Kev piav qhia

Nqe lus piav qhia
Nqe lus piav qhia

1. Lub NodeMCU (Node MicroController Unit) yog qhov qhib qhov software thiab kho vajtse ib puag ncig uas tau tsim nyob ib puag ncig ib qho tsis kim heev System-on-a-Chip (SoC) hu ua ESP8266.

ESP8266 yog tus nqi qis, WiFi Module nti uas tuaj yeem teeb tsa los txuas rau Is Taws Nem rau Internet ntawm Yam (IoT) thiab Cov Txheej Txheem Technology zoo sib xws. Lawv tsis muaj lub teeb tsa tsim los ua li ntawd.

Koj tuaj yeem teeb tsa ESP8266 nrog cov khoom siv no thiab ua cov khoom zoo. Tswj, Saib Xyuas, Txheeb Xyuas thiab ntau ntxiv. ESP8266 NodeMCU muaj 17 GPIO pins uas tuaj yeem muab rau ntau yam haujlwm xws li I2C, I2S, UART, PWM, IR Chaw Taws Teeb Tswj, LED Teeb thiab Khawm programmatically. Txhua qhov qhib siv GPIO tuaj yeem teeb tsa siab lossis qis. Yog xav paub ntxiv xa mus rau

nodeMCU

Kauj ruam 3: Relay

ib Relay
ib Relay
ib Relay
ib Relay
ib Relay
ib Relay
ib Relay
ib Relay

yog qhov hloov hluav taws xob uas tuaj yeem qhib lossis kaw, cia qhov tam sim no hla mus lossis tsis yog, thiab tuaj yeem tswj tau nrog cov hluav taws xob qis, zoo li 5V muab los ntawm Arduino pins.

Daim duab hauv qab no qhia qhov txuas txuas tus lej 3 Tus pin nyob rau sab laug ntawm qhov txuas qhov txuas txuas qhov hluav taws xob siab, thiab cov pins ntawm sab xis txuas cov khoom siv uas xav tau hluav taws xob tsawg-Arduino pins.

Sab qhov hluav taws xob siab muaj ob qhov txuas, txhua nrog peb qhov nyob: ib qho (COM), ib txwm kaw (NC), thiab ib txwm qhib (TSIS).

1. COM: tus pin ntau

2. NC (Feem ntau Kaw): qhov kev kaw kaw ib txwm siv thaum koj xav kom lub kaw lus xa tawm raug kaw los ntawm lub neej ntawd, txhais tau tias cov dej ntws tam sim no tshwj tsis yog koj xa lub teeb liab los ntawm Arduino mus rau cov qauv xa tawm kom qhib lub Circuit Court thiab nres tam sim no..

3. TSIS YOG (Qhib Qhib): qhov qhib qhib ib txwm ua haujlwm lwm txoj hauv kev: qhov txuas txuas ib txwm qhib, yog li lub Circuit Court tawg tshwj tsis yog koj xa lub teeb liab los ntawm Arduino kom kaw lub Circuit Court.

Kev sib txuas ntawm cov qauv sib txuas thiab NodeMCU yog qhov yooj yim heev:

1. GND: mus rau hauv av

2. IN: tswj kev xa xov (nws yuav txuas nrog lub nodeMCU tus lej digital)

3. VCC: mus rau 5V

Ntawm no, peb muab 5V thiab GND tus pin ntawm kev xa xov txuas nrog rau arduino 5V thiab GND tus pin feem thiab GND tus pin ntawm arduino yog ib txwm nrog GND tus pin ntawm NodeMCU.

Ua ntej txuas ntxiv nrog txoj haujlwm no, Kuv xav qhia rau koj paub tias koj tab tom cuam tshuam nrog lub zog hluav taws xob. Yog li, ua siab zoo saib qhov kev sib txuas ua ntej ua ntej hloov nws. Pins & kev piav qhia kev sib txuas:

1. Ntsuab hlau txuas D2 tus pin ntawm nodeMCU mus rau i/p ntawm kev xa xov

2. Cov xov hlau liab thiab daj txuas 5V thiab GND mus rau VCC thiab GND ntawm Relay feem.

Tam sim no txhawm rau txuas lub nra (hauv qhov no Lub Teeb). Thaum xub thawj txiav cov xov hlau nyob ntawm lub teeb lossis teeb. Tam sim no txuas thawj qhov kawg piv txwv li mus rau cov khoom siv hluav taws xob rau NO tus pin (yog tias koj qee zaum xav hloov ntawm lub teeb/teeb) thiab lwm qhov kawg ntawm cov xov tooj nyob mus rau lub teeb, mus rau COM tus pin ntawm Kev Tshaj Tawm. Kindly nrhiav qhov txuas hauv qab no.

Kauj Ruam 4: DHT11 Sensor

DHT11 Sensor
DHT11 Sensor
DHT11 Sensor
DHT11 Sensor
DHT11 Sensor
DHT11 Sensor

Siv los paub qhov kub thiab txias ntawm qhov chaw ua haujlwm hauv chav no, ntawm lub ntsuas cua.

Yog xav paub ntxiv saib

Kev sib txuas ntawm DHT11 yog raws li txuas Txuas VCC thiab GND pins ntawm lub sensor mus rau 3.3V thiab GND pins ntawm nodeMCU feem thiab cov ntaub ntawv tus pin rau D4 hauv qhov dej no koj tuaj yeem siv ib qho ntawm GPIO pins hauv txoj haujlwm no tham txog tam sim no. Zoo xa mus rau cov duab hauv qab no:

Ntawm no, Cov kab liab thiab Ntsuab tau txuas 3.3V thiab GND pins ntawm nodeMCU nrog VCC (+) thiab GND (-) tus pin ntawm DHT11 sensor feem.

Kauj Ruam 5: Blynk App

Lub Blynk App
Lub Blynk App

Blynk yog lub platform tshiab uas tso cai rau koj tsim kev cuam tshuam sai rau kev tswj hwm thiab saib xyuas koj cov phiaj xwm kho vajtse los ntawm koj li iOS thiab Android ntaus ntawv. Tom qab rub tawm Blynk app, koj tuaj yeem tsim qhov phiaj xwm phiaj xwm thiab teeb tsa cov nyees khawm, swb, kab duab, thiab lwm yam cuab yeej rau ntawm lub vijtsam.

Txhawm rau pib nrog blynk ua raws qhov txuas hauv qab no.

Yog xav paub ntxiv saib

Kauj Ruam 6: Daim duab Circuit Court

Daim duab Circuit Court
Daim duab Circuit Court

Kauj ruam 7: Code

Tau koj tus lej ntawm no

Qee qhov txuas tau zoo dua

1. Blynk tsev qiv ntawv txuas rau arduino IDE

2. dht11 sensor tsev qiv ntawv

3. Lub tsev qiv ntawv timer yooj yim

4. Vim li cas timer yooj yim siv?

Pom zoo: