Cov txheej txheem:

ESP8266 Modbus Thermostat Nrog Kov: 5 Kauj Ruam
ESP8266 Modbus Thermostat Nrog Kov: 5 Kauj Ruam

Video: ESP8266 Modbus Thermostat Nrog Kov: 5 Kauj Ruam

Video: ESP8266 Modbus Thermostat Nrog Kov: 5 Kauj Ruam
Video: How to make Homekit Compatible Thermostat with NodeMCU(ESP8266) || Homekit thermostat in Just 7$. 2024, Hlis ntuj nqeg
Anonim
ESP8266 Modbus Thermostat Nrog Kov
ESP8266 Modbus Thermostat Nrog Kov

Kuv yuav qhia koj hauv cov lus qhia no yuav ua li cas thiaj ua kom zoo saib lub vijtsam ntsuas cua nrog xaiv Modbus txhawb nqa ntawm RS485 nrog ArduiTouch ESP thiab ESP8266 (NodeMCU lossis Wemos D1 Mini).

Kauj Ruam 1: Nqi Khoom

Nqi Khoom
Nqi Khoom
Nqi Khoom
Nqi Khoom
Nqi Khoom
Nqi Khoom
  • NodeMCU V2 Amica lossis Wemos D1 mini
  • ArduiTouch ESP cov khoom siv

yeem rau RS485 interface:

  • MAX3485
  • transistor BC557
  • Resistor 10k ib
  • Resistor 22k ib
  • 2 x Resistor 1k
  • Kev tiv thaiv 120 Ohm
  • Capacitor 1, 5nF
  • 2pole npe
  • Jumper choj

Kauj ruam 2: Sib dhos

Los ua ke
Los ua ke

Koj tuaj yeem siv rau kev sib sau ntawm ArduiTouch nws tus kheej phau ntawv txuas nrog.

ArduiTouch nws tus kheej tsis muaj RS485 interface. Peb yuav tsum ntxiv txoj haujlwm no rau ntawm thaj tsam ntawm lub khob cij. Ib sab ntawm thaj tsam ntawm lub khob cij koj yuav pom cov ntaub qhwv nrog txhua yam xav tau cim. Koj tsuas yog yuav tsum txuas cov kab hluav taws xob hauv qab no nrog cov ntaub ntawv sib txuas no. Rau A thiab B cov cim nws tau pom zoo kom siv cov ntaub qhwv 3 thiab 4 uas txuas ncaj qha rau lub davhlau ya nyob twg.

Kauj Ruam 3: Txhim Kho Tsev Qiv Ntawv Ntxiv

Lub firmware tau sau nyob rau hauv Arduino IDE. Koj yuav xav tau cov tsev qiv ntawv ntxiv hauv qab no:

Nruab ib lub tsev qiv ntawv hauv qab no los ntawm Arduino Library Manager

Adafruit GFX Library

Adafruit ILI9341 Lub Tsev Qiv Ntawv

XPT2046_Touchscreen los ntawm Paul Stoffregen

SimpleModbus NG

Koj tseem tuaj yeem rub tawm lub tsev qiv ntawv ncaj qha raws li ZIP cov ntaub ntawv thiab uncompress lub nplaub tshev hauv qab koj tus lejduinosketchfolder/ qiv ntawv/ Tom qab txhim kho Adafruit cov tsev qiv ntawv, rov pib dua Arduino IDE.

Koj yuav pom qhov chaws rau Thermostat ntawm peb lub vev xaib.https://www.hwhardsoft.de/english/projects/arduito …

Kauj ruam 4: Khiav Demo

Khiav qhov Demo
Khiav qhov Demo
Khiav qhov Demo
Khiav qhov Demo
Khiav qhov Demo
Khiav qhov Demo
Khiav qhov Demo
Khiav qhov Demo

Thov qhib cov qauv no hauv Arduino IDE. Sau thiab xa nws mus. Please nco ntsoov: Lub jumper yuav tsum qhib rau kev ua haujlwm ntawm ESP8266 tus qauv ntawm USB.

Tom qab muab tso ua ke thiab rub tawm koj yuav pom lub vijtsam tseem ceeb nrog lub hauv paus ntsuas rau chav sov, teeb tsa qhov kub thiab qhov cua. Koj tuaj yeem hloov pauv qhov kub thiab txias qhov cua yam tsis muaj kev sib txuas RS485 thiab. Koj tuaj yeem qhib ntawm lub iav nyob rau sab xis saum toj ntawm cov ntawv qhia zaub mov. Cov ntawv qhia zaub mov no suav nrog kev ua haujlwm txhawm rau kho tus lej Modbus ID thiab kev ua haujlwm ntxuav lub vijtsam.

Kauj ruam 5: Modbus Test

Modbus Xeem
Modbus Xeem
Modbus Xeem
Modbus Xeem

Peb yuav siv qhov piv txwv no PC ua MODBUS tus tswv. Koj yuav tsum tau downloadModbustester. Thov unpack zip archive rau cov npe tshiab ntawm koj lub harddisk. Qhib lub software thiab hloov cov cim cim raws li hauv daim duab saum toj no. Koj yuav tsum txuas USB-RS485-adapter ua ntej. Rau kev sim yooj yim txuas txuas ntawm USB cable ntawm koj lub PC thiab NodeMCU tseem yuav ua haujlwm. Thov xaiv txoj cai COM-chaw nres nkoj rau qhov hloov pauv no hauv Modbustester

Koj tuaj yeem nias lub Nyeem khawm hauv Modbustester. Cov lus txib no yuav nyeem 6 bytes ntawm lawv lub cim xeeb ntawm peb cov cuab yeej qhev tshiab ArduiTouch. Koj tuaj yeem nyem rau hauv cov teb ib sab ntawm cov chaw nyob thiab tswj hwm qhov muaj txiaj ntsig. Nrog khawm sau koj xa qhov kev hloov pauv no mus rau ArduiTouch. Thov saib cov lus hauv qab no txog kev sau npe ua haujlwm.

Pom zoo: