Introduction: ESP8266 WiFi Touch Screen Thermostat

In this tutorial we will show how to build WiFi controlled thermostat with ESP8266, Arduino and touch screen display. Thermostat will also show other info, like weather forecast and temperature outside. Total cost for thermostat is about 40EUR, which is price for basic commercial thermostat in shop.

Basic features:

  • 6 modes - Auto, Off, LOLO, LO, HI, HIHI
  • Touch screen
  • WiFi connected
  • Four set temperatures (LOLO, LO, HI, HIHI) and weekly schedule
  • Time display
  • Additional data display - temperature in other room, air pressure and weather forecast

See more tutorials at http://iot-playground.com/build

Step 1: Materials

  • Arduino Mega 2560
  • ESP8266 WiFi module
  • BMP180 Digital Barometric Pressure Sensor
  • DHT22 Digital Temperature And Humidity Sensor
  • 1 Channel Isolated 5V Relay Module
  • RTC DS1302 Real Time Clock Module
  • 3.2" TFT LCD Module Touch Panel+ TFT 3.2" LCD Shield Expansion Board For Arduino

Step 2: Connections

Connect Arduino and TFT shields together. Then add ESP8266 module. Then add ESP8266 to Arduino. See Connenct 5V Arduino and ESP8266 tutorial for details.

DHT22 connections

Arduino DHT22

VCC->1 VCC

GND->4 GND

8->2 DATA

BMP180 connections

Arduino BMP180 module

VCC->VCC

GND->GND

20->SDA

21->SLC

RTC DS1302 connectios

Arduino DS1302

VCC VCC

GND->GND

11->CE

10->IO

9->CLK

See ESP8266 WiFi thermostat for details.

Step 3: Programming

Download program from GitHub. Current program version can be complied with Arduino 1.0.6. If you want to use Arduino 1.6 and above please use latest version of UTFT library.

Step 4: EasyIoT Server Setup

This step is optional if you want remote access to your thermostat from computer or smartphone.

Go in EasyIoT server (Windows or Raspberry Pi platform) and add new thermostat in configuration. If you done everything correctly you should see thermostat in Web interface.

See ESP8266 WiFi thermostat for details.

Comments

author
reddyfire made it!(author)2017-01-25

Can this be modified to control an electric floor heating element ? And if so how would it read the temps from the floor sensor ?

author
AdamS461 made it!(author)2017-01-21

looking into building this and trying to control it via HomeAssistant instead. Anyone know where abouts to start with modifying it?

author
gabontz made it!(author)2016-09-18

How can this be combined with this? http://iot-playground.com/blog/2-uncategorised/87-...

What I want, is to have a wireless thermostat, to place it anywhere in house.

author
apapai made it!(author)2015-12-23

Is an Arduino Mega really necessary? Would an UNO be sufficient?

author
vinceh121 made it!(author)2016-05-11

I think there is no such kind of shield and screen for the UNO

author
CptanPanic made it!(author)2015-05-06

Can you modify this to not need the separate arduino and just do everything on the ESP8266-12 now that it can use the arduino IDE?

author
xillwillx made it!(author)2015-05-11

the esp is not capable of controlling the lcd etc by itself so you would need the arduino

author
CptanPanic made it!(author)2015-05-12

Oh yeah I see. How about using a Screen with SPI like http://www.hotmcu.com/28-touch-screen-tft-lcd-with-spi-interface-p-42.html?

author
EasyIoT made it!(author)2015-05-12

Here is good example what can be done with ESP8266 and SPI LCD without Arduino:

https://www.youtube.com/watch?v=VraLl8XK1CI

I've tried this demo and it works very good, but I didn't have time to adapt code to my thermostat.

author
Nickduino made it!(author)2015-11-28

I felt the title of this instructable (not mentioning the Arduino) was a bit misleading, thanks for putting some ESP8266 back into my mind :-)

author
farticus made it!(author)2015-05-16

You could do that, in fact you can make a much cheaper design if the screen data is pushed from a central HTTP server to multiple thermostats in different areas, and their data and user inputs are passed right back to the server too. That way the ESP+Display combo just acts as a thin client to the server and does not need to run a lot of code itself. Instead of a touch screen you can use a cheap OLED display and a separate cap-sense board for menu navigation.

However then you have a different beast alltogether and a new Instructable to write up for us too. ;-)

author
PedroM11 made it!(author)2015-11-12

Very nice work! congrats!

author
maxwellmoojw made it!(author)2015-11-11

Great

author
jevans70 made it!(author)2015-11-05

Would it be possible to use remote sensors with this? The problem I have currently is the thermostat (stupidly) is in the only unheated area of our house, the entrance hall. but I'd like to out the smart one their to use the cure boiler connections but get a temp reading from the lounge.

author
Arduino4Me made it!(author)2015-08-16

Awesome!

author
BrandenS1 made it!(author)2015-08-13

As some people asked above, how to add more relays to control morethan just heat? I want to control heat, air, and fan.

author
tour93 made it!(author)2015-07-09

I don't see where do you plug the HVAC wires, RBWYG

author
CrankyCoderBlog made it!(author)2015-05-29

I was wondering, would this work as a replacement for a standard themostat? I noticed you only have 1 relay, but I would think atleast 3 would be needed (AC, HEAT, FAN)

I love this project and am very excited to do this one. I am going to 3d print the case for mine.

author
CptanPanic made it!(author)2015-05-12

2 More questions.

1) What did you use for case?

2) Why a RTC? Why not just use NTP?

author
EasyIoT made it!(author)2015-05-12
author
xillwillx made it!(author)2015-05-11

SevenSeg_XXXL_Num.h and SevenSegNumFontPlus.h not found on your github https://github.com/iot-playground/Arduino

author
mming+chek made it!(author)2015-04-17

Using DS3231 RTC with Digital Temperature if you no need the Humidity Sensor.

author
EasyIoT made it!(author)2015-04-17

Temperature sensor is already built in BMP180, but without humidity sensor. That's why I use DHT22.

author
Mjtrinihobby made it!(author)2015-04-15

impressive instructable!

author
MrBaseballPants made it!(author)2015-04-02

Does this mount to a standard HVAC thermostat and control central heat/air? Thanks!

author
EasyIoT made it!(author)2015-04-03

Yes, this can control central heat.

author
vicnur made it!(author)2015-03-30

excellent! !!

About This Instructable

76,894views

697favorites

License:

More by EasyIoT:ESP8266 Smart Plant Irrigation SystemESP8266 Controlling 4 RelaysESP8266 Door/window Sensor With SMS Alarm
Add instructable to: