Controlling a high voltage heater with an ESP32

Update 31/12/2018:

See https://github.com/schlunsen/esp32_mqtt_relay for the relay control programmed with the Espressif-idf framework.

Modify a heat controller to control the ON/OFF state with an ESP32 using MQTT and MQTT Dash.

We live in two floored apartment where the temperature sensor for the whole apartment is placed downstairs in a hallway which never gets heated. With the emerging of cheap and easy deployable micro controllers like the ESP32, I thought it must be possible controlling/overriding our existing installation ( See below for pictures)

I wanted to be able to modify our existing heat controller and give it the capability of reaching it over WIFI, and have the ability of controlling it via my phone and an external temperature sensor, for automatic on/off during the night.

With the setup of 2 ESP32, a Raspberry PI, a 3v switch relay and a DHT22 I was able to do so :)

The code is Arduino based, along with a python script for automatic heat controlling during the night.

I use a Raspberry pi as the MQTT server, while also running the automatic python heat script.

Below I’ve listed my hardware setup along with a github reposity with the code.

Setup hardware requirements:

With external temperature sensor:

You’ll find the code behind the project here :

External Arduino libraries:

You are able to get both libraries via the Arduino IDE:

Below I’ve captured some images of the installation we have here at home.

The heat controller
The heat controller / temperature controller
Heat controller modified
The ESP32 and the 3v switch relay
Using MQTT Dash as the application controller

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store