Abstract
BACKGROUND:
Incubators, especially the ones for babies, require continuous monitoring for anomaly detection and taking action when necessary.
OBJECTIVE:
This study aims to introduce a system in which important information such as temperature, humidity and gas values being tracked from incubator environment continuously in real-time.
METHOD:
Multiple sensors, a microcontroller, a transmission module, a cloud server, a mobile application, and a Web application were integrated Data were made accessible to the duty personnel both remotely via Wi-Fi and in the range of the sensors via Bluetooth Low Energy technologies. In addition, potential emergencies were detected and alarm notifications were created utilising a machine learning algorithm. The mobile application receiving the data from the sensors via Bluetooth was designed such a way that it stores the data internally in case of Internet disruption, and transfers the data when the connection is restored.
RESULTS:
The obtained results reveal that a neural network structure with sensor measurements from the last hour gives the best prediction for the next hour measurement.
CONCLUSION:
The affordable hardware and software used in this system make it beneficial, especially in the health sector, in which the close monitoring of baby incubators is vitally important.
Keywords
Introduction
After the microorganisms are planted in the culture medium, they must be kept at a certain humidity and temperature in order to ensure their proliferation in their environment. This process is called incubation [1]. The insulated enclosure that provides these conditions is called an incubator. There are three main types: bacteriological incubators, poultry incubators and baby incubators. These incubators require continuous monitoring for anomaly detection and taking action when necessary.
In a study on baby incubators, which are of vital importance, humidity and temperature data were displayed on the Thin Film Transistor (TFT) screen via Wi-Fi ESP32 [2]. In another study, an IoT-based incubator tracking system was used where the temperature, humidity and gas data of the medium were transferred to the mobile application, web server and PC via Wi-Fi using the ESP8266 Wi-Fi module and Arduino Uno [3]. The work of Khotimah et al. [4] focused on controlling and monitoring the temperature of infant incubators using a phone. Data were transferred using the HC-05 Bluetooth module only using the Bluetooth substructure. In addition, only DHT11 was used as the sensory equipment to gather temperature and humidity data. In a different study, the following were used: ESP32 module, SHT11 temperature and humidity sensor, Ds18b20 skin sensor, and analog sound level meter. In this system, data were transferred to the mobile application using only Wi-Fi and the current situation was monitored by an alarm system [5]. In the study by Tej et al. [6], pressure sensor, DHT11 humidity sensor, LM35 temperature sensors were connected to Arduino Uno board, and a camera was connected to Raspberry Pi. In this study, the parameters were continuously received and sent to the cloud, where they could be viewed on a web page.
In our study, some improvements were made to overcome the four shortcomings found in previous studies. The first of the most important deficiencies in the studies carried out is the use of only Wi-Fi based communication systems. In case of any adverse situation, such as Internet interruption, the data would be lost, preventing regular monitoring. In our study, we aimed to use Bluetooth Low Energy (BLE) technology in addition to Wi-Fi in order to enable data retrieval from incubators for the environments lacking stable Wi-Fi connections. Moreover, as in the study by Shalannanda et al. [3], there is a mobile application, therefore instantaneous data can be received via BLE and displayed in the form of graphics. It can also store the data until the Internet becomes available in the incubator environment. The second common problem is the inability to monitor the data when away from the PC. In our proposed system, data are tracked via the mobile application either within the BLE range of the sensors, or through the server. This way, past and present data can be viewed regardless of time or place. The third shortcoming we identified is that the alarm states can only be received on the PC monitor. Incubators have an optimal range of temperature, humidity, and gas values. Absence of personnel on duty at the time of an alarm condition may lead to negative or even dangerous outcomes. In our study, we aimed to inform the staff, regardless of their location, about emergency situations via a warning on the mobile application. The last shortcoming in the studies carried out is that alarm conditions are activated only when the sensors exceed the specified limit values. This means that any negative conditions reported require immediate intervention. Our proposal for avoiding this situation is to develop an early warning system that predicts alarm situations using machine learning algorithm based on collected sensor data.
Method and approach
The overall diagram of the proposed system is given in Fig. 1. As can be seen, the full system consists of four main parts: hardware module, database system, web application and mobile application. The purpose of the hardware module is to automatically receive data from temperature, humidity, and gas sensors with the BLE functionality of ESP32, and send the real-time data to the phone, and in addition, to the database server over the Internet using ESP32. The data gathered from the sensors and transferred to the server are displayed in both the Web application and the mobile application. Furthermore, the sensor measurements outside the predefined borders create alarm notifications in both Web and mobile applications. Machine learning is used to predict the alarm conditions by analyzing the data and learning the tendencies.
Sensors and microcontrollers
As shown in Fig. 1, the hardware component of the system contains the temperature and humidity sensor, the gas sensor, Arduino Mega and ESP32.
Working principle of the proposed system.
DHT11
DHT11 is a digital temperature and humidity sensor, used to measure temperature and humidity in a variety of applications such as weather monitoring, Heating, Ventilation and Air Conditioning (HVAC) systems, and indoor temperature monitoring. The sensor’s digital interface makes it easy to connect to digital systems and microcontrollers. The DHT11 sensor helps to read the relative humidity with
Sensors and Microcontrollers (Left – to – right): DHT11 Temperature and Humidity Sensor, MQ6 Gas Sensor, Arduino Mega Board, ESP32 Module.
MQ6
MQ6 is a type of gas sensor used to detect the concentration of multifarious gases, such as propane, LPG, butane, methane, and alcohol vapor in the ambient air (Fig. 2). It is a type of gas sensor that detects gas through changes in its electrical conductivity. The MQ6 gas sensor is widely used in gas leak detection systems, gas alarms, industrial security applications or for detecting the concentration of various gases in the environment. It is sensitive to gas concentrations in the range of 200 to 10000 ppm (parts per million) [8]. Its sensitivity can be adjusted by the potentiometer. The MQ6 gas sensor is capable of operating in the
Arduino Mega
Arduino Mega is a microcontroller, as shown in Fig. 2, board having 54 digital input/output pins and 16 analog input pins [10]. It can be easily programmed using the Arduino Integrated Development Environment (IDE) software. We selected Arduino Mega board in our system because it has many pins, and hence, allows multiple sensors to be connected. This yields higher performance than standard Arduino boards. As seen in Fig. 1, temperature and humidity sensors, and MQ6 gas sensor were connected to Arduino Mega board.
The Bluetooth scanning screen of the mobile application.
Instant and graphical temperature values on the mobile application.
ESP32
ESP32 is a low power consumption system-on-a-chip (SoC) microcontroller module designed for Internet of Things (IoT) applications (Fig. 2). ESP32 has the feature of Wi-Fi and Bluetooth connections. It can also be programmed with Arduino. The ESP32 module has 34 general purpose input output (GPIO) pins [11]. The suitable operating voltage of the ESP32 module is 3.3V. ESP32 was selected for our system for the same reason: easy connectivity with the Arduino Mega board. Furthermore, both Wi-Fi and BLE features can be used simultaneously while transferring the data from the Arduino Mega board to the mobile application and the server.
The open-source framework Flutter was used for mobile application. The coding is done in Dart language. The application consists of two parts. In the first part Bluetooth connection is made using an on/off switch button. After the activation, Bluetooth scan starts, and a list of devices supporting Bluetooth connection appears on the screen, including the ESP32, as shown in Fig. 3. After ESP32 is selected, the connection is established and the second part of the application is run. In this section, the data from the ESP32 which is connected to the DHT11 and MQ6 sensors through the Arduino Mega Board are displayed in real-time in the form of graphics (Fig. 4). In addition, the mobile application is able to store data temporarily in case of any Internet interruption.
Server and machine learning algorithm
A local Apache server and MySQL database are setup using XAMPP environment [12]. This database on this server is used to store the sensor data sent by the ESP32 via Wi-Fi. While connected to the Internet, the mobile application also sends data to the server, which it stores in its internal memory during sensor communication via BLE. The server scripts organizes these data coming from both ESP32 and mobile application. The user can access the data on either mobile or Web application as required.
The data populated on the server are processed using a machine learning algorithm to assess the relationship between the sensor measurements, and predict potential alarm conditions in advance.
Instant and cumulative sensor measurements on the Web application.
Daily sensor measurements on the Web application.
Alert condition on the Web application.
Neural network structure used.
Train and validation loss graphics.
Desired and predicted values with % error.
It is important to communicate the data from the incubator sensors to the duty personnel in an organized way, in real-time, and remotely. To achieve this, a Web application is prepared and past and present data values are shown in both numerically and graphically, similar to the mobile application. In addition, alarm conditions notifications are raised on this page.
Results and discussion
Screenshots of the developed Web application are given in below. Figure 5 displays the temperature, humidity and gas measurements stored in the server between 6 July 2023 and 8 August 2023 together with the instant values. Machine learning powered predictions for one hour ahead are also shown on this page. Since predictions are within the safe limit values, they are written in green color and no alert is displayed at the bottom.
On the Web application, it is also possible to specify start and end dates, and zoom-in to the recorded data, as shown in Fig. 6.
Figure 7 represents a screen with the alert condition. Machine learning predicts an out-of-limits value for the temperature which is written in red color and alert text is displayed accordingly.
A neural network structure as given in Fig. 8 is used to predict the temperature, humidity and gas values one hour in advance. Two hidden layers with 100 and 50 neurons are formed in the first and second hidden layers, respectively. Adam optimizer is utilized during the training. Mean squared error is selected as the loss function to be minimized.
Loss curves for the train and the validation sets and predictions over the test set are given in Figs 9 and 10 for a single trial. As expected, loss decreases when learning progresses; and predictions are quite close to the desired values.
Test error for different input ranges
Test error for different input ranges
After 500 epochs in each training, ten-fold results are given in Table 1 for different input structures. Output range is held fixed, i.e., one hour ahead value is to be predicted for all cases. Input parameters are selected as the one-hour, three-hour, ten-hour, and 24-hour previous measurements in order to find the optimum input range.
According to the obtained results, test error is the smallest when one-hour past values are used as inputs. When the input range is expanded, prediction becomes poorer. This suggests that, one-hour past measurement holds the most significant information to predict the value one hour in advance.
The system proposed in this work concerns real-time monitoring of changes in the incubator environments using temperature, humidity and gas sensors. The data from these sensors are sent to a mobile application via BLE, and to a cloud server via Wi-Fi using microcontroller hardware. The past and present measurement values are displayed both on mobile device’s display and on the Webpage.
When within the BLE range of the equipment, the developed mobile application can be used to capture and store the data, especially when the Internet is not available. The mobile application also enables staff to access data remotely regardless of time and place. Furthermore, predefined alarm conditions and machine learning-powered alarm predictions allow for rapid intervention.
Several points can be noted as future work: The current system is designed to monitor the parameters of a single incubator, but support could be added for simultaneous data handling on the cloud server for multiple incubators. Related with this, the incubator selection screen could be included in the mobile and Web application. Moreover, within the application, in addition to the alarm notifications, it could also be possible to send text messages to the relevant staff in case of emergency.
The outcome of this study would be beneficial primarily in the biomedical and health sectors, which use incubators extensively. Real-time data, emergency alerts and alarm prediction by the machine learning could greatly assist the duty personnel.
Funding
The authors report no funding.
Availability of data and materials
Not applicable.
Author contributions
Both authors contributed equally to this study.
Footnotes
Acknowledgments
The authors have no acknowledgments.
Conflict of interest
The authors declare that they have no conflict of interest.
