Skip to content

Korag/IoTTemperatureRegulatorSystem

Repository files navigation

IoTTemperatureRegulatorSystem

IoTTemperatureRegulatorSystem is a project of a complex system of temperature regulation service including both hardware and software layer.

The temperature control system, due to its degree of dispersion of physical elements in space, is divided into several smaller independent modules performing the set functions:

  1. A temperature sensor chip that sends its measurements to the controller:
  • ESP32.
  • DS18B20 temperature sensor - digital 1-wire THT.
  • Communication via MQTT and WiFi.
  1. A hardware actuator circuit in the form of a thermal fan (simulated by an LED) that receives control signals from the controller:
  • ESP8266.
  • LED.
  • 270 Ω resistor.
  • Communication via MQTT and WiFi.
  1. Mongo Atlas database storing recorded temperature measurements and temperature control settings.
  2. MQTT broker based on mosquitto. The broker is installed on a virtual machine running CentOS on Azure VM and has a static IP address.
  3. A web application to observe the current status of the temperature control system and to edit the preset settings. Developed in React.js technology together with ASP.NET Core Web Api. The application is hosted in Azure App Service.
  4. A program controlling (driver) the whole system, which is responsible for receiving measurements sent by the temperature sensor system using the MQTT protocol. It places the received measurements in a database and then takes appropriate actions based on the last measured value and the set temperature control settings. The controller has a possibility to control the actuator system in a form of a thermo fan through the MQTT protocol - it sets the on/off state and 1 of 4 user preset heating power levels. The application is written using ASP.NET Core technology and is a console application that runs in an infinite loop. The application is hosted as a WebJob in the Azure App Service.

Video presentation (in Polish)

Diagram of the relationship between the components of a temperature control system:

alt text

Realised temperature sensor circuit based on ESP32:

alt text

A realised hardware actuator circuit in the form of a thermo fan which is simulated by the LED used:

alt text

App login page:

alt text

Client application launched, which includes a section for setting parameters and a section for visualising the current state of the system:

alt text

Test scenario: we artificially cool down the temperature in the test room - the sensor sends out increasingly lower temperature readings. The temperature value has already exceeded the hysteresis threshold, but the LED still remains off:

alt text

Test scenario: the value of the last temperature readings fell below the setpoint, causing the heating system to start (LED on). Heating will be on until the temperature is greater than the hysteresis setpoint:

alt text