Real-time wireless temperature measurement system of infant incubator

The internet of things (IoT) has allowed for ubiquitous measurement. Infant incubator temperature is one of crucial parts that need to be measured, especially for the stability and uniformity temperature. Based on the interpretation of IEC 60601-2-19, we proposed measurement method using IoT with the message queue telemetry transport (MQTT). In the 10,000 packet, the result shows the quality of service (QoS) level 2 of the system has the highest delay, however it has the lowest packet loss data than the other QoS. For 1 hour, the uniformity result and stability can fulfill the standards. Uniformity of 32°C, the lowest difference is point C with 0.32 °C, and the highest difference is point B with 0.75 °C. Uniformity of 36 °C, the lowest difference is point B with 0.27 °C, and the highest difference is point C with 0.79 °C. The stability of 32 °C and 36 °C is 0.32 °C and 0.44 °C, respectively. Moreover, the Kruskal Wallis test shows the highest difference average from point M is point A and B. It occurred because of the point A and B located far from the heater part, so the point A and B colder than point C.


INTRODUCTION
Internet of things (IoT) made everything possible to monitor and measure nowadays [1], [2]. The advances in Internet innovation have made possible vary techniques, such as for the measurement of the conformity of medical electrical equipment (MEE), blockchain-based big data processing and smart control system [3]- [6]. The possibility of using wireless tool to ensure the conformity requirement is an advantage [7]. This supports the idea that there is a lot of potential in developing low cost, and portable tool for remote measurement and monitoring, not only human health but also for MEE especially in Indonesia [8].
Incubator, as part of the MEE is normally used for infants who cannot suit the surrounding environment, has the function of maintaining a stable temperature in the room. It remains stable at a predetermined temperature [9]. There are requirements that allow us to measure the uniformity of the temperature inside the compartment. Based on standard IEC 60601-2-19, the uniformity temperature requirement is that with the incubator working as an air-controlled incubator, and the control temperature set at any temperature within its range, the average temperature did not differ from the average incubator temperature by more than 0.8 °C in normal use [10]. The uniformity temperature was one of the crucial parameters to be measured as part of conformity requirement, which is the accuracy of controls and instrument in clause 201.12.1.102. It was measured by five sensors, in five different placements and positions inside the infant incubator compartment, which is shown in Figure 1. The sensors were put on the mattress with height of 10 cm from the mattress. The requirement of this clause is that the average temperature did not differ from the average temperature by more than 0.8 °C in normal use. Generally, the measurement of stability and uniformity temperature is conducted by non-real-time test and wired method for communication [11]. The data was collected in a certain time and temperature, stored the data to personal computer (PC), analyzed, and final decision based on data analysis of the measurement [12]. It has a lot of activity to determine the conformity of this requirement. The previous project has made an online monitoring system using DS18B20. However, it has weaknesses on the port initialization, since the system is connected to the PC.
The message queue telemetry transport (MQTT) is used in a large variety of use cases and industries. The MQTT official web page reports that International Business Machines Corporation (IBM) can use telemetry on home patient monitoring system [13]. However, there was not a well-documented application of it. The preliminary result demonstrated that heart rate monitoring system using ESP8266 Wi-Fi module on the Arduino microcontroller and MQTT for messaging protocol provides useful information and helpful for nursing [14], [15]. Since the ESP8266 is discontinued, we develop the system using the new generation, ESP32. The ESP32 is more powerful than ESP8266, such as dual connectivity (Wi-Fi+Bluetooth/Bluetooth LE), easy computing and strong safety feature [16].
Recently, Node-RED has been selected for use as preferred IoT platform [16]. This platform provides a way to store data that can be shared between nodes that pass-through by browser-based flow editor and allows users to replace common coding task with visual drag-and-drop to connect web services or gadgets, so it is easy to work with [15]. We picked this platform to run in the Raspberry Pi, since this platform provides an application for MQTT method.
Information that needs to be examined is abundant and gathered from different sources of IoT [7]. However, it is made up of different kinds of information, such as data collected from sensors, IoT devices, or another connected network. When the number of sensors and smart devices increases, a large amount of information is generated by such machines. A small amount of that information is brief or unusual, providing a reasonable statistic of a device's fitness, whereas visual surveillance systems can produce massive amounts of information through artificial intelligence, for instance, to monitor massive crowds [6]. It can depend on the connectivity of the nodes and the information gathered by the IoT devices. Big data analytics could enhance strategies for data mining and data observation. Big data allows more information to be analyzed to discover further relevant data, and more data does not automatically equal more valuable knowledge [5]. This could lead to some vague and anomalous results.
The objective of this work is to develop an effective method for uniformity temperature measurement system, which does the measurement by remote, which allows us to access the acquired data anytime and anywhere. To achieve this, the infant incubator from local manufacturer will be the object under measure for the development of this system. This paper will describe the design and development of a realtime wireless temperature measurement system for an infant incubator, using MQTT. A brief introduction and related work of this project will also be presented as well as the design. At the end of this paper, we described the result and discussion of the project, also the conclusion of this proposed measurement system.  Figure 2 explains the design of the proposed measurement system. The microcontroller is used to obtain data from the temperature as the data acquisition, ESP32 as a client and subscriber [17], [18], and the Raspberry as a broker or server to show the result on the localhost MQTT [19], so that temperature data can be measured. The temperature sensor of the proposed system is the digital temperature sensor DS18B20 (Maxim IC, USA), which can output the digital temperature value directly. DS18B20 measures the temperature range from −55 °C to 125 °C with a ±0.5 °C accuracy range from −10 °C to 85 °C [20]. It has 1-wire communication protocol which has the advantages of strong anti-interference ability and reliability of communication and immunity from fault data, thereby preventing the acquisition system from storing faulty temperature values and improving the reliability of the monitoring system. Five sensors are used and connect it to the ESP32.

Figure 2. Proposed system
ESP32 is a series of low cost, low power systems on a chip microcontroller with integrated Wi-Fi and dual-mode Bluetooth. Engineered for mobile devices, wearable electronics, and IoT applications, ESP32 achieves ultra-low power consumption through power saving features including fine resolution clock gating, multiple power modes, and dynamic power scaling [21]. As a microcontroller, ESP32 has the function to get data, calculate data, and send temperature data from DS18B20 [22]. The data calculated by (1), which refers to the stability requirement of incubator temperature clause from standard IEC 60601-2-19. The difference between the average incubator temperature ( ) which is located in the middle compartment of infant incubator and the setpoint temperature, , shall not differ by 0.5 °C at the steady state temperature condition, for 1 hour. As for the uniformity of the incubator temperature is calculated by (2), where |∆ | is the temperature different between and the measured values at point at A, B, C or D, ( ). ∆ result has absolute value [10], and it shall be not differed by more than 0.8 °C, at each point of measurement. Figure 3 describes the flowchart program of the proposed method. Node-RED is used as a flowbased programming tool, it is low-code programming for event-driven applications which can be used MQTT function freely [23]. MQTT is a protocol used to transfer data [24], [25] and is used to published and subscribed function protocol which admits multiple devices to communicate with each other over a wireless network [26]. To communicate with Raspberry, the ESP32 shall have the same Wi-Fi name and Wi-Fi password, and IP address. On the contrary, the IP port of ESP32 must be different from the IP port of Raspberry [15]. When the master MQTT is ready, then the system starts to read the data from the sensor. If the temperature is equal to -127 °C, then the sensor reading is error. The system starts to calculate data for one hour. ESP32 sends the temperature data to the Raspberry to show the result on localhost MQTT, so that the temperature data can be seen by another PC or smartphone.
The MQTT has different levels of quality of service (QoS), thereby the QoS was analyzed by two parameters, those are pocket loss and delay time [27]. Those two parameters determine which QoS will be chosen for this system. Packet loss and delay time of the system will be calculated by (3) and (4)   will be analyzed by using parametric and nonparametric test statistics to get the information, if there are any important differences between the five temperature sensors [29]. Figure 3. Flow chart of the system

RESULTS AND DISCUSSION
The Wi-Fi of medical electrical equipment laboratory used to communicate between the client and server with port 1883 and 1880, respectively. The ambient temperature at the laboratory is set at 20 °C to 25 °C. The measurements were conducted after the incubator warmed up and reached a stable temperature condition. The measurements are conducted at 32 °C and 36 °C for one hour for stability and uniformity. The QoS performance analysis only has 279 data because of delay of the system, for example, one second delay for sending data from the ESP to the MQTT broker and one second for the temperature sensor acquisition data.

Packet loss
The MQTT analysis with different QoS levels is shown in Figure 4. The packet loss increases when the client receives a high amount of packet data. QoS 2 has the lowest pocket data loss, compared to QoS 0 and 1. At the 2000-bytes packet data, the pocket loss of QoS 0, 1, and 2 are 1.01%, 0.83%, and 0.08%, and the pocket data loss increase significantly at 4000-bytes as for the next byte of packet data is not as significantly increase for all QoS, they are 1.23%, 1%, and 0.23%. It occurred because of the QoS level 2 uses 4-way handshake, such as publish, pubrec, pubrel and pubcomp. On the other hand, QoS level 0 only uses publish.  Figure 5 shows the delay time of each QoS. The delay time from the 1000-bytes packet data sent increases significantly for each QoS to the 4000-bytes data, it has the same behavior as the packet loss data. However, the QoS level order is in the opposite position. The QoS level 2 has the highest delay time compared to the other QoS. QoS 2 has 4 steps to send and to receive the packet data, so it will increase the delay time. Even though the QoS level 2 has the highest delay time, the difference between each QoS level is not significant.

Temperature measurement
The temperature measurement data collection uses the QoS level 2 at 32 °C and 36 °C for 1 hour. The local host address in this result is 192.168.125.214 with port 1880. There are 279 data for each sensor, it is because of the delay of the system due to the sending data from the ESP to the MQTT broker and the temperature sensor data acquisition. Figure 6 explains the stability of temperature 32 °C in Figure 6(a) and stability of temperature 36 °C in Figure 6(b). For 1 hour, the result both of temperature has maximum result around 0.8 °C, but overall, the average has fulfilled the requirement of standard with 0.31 °C and 0.44 °C for temperature 32 °C and temperature 36 °C, respectively.  Figure 7(a) and temperature 36 °C in Figure 7(b) by the Node-RED Raspberry. It shows the different value at point M to the temperature control value as well as the different value for each temperature at point A, B, C, and D to the M. It will help to decide the conformity to the standard requirement. We also put the recent temperature by the sensor M in the graph as information. At the same temperature control value, the temperature collected by sensor A and B have the higher value than the sensor C and D. From the graph, at 32 °C we can see that the different temperature for sensor A, B, C and D are 0.67 °C, 0.69 °C, 0.13 °C, and 0.24 °C as at 36 °C are 0.61 °C, 0.69 °C, 0.13 °C, and 0.30 °C. However, the value still within the standard requirement, which is the average temperature did not differ from the average incubator temperature by more than 0.8 °C in normal use.
Kruskal-Wallis test shows that there is a significant difference between points C and D with points M, A, and B (<0.05). Table 1 describes that point C has a higher average and the standard deviation tends to be the same compared to others point. It shows that the mean value at C is significantly different from others points on both 32 °C and 36 °C.
Statistics show that the difference between points in this study did not reach 0.8 °C and the highest average temperature was found at points C and D because the locations of these two points are closer to the heating channel. Table 2 shows the Spearman correlation. The results explain that each sensor point at the 1158 two temperatures has a significant correlation (<0.05). Although the strength of the correlation is weak, it has a positive direction. This direction shows that the closer to the heating channel, the higher the temperature increases.

CONCLUSION
The proposed method of real-time wireless temperature measurement system of infant incubator was successfully developed. We can easily monitor the result with user friendly view on desktop and mobile. The QoS level 2 has the highest delay, however it has the lowest pocket loss data compared to the QoS level 0 and 1. The data displayed from the Raspberry graph gave information that helped us to decide the conformity to the standard requirement of IEC 60601-2-19 for temperature control especially on stability and uniformity which is below 0.8 °C. In addition, data analysis of the Kruskal Wallis test explains that the pairs of point A and B have the lowest temperature result than the pairs of point C and D.