Skip to content

Latest commit

 

History

History
90 lines (57 loc) · 4.79 KB

ReadMe_V1.md

File metadata and controls

90 lines (57 loc) · 4.79 KB

ESP8266 Thermostat System V1

This came out of the desire to have both remote and finer grain control of our heating and cooling system. Specifically for multi-floor houses with a single heating and cooling system it might be desirable to cool in respect to the top, ground, or basement floors. This of course isn't achievable in a single thermostat system, and thus a multi-sensor system that reports to central controller architecture was born. Overall the project costs about $100 for four remote sensing devices, a four relay central server, power and programing adapters. See below for interface screenshots!!

Key Features

  • Web-based interface for thermostat
  • Selection of what temperature "device" to cool to
  • Historical views of temperature and humidity
  • Remote control of thermostat if paired with VPN
  • This requires a series of remove "clients" to send data to the server
  • Calibration of remote devices through best fit

Dependencies

Server Device

The server device serves the webpage that provides user feedback, temperature information, and allow for setting of desired temperature. This will be located near the actual cooling unit and uses a set of relays to turn on and off the fan, heat, and cooling functions. This server should have a static IP address and be configured to connect to your SSID network. The wiring that I used for my US-based heater/cooling unit was the following:

  • R - 24VAC
  • G - Fan/Blower
  • Y - Cool/Compressor
  • W - Heat

To "enable" one of the functions, have the relay connect the 24VAC wire with the desired function. I wired the system so that these are "normally open" (NO) so that if the device lost power the heater/cooling unit failed gracefully. There is a pretty nice pre-made four relay system on amazon that I used, but one could easily build one and trigger using a ESP8266 form factor that exposes enough GPIO pins.

server photo

screenshot 1screenshot 2

Client Devices

These client devices have a simple task of just reporting the current temperature and humidity to the central device. These leverage the DHT22 sensors, which I have found seem to have very poor initial calibration. I am not sure of the best way to calibrate them, but for now just using a known good sensor and "offset" the current sensor readings to it. For now calibration values can be set that map the raw values into the calibrated values. These are fitted using a linear regression to find the best correspondence between the read and calibrated values. You will want to assign a static IP to your server device and then input this into each client so that they can report their temperature readings to it. You will also need to configure the SSID and password for your wireless router so that the ESP8266 can connect.

client photo

screenshot 3 screenshot 4

Afterthoughts

The calibration still seems to be a weak point, but for now it should perform as expected if there is a linear mapping. I am unsure if this actually will save anything on the electric bill, but the convenience factor of being able to access on my phone is a big "win" in my books. I think that some more intelligent choices on when to enable and if we should cool/heat past the desired temperature is an interesting future direction. The original idea was to stick a neural network on this, but due to the ESP8266 small size and slow execution this probably is not possible in practice. Would still be an interesting to try to improve cost savings through optimization-based methods and predicted outdoor temperature trends.