Design of IoT-Based Temperature Monitoring System for Automated Inhomogeneity Measurement

Badan Meteorologi, Klimatologi, and Geofisika (BMKG): For weather and climate observations, the Meteorology, Climatology, and Geophysics Agency operates 1,285 digital and automated instruments across Indonesia. These instruments need regular calibration as required by Law No. 31 of 2009 on Meteorology, Climatology, and Geophysics. BMKG maintains a calibration laboratorylaboratory in Medan, North Sumatra, complying with ISO/IEC 17025:2017 standards, which ensure the quality of measChamber inhomogeneity, which affects temperature stability, is an important factor in calibration. ibration. To address this, a study designed an IoT-based temperature monitoring system using nine DHT22 sensors to measure chamber temperature inhomogeneity. The IoT system measured an inhomogeneity value of 0.9 0.9 °C, matching standard results using Aqara sensors. The designed system measured inhomogeneity at 0°C through the T6 sensor, while the standard system did so at 2°C with the Aqara 6 sensor, both placed consistently in the upper left rear section. The IoT system improved efficiency, offering real-time monitoring via the ThinkSpeak platform and reducing sampling time to 20 seconds from the standard 30 minutes.


Introduction
Badan Meteorologi, Klimatologi, and Geofisika (BMKG) in Indonesia operates 1,285 digital and automated instruments for weather and climate observations, distributed across the country.These instruments play a crucial role in providing accurate and reliable data for forecasting and monitoring weather patterns and climate trends.To ensure the integrity and precision of these observations, regular calibration is essential.Mandated by Law No. 31 of 2009 on Meteorology, Climatology, and Geophysics, calibration guarantees that the instruments maintain their accuracy and functionality over time.
Calibration activities are conducted by BMKG's accredited Calibration Laboratory, which adheres to the rigorous standards outlined in ISO/IEC 17025:2017.This international standard specifies the general competence requirements for testing and calibration laboratories, ensuring the reliability and traceability of measurement results.Through calibration, correction and uncertainty values (U95) are determined, contributing to the enhancement of measurement accuracy.Additionally, Government Regulation No. 46 of 2012 underscores the importance of calibration in maintaining the quality and operational feasibility of these instruments, highlighting its role in upholding the standards of meteorological and climatological data collection and analysis.
The Calibration Laboratory of BMKG, which includes the facility in Medan, North Sumatra, upholds the stringent requirements outlined in ISO/IEC 17025:2017, ensuring that all testing and calibration procedures adhere to international standards.Within these laboratories, calibration equipment such as thermometers is supported by temperature chambers and baths to maintain precise measurement conditions.However, the presence of chamber inhomogeneity, resulting in temperature fluctuations, poses a challenge to calibration accuracy.Presently, sensor adjustment within these chambers relies on manual intervention, a process that can introduce instability.To address this issue, a novel approach is proposed in this study: the implementation of an IoT-based system equipped with nine sensors to autonomously gauge inhomogeneity.By automating this process, the study aims to streamline operations while enhancing accuracy by mitigating external factors that may influence calibration results.
This innovative system not only measures temperature distribution within the chamber but also conducts a comparative analysis against existing calibration methodologies.By leveraging IoT technology, this study seeks to revolutionize calibration practices within BMKG, paving the way for more efficient and precise measurement procedures.Ultimately, the adoption of this advanced system promises to elevate the quality and reliability of weather and climate observations, thereby reinforcing BMKG's commitment to providing accurate meteorological and climatological data for Indonesia.
Fig. 1.Map shows the location of research study where the similar studies have been conducted previously (Idha et al., 2023, Sari et al., 2023).(Alam et al., 2020) developed a low-cost IoTbased weather station providing real-time data on wind speed, temperature, humidity, and rainfall.Utilizing affordable controllers like Node MCU and Arduino UNO, the station is accessible to various users, while ThingSpeak enhances its functionality with real-time data collection and visualization.(Ahmad et al., 2021) developed an IoT temperature monitoring system using the DHT22 sensor and Raspberry Pi, comparing its measurements with an industrial-grade temperature probe, the Keithley 6517-TP.While the DHT22 sensor provided accurate temperature readings up to 0.10°C, it exhibited slower response times compared to industrial sensors, though the study didn't address potential limitations or calibration requirements for the DHT22.(González Rivero et al., 2023) evaluated a low-cost calibration method for temperature, relative humidity, and carbon dioxide sensors in air quality monitoring systems, showing its effectiveness in transforming self-developed monitoring systems into low-cost scientific instruments.However, the study did not present quantitative comparisons with existing calibration methods and did not explicitly address limitations such as accuracy and precision.(Žužek and Pušnik, 2017) compared the calibration of air thermometers in climatic chambers and liquid baths, finding that calibration in liquid baths resulted in smaller temperature errors and lower measurement uncertainties due to better thermal homogeneity.However, the study focused solely on digital indication thermometers designed for air temperature measurements, particularly those equipped with thermistors, metal resistors, or thermocouples as temperature sensors.(Mihalič et al., 2018) found that the humidity inside microclimate chambers for preserving archaeological artifacts depends on how close they are to the humidity stabilizer and the outside temperature.They discovered that even when tubes were placed horizontally, the humidity stayed mostly within the recommended levels.However, the study only looked at how changes in outside temperature affected the chambers and didn't explore other possible reasons for differences, like how the air moves inside or what else is in the chambers.(Indrayani et al., 2017) tested the Mini Liquid Bath using six thermocouple sensors to assess its reliability for calibration.They found stable conditions at both low and high temperatures but noted significant uncertainty at lower temperatures, highlighting the importance of addressing homogeneity and stability issues.(Fatwasauri et al., 2021) calibrated digital thermometers by comparing readings with standard ones and using regression equations, resulting in a small standard error of estimation (SEE) value of 0.001.They found no significant difference between different regression methods in terms of thermometer calibration, but the study didn't specify sample size or details about the thermometers used, nor did it discuss potential sources of error or uncertainty.

