Giter Site home page Giter Site logo

esp-thermostat's Introduction

ESP-Thermostat

This repo implements a standalone bang-bang thermostat for controlling room temperature for a central heating system. The thermostat actuates a relais that operates the boiler. The thermostat has a minimal web interface for convenience and uses configurable hysteresis intervals to reduce the number of boiler triggers.

Hardware

Components

Wiring

  • plug a 5V adapter to the NodeMCU (keep in mind that the operating voltage is 3.3V!)
  • connect relay to the boiler circuit (ues the normal open and comm pins).
  • connect the relay to the D3 pin of the NodeMCU, and the V_in of the NodeMCU. Do not use a 3.3V pin as this will result in faulty behaviour of the relay.
  • connect the sensor to the V_in port of the NodeMCU (3.3V is supposed to work but was less stable for me), connect the data pin to the D2 pin of the NodeMCU and add a pull-up resistor as described in the data sheet. You can see an example layout (with additional LED) below: IMG20221112232500

Software

  • install Platformio for vscode (instructions here)
  • install the Espressif Platform
  • clone this repo and open the platformio project
  • upload the code after connecting the ESP with your pc.

Web Interface

To interact with the Thermostat a minimal web interface is available. With this interface you can read the current temperature, turn the thermostat on/off and set the desired temperature. To find the Thermostat's IP address you should use the serial monitor after uploading the program, the IP address will be printed.

You can see the interface below:

signal-2022-11-12-233022 (1)

Note that there is no authentication for the web interface, so you should not expose it outside of your local network.

Note on power efficiency

  • This Thermostat requires an 5V power supply and is far from power-efficient due to the constant polling of the webserver, best to keep it plugged in. If you want to make this more efficient, you could use an IoT protocol such as MQTT that e.g. pulls user input every 10s instead of creating a webserver that is constantly polling for client connections. Note however that in that case you need a seperate device that creates the UI (a raspberry Pi for example) that functions as MQTT broker and that runs a webserver. On this device however, you can just use standard web development frameworks instead of having to hack something on an embedded device in C++.

Resources

esp-thermostat's People

Contributors

tlpss avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.