Fuzzy Logic Method to Control Evenly Distributed and Stable Waterbath Temperature with Four Heaters

Water baths are commonly used in scientific fields to incubate samples at specific temperatures. The temperature of the water bath must be controlled precisely, because even the slightest temperature variation can affect the results of the experiment. It can handle imprecise, uncertain and incomplete information, making it suitable for temperature control in water baths. This research aims to determine the distribution and stability of fuzzy logic control to control the temperature of a water bath with four heaters. Even heat distribution from the four heaters will ensure consistent water bath temperature throughout the bath. This research uses an Arduino microcontroller to process the temperature sensor output from the DS18B20, then the processed temperature value will be displayed on the TFT LCD. The independent variable in this research is the temperature value, while the dependent variable is the DS18B20 temperature sensor. The largest error value from the module measurements is at a temperature setting of 30 ºC on the 2nd temperature sensor with an error value of 1.43%. Meanwhile, the smallest error value is found at a temperature setting of 35 ºC on the 1st and 4th temperature sensors with an error value of 0.01%. Data collection used a digital thermometer comparison tool with 10 repetitions as a temperature sensor reference tool. The results obtained using this sensor are more stable and have a high accuracy value. The results of the research show that the temperature difference between points 1 to 4 when viewed from the error percentage is very small, or it can be said that the temperature distribution is even. The conclusion from these results is that the module has a stable temperature value and the error value is low and is still within the tolerance limit. permitted is ±5%.


I. INTRODUCTION
Waterbaths are generally used in the scientific field to incubate samples at a certain temperature.The temperature of the waterbath must be controlled with precision, because even small variations in temperature can affect the results of the experiment.Several techniques have been developed to control waterbath temperature, such as on/off control, proportional control, and PID control [1]. the introduction of the Shaking Water Bath module with automated water filling and draining, temperature detection using the LM35 sensor, and real-time display on a 4x20 character LCD represents a significant advancement in medical laboratory equipment.The module's design addresses previous limitations associated with manual drainage systems, providing a safer and more efficient solution for heating, incubating, and mixing sample solutions [2].this paper presents a fuzzy logic-based temperature control system designed to address the challenges of multi-parameter and non-linear control models.Fuzzy logic technology offers several advantages over conventional control design techniques, including faster solution delivery and increased flexibility in defining control strategies [3].These techniques have their own advantages and disadvantages, but none of them can provide the desired level of stability and uniformity when handling large volumes.Fuzzy logic is a mathematical technique that can be used to control complex systems [4], Including temperature control in the waterbath.Fuzzy logic is a form of multivalued logic that handles levels of truth rather Absolute truth value.It can handle imprecise, uncertain, and incomplete information, making it suitable for temperature control in waterbaths.
The addition of heaters to the waterbath can be a solution for good temperature distribution and stabilization, using four heaters to control the temperature of the waterbath.The heaters will be placed at different locations within the waterbath to ensure even heat distribution.In this study using a digital sensor, namely DS18B20 as a temperature sensor.However, this study still uses an on-off system as a temperature control so that the possibility of overload is still frequent, and the temperature distribution in the chamber is still uneven.In 2019, the waterbath module was made by Febri Indiani with the title Waterbath Design equipped With Temperature Distribution Monitor (Temperature and Timer Control Parameters) [5]. the integration of the DS18B20 Waterproof temperature sensor with Arduino as a data acquisition system has proven to be a cost-effective and user-friendly solution for temperature measurements.This research addressed the critical aspect of sensor calibration to enhance accuracy, proposing a method that utilized an ASTM 117C thermometer calibrator and an oil medium for stability [6]. the integration of the DS18B20 sensor and advanced technologies has not only significantly improved the accuracy of the water bath temperature control system but has also elevated its practical utility.The system's capabilities align with the demands of various applications, reinforcing its relevance and value in ensuring precise and reliable temperature control in diverse scenarios [7]. the implementation of a fuzzy temperature controller on a microcontroller, devoid of specialized software tools, offers a unique and cost-effective solution to temperature control challenges in industrial settings.The distinctiveness of this approach lies in the development of a Fuzzy Logic Controller (FLC) with a minimal set of rules and a straightforward implementation, specifically tailored to address issues related to unknown system dynamics and variable time delays commonly encountered in industrial processes [8].this paper undertook a comprehensive comparison of intelligent techniques for temperature control in a water bath system, evaluating the performance of PID, GA-PID, Fuzzy Logic Control (FLC), Neural Network, Adaptive Neuro-Fuzzy Inference System (ANFIS), and GA-ANFIS through experimental studies.The assessment encompassed set-points regulation, ramppoints tracking, and the influence of unknown impulse noise and large parameter variations [9]. the presented system offers a technological solution to streamline the utilization of hot water for bathing by introducing an automatic faucet.Leveraging a Water Heater tool, temperature sensors, ultrasonic sensors, water pumps, and an Arduino Mega2560-based Android microcontroller with MQTT protocols, the system aims to expedite the process of achieving the desired water temperature in the main tub [10].the paper highlights the drawbacks of conventional controllers, particularly their reliance on prior knowledge of mathematical modeling, which can be limiting, especially in dealing with non-linear and complex control problems.To address these limitations, the paper explores the implementation of intelligent controllers, specifically focusing on Fuzzy Logic (FL) and Adaptive Neuro-Fuzzy Inference System (ANFIS) [11].this study demonstrates the practical application of fuzzy logic controllers for the temperature control of a treatment chamber, utilizing a PIC16f877A microcontroller.One of the primary advantages highlighted in the study is the inherent capability of fuzzy logic controllers to operate without requiring a mathematical model.This characteristic allows for the incorporation of expert knowledge through verbal expressions, making the control process more adaptable and user-friendly [12].this study addresses the crucial aspect of energy-saving renovation in existing public buildings in China, with a specific focus on public baths.The research explores the integration and optimization of hot water supply systems, leveraging the characteristics of various heat sources to enhance overall energy efficiency and hot water production.The following key findings and outcomes are highlighted [13].the study addresses the challenges associated with electrical power distribution in household settings, particularly when applying conventional subscription models to individual dorm rooms with smaller electrical loads.The integration of a Delimiter Tool for Electricity with a Triac-Based Microcontroller offers a tailored solution to limit and manage the supply of electrical power to each room based on specific settings configured through a keypad [14].The study found that P control, while requiring a high step input, could effectively reduce offset.PI control demonstrated a fast response and reduced steady-state error, making it a favorable option.PD control, however, was deemed highly unstable for the firstorder system, rendering it unfit for this particular application.The PID compensator emerged as a compromise between P and PI, exhibiting a balanced performance with a rise time of 541s, settling time of 794s, and an overshoot of 1.10% [15].this study introduces a novel approach to adaptive control, specifically targeting the challenges associated with training time and overtuning in multilayered backpropagation neural networks (BPNN).The proposed solution, a neural fuzzy inference network (NFIN), is designed for adaptive temperature control, particularly in the context of a water bath system [16].this paper outlines the successful development of a water bath control system within a virtual laboratory environment using LABVIEW 8.6.The project unfolds in three main stages, starting with hardware development to establish communication between the physical system and a computer.Subsequently, a Fuzzy Logic Controller (FLC) is implemented using LABVIEW, incorporating fuzzy set theory and rule-based logic.The final stage involves the creation of a web-based Graphical User Interface (GUI) module for real-time remote control and monitoring [17].this paper outlines the development of a temperature control system for an artificial rumen device utilizing a constant temperature water bath.The key contributions of the system include the use of an 89S51 microcontroller as the central control core and the implementation of a fuzzy control algorithm to achieve thermostatic control [18].this paper discusses the design and implementation of a fuzzy logic-based temperature controller for a vacuum distiller used in the production of high-concentration bioethanol.The vacuum distiller operates under nearly vacuum conditions, and precise temperature control is crucial for optimizing the bioethanol production process, especially given the high heating power requirements [19].this study addresses the crucial issue of predicting device temperature in high-performance mobile devices, emphasizing the impact of temperature on device reliability, lifespan, and energy efficiency.Thermal models are pivotal in making accurate predictions and optimizing workload scheduling based on these predictions.This research introduces two generic methods to extend thermal models [20].this study addresses the critical issue of cardiovascular disease by exploring the implementation of an Internet of Things (IoT)-based ECG monitoring system.The traditional ECG examinations in hospitals may have limitations, leading to delays in delivering results and potential risks associated with negligence.The objective of this research is to analyze ECG signals sent and received through IoT media to enhance the diagnostic process [21].the study aimed to design and implement a water bath temperature control system using Arduino Atmega 328, PID controller, and DS18B20 sensor.The primary focus was on creating a reliable tool for maintaining constant temperatures, particularly in the context of microbiology analysis [22]. the development of a temperature and humidity monitoring system was successfully achieved using components such as Arduino Uno, DHT11 sensor, USB cable, adaptor, DC power jack, 9-V battery connector, 9-V DC battery, resistor, LCD screen, trimmer potentiometer, LED bulbs, jumper wires, micro SD card module, and PCB.The field testing conducted at various locations within the college campus demonstrated the system's functionality, reliability, and cost-effectiveness [23].this research focuses on addressing the challenges of traffic congestion, accidents, speed, and irregularities through the application of fuzzy logic in a multi-agent-based autonomous traffic lights control system.The increasing vehicular travel in urban areas necessitates the optimization of traffic control methods to meet the rising demand, and intelligent traffic control systems become crucial in this context [24].the exploration of a temperature-controlled waterbath as a simple yet illustrative example has provided valuable insights into mathematical methods for describing linear systems and feedback controls.The journey began with the formulation of a mathematical model, expressing the relationship between temperature (output signal) and heating power (input signal) through a first-order differential equation reminiscent of the RC-lowpass model [25].the Temperature Calibrator (5 Channels) designed for calibrating temperature-related devices, particularly Sterilizers, demonstrates its significance in ensuring precise temperature measurements.The integration of a type-K thermocouple, a user-friendly 4x20 LCD, and a micro SD card for data storage enhances its functionality and applicability in laboratory settings [26].The experimental results validate the effectiveness of the proposed fuzzy logic controller with unevenly-distributed membership functions in achieving superior temperature control performance and system robustness.These findings have practical implications for various applications requiring precise and robust control systems, particularly in environments susceptible to noise disturbances [27].The application of fuzzy logic control has enabled the system to optimize drying conditions dynamically, thereby achieving faster and more efficient drying while minimizing energy consumption.By maintaining closed conditions within the dryer, the system effectively reduces the spread of unpleasant odors in the surrounding environment, enhancing overall environmental quality [28].This study presents a significant advancement in the field of furnace temperature control by introducing a novel approach based on Fuzzy Logic Control (FLC).The furnace, operating at temperatures up to 1500 degrees Celsius, serves the critical purpose of studying welding materials' characteristics under extreme heat conditions [29].This study has demonstrated the effectiveness of applying the Tsukamoto fuzzy approach to achieve precise and flexible control over internal environmental conditions, specifically temperature and humidity, in a plant factory system.The main objective was to maintain constant environmental conditions to ensure optimal growth and cultivation of vegetable plants, focusing on pak choy [30].Based on the problems and research that has been carried out, the author will create research entitled "Fuzzy Logic Method for Controlling the Distribution and Stability of Waterbath Temperature with 4 Heaters".This research aims to determine the distribution and stability of fuzzy logic control for controlling the temperature of a waterbath with four heaters.Even heat distribution from the four heaters will ensure an even water bath temperature.

II. METHODHOLOGY
This research aims to determine the distribution and stability of fuzzy logic control to control the temperature of a water bath with four heaters.Even heat distribution from the four heaters will ensure the water bath temperature is consistent throughout the water bath.Using a digital thermometer comparison tool as a reference and comparison in determining the value of sensor accuracy and temperature sensor stability [26].DS18B20 used in this study.The research design used in making the module is Preexperimental with the type After Only Design.In this design, researchers only use one group of subjects and only look at the results without measuring and knowing the initial conditions, but there is already a comparison group.
This study used sensors using DS18B20 temperature sensors.DS18B20 Temperature Sensor is a one wire digital temperature sensor or only requires 1 pin of communication data line.Each sensor DS18B20 has a unique 64-bit serial number which means we can use multiple sensors on the same power bus (many sensors connected to the same GPIO).DS18B20 provides 9 to 12-bit readings.The number of bits can be configured.The readings are sent to or from the DS18B20 via a one wire interface.The power required to read, write, and perform temperature conversions can be derived from the data path itself without the need for an external power source.Based on information from the datasheet, this sensor has a temperature measurement range from -55 ºC to +125 ºC dengan akurasi kurang lebih 0,5 ºC dari -10 ºC sampai +85 ºC.
In the block system FIGURE 1 When the on/off button is pressed and all circuits get PLN power supply, then all sensors will work and start initializing the LCD.Basically, Arduino as a source of temperature control settings as well as heater and water level settings.The data is in the form of temperature and timer that will be displayed on the TFT LCD.Water level input will detect the level or height of water in the chamber.The input of the temperature sensor at 4 points, namely the T1 sensor, T2 sensor, T3 sensor and T4 sensor will read the measured temperature.Push button consists of Up, Down, Enter, Monitoring and Reset buttons.The Down button is used to reduce the desired temperature and time.The Up button is used to add temperature settings and time settings.Enter is used to select the desired temperature and time settings and start the system.The monitoring button is used to display the temperature at each monitoring point in the waterbath chamber.When the temperature is reached at the setting point of 30 ° C -60 ° C, the buzzer and timer will be turned on according to the controlled time setting, namely in the selection of 5, 10, 15 minutes on the buzzer driver from Arduino.The thermostat functions to turn off the heater if the temperature exceeds the setting temperature that has been Determined.The timer will Off when the specified time has been reached with the reset button used to reset the system and restart from the beginning.FIGURE 2 is a system flow diagram, starting from turning on the ON button, after the module is activated the process begins with initialization after completion it will continue with water level detection by the microcontroller.If the water level is LOW (When water is lacking) the LED LOW indicator will light up and the buzzer will sound, then manual water filling can be done by the user.The water level will detect the water level filled by the user, if the water level is HIGH then the LED HIGH indicator will light up.After setting the temperature and timer and taking temperature readings on the waterbath by the microcontroller, the Monitoring button can be pressed to find out the temperature readings at 4 predetermined points, namely T1, T2, T3, and T4.Then the temperature readings will be displayed on the TFT LCD according to each monitoring point.If the temperature at all points that have been displayed on the LCD display has not matched the temperature setting, then the temperature reading on the sensor continues to run until the temperature matches the setting.If the temperature at all points has been reached, the timer will activate and continue the next process.After the water level detection is met, do the temperature setting and timer setting as desired, the heater will be on, then the microcontroller detects the error value, which is the difference value between the set point temperature and the actual temperature, the error value becomes input to the fuzzy control, the fuzzy control will process the error value and determine the pwm output value for the heater, the temperature sensor will read the actual temperature value which will be compared again with the setting temperature, The fuzzy control will continue to process the error value and determine the PWM output value until the actual temperature is equal to the setting temperature or the error value is zero (0).When the temperature has been reached, the timer is active, if it has not been reached, the microcontroller still reads the error value until the error value is zero.And if the temperature exceeds the setting temperature, the thermostat is active which causes the heater to turn off and the buzzer sounds.Then when the timer runs out, the heater turns off and the buzzer sounds.Furthermore, if completed, then the process ends.The decision-making process with fuzzy control has different stages, one of which is the formation of membership, which will be interfered with at the stage of forming the rule base and the defuzzification process.This fuzzy method uses an error or feedback value of 0.5 with linguistic variable input and 7 design tables.where xn is the measured value of the calibrator machine.X is the measured value of the design.

III. RESULT
In this study, the module was tested by Digital Thermometer Comparator as a reference and comparison in determining the module accuracy value and module error value for temperature parameters.Waterbath module design shown in FIGURE 4. 5. Data collection is carried out using settings 30°C -60°C with 5x repetition at each temperature setting point in 4 different temperature sensors simultaneously to see the temperature value produced by the DS18B20 temperature sensor.Error or error is the difference from the actual value compared to the measured value of the module with the unit in this study, namely ºC.It can be seen in the table below that the largest error value of the module measurement is at the temperature setting of 30 ºC in the 2nd temperature sensor with an error value of 1.43%.While the smallest error value is when setting the temperature of 35 ºC in the 1st and 4th temperature sensors with an error value of 0.01% as intended in TABLE 1.When viewed from the overall error value obtained from the measurement of the module and digital thermometer comparison device, it can be said to be good with the highest error of 1.43% at the temperature setting of 30 ºC in the 2nd temperature sensor and the lowest error value of 0.01% at the temperature setting of 35 ºC in the 1st and 4th temperature sensors with an error value of 0.01%.Although there is a fairly large error value, the error value obtained is still within the range of calibration tolerance, which is ±5%.When viewed from the error value of each temperature setting in each experiment, the DS18B20 temperature sensor used in this waterbath module has a stable temperature value when compared to digital thermometer comparison devices.Table 1 and Figure 6 is the error value obtained from the actual value compared to the value of the digital thermometer comparison device.table 2 is the standard deviation value obtained from measurements with the waterbath module.The waterbath module is said to be good, because the standard deviation value does not exceed the average value of the waterbath module measurement.table 3 Uncertainty values (UA) are used to see how much deviation (accuracy) the waterbath module has in pressure value readings.table 4 The correction value in this study proves that there are still errors or insecurities between the determination of values and their average.module measurement can be used as a measurement representation of the entire data.It can be seen from TABLE 3 above if the uncertainty value (UA) is used to see how much deviation (accuracy) of the waterbath module in reading the temperature value of the 4 sensors used.Relative uncertainty is closely related to the accuracy of measurement, that is, it can be expressed if the smaller the uncertainty, the higher the accuracy.In this study, the largest deviation value was obtained at the temperature setting of 30 ºC which had a value of 0.35, while the smallest deviation value was at the temperature setting at 50 ºC which had a value of 0.03.From TABLE 4 above, it can be seen that the correction value indicates an error in the system.So, the more the correction value is close to 0, the better the tool will work.Based on the data above, the largest correction value in this study was found in the temperature setting of 55 ºC on the 2nd temperature sensor, which is 0.55 in the module.For the smallest correction value at a temperature setting of 35 ºC on the 1st and 4th temperature sensors, which is 0.00 on the waterbath module.
A module that has a value output using a temperature sensor can be said to be good if it has a high accuracy and precision value.Not all modules that have output in the form of values from a sensor have good precision also have good accuracy as well.In addition, a module also requires good sensitivity or good response to small changes in each temperature setting at any time.

TABLE 4
Comparison value of correction of each temperature setting in the module tool.The positions of the Temp1, Temp2, Temp3, Temp4 sensors can be seen in Figure 3.

Temperature setting Correction
Temp1 Temp2 Temp3 Temp4 After testing the results, data collection and analysis of the results were carried out to determine the accuracy, and stability of the value of the DS18B20 temperature sensor output used in this waterbath module.Data collection was carried out using settings of 30°C -60°C with 5x repeats at each temperature setting point in 4 different temperature The sensors are equivalent to see the temperature values generated by the DS18B20 temperature sensor.
After conducting experiments on research to get the temperature value at the temperature setting of this waterbath tool, the results obtained in the module are as follows: In the comparison tool of the digital thermometer and waterbath module at the setting setting of 30 ° C -60 ° C obtained the results of stable temperature values.The largest error value from the module measurement is at a temperature setting of 30 ºC in the 2nd temperature sensor with an error value of 1.43%.While the smallest error value is when setting the temperature of 35 ºC in the 1st and 4th temperature sensors with an error value of 0.01%.uncertainty (UA) is used to see how much deviation (accuracy) of the waterbath module in reading the temperature values of the 4 sensors used.Relative uncertainty is closely related to the accuracy of measurement, that is, it can be expressed if the smaller the uncertainty, the higher the accuracy.In this study, the largest deviation value was obtained at the temperature setting of 30 ºC which had a value of 0.35, while the smallest deviation value was at the temperature setting at 50 ºC which had a value of 0.03.Relative uncertainty is closely related to the accuracy of measurement, that is, it can be expressed if the smaller the uncertainty, the higher the accuracy.
While the correction value is still said to be good with the largest correction value obtained in this study is found in the temperature setting of 55 ºC on the 2nd temperature sensor, which is 0.55 in the module.For the smallest correction value at a temperature setting of 35 ºC on the 1st and 4th temperature sensors, which is 0.00 on the waterbath module.So it can be said that the correction value of this waterbath module tool is good, because the correction value is small and close to 0.
There are several shortcomings in the module that has been made, including the screen size of the module is still fairly small with a large waterbath tool, then it takes a long time to stabilize the waterbath module tool to reach the setting temperature.Then the grounding of the tool is still not good.

