Fathooo
Menu
Contactar

Temperature Control with ESP8266 NODEMCU

IoT system for automatically regulating temperature using ESP8266 NODEMCU, sensors, and relay module.

Arduino C++ DHT22 ESP8266 IoT NodeMCU

About the project

REPOSITORY:

Click here

Materials:

  • ESP8266 NODEMCU
  • DHT11 Sensor
  • 5V Relay Module
  • Heat Mat for Reptiles
  • Display Module

20220209182455.webp 20220209182534.webp 20220209182556.webp

Operation:

  • The operation is straightforward; my intention is to regulate the temperature of an enclosed space when it is below 24 degrees Celsius. This is useful for the care of animals or for regulating plant temperatures by adding a relay module with higher voltage and amperage capacity.

  • An optimal temperature range has been applied in which it is desired to operate. When the minimum temperature is reached, the relay turns on, supplying power to the heat mat. When the maximum temperature is reached, the relay turns off, cutting power to the heat mat and thus lowering the temperature. All this configuration is done from a browser.

  • From a computer or mobile device, one can access the browser to view the current temperature and humidity in real-time, as well as the current temperature range settings. The configuration can also be modified with a minimum and maximum temperature along with a user that serves as an authenticator.

20220209135234.webp

  • The data is stored in the GCLOUD cloud, specifically in RealtimeDatabase.

20220209133653.webp

  • As can be seen, the Celsius degrees, humidity, date, and time are stored. Subsequently, the data is downloaded in JSON format and regular expressions are used to work with it.

20220209143752.webp

  • Up to this point, the project is functioning and collecting data for monitoring.

Data Analysis

  • Python is used for the analysis as it allows for sorting the data and generating graphs.

  • Since the information is in RAW format separated by a pipe " | ", regular expressions are used to sort the information and transform it into a dataframe with pandas.

20220209170624.webp

  • The temperature configuration set was a minimum of 27 degrees and a maximum of 28 degrees. After conducting a descriptive analysis of the data, it can be determined that:

20220209170354.webp

  • A total of 2824 data points were collected, with an average temperature of 27.67 degrees and a standard deviation of 0.18. The data shows that a minimum of 22.6 degrees and a maximum of 29.10 degrees were reached. When the data is sorted, it can be observed that 25% of the temperatures are at 27.6 degrees, 50% at 27.7 degrees, and 75% at 27.8 degrees, which is consistent.

  • The count of data points for each temperature reached is as follows:

20220209170444.webp

  • The following graph shows the average temperature over the last 7 days.

20220209180204.webp

  • The following graph shows the last two weeks.

20220209181945.webp

  • A weak correlation between humidity and temperature can be observed.

20220209172120.webp 20220209174502.webp

  • This fact is corroborated in the following scatter plot (average temperature and humidity per day).

20220209172456.webp

  • Additionally, the graph of total temperature and humidity per day is shown.

20220209172738.webp

Temperature Control with ESP8266 NODEMCU