Cov txheej txheem:

ESP8266 WiFi Touch Screen Thermostat (EasyIoT Cloud): 4 Cov Kauj Ruam
ESP8266 WiFi Touch Screen Thermostat (EasyIoT Cloud): 4 Cov Kauj Ruam

Video: ESP8266 WiFi Touch Screen Thermostat (EasyIoT Cloud): 4 Cov Kauj Ruam

Video: ESP8266 WiFi Touch Screen Thermostat (EasyIoT Cloud): 4 Cov Kauj Ruam
Video: ESP8266 DS18B20 temperature sensor 2024, Kaum ib hlis
Anonim
Image
Image
ESP8266 WiFi Touch Screen Thermostat (EasyIoT Huab)
ESP8266 WiFi Touch Screen Thermostat (EasyIoT Huab)
ESP8266 WiFi Touch Screen Thermostat (EasyIoT Huab)
ESP8266 WiFi Touch Screen Thermostat (EasyIoT Huab)
ESP8266 WiFi Touch Screen Thermostat (EasyIoT Huab)
ESP8266 WiFi Touch Screen Thermostat (EasyIoT Huab)

Hauv qhov kev qhia no peb yuav qhia yuav ua li cas thiaj tsim WiFi kov lub ntsuas cua sov. ESP8266 WiFi kov lub ntsuas cua sov yog piv txwv ntawm cov teeb meem sensor tsim los ntawm ESP8266, Arduino Mega 2560 thiab TFT 3.2 kov lub vijtsam zaub. Thermostat txuas nrog EasyIoT Cloud thiab tuaj yeem tswj tau hauv internet.

Cov yam ntxwv tseem ceeb ntawm ntsuas cua sov

  • 6 hom - Pib, Tawm, LOLO, LO, HI, HIHI
  • Kov npo
  • Txuas nrog WiFi
  • Plaub teev kub (LOLO, LO, HI, HIHI) thiab lub sijhawm teem tseg txhua lub lim tiam
  • Lub sij hawm tso tawm
  • Lub sij hawm tso tawm
  • Txuas nrog EasyIoT Cloud thiab tuaj yeem tswj tau hauv WEB interface lossis ib txwm siv mobile thov hauv internet

Kauj ruam 1: Cov ntaub ntawv

Khoom siv
Khoom siv
  • Arduino Mega 2560
  • ESP8266 WiFi module
  • BMP180 Digital Barometric Siab Sensor
  • DHT22 Digital Kub Thiab Vaum Sensor
  • 1 Channel Rho Tawm 5V Relay Module
  • RTC DS1302 Lub Sijhawm Sijhawm Sijhawm Tiag
  • 3.2 "TFT LCD Module Touch Panel+ TFT 3.2" LCD Shield Expansion Board

Kauj ruam 2: Tsim

Tsim
Tsim

Kev sib txuas

Arduino Meaga 2560 TFT zaub Qhov no yooj yim, vim tias peb yuav siv daim thaiv npog. Tsuas yog muab TFT 3.2 "LCD Shield Expansion Board thiab 3.2" TFT LCD Module Touch Panel rau saum Arduino Mega 2560.

ESP8266ESP8266 tau siv los ua WiFi lub qhov rooj mus rau EasyIoT Cloud. Nws tau ntim nrog firmware sau hauv Arduino IDE. Hauv qhov no peb yuav siv HW serial1 ntawm Arduino Mega 2560 los txuas ESP8266 module. Ua raws ESP8266 Connenct 5V Arduino thiab ESP8266 qhia kom txuas ESP module rau Arduino. Arduino Serial1 RX tus pin yog 19, Tx 18 thiab Pib dua tus pin yog 12. Rau 3.3V fais fab mov peb yuav siv 3.3 V los ntawm TFT ntaub thaiv npog nthuav dav. Saib daim duab hauv qab no txhawm rau txuas 3.3 V.

NPE 180

Arduino - BMP180 tus qauv

VCC - VCC

GND - NCO

20 - TSA

21 - NCO

TSH 22

Arduino - HLB 22

VCC - 1 VCC

NCO - 4 GND

8-2 DATA cov ntaub ntawv

Relay moduleRelay module input txuas nrog tus pin 51 ntawm Arduino. Peb kuj txuas VCC thiab GND.

TSO DS1302

Arduino - DS1302

VCC - VCC

GND - NCO

11 - CEEB

10 - IAB

9 - KLS

Kauj ruam 3: Source Code

Qhov Code
Qhov Code
Qhov Code
Qhov Code

ESP8266 qhov kev pab cuam

ESP8266 qhov chaws tuaj yeem nrhiav tau ntawm GitHub. Rub tawm qhov program nrog ESP8266 Arduino IDE. Yog tias koj siv ESP-01 ces khaws DEBUG hauv cov lus. Txhawm rau kom DEBUG siv ESP8266 NODE MCU uas tso cai rau ib qho software ntxiv.

Arduino Mega 2560 program

Arduino Mega 2560 program muaj nyob ntawm GitHub.

Ua ntej koj rub qhov program mus rau Arduino raug pom zoo kom hloov cov kab hauv qab no:

#define DEFAULT_AP_SSID "XXXX"

#define DEFAULT_AP_PASSWORD "XXXX"

#define DEFAULT_CLOUD_USERNAME "XXXX"

#define DEFAULT_CLOUD_PASSWORD "XXXX"

Teeb lub npe nkag thiab lo lus zais thiab EasyIoT Cloud username thiab password. Tom qab koj tuaj yeem teeb tsa cov teeb tsa ntawm lub ntsuas cua sov kov lub vijtsam (Chaw-> WiFi Huab), tab sis nws yooj yim dua los hloov nws hauv qhov program. Qhov kev zov me nyuam yuav ntxiv ntsuas cua sov rau EasyIoT Cloud thiab teeb tsa cov qauv ntsuas. Tau kawg koj yuav tsum tso npe rau EasyIoT Cloud ua ntej.

Cov tsev qiv ntawv ntxiv nyob ntawm no: lib.

Kauj Ruam 4: teeb tsa EasyIoT Cloud

Configure EasyIoT Cloud
Configure EasyIoT Cloud

Automation

Peb lub ntsuas cua sov tseem qhia txog qhov kub thiab av nyob hauv lwm chav thiab sab nraum. Ua ntej ntxiv cov qauv no rau EasyIoT Cloud. Ntxiv peb qhov kev siv tshuab hluav taws xob mus rau tom ntej tus nqi ntawm cov ntsuas (ntsuas kub 1, av noo 1 thiab kub 2) rau lub ntsuas cua sov. Hauv kev siv tshuab (Configure-> Automation) ntxiv cov haujlwm tshiab thiab xaiv hom kev pab cuam rau Tus nqi Tom ntej. Tom qab ntawd xaiv cov qauv tsim nyog thiab ntsuas kom mus rau qhov tseem ceeb. Thermostat tsis yog cov hauv qab no:

Sensor. Parameter4 - kub 1

Sensor. Parameter5 - kub 2

Sensor. Parameter6 - av noo 1

Pom zoo: