ESP32 Based On/Off Boiler Controller

How long it gonna take to build a simple end-to-end IoT application ? , lets find out. In next couple of blogs I will try to build a end to end IoT application. For demonstration purpose we will take a boiler automation use case. We will iterate our solutions to reach our final destination of fully automating the boiler setup

Environment requirements:

  • ESP32
  • Install latest version of arduino IDE and add ESP32 board using boards manger
  • Arduino libraries : PubSubClient,ArduinoJson (if you haven’t already installed it , you can install it from Sketch->Include library->Manage Libraries)
  • Install nodejs 
  • Install mongodb 
  • mqtt broker , if you don’t have one you can use eclipse Paho broker for experimentation (host: iot.eclipse.org , port : 1883, it is a free and open broker)
  • couple of LEDs,LM32 and breadboard to see the output

Current setup

Lets assume that there is a boiler in a industrial plant, something looks above. It uses electrical heaters, there is temperature meter and inlet/outlet. In the current scenario  operator will take readings of the temperature periodically  and switch on/off the heater based on the temperature

Now we would like to automate this system

ESP32 Circuit Setup

Hardware setup will be same for all the three iterations, Only the software will change. We need one LED (to indicate the heater status) and one LM35 to read the temperature. Connect LED to GPIO4 through a resistor and connect signal pin of LM35 to GPIO32 (Minimum voltage required by LM35 is about 4.4V, if you access to 5v supply provide 5v to LM35 vs pin)

All the code is available in this git repository, download full repository before going to next section.

In first iteration we will build a web console which shows the current temperature and lets the user control the heater

In second iteration we will add a server which store every reading received from boiler and also automates the heater control

Third iteration is same as second iteration but the heater control decision control logic moved to the edge from server

 

Add a Comment

Your email address will not be published. Required fields are marked *