Skip to content

Digital thermostat based on ESP32 C3 SuperMini to control gas boiler via Home Kit

License

Notifications You must be signed in to change notification settings

vokomarov/thermostat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thermostat

Digital thermostat based on ESP32 C3 SuperMini to control gas boiler via Home Kit.

TODO. Currently this device acts as Home Kit switch. Add temperature sensor to implement real thermostat function.

Components used:

In fact anything else can be used with the same nominals and chip architecture, this is just an example of components I have used.

Architecture

Connection

  • USB Type-C is used as power supply to get input 5V, input GND
  • Power switch is connected to input 5V
  • ESP32 board is connected to input 5V through Power switch via 5V pin
  • ESP32 board is connected to input GND via G pin
  • Relay module is connected to input 5V through Power switch via VCC pin
  • Relay module is connected to input GND via Gnd pin
  • Relay module is connected to ESP32 board GPIO5 pin via In pin
  • Relay module out pads NO and COM should be connected to gas boiler thermostat's pads

Operation

ESP32 board connects to home WiFi network and act as a smart switch in Home Kit environment.

When switch is ON - ESP32 board sets logic 1 on Relay which shorts two output pads of the Relay. This gives the gas boiler a signal to enable heating as soon as thermostat pads shorted.

When switch is OFF - ESP32 board sets logic 0 on Relay which cur two output pads of the Relay. This tells the gas boiler a signal to stop heating.

TODO. Read temperature from other home devices to enable/disable heating automatically. TODO. Connect temperature sensor to ESP32 board and expose Thermostat device to Home Kit to act automatically by keeping target temperature.

Note For Relay Module

The Relay module used supported 5V control signal, but ESP32 C3 board operates on 3.3V. Relay module was modified to support control signal on 3.3V (as suggested by Kutsenko Oleksii (27.09.2023)) by replacing R1, R2 to 1kOm instead of original 4.7kOm.

Relay module declared to operate on 5V, and ESP32 C3 board declared to operate on 3.3V. However, it was discovered that ESP32 C3 board having powered by 5V pin operates normally with Relay module (that actually expects 5V on In pin) even with 3.3V as output on GPIO5.

Measured voltage at the time of logical 1 set on GPIO5 seen around 3.8V, which may be enough for Relay module to switch.

Setup

  • Copy secrets.h.example to secrets.h
  • Configure WiFi credentials in secrets.h
  • (optional) Assign IP to ESP32 C3 board MAC statically on your router

About

Digital thermostat based on ESP32 C3 SuperMini to control gas boiler via Home Kit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published