Basic Concept
The temperature inhomogeneity is determined as the maximum temperature deviation at a corner or measurement point within the enclosure compared to a reference point, typically located at the center.The maximum temperature difference measured at the sensor positioned at the corner and the temperature measured at the observed reference location simultaneously or as close as possible in time to determine the temperature pattern or homogeneity within the space under steady-state conditions.(Thai Laboratory Accreditation Scheme, 2008).The intended steady state refers to when the chamber is in a stable condition; thus, when conducting inhomogeneity testing, it requires some time for the conditions within the chamber to stabilize.The placement of sensors in the inhomogeneity testing is positioned at specific locations as shown in Fig. 2.This testing system utilizes 9 temperature sensors positioned at 9 points, with 8 sensors located at each corner of the chamber and 1 at the chamber's center.Further details regarding sensor placement will be depicted in Fig. 3 and in the sub-subsection on the climatic chamber.1-9 refers to temperature sensors placed at measurement points, comprising eight sensors, each positioned at every corner of the workspace in the instrument, and one sensor as a reference at its center.JTM K07 states that temperature dispersion varies with time and space.If the temperature deviates at a measurement point or fluctuates, it will affect uncertainty evaluation.The calculation of the value and uncertainty of inhomogeneity is obtained from equations 2.1 and 2.2: Where:  ℎ : Value of inhomogeneity deviation in the chamber   : Corrected temperature at the reference sensor located at the center of the chamber.  : Corrected temperature at the sensor installed at the corner of the chamber ( ℎ ) : Uncertainty value caused by chamber inhomogeneity.

Hardware Design
The hardware design phase is the initial step in developing a device, aimed at providing a clear and detailed understanding of the entire construction.This step is crucial to ensure that the system is designed and implemented effectively.
The input is supported by various sensors that collect essential data required for the system's operation.These sensors are designed to detect and measure different parameters, depending on the specific application of the system.The data collected by the sensors is then sent to the processing unit.The processing unit is managed by an ATMega 2560 microcontroller, which is responsible for processing the data received from the sensors.This microcontroller is a powerful component capable of handling multiple tasks simultaneously, ensuring that the system operates smoothly and efficiently.It processes the data and prepares it for output.
The output is displayed through an LCD screen, providing real-time information to the user.Additionally, the system is monitored via a PC using ThingSpeak, a platform that allows for data visualization and analysis.This integration with ThingSpeak enables users to monitor the system remotely and receive real-time updates.The use of Wi-Fi creates a connected and integrated system, enhancing its functionality and efficiency.
The block diagram of the hardware system design is illustrated in Fig. 3.This system is composed of three primary interconnected components: the input, the processing unit, and the output.

Software Design
The role of software design is paramount within the system, serving as the primary interface for overseeing, integrating, controlling, and processing data.In this research endeavor, ThingSpeak software is harnessed to facilitate the real-time tracking of temperature readings obtained from the DHT22 sensor.To adhere to the operational constraints and requirements, the system configuration is strategically divided into two distinct channels.This division is necessitated by the inherent limitation of ThingSpeak, which can only accommodate data from a maximum of 8 sensors per channel.Channel 1 serves as a comprehensive platform for visualizing temperatures ranging from T1 to T8, offering a detailed insight into the system's thermal behavior and distribution across different points within the chamber.Meanwhile, Channel 2 plays a pivotal role in presenting critical reference metrics such as the reference temperature (Tref) and the chamber's inhomogeneity values, thereby providing a holistic perspective on the system's thermal dynamics.By leveraging a dual-channel approach, this software design optimizes the monitoring, integration, and control functionalities of the system.Channel 1 facilitates meticulous observation and analysis of temperature variations across multiple points, ensuring a thorough understanding of the chamber's thermal distribution (Fig. 5).Conversely, Channel 2 enhances the system's effectiveness by presenting essential reference metrics, enabling researchers to assess the chamber's overall thermal stability and homogeneity.By leveraging a dual-channel approach, this software design optimizes the monitoring, integration, and control functionalities of the system.Channel 1 facilitates meticulous observation and analysis of temperature variations across multiple points, ensuring a thorough understanding of the chamber's thermal distribution (Fig. 5).Conversely, Channel 2 enhances the system's effectiveness by presenting essential reference metrics, enabling researchers to assess the chamber's overall thermal stability and homogeneity.This bifurcated configuration not only enhances the system's monitoring capabilities but also streamlines data processing and analysis, thereby augmenting its overall efficiency and reliability in temperature management and control.

Experiment Design
This testing approach is based on the Calibration Method provided by the BBMKG Region I Calibration Laboratory for the temperature parameter, documented under number MK/MET/BWI/01, specifically for evaluating chamber inhomogeneity.The flowchart for system testing is depicted in Fig. 6.The testing process begins with positioning the standard Aqara sensor and DHT22 sensor inside the chamber, adhering to the layout outlined in Fig. 2. Following this, the room's temperature and humidity levels are adjusted to meet specific criteria: 20 -25 °C and 40 -70 %RH, respectively.Subsequently, the chamber is activated, and the calibration set point is configured within the 0 °C range.After allowing time for the chamber's temperature to stabilize, the temperature values of the standard and Aqara sensors are logged on the provided calibration sheet.Concurrently, the DHT22 sensor's temperature reading is automatically relayed to the Arduino Mega 2560.Calibration procedures are then repeated at subsequent set points: 2, 5, and 8 °C (Fig. 6).
The inhomogeneity calculation utilizing the Aqara temperature sensor involves manual data transfer to Excel for analysis to determine the inhomogeneity value.Conversely, in the devised system, the Arduino Mega 2560 microcontroller automates the calculation of chamber inhomogeneity values, transmitting them to the ThingSpeak platform via IoT.This automated approach optimizes the testing process, streamlining operations by eliminating manual data processing and entry.

Result and Discussion
Fig. 7 illustrates the hardware design featuring nine DHT22 sensors interfaced with an Arduino Mega 2560 microcontroller.Each DHT22 sensor is meticulously connected to specific digital pins on the Arduino: pins 26, 28, 30, 32, 34, 36, 38, 40, and 42.These sensors are crucial for measuring temperature and humidity, and they require a reliable connection to ensure accurate data collection.To power these sensors, they are connected to the 5V and ground pins on the Arduino, providing them with the necessary voltage for operation.Fig. 7 illustrates the hardware design featuring nine DHT22 sensors interfaced with an Arduino Mega 2560 microcontroller.Each DHT22 sensor is meticulously connected to specific digital pins on the Arduino: pins 26, 28,30,32,34,36,38,40,and 42. Fig.7 illustrates the hardware design featuring nine DHT22 sensors interfaced with an Arduino Mega 2560 microcontroller.Each DHT22 sensor is meticulously connected to specific digital pins on the Arduino: pins 26, 28, 30, 32, 34, 36, 38, 40, and 42.These sensors are crucial for measuring temperature and humidity, and they require a reliable connection to ensure accurate data collection.To power these sensors, they are connected to the 5V and ground pins on the Arduino, providing them with the necessary voltage for operation.The Arduino Mega 2560 microcontroller itself is a robust platform designed for complex projects involving multiple inputs and outputs.In this setup, it acts as the central unit that processes data received from the nine DHT22 sensors.The microcontroller operates on a 5V power supply, which is essential for its functionality and the connected sensors.This setup ensures that the Arduino can handle the simultaneous data flow from all nine sensors without any performance issues.To power the entire system, a power adapter is utilized, converting the standard 220 VAC from the public electrical network (PLN) to a stable 5 VDC.This conversion is crucial because the Arduino Mega 2560 and the DHT22 sensors require a consistent 5V DC power supply for optimal performance.The adapter's role is to ensure that the Arduino receives the correct voltage, thereby maintaining the reliability and accuracy of the sensors' readings.This setup underscores the importance of stable power delivery in maintaining the integrity of data collected from environmental sensors.The measurement of chamber inhomogeneity from the designed system is divided into four distinct setpoints: 0°C, 2°C, 5°C, and 8°C.These setpoints represent specific temperature targets within the chamber, chosen to assess the uniformity of temperature distribution at different levels.For each setpoint, the inhomogeneity measurement is carried out only after the chamber has reached a stable condition, ensuring accurate and reliable data.Stabilizing the chamber is crucial as it ensures that the temperature readings reflect true conditions rather than transient fluctuations.By using these varied setpoints, the system provides a comprehensive understanding of how temperature consistency varies within the chamber over a range of common operational temperatures.
Once the chamber is stable at a given setpoint, temperature readings are taken every 20 seconds and transmitted to ThingSpeak, an IoT analytics platform, over a period of 10 minutes.This process allows for real-time monitoring and data logging, facilitating detailed analysis of temperature variations.The sensors inside the chamber are strategically placed according to the Equipment Work Instruction Document from the Calibration Lab at BBMKG Region I.This precise placement is crucial for ensuring that the measurements are representative of the entire chamber environment.The setup follows the guidelines illustrated in Figure 1, which provides a standardized approach to sensor positioning, thereby ensuring consistency and repeatability in the calibration process.In Fig. 8, The inhomogeneity measurement results from the Aqara sensor, indicate the largest deviation value, which is used as the chamber's inhomogeneity value, at 0.9°C.This specific value is derived from the average temperature deviation recorded by the Aqara sensor 6 at the 2°C setpoint.
The significant deviation highlighted by this sensor underscores the presence of temperature inconsistencies within the chamber.Such detailed measurements are crucial for understanding and improving the environmental control within the chamber, ensuring that the temperature distribution remains as uniform as possible across different set points.According to the placement guidelines, the Aqara sensor 6 is strategically positioned at the upper left part of the chamber, near the sensor's entry hole and a fan.This particular location is prone to temperature fluctuations due to external environmental factors entering the chamber.The proximity to the entry hole and the fan introduces variables that can disrupt the temperature homogeneity, such as airflow and external temperature variations.As a result, this area experiences a higher degree of temperature inhomogeneity, making it a critical point for measurement and analysis.In Fig. 9(a), The gold line represents the reference temperature sensor placed in the middle of the temperature chamber, while the other dotted lines represent the other temperature sensors placed at the corners of the chamber according to the document guidelines.Fig.9(b) shows that all sensors have corrected temperature values below the reference value.The dominant temperature value is then calculated based on the statistical mode, which is the value that appears most frequently in the data.Fig. 9(c) shows the calculation of chamber inhomogeneity at all set points.It is based on the largest deviation observed between the corrected reference temperature sensor and the other temperature sensors.
The deviations are measured and recorded to ensure accuracy and reliability of the temperature readings across different sensors.The collected data is then illustrated, which presents a bar plot visualization.This bar plot clearly shows the deviation of each sensor relative to the reference temperature sensor, allowing for easy comparison and analysis of the inhomogeneity within the chamber.Such visual representation aids in identifying any significant discrepancies and helps in the assessment and adjustment of the calibration process to maintain precise temperature control.

Conclusions
The design of hardware and software in this research was successfully carried out using the DHT22 sensor and Arduino Mega 2560 microcontroller, with the IoT platform ThinkSpeak.System design testing using the BBMKG Region I Temperature Calibration Method yielded varying correction values at each calibration set point.The inhomogeneity value obtained by the system designed through the IoT platform is 0.9°C.Meanwhile, the inhomogeneity value obtained using the standard Laboratory system with the Aqara sensor is also 0.9°C.Therefore, the inhomogeneity values from the system designed and the Laboratory standard system show the same results.Sensors T6 and Aqara 6 are placed in the same location, which is at the upper left rear of the chamber.Based on the experiments, the time required by the designed system to obtain the inhomogeneity value is realtime, which can be monitored through the IoT platform ThinkSpeak, with a data sampling time of 20 seconds.In contrast, the time required by the standard system is approximately 30 minutes to obtain the inhomogeneity value.
1. W refers to Length of the chamber 2. D refers to Width of the chamber 3. H refers to Height of the chamber 4. a, b, c refers to Coordinates of measurement points at the corners of the workspace.

Figure 2 .
Figure 2. Points of placement of inhomogeneity test sensors.

Figure 3 .
Figure 3. Hardware designFurthermore, the system incorporates Wi-Fi connectivity to facilitate internet access.This connectivity allows the system to send notifications, ensuring that users are promptly informed of any significant events or changes.

Figure 6 .
Figure 6.Flow chart for testing the system.

Figure 9 .
Figure 9.The Inhomogeneity (a); Dominant Temp (b); and Absolute Temp Deviation (c) in all set points