Design of Water Heater Temperature Control System
Design of Water Heater Temperature Control System
1, No 2, 2023
ISSN: 2985-6116, DOI: 10.59247/csol.v1i2.41 111
Abstract— This research delves into advanced control Adapting to different applications, liquid heating requires
methodologies by investigating the intricate applications of accurate temperature adjustments as a function of time. These
Proportional-Integral-Derivative (PID) control for adjustments can vary, and the work of the actuator needed
achieving precise and dependable temperature regulation also varies based on the desired power output. Some water
within electric water heaters. The study delves into various heaters have thermostats that provide discrete control (on/off)
control strategies, namely Proportional, Proportional-
Integral, and Proportional-Integral-Derivative
and require human operators for manual operation or
methodologies, to realize the pinnacle of stable and exacting automatically [14], [15]. However, PID (Proportional
temperature control. The Proportional Controller, Integral Derivative) control offers analog control capable of
operating with a Kp value of 10, stands out with its continuously and precisely regulating the power output of a
relentless performance, characterized by minimal heater as needed. With this control system, water heating that
overshoot and an inconsequential steady-state error. demands excellent temperature accuracy concerning time can
Implementing the Proportional-Integral Controller, be automated effectively. The process can be carried out
synergizing Kp at 10 and Ki at 5, elevates system stability efficiently and accurately during the heating and temperature-
while deftly curbing any hint of overshoot. The dynamic holding phases. The PID control system provides continuous
interplay between the Kp, Ki, and Kd parameters in the
Proportional-Integral-Derivative (PID) Controller unveils
analog control, reducing the need for manual intervention
an intricate dance of precision and control. Notably, [16].
configurations involving Kp 10, Ki 5, and Kd 2 emerge as Prior research has addressed the thermal stabilization of
beacons of rapid stabilization, heightened precision, and water heater dispensers through diverse approaches. A
masterful overshoot management, exemplified by a rise notable methodology involves the application of Ziegler-
time of 119.3543 seconds, settling time of 162.6116 seconds, Nicholas PID tuning, resulting in the achievement of a peak
overshoot of 1.0299%, peak time of 216 seconds, and a temperature of 92.62°C within 34 minutes, alongside prompt
commendably low steady-state error of 0.31. This extensive attainment of a water temperature of 65°C in 8 minutes (480
exploration bears testament to its instrumental role in seconds) [17]. A thermoelectric portable water heater has
optimizing PID control strategies, ushering in augmented
efficacy and pinpoint accuracy in water temperature
been developed in a separate study, employing a power bank
regulation across an expansive spectrum of applications. As as the energy source. Notably, this investigation attains a
a result, these findings pave the way for the evolution of maximum water temperature of 34°C within 15 minutes (900
control methodologies that transcend theoretical confines seconds), omitting the utilization of PID control [18].
and manifest within practical scenarios with profound Considering the background presented above, the authors
impact. recognize the importance of understanding how PID
Keywords—DS18B20, Arduino, Water Heater, PID controllers can be applied to electric water heaters and how
proper PID tuning can be implemented in PID controller-
I. INTRODUCTION
based electric water heaters. Therefore, this research involves
Electric heaters are electronic devices that convert the development of a prototype and experimentation on
electrical energy into heat energy. A resistor [1] is the heating “Design of Water Heater Temperature Control System using
element present in electric heaters [2], [3]. Electricity is PID Control” where a 12 Volt immersion water heater with a
transformed into heat energy when an electric current flows power of 120 Watts is employed as the actuator, and a
through the resistor [1]. Liquid heating is a form of electrical waterproof DS18B20 temperature sensor is used for
heating where specific fluids are heated to predetermined temperature measurement.
temperatures as needed. Liquid heating finds applications in
various fields, including industries, research, and households. II. METHODS
Temperature control is essential in several industries and This research calibrated the heater's temperature using a
applications, such as maintaining the ideal water temperature standardized thermometer, and optimal PID parameters were
for different types of fish [4]–[6], achieving the perfect determined for precise and continuous control. The research
temperature for coffee [7], [8], and ensuring a comfortable aims to achieve stable temperature control, which is vital in
bathwater temperature [9], [10], aquaponic [11], [12], and various applications, enhancing process efficiency and
temperature control for baby incubator [13]. Water is one of reliability. Experimental results will advance PID
the most commonly used substances in various liquid heating implementation in heating systems.
applications.
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
Control Systems and Optimization Letters, Vol. 1, No 2, 2023 112
B. Wiring Diagram
The Water Heater Temperature Control System is While (1) = ?
integrated with the Arduino Uno 328P microcontroller as its
primary computing unit. The system features four push
buttons, a BTS7960 module, and auxiliary components,
End
including a power supply, step-down module, DS18B20
temperature sensor, and an LCD 16x2 display. The Arduino
Fig. 3. Flowchart system
Uno 328P is the central control hub, receiving input signals
from the push buttons and DS18B20 sensor and effectively D. System Diagram
managing the output control to the BTS7960 and LCD. This
Fig. 4 illustrates the System diagram of a systematic tool
arrangement enables the system to regulate the water heater's
temperature precisely and efficiently during heating. For a designed for real-time water temperature monitoring during
visual representation of the system's wiring connections, refer water heating. The system incorporates a 12V DC water
to Fig. 2 Wiring Diagram. Arduino-based control in the heater for elevating the water temperature and a DS18B20
Water Heater Temperature Control System enhances its sensor to detect and record the precise water temperature
responsiveness and accuracy, offering practical applications values. Upon reaching a predetermined set point, the system
seamlessly engages an automated mechanism to regulate and
in various industrial and research settings.
sustain the water temperature at the desired level. This control
mechanism can encompass either the pulse-width modulation
(PWM) signal or the implementation of a feedback loop.
Subsequently, the system displays the designated set point
value on the user interface, predominantly involving the
operation of a Laptop through the Arduino Integrated
Development Environment (IDE) alongside a 16x2 LCD.
This comprehensive interface provides users a convenient
Fig. 2. Wiring diagram means to access and comprehend crucial temperature
Vatia Fahrunisa Rahmadini, Design of Water Heater Temperature Control System using PID Control
Control Systems and Optimization Letters, Vol. 1, No 2, 2023 113
information, facilitating efficient monitoring and control of response has ceased until a relatively infinite time. The
the water heating process. characteristics of a control system's quick response to a step
input can generally be expressed as follows. Peak Time (tp)
refers to the time the responsive system takes to reach the first
peak of the overshoot takes. Rise Time (tr) indicates the
duration required by the responsive system (output) to reach
the final value (or encompass the range between 10% to 90%
of the final value). Undershoot describes the condition where
Fig. 4. System diagram a signal or function has a value lower than the reference (set
point) value.
E. PID The maximum overshoot, Mp, represents the maximum
The Proportional Integral Derivative (PID) controller is a value of the peak response calculated relative to the value of
feedback control mechanism commonly employed in one. The maximum overshoot is usually expressed as a
industrial control systems [19]. A PID controller percentage of the responsive system achieving stability. The
continuously calculates the error as the difference between value of overshoot in percentage is calculated using the
the desired setpoint and the measured process variable. It equation (2):
strives to minimize the error value over time by adjusting 𝑐(𝑡𝑝) − 𝑐(∞)
control variables, such as control valve position, damper 𝑀𝑝 = 𝑥 100% (2)
𝑐(∞)
opening, or heating element power, to new values determined
by the PID controller's equation (1) [20]. In this context, 𝑐(𝑡𝑝) represents the value of the
maximum overshoot, and 𝑐(∞) refers to the value when the
𝐾𝑝 𝑡 𝑑𝑒(𝑡) system reaches a steady-state condition. The maximum
𝑢 = 𝐾𝑝 𝑒(𝑡) + ∫ 𝑒(𝑡)𝑑𝑡 + 𝐾𝑝 𝑇𝑑 (1)
𝑇𝑖 0 𝑑𝑡 amount of overshoot indicates the level of system stability. A
stable system will have an overshoot that does not exceed
In the control system, Kp represents the proportional
10%. Delay Time (TD) is required for the system response to
constant, Ki represents the integral constant, and Kd
reach half the final value for the first time. Settling time (Ts)
represents the derivative constant, all of which are essential
describes the time the system output reaches and remains
parameters in the Proportional-Integral-Derivative (PID)
within its steady-state value (± 2% of the final value). Steady-
control algorithm widely used in regulating and stabilizing
state error is the difference between the desired final value
various industrial processes [21]. The proportional constant
(set point) and the actual final value when the system reaches
(Kp) determines the control action's magnitude in proportion
the steady-state condition. Understanding these system
to the error signal, the integral constant (Ki) acts on the
response characteristics is crucial in analyzing and designing
integral of the error signal over time, and the derivative
control systems to achieve desired performance and stability.
constant (Kd) influences the rate of change of the error signal.
By fine-tuning these PID constants, the system's response and III. RESULTS AND DISCUSSION
stability can be optimized, leading to efficient and accurate
This research delves into water temperature control in a
control of dynamic systems in engineering and industrial
water heater, focusing on evaluating PID methods. The study
applications. The parameter P responds to the current error
examines the time efficiency and heat response achieved
measurement, where a significant positive error value results
in a sizeable positive control output. The parameter I address through PID implementation. Throughout the investigation, a
the accumulated error from past periods, and if the current meticulous analysis of PID parameters and their impact on
the water heater's performance is conducted, aiming to gain
output is too low, the error will accumulate, prompting the
comprehensive insights into the efficacy and dependability of
controller to respond with a higher result. Parameter D is
the PID Controller in regulating water heater temperatures.
responsible for predicting future errors based on the rate of
The findings from this study will contribute to advancing the
change over time. These PID parameters facilitate robust and
precise control, enabling advanced applications in diverse knowledge and practical application of PID control
industries. techniques for water heating systems, ultimately enhancing
their efficiency and reliability in various domains.
The PID controller's ability to continuously analyze and
adjust control variables enables precise and efficient control A. Temperature Sensor
in various industrial processes. By considering the present The temperature sensor testing commenced with the
error, past accumulated error, and future error prediction, the calibration of the sensor using a standardized thermometer.
PID controller can maintain the system at the desired setpoint, Throughout this phase, the sensor underwent testing under
effectively regulating the process and enhancing overall diverse temperature conditions, spanning from 34.5 degrees
system performance. The PID control approach has proven to Celsius to 41.7 degrees Celsius, aligning with the maximum
be an essential tool in industrial automation, offering measurement capacity of the standardized thermometer.
stability, accuracy, and adaptability in controlling complex Table 1 presents the outcomes obtained from the calibration
systems across different applications. test, showcasing the correlation between the temperature
F. System Response sensor readings and the readings obtained from the
System response is the system's response from the initial standardized thermometer.
state to the steady-state condition. In contrast, steady-state
response refers to the output condition after the system
Vatia Fahrunisa Rahmadini, Design of Water Heater Temperature Control System using PID Control
Control Systems and Optimization Letters, Vol. 1, No 2, 2023 114
Vatia Fahrunisa Rahmadini, Design of Water Heater Temperature Control System using PID Control
Control Systems and Optimization Letters, Vol. 1, No 2, 2023 115
The analysis of the dynamic response characteristics of In the first configuration with Kp set to 10 and Ki set to
the Proportional Controller across varying Proportional 1, a significant limitation in system stabilization was evident,
Constant (Kp) values, as presented in Table 2, offers valuable leading to an undefined settling time (“NaN”). The rise time
insights into its efficacy in regulating temperature control measured at 127.5158 seconds and an overshoot of 1.4925%
processes. The study underscores that a Kp value 10 leads to indicated a temporary deviation beyond the desired setpoint
a notably shorter settling time, quicker rise time, modest during stabilization. Additionally, the system consistently
overshoot, and the smallest steady-state error, indicating its undershot the desired setpoint, as demonstrated by the steady-
ability to achieve rapid convergence to the desired state error of -1.
temperature with precise control and minimal deviations. Moving to the second configuration with Kp set to 20 and
This comprehensive evaluation suggests that a Kp value 10 is Ki set to 5, the system showcased successful stabilization
optimal for maintaining stable and accurate temperature with a settling time of 178.3000 seconds. The improved rise
control, with other tested values showing trade-offs between time of 125.4547 seconds indicated more efficient
responsiveness and performance metrics. These findings hold temperature attainment compared to the previous
significant implications for enhancing temperature control configuration. Moreover, the minimal overshoot of 0.0896%
strategies across various practical applications. highlighted a stable response close to the desired setpoint.
The peak time was approximately 198 seconds, and the
D. Proportional Integral Controller
steady-state error was 0, signifying effective maintenance of
In this experimental study, we implemented and tested the the desired setpoint without deviation.
Proportional Integral Controller on the water heater system. The third configuration, Kp set to 50 and Ki set to 7,
We maintained a fixed Kp value of 10 and a Kd value 0. demonstrated relatively rapid stabilization with a settling
However, to observe the response of the Integral Controller time of 223.3733 seconds. The rise time remained
in the water heating system, we varied the Ki parameter. We comparable to the previous configuration, at 126.5626
set the test duration to 250 seconds and selected the seconds. An observed overshoot of 0.3731% indicated a
experiment's Ki parameter values of 1, 5, and 7. The minor transient peak during stabilization, while the peak time
Proportional Integral Controller testing results for the water was approximately 242 seconds. The steady-state error of -
heating system are depicted in Fig. 6, offering valuable 0.06°C indicated a slight undershoot from the desired
insights into the system's performance under different Ki setpoint.
settings. Additionally, Table 3 presents the comprehensive The analysis of the Proportional Integral (PI) Controller
response system results for the Proportional Integral tests presented in Table 3 offers insightful guidance for
Controller. selecting optimal control parameters in the context of a water
heater system. Among the tested configurations, the second
setup with Kp set to 20 and Ki set to 5 emerges as the most
effective. This configuration demonstrated successful
stabilization with a reasonable settling time, improved rise
time, minimal overshoot, and accurate maintenance of the
desired setpoint. These attributes collectively signify a
controlled and precise temperature regulation process. The
results emphasize the importance of carefully balancing the
Proportional (Kp) and Integral (Ki) constants for optimal
system performance, with the Kp value of 20 and Ki value of
5 offering the best compromise between response speed and
stability. These findings are valuable for enhancing control
strategies in various practical applications necessitating
accurate temperature regulation.
Fig. 6. Proportional integral controller system
E. Proportional Integral Derivative (PID) Controller
Table 3 presents a comprehensive assessment of the We conducted the experimental endeavor with meticulous
Proportional Integral Controller (PIC) tests conducted on the precision in the PID controller evaluation. The Kp value
water heater system, where the Proportional Constant (Kp) remained unwavering at 10, while we kept the Ki parameter
and Integral Constant (Ki) were systematically varied to resolute at 5, providing a consistent backdrop against which
investigate the system's response under diverse control we deftly manipulated the enigmatic Kd parameter. This
parameter configurations. The outcomes offer crucial insights probing exploration transpired across a carefully stipulated
into the system's behavior, encompassing stability, response temporal expanse of 300 seconds, within which a thorough
speed, overshoot, peak time, and steady-state error. assessment of the PID controller's comportment materialized,
orchestrated through the systematic variation of Kd values,
Table 3. Response system proportional integral controller specifically 1 and 2. The graphical depiction seen in Fig. 7
Peak Steady
eloquently elucidates the zenith of these empirical
Settling Rise Overshoot investigations, serving as a visual testament that intricately
Kp Ki Time State
Time (s) Time (s) (%)
(s) Error(°C) captures the system's nuanced oscillations and behaviors. It
10 1 NaN 127.5158 1.4925 250 -1 dynamically responds to the distinct and multifarious Kd
20 5 178.3000 125.4547 0.0896 198 0
50 7 223.3733 126.5626 0.3731 242 -0.06
configurations.
Vatia Fahrunisa Rahmadini, Design of Water Heater Temperature Control System using PID Control
Control Systems and Optimization Letters, Vol. 1, No 2, 2023 116
Vatia Fahrunisa Rahmadini, Design of Water Heater Temperature Control System using PID Control
Control Systems and Optimization Letters, Vol. 1, No 2, 2023 117
Robotics and Control (JRC), vol. 2, no. 3, pp. 161–165, 2021, [18] M. K. Fadzly, S. N. Aqilah, Farizuan, T. Amarul, and A. R. Irfan,
https://doi.org/10.18196/jrc.2371. “Portable Water Cooler with Water Heater Using Thermoelectric and
[4] T. Abinaya, J. Ishwarya and M. Maheswari, “A Novel Methodology Arduino Uno and Powered Using Power Bank,” IOP Conference
for Monitoring and Controlling of Water Quality in Aquaculture using Series: Materials Science and Engineering, vol. 864, no. 1, p. 012216,
Internet of Things (IoT),” 2019 International Conference on 2020, https://doi.org/10.1088/1757-899X/864/1/012216.
Computer Communication and Informatics (ICCCI), pp. 1-4, 2019, [19] A. Latif, A. Z. Arfianto, H. A. Widodo, R. Rahim, and E. T. Helmy,
https://doi.org/10.1109/ICCCI.2019.8821988. “Motor DC PID system regulator for mini conveyor drive based-on
[5] Y. Kim, N. Lee, B. Kim and K. Shin, “Realization of IoT Based Fish matlab,” Journal of Robotics and Control (JRC), vol. 1, no. 6, pp.
Farm Control Using Mobile App,” 2018 International Symposium on 185–190, 2020, https://doi.org/10.18196/jrc.1636.
Computer, Consumer and Control (IS3C), pp. 189-192, 2018, [20] A. Ma’arif, Iswanto, N. M. Raharja, P. Aditya Rosyady, A. R. Cahya
https://doi.org/10.1109/IS3C.2018.00055. Baswara and A. Anggari Nuryono, “Control of DC Motor Using
[6] T. I. Salim, T. Haiyunnisa and H. S. Alam, “Design and Proportional Integral Derivative (PID): Arduino Hardware
implementation of water quality monitoring for eel fish Implementation,” 2020 2nd International Conference on Industrial
aquaculture,” 2016 International Symposium on Electronics and Electrical and Electronics (ICIEE), pp. 74-78, 2020,
Smart Devices (ISESD), pp. 208-213, 2016, https://doi.org/10.1109/ICIEE49813.2020.9277258.
https://doi.org/10.1109/ISESD.2016.7886720. [21] P. Warrier and P. Shah, “Design of an Optimal Fractional Complex
[7] A. Setiawan and A. Ma’arif, “Stirring System Design for Automatic Order PID Controller for Buck Converter,” Journal of Robotics and
Coffee Maker Using OMRON PLC and PID Control,” International Control (JRC), vol. 4, no. 3, pp. 243–262, 2023,
Journal of Robotics and Control Systems, vol. 1, no. 3, pp. 390–401, https://doi.org/10.18196/jrc.v4i3.17446.
2021, https://doi.org/10.31763/ijrcs.v1i3.457.
[8] G. Cosoli, P. Chiariotti, M. Martarelli, S. Foglia, M. Parrini and E. P.
Tomasini, “Development of a Soft Sensor for Indirect Temperature
Measurement in a Coffee Machine,” in IEEE Transactions on
Instrumentation and Measurement, vol. 69, no. 5, pp. 2164-2171,
2020, https://doi.org/10.1109/TIM.2019.2922750.
[9] M. D. Khairunnas, E. Ariyanto and S. Prabowo, “Design and
Implementation of Smart Bath Water Heater Using Arduino,” 2018
6th International Conference on Information and Communication
Technology (ICoICT), pp. 184-188, 2018,
https://doi.org/10.1109/ICoICT.2018.8528772.
[10] W. Ding, W. Chang, H. Gan and X. Xiong, “Multi-functional
intelligent bathing machine for the elderly,” 2020 5th International
Conference on Mechanical, Control and Computer Engineering
(ICMCCE), pp. 966-969, 2020,
https://doi.org/10.1109/ICMCCE51767.2020.00211.
[11] A. K. Pasha, E. Mulyana, C. Hidayat, M. A. Ramdhani, O. T.
Kurahman and M. Adhipradana, “System Design of Controlling and
Monitoring on Aquaponic Based on Internet of Things,” 2018 4th
International Conference on Wireless and Telematics (ICWT), pp. 1-
5, 2018, https://doi.org/10.1109/ICWT.2018.8527802.
[12] L. K. S. Tolentino et al., “Development of an IoT-based Aquaponics
Monitoring and Correction System with Temperature-Controlled
Greenhouse,” 2019 International SoC Design Conference (ISOCC),
pp. 261-262, 2019,
https://doi.org/10.1109/ISOCC47750.2019.9027722.
[13] A. Latif, H. A. Widodo, R. A. Atmoko, T. N. Phong, and E. T. Helmy,
“Temperature and humidity controlling system for baby incubator,”
Journal of Robotics and Control (JRC), vol. 2, no. 3, pp. 190–193,
2021, https://doi.org/10.18196/jrc.2376.
[14] G. M. Debele and X. Qian, “Automatic Room Temperature Control
System Using Arduino UNO R3 and DHT11 Sensor,” 2020 17th
International Computer Conference on Wavelet Active Media
Technology and Information Processing (ICCWAMTIP), pp. 428-432,
2020, https://doi.org/10.1109/ICCWAMTIP51612.2020.9317307.
[15] A. N. Fathoni, N. Hudallah, R. D. M. Putri, K. Khotimah, T. Rijanto
and M. Ma’arif, “Design Automatic Dispenser for Blind People based
on Arduino Mega using DS18B20 Temperature Sensor,” 2020 Third
International Conference on Vocational Education and Electrical
Engineering (ICVEE), pp. 1-5, 2020,
https://doi.org/10.1109/ICVEE50212.2020.9243254.
[16] D. Saputra, A. Ma’arif, H. Maghfiroh, P. Chotikunnan, and S. N.
Rahmadhia, “Design and Application of PLC-based Speed Control for
DC Motor Using PID with Identification System and MATLAB
Tuner,” International Journal of Robotics and Control Systems, vol.
3, no. 2, pp. 233–244, 2023, https://doi.org/10.31763/ijrcs.v3i2.775.
[17] R. Aisuwarya and Y. Hidayati, “Implementation of Ziegler-Nichols
PID Tuning Method on Stabilizing Temperature of Hot-water
Dispenser,” 2019 16th International Conference on Quality in
Research (QIR): International Symposium on Electrical and
Computer Engineering, pp. 1-5, 2019,
https://doi.org/10.1109/QIR.2019.8898259.
Vatia Fahrunisa Rahmadini, Design of Water Heater Temperature Control System using PID Control