A new IOT system for non-contact body temperature sensing and warning
* Author to whom correspondence should be addressed.
Sigma Journal of Engineering and Natural Sciences 2023, Vol. 41, Issue 5, pp. 892-899; doi.org/10.14744/sigma.2022.00070
Abstract
Keywords: Internet of Things (IoT); Sensors; Machine Learning; Neural Network Algorithm
Introduction
Emergency intervention in high or low body temperature values prevents the patient from experiencing temporary or permanent health problems. Internet of Things (IoT) provides solutions such as providing instant alerts, eliminating possible damages caused by negligence, providing early diagnosis and emergency response, increasing the comfort of both patients and emergency responders, especially in the healthcare sector, for better care, improved treatment outcomes and lower cost for patients and better processes for healthcare providers [1-7]. According to the Turkish Statistical Institute, 42% of the patients (especially 0-6 years old) have a high fever
during the illness. The failure to control high fever can lead to dangerous consequences such as meningitis, paralysis, and etc… [8-9]. Today, the most common devices used to monitor changes in body temperature are Digital and NonDigital Thermometers. However, for accuracy, the patient must remain in a certain position while using these devices. Also, measurement should be done manually by a companion or healthcare provider for regular monitoring of body temperature. Therefore, these thermometers cannot either meet the needs or protect the sensitivity depending on the situation. On the other hand, in common usage areas, body temperature is measured individually by a person, or thermal cameras make measurements. These applications
*Corresponding author. *E-mail address: fakgun@yildiz.edu.tr This paper was recommended for publication in revised form by Shengda Zeng Published by Yıldız Technical University Press, İstanbul, Turkey Copyright 2021, Yıldız Technical University. This is an open access article under the CC BY-NC license (http://creativecommons.org/licenses/by-nc/4.0/).
Sigma J Eng Nat Sci, Vol. 41, No. 5, pp. 892−899, October, 2023
increase workload and time loss or cost. The aims of this study are • To develop a prototype that provides non-contact detection, alert of body temperatures, and the following features that are not available in existing devices • To determine the body temperature without contact and keeping the patient in a specific position, thus increasing the comfort of the patient, • To minimize the risks arising in cases of negligence and overlook, with automatic and regular controls, • To provide instant warnings and chance of emergency intervention in case of anomaly, • To eliminate the responder’s obligation to be in the same environment with bthe patient, which increases the responder’s comfort, • To reduce the risk of contagion in the case of infectious disease and epidemic, • To control the body temperature of more people with less healthcare personnal. As a result of this work, we produced a prototype that satisfies all these solutions. The prototype will bring an innovative approach to body temperature measurement technology in the health sector. The study, divided into five sections, consists of the following scheme; first we introduce IoT systems’ advantages and their uses in the literatüre, then we mention the studies close to our work on measuring body temperature using the IoT system and explain our research’s differences and prominent aspects. Next, we describe the system’s hardware and software design and the methods applied in detail. We reveal our results comparatively. Finally, we give the conclusions.
Metodology
System Hardware Design System hardware (as shown in Figure 1) consists of three main parts; single-board PC, multiple sensors, and server. The single-board PC has various sensors on it. The Single board computer is composed of; Raspberry Pi 3 Model B with Wi-Fi compatibility, Python interpreter with Wi-Fi module to run the data transfer script and perform an HTTP request, The Linux-based operating system, 1 GB RAM, 1.2 GHz processor to run the operating system and the software that developed GPIO pins and I2C connections to connect the sensors for data collection. To obtain the correct body temperature, we collect the parameters that affect body temperature from thermal, ultrasonic, distance, temperature, and humidity sensors. In this study, we are using the Panasonic AMG8833 thermal sensor [13]. It stores the temperature data as inputs to an 8x8 matrix. The temperature data defined by the 64 inputs varies according to the distance between the sensor and the object. The Raspberry Pi communicates with the pins on the device using the I2C communication protocol. It looks at the surface at an angle of 60 ° vertically and horizontally. As the distance between the sensor and the surface increases, the temperature data corresponds to a larger surface. It is crucial to measure the distance between the device and the patient with high accuracy for accurate results. The system processes the temperature data obtained from the thermal sensor according to the distance. We used an HCSR04
Sigma J Eng Nat Sci, Vol. 41, No. 5, pp. 892−899, October, 2023
ultrasonic distance sensor [14] and accepted the maximum distance as 400 cm during the prototyping phase.To correct the thermal sensor data, we use the humidity and temperature sensor DHT11, considering that the patient’s environment may affect the temperature value. All these data obtained from the sensors are sent directly to the server with a unique key produced for the Raspberry Pi device. The server provides the storage and instant presentation of temperature and other data obtained from the
sensors and acts as a data transmitter between the single card PC and the mobile application. Open source database MYSQL(community edition) is located on the server, and data is processed, hosted, and operated here. On the other hand, we developed a mobile application to display the detected body temperatures and to warn the users against dangerous body temperature values. Figure 2 shows the relationship between the components of the designed system.
Sigma J Eng Nat Sci, Vol. 41, No. 5, pp. 892−899, October, 2023
System Software Design The system software consists of three main parts; database structure, mobile application, and machine learning algorithms. Figure 3 shows these relations, which are detailed below. i) Sensor Calibration Using Machine Learning As we mentioned above, we obtain data with multiple sensors at different distances. We compared, regulated, and processed the actual temperature of the object and the temperatures we received due to the values detected by the sensors at various distances. In the trials made, We observed that the thermal sensor gives better results when it is closer to the patient’s body. We calibrated the temperature value that we got from different distances by taking all parameters into account.
Then, we made predictions based on previous data by the trained algorithm. A three-layer and backpropagation neural network algorithm was designed and used to calibrate sensor values and minimize the output of the error function while training feed-forward neural networks. (Figure 4). The first layer is the input layer, where the required features for the algorithm like Distance, Room temperature, Humidity, Body temperature are specified. The second layer is the hidden layer formed dynamically according to various parameters. The hidden layer consists of five neurons because the input layer has four inputs. The number of neurons and layers in this layer can vary according to need. We used the forward feeding sigmoid activation function and the derivative sigmoid function for the reverse feed.
The third layer is the output layer that has only one output, the estimated body temperature. The algorithm starts with a random value. Then, calculates the next neuron value with the weight values found in the interlayer paths. Finally, it obtains a value in the output layer by going towards the input layer to reduce the error rate according to the determined method. When iterations get an error rate below a specific error rate, the algorithm is completed. The thermal sensor determines the body temperature with 64 temperature values in matrix form. These values are minimum 35 °C and maximum 40 °C. Within these 64 values, we eliminate the values below the minimum value and above the maximum value. When we detect ± 5 °C data from room temperature, we will assume that an object detected an abnormal temperature. Temperature abnormality occurs in two cases; First, detecting an abnormally low body temperature, leading to hypothermia. The second is detecting an unusually high body temperature that can lead to consequences such as meningitis. The system constantly monitors the change in body temperature to analyze these issues. An abnormal situation is detected when the body temperature changes more than the threshold values of the specified time intervals. The algorithm is developed with the Python programming language and runs on the server. In the prototype stage, we used web services that provide communication with both the device and the client application on the server written in Java programming language. ii) Database Structure The database’s primary focus is to store the values that we receive from the sensors and calibrate them by the script running on the server. Multiple tables store some helpful
Sigma J Eng Nat Sci, Vol. 41, No. 5, pp. 892−899, October, 2023
information about the system and mobile application in this database. These tables are detailed below. Sensor Values Table: This table includes the sensors’ values via the device that hosts and controls both sensors with a script. We transfer the received values to the database running on the server. Calibration Table: This table includes calibrated values obtained by the calibration script. The calibration script runs in the sensor value table and calibrates the values ac- 193 cording to the training data set. User Information Table: This table includes user information. Device Information Table: This table includes the device information. Paired Device Information Table: This table includes the relationship information between the User Information Table and the Device Information Table. One user can pair with many devices as well, as one device can pair with many users. There are more than one relationship between the User Information Table and the Device Information Table. Notification Table: This table includes the notification information. iii) Mobile Application The developed mobile application allows users to report measured and stored body temperatures to those concerned and send notifications in case of emergency. It is also possible to access previous messages, hourly, daily, and weekly averages of patients. The application allows refreshing the data screen with the latest data in the database with a button. After the update process finish, new data displays, and the users are taken the messages “VALUES UPDATED.” On the backhand, when we push the button, the mobile application sends an HTTP request to the webserver on Raspberry Pi, which is running on the same network by
Sigma J Eng Nat Sci, Vol. 41, No. 5, pp. 892−899, October, 2023
Wi- Fi. The web server transmits the request, and the web service decodes the request parameter and the request from the mobile device. This stand-up function executes the underlying query to the server’s database and continuously stores and edits the new data. This arrangement is converting incoming
data to the JSON type by doing the necessary key-value mappings. The JSON type data obtained is located on the Apache Tomcat web server’s required port running on the server machine. This broadcast is directed to the mobile device requesting from the mobile device to the mobile application to display the most up-to-date data available in the data- base. The mobile application has been developed for devices with the Android operating system and has user interface screens as Registration, Login, Device Pairing, Device List, Home, Live, and Notification screens (Figure 5).
Results And Discussions
A sample data set was formed by measuring a selected group of people at various room temperatures and in different places. During our measurements, temperatures between 0 °C and 50 °C and humidity between 20% and 80% are acceptable. While 21% of 229 the measured temperatures were above 40 °C, 11.4% were determined as 34 °C and below.
Table 1. Image of a part of the collected data table SensorRecord_l[
Sigma J Eng Nat Sci, Vol. 41, No. 5, pp. 892−899, October, 2023
Figure 7. The relationship between real values and values obtained from the prototype after training. Blue points denote the measurements obtained by mercury thermometers, and red points represent the prototype’s measurements. The sample data set consists of 1000 data and is used to train the network with the backpropagation algorithm. The training consisted of four component vectors: temperature sensor, thermal sensor temperature, room temperature, humidity value. As we mentioned before, distance is a crucial value for calibration. The temperature decreases as the sensor move away from the object. Therefore, calibration is required when the distance and other parameters are changed. We observe that if the distance is below 40 cm, the thermal sensor can better sense the body temperature. However, when the distance is over 400 cm, the thermal sensor detects body temperature less precision. Sample dataset values used to calibrate the thermal sensor value were weighted between 60 cm and 140 cm. The device function is more accurate in different room temperatures if we have room temperature values between 20°C and 30°C. To capture this range, we arrange the humidity values with a more significant range between 40 and 80 grams per cubic meter. We record the data taken from each sensor (distance, room temperature, humidity) in columns 6, 7, and 8 for each measurement, respectively. We keep the temperature values measured from the thermal sensor in column 5 and the trained temperature value in the 2nd row of the table. Moreover, the 3rd column contains the record of the measurements made manually with the mercury thermometers in use at each measure simultaneously. The training data was created daily, weekly, and monthly. Measurements were also made with a mercury glass thermometer to compare 1000 data. We compare, edit and process the obtained temperature value with the actual temperature of the object with the statistical calculations given in Table 2.
Table 2. Statistical Analysis of Temperature Measurement Absolute Error
Let am= automatic (measured by prototype) data and mm= manual (measured) data. Then, 𝑨𝒃𝒔𝒐𝒍𝒖𝒕𝒆 𝑬𝒓𝒓𝒐𝒓 = |𝒂𝒎 − 𝒎𝒎|. Using the neural networks approach, we take training examples and then develop a system that can learn from those training measurements. By increasing the number of training data, the network can learn more and so improve its accuracy. When we compare and analyze the results, we confirm that the developed prototype measures body temperature with an accuracy of 98.1% at the appropriate distance, temperature, and humidity obtained by the algorithm and IoT.
Conclusion
We designed a prototype (Figure 6) of the IoT-based non-contact heat detection and monitoring system that brings innovations both individually and institutionally. We named our prototype SFEVER because it resembles safe fever. The innovations brought by SFEVER for individual use in personal health are; • non-contact measurement of patient temperature,regular and automatic (unassisted) measurement, • recording and reporting the data obtained, • viewing patient data and monitoring patient status regularly, • giving warnings in extraordinary situations such as high and low temperatures, • providing early intervention. The innovations that SFEVER provides to patient follow-up public areas; • ensure the safety of the patient with regular control, • protect the health of healthcare personnel by providing contactless control in cases of contagiousness and epidemics, • reduce labor waste and costs as it eliminates manual control in use in hospitals, shopping malls, and public vehicles, • collect data in a single-center • enable statistical analysis and evaluation, even taking measures in a specific area.
Sigma J Eng Nat Sci, Vol. 41, No. 5, pp. 892−899, October, 2023
It is estimated that non-contact body temperature measurement devices, which are the most demanded medical product during the COVID-19 epidemic, will reach a huge global market size by 2026 [15]. Our work, which produces an essential and functional product due to our process, is economical and contributes to protecting personal data byusing thermal cameras. We believe that it will guide many studies due to its non-contact, automatic measurement, and instant and remote warning system features. On the other hand, in our country, not only body temperature control but also HES code control is carried out when entering common areas. Considering this, the HES code scanning function can be added to the smart temperature measuring devices. An efficient controlled passage unit can be created with the integration of the existing HES application to the system and turnstiles and image processing techniques.
Acknowledgments
The study was supported by The Scientific and Technological Re- 296 search Council of Turkey (TUBITAK) within the scope of Tubitak 2209 projects 297(1919B011701935). Patents: Aydın Akgun F., Dede M., Soyturk G. 2003. Body Temperature Trcaking System (National patent). patent number: 2019-GE-227889, 2019 07825 293
Data Availability Statement
The authors confirm that the data that supports the findings of this study are available within the article. Raw data that support the finding of this study are available from the corresponding author, upon reasonable request.
Conflict Of Interest
The author declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Ethics
There are no ethical issues with the publication of this manuscript.
Share and Cite
AKGUN, F.A.; SOYTURK, G.; DEDE, M. A new IOT system for non-contact body temperature sensing and warning. Sigma Journal of Engineering and Natural Sciences 2023, Vol. 41, pp. 892-899. https://doi.org/10.14744/sigma.2022.00070

