IoT-Based Water Heater Control
IoT-Based Water Heater Control
2 (2023)
Abstract—IoT devices can range from smart home devices such as thermostats and security systems to industrial control systems used
in manufacturing and other industries. One focus of the IoT-based monitoring and control concept is monitoring and controlling water
heaters based on IoT technology to support the creation of a smart home. The purpose of this research is to create a system that can
control and monitor water heaters remotely using the Android Studio application so that the water temperature in the heater can be
ensured for safety, comfort, reliability, and energy efficiency. The system is designed using temperature sensors and water flow sensors,
and then the data is processed with the NodeMCU microcontroller and then sent to the Firebase website to be displayed on the
application. The application built can set a large amount of water and heat it to the desired temperature before sending it to Firebase
and then to NodeMCU. The result of this research is an application that is able to control and monitor a water heater with an average
measurement difference of 0.38 liters and an average error percentage of 7.11% The relay control system in the application has an
average delay time of 3.6 seconds.
Keywords—Water heater, NodeMCU, smart home, temperature sensor, energy efficiency.
II. METHOD sensor DS18B20 to read the temperature value of heated water,
NodeMCU, namely the microcontroller to regulate the
Methodological research is a systematic process that is used components on the device, Relay four channels, with the switch
to design, create, collect, and analyse data to achieve goals and acting as a contact to power the DC water pump and water
solve problems. The research method for building an IoT-based heater. A buzzer will sound if the flowing water is too hot, a
water heater monitoring and control system is shown in Fig. 1. servo motor will rotate the Water Heater valve, a DC water
pump will pump water from the bucket to the Water Heater,
and the Water Heater will heat the water that flows from the
pump.
The first stage is identifying the problems to be solved by Figure 2. Block diagram of an IoT-based water heater monitoring and control
system
the system and collecting tools and materials to design and
build an IoT-based water heater monitoring and control system.
The second stage is the study of literature involving technology
and existing solutions related to the problem to be solved. This
stage can be completed by reviewing scientific papers or patent
applications. Designing system architecture, components, and
interfaces is the third stage of system design. The system to be
built consists of a sensor to measure water temperature, a
microcontroller to process data, and a cloud-based platform for
remote monitoring and control. The fourth stage of system
development involves creating a system based on the design
carried out in the previous stages. selection and integration of
sensors, microcontrollers, and cloud platforms, and
programming systems to meet system requirements. The fifth
stage of testing and evaluation involves system testing to
ensure that the system meets the requirements and functions as
expected.
A. Block Diagrams
Block diagrams were used to explain how the system
worked. The IoT-based water heater monitoring and control
system block diagram is shown in Fig. 2. The components used
are 1 unit water heater, 1 unit NodeMCU ESP8266, 1 unit 12V
5A power supply, 1 unit 4 channel relay module, 1 unit step Figure 3. NodeMCU ESP8266 Receiver System Flowchart to Android
down module, 1 unit DS18B20 temperature sensor, 1 unit B. Android Application System Design
water flow sensor, 1 DC water pump 12V, 1 piece iron pipe,
PVC pipe to taste, 2 buckets, 1 panel box, 1 regulator, wooden 1) Receiver System for Android
boards to taste, and 1 water faucet. In designing this system, a system for receiving data from
Based on Fig. 2, there is a component function consisting of monitoring water temperature and water flow was created on
a power supply as a voltage source for each system component, the Android application. Fig. 3 shows how the receiver system
Stepdown module to convert 12 v voltage to 5 v, sensor YF- works from the NodeMCU ESP8266 to Android, which is
201 to calculate the amount of water flow in units of liters, explained via a flowchart.
The first step is to initialize the NodeMCU ESP8266, control and ensure the water heater operates efficiently and
specifically with the temperature sensor reading and water flow effectively. In water heaters, servo motors can be used to
sent via the Wi-Fi network intermediary on the NodeMCU control the mixing of hot and cold water to reach the desired
ESP8266.The next step is to check the WiFi network temperature. The servo motor is connected to a mixing valve,
connection process on the NodeMCU ESP8266. Then, if the which regulates the flow of hot and cold water into the water
Wi-Fi network is connected, NodeMCU ESP8266 will retrieve heater tank. Transmitter system flowchart Servo control in the
data from the Firebase website; if not, then NodeMCU Android application is described in Fig. 5.
ESP8266 will initialize it again. The data taken from the
Firebase data then displays the sensor reading results in real
time on the Android application in the form of a numeric value.
2) Android Relay Control Receiver and Transmitter
System
A receiver and transmitter system were created during the
design of this system to relay control on the Android
application. The relay control system is used to turn on or turn
off the water heater and also the water pump, which works
according to sensor output. Fig. 4 shows how the receiver and
transmitter system work for relay control, which is explained
through a flowchart.
Start
temperature value on the temperature sensor is 36.75 oC. If the Based on the data obtained, it can be seen that the difference
final value of the temperature test measured on the in input water volume readings between the volume meter and
thermometer measuring instrument is 50 oC, then the the sensor is quite large with an average error proportion value
temperature value on the sensor is 46.5 oC. The difference in the of 7.11%, the highest error value is around 13% and the lowest
largest temperature measurement is on a thermometer value is around 4.59%. can be seen in table III, if the initial
measuring instrument and the sensor is obtained at a value of measuring the input water volume on the measuring
temperature value of 50 oC which is 3.5 oC or equivalent to a 7 % instrument is 3 L, then the air volume value on the sensor is
proportion of error, then the difference in nail temperature is 3.176 L. If the final value of the temperature test measured on
followed by 42 oC of 3.25 oC or 6.7 % and 40 oC is 2.5 oC or the measuring instrument is 7 L, then the air volume value at
6.25 %. the greater the temperature value measured on the sensor is 7.43 L. The largest difference in measurement of the
temperature sensor, the greater the temperature value measured volume of input water on the measuring instrument and sensor
on the thermometer measuring instrument, and vice versa. this is obtained at a value of 5 L, which is 5.752 L or equivalent to
shows that the temperature value measured at the sensor 13% of the proportion of error, then the difference in the
temperature is directly proportional to the temperature value volume of input water is followed by 4 L of 4.286 L or 6 .67%
measured on the thermometer measuring instrument. and 7 L is 7.43 L or 5.78%. the greater the input water volume
Differences in temperature values between the temperature value measured on the sensor, the greater the input water
sensor and the measuring instrument thermometer occur due to volume value measured on the measuring instrument, and vice
user error; calibration level; and the quality of the sensors used. versa. this shows that the value of the input water volume
Based on the measurement data above, we get a comparison measured on the sensor is directly proportional to the value
of the readings between the temperature value input from the measured on the measuring instrument. The difference in the
application and the reading value from the temperature sensor. value of the input water volume between the sensor and
The difference in reading values produced is quite large, with measuring instrument occurs due to user error; calibration level;
the highest reading error percentage of 7 % and an average and the quality of the sensors used.
error percentage of 5.38 %. The reason for the large difference Based on the resulting measurement data, we get a
in reading the existing values is due to the long delay in sending comparison of the readings between the value of the amount of
the off-relay command from the application to NodeMCU, so water input through the application and the value of the water
that when the temperature value input from the application is flow sensor. The difference in reading the resulting value is
met, the water heater relay is a little late to turn off and causes quite large, with the highest reading error percentage of 13%
the water heater to turn off late. (there is an error in the calibration, or the sensor cannot work
properly) and an average error percentage of 7.11%. The large
B. Water Flow Sensor Testing
difference in value obtained is caused by the delay in sending
Testing the Water Flow sensor aims to determine the volume data from the website to NodeMCU. Also, when the water
of water released by the Water Heater, as well as the precision input value in the android application has been fulfilled and the
level of the sensor, whether the volume of water input via a Water Heater is off, the remaining water from the Water Heater
smartphone is the same as the volume of water released by the flows back from above to the bucket through the pipe, and the
Water Heater, and what the difference in the resulting values is. water flow sensor causes the sensor to recalculate the
The following is the process of testing and retrieving water remaining water flow so that the reading of the sensor value
flow sensor data when heating water. goes up.
TABLE III
SYSTEM TESTING AND WATER FLOW SENSOR ACCURACY
Water Water volume is
No. Percentage Error (%)
Input(L) obtained (L)
1 3 3,176 5.54 %
2 4 4,286 6.67 %
3 5 5,752 13 %
4 6 6,289 4.59 %
5 7 7,430 5.78 %
Average 7.11 %
control the water heater relay and servo motors via a Wi-Fi in the image below. The results of this study demonstrate the
network to send data commands. Pictures of the testing process feasibility of using IoT technology to monitor and control
can be seen below: water heaters. The system was able to accurately maintain
water temperature within the desired range, and real-time data
transmission and accessibility via a mobile app were found to
be convenient and useful features.
produced from the measurement of the water flow sensor with [5] M. I. Joha and M. S. Islam, “IoT-Based Smart Home
an average measurement difference of 0.38 liters and an Automation Using NodeMCU: A Smart Multi-Plug with
average error percentage of 7.11% The relay control system in Overload and Over Temperature Protection,” 2021 24th
the application has an average delay time of 3.6 seconds. International Conference on Computer and Information
Technology (ICCIT), Dhaka, Bangladesh, 2021, pp. 1-6.
[6] H. González, P. Díaz, J. Toledo and S. E. Restrepo,
FUTURE WORK “Design of an occupancy simulation system in Smart
homes based on IoT,” 2021 IEEE International
With the advancement of IoT, water heaters will become Conference on Automation/XXIV Congress of the
more intelligent and efficient. Some potential areas for future
Chilean Association of Automatic Control (ICA-ACCA),
work in this field are:
Valparaíso, Chile, 2021, pp. 1-8.
The water heater can integrate with other smart home [7] S. P. Medeiros, J. J. P. C. Rodrigues, M. A. A. da Cruz,
devices, enabling central control and monitoring of all R. A. L. Rabêlo, K. Saleem and P. Solic, “Windows
household appliances. This will certainly help Monitoring and Control for Smart Homes based on
improve energy efficiency and provide greater Internet of Things,” 2019 4th International Conference on
comfort for homeowners. Smart and Sustainable Technologies (SpliTech), Split,
Energy management in IoT-enabled water heaters Croatia, 2019, pp. 1-5.
optimizes energy use based on real-time data, such as [8] Domb, Menachem, “Smart home systems based on
outside temperature and home water usage patterns. internet of things,” Internet of Things (IoT) for automated
and smart applications, IntechOpen, 2019.
REFERENCES
[9] Wen-Tai Li, Wayes Tushar, Chau Yuen, Benny Kai Kiat
[1] S. S. Rajawat, A. Basit, H. Walia, K. Saxena and A. Rana, Ng, Stewart Tai, Kwee Tiang Chew. “Energy efficiency
“Internet of Thing based Electrical Device Surveillance improvement of solar water heating systems – An IoT
and Management Apparatus,” 2021 9th International based commissioning methodology.” Energy and
Conference on Reliability, Infocom Technologies and Buildings. Volume 224. 2020. 110231. ISSN 0378-7788.
Optimization (Trends and Future Directions) (ICRITO), [10] Jan F, Min-Allah N, Düştegör D. “IoT Based Smart Water
Noida, India, 2021, pp. 1-6. Quality Monitoring: Recent Techniques, Trends and
[2] C. K. Metallidou, K. E. Psannis and E. A. Egyptiadou, Challenges for Domestic Applications. Water.” 2021;
“Energy Efficiency in Smart Buildings: IoT 13(13):1729.
Approaches,” in IEEE Access, vol. 8, pp. 63679-63699, [11] Hohne, P. A., Kusakana, K., & Numbi, B. P. (2019), “A
2020. review of water heating technologies: An application to
[3] W. Li, T. Logenthiran, V. -T. Phan and W. L. Woo, “A the South African context,” Energy Reports, 5, 1-19.
Novel Smart Energy Theft System (SETS) for IoT-Based [12] Patricio, M. U. A., & Vladimirovna, P. T., “Improving
Smart Home,” in IEEE Internet of Things Journal, vol. 6, energy efficiency in the Republic of Ecuador,” 2022,
no. 3, pp. 5531-5539, June 2019. International Multidisciplinary Scientific
[4] M. Rokonuzzaman, M. I. Akash, M. Khatun Mishu, W. - GeoConference: SGEM, 20(5.2), 285-292.
S. Tan, M. A. Hannan and N. Amin, “IoT-based [13] A. Abdi Musyafiq, N. Asma Ilahi, R. Prima Dewi, and U.
Distribution and Control System for Smart Home Barokah, “Simulation of Piko Hydro Power Generator
Applications,” 2022 IEEE 12th Symposium on Computer Using Thread Turbine With 10 Watt Power”, Jartel, vol.
Applications & Industrial Electronics (ISCAIE), Penang, 12, no. 2, pp. 100-104, Jun. 2022.
Malaysia, 2022, pp. 95-98.