IV. CONCLUSION
Overall, this study can be concluded that from the research method, data collection and analysis of the Fuzzy Logic method to control the even distribution and stability of the waterbath temperature with 4 heaters.Based on the research that has been done, conclusions can be drawn as follows.
Fuzzy Logic method tool can be made to control the even distribution and stability of waterbath temperature with 4 heaters.A series of temperature sensors can be made with a temperature selection of 30ºC-60ºC.Arduino microcontroller module can be used to regulate the work of 4 temperature sensors.Microcontroller programs can be created using fuzzy logic methods and can be made a series of buzzer drivers.The most error values of the module measurement are at a temperature setting of 30 ºC in the 2nd temperature sensor with an error value of 1.43%.While the smallest error value is when setting the temperature of 35 ºC in the 1st and 4th temperature sensors with an error value of 0.01%.when compared with research [22] of 0.11%, there is a better difference.The largest deviation value is obtained at the temperature setting of 30 ºC which has a value of 0.35, while the smallest deviation value is at the temperature setting at 50 ºC which has a value of 0.03.The largest correction value in this study was found in the temperature setting of 55 ºC on the 2nd temperature sensor, which was 0.55 in the module.For the smallest correction value at a temperature setting of 35 ºC on the 1st and 4th temperature sensors, which is 0.00 on the waterbath module.
There are several developments that can be developed in this research.First, the screen can be replaced at the output of a larger module, so that the value of the screen used in the module is proportional to the size of the waterbath used.Further research can be done so that the time used to stabilize the waterbath to reach the setting temperature is faster.Better grounding can be made for future waterbath research.

FIGURE 3 .
FIGURE 3. Membership function from FuzzyFIGURE 3is a variable graph with 7 labels with a maximum error or feedback of 0.5.In the temperature control study, a tolerance value of 0.5˚C was used, with an error equal to the tolerance value, it is hoped that the output of this fuzzy control will maintain the temperature value within the tolerance value range.Data collection is carried out using settings 30°C -60°C with 5x repetition at each temperature setting point in 4 different temperature sensors simultaneously to see the temperature value produced by the DS18B20 temperature sensor.The average value of the measurement is obtained using the mean or average by applying equation(1).The average is a number obtained by dividing the number of values by the amount of data in the set.:  = 1+2…+