Apps-Based Temperature Monitoring System with Location Services for Medical Needs Delivery Using Drone

gankokbeng@ukm.edu.my Abstract —Traditional temperature monitoring system for blood delivery re-quires a USB cable to extract data after delivery has been completed. Without real-time temperature data during delivery, the quality of the products cannot be monitored efficiently. In this paper, we have designed and developed a mobile application-based temperature monitoring system for medical needs delivery. It has a mobile application to display temperature data in real-time. The system in-cludes Arduino Uno, DHT22, DS3231, microSD card adapter and ESP8266 Wi-Fi module. The temperature and humidity data were stored in the microSD card and ThingSpeak server for further analysis. A mobile application allowed users to visualized and monitor the temperature of the payload during delivery. For the system test and evaluation purpose, the developed temperature monitoring system was placed inside a polystyrene box. The temperature and humidity data were acquired using DHT22 and Fluke t3000 fc in cold and ambient temperature for 30 minutes with a sampling time of 2 seconds in the polystyrene box. The results showed that the correlations error 0.96 and 1.00, respectively. Finally, we showed that the developed temperature monitoring system can capture and record temperature data in real-time. It is reliable and comparable to a high-end temperature


Introduction
Over the past decade, the operation of Unmanned Aerial Vehicles (UAVs) is often referred to as drones [1]. Drones have a variety of applications and now their application is absorbed into healthcare system. Focusing on emergency care delivery, drones can potentially change the system for public health care especially in rural areas since they can respond to a medical emergency in a way that is more efficient and faster than using traditional delivery method. Medical supplies are also defined as items required for the treatments of illness or injuries [2]. Medical supplies have their own properties and storage requirements to avoid any spoilage or defects that will lead them to be disposed. Medical supplies will lose their functionality if they are out of their controlled temperature storage. For example, if the Red Blood Cell units are out of their temperature storage for more than 30 minutes after shipping out, they cannot be reissue and this will lead to blood wastage. The reason for this is that once the RBC units are out of their controlled temperature storage, the blood components warms up and lead to proliferation of bacterium within that period [3]. Therefore, maintaining the medical supplies within their controlled temperature storage is very important. For traditional delivery of blood products, a compact USB temperature monitoring system is used to record the temperature of the blood products during delivery and examined after a delivery using a laptop/PC. For such cases, the application for remote temperature monitoring can eliminate the need for post-delivery temperature inspection that spend longer time and provide a simplified method to inspect the products temperature variation. A temperature monitoring system is a portable measuring device which can record temperature readings automatically over a specified period. Besides, the temperature monitoring system also refers to the data logger which is optimized or configured with a temperature probe or sensor [4]. Compared to traditional equipment, the temperature monitoring systems are tools used to collect, analyze experimental data and can present real-time analysis clearly with temperature sensors and probes that can respond to parameters that are out of acceptable range [5]. According to Goyal and Malhotra's research, there are various designs of temperature monitoring system but most of them have internal thermometers or thermocouples or can be connected to external equipment [6]. Data retrieval can be done via cable, RFID, or wireless system. They are usually in small size, battery-powered, portable, and equipped with data storage and sensors. However, their study concluded there is no temperature monitoring system was developed for various phenomena. In 2016, there was a study on the small-scale autonomous temperature monitoring system conducted by Ahmed Tawfik and Brian Kopp for automated manufacturing applications. In their study, a temperature monitoring system was developed at a cost-effective and met most of the requirements for automated manufacturing applications except for the accuracy of temperature measurement [7].
In Mattoli's research, a flexible data logger tag with temperature, humidity, and light sensors was developed to improve food logistics [8]. The data transmission used in the study is infrared communication, also known as RFID technology. A mobile application is also developed to display stored data graphically. Although the developed data logger system is very compact, lightweight, low power consumption and low cost, but it has only 2 KB of memory size. This memory size is limited concerning logistics as the delivery period is usually long and cause the data log is incomplete. Sehgal and his team members built a wireless temperature monitoring system by using IEEE 802.15.4/ZigBee protocol [9]. In their research, temperature data from a temperature sensor will be sent to the terminal serial port, where the data is stored. Although the system can reduce power consumption, this system is not suitable in medical supplies delivery applications because the developed system needs to be connected to a computer to get data.
A comparison study had been presented between the most common sensors used. Saptadi discussed the comparison of temperature and humidity measurement accuracy between DHT11 and DHT22 using ATMEL AVR and Arduino platforms [10]. Based on the results of his study, DHT22 has better accuracy at temperature measurement than DHT11 with a relative error of 4% compared to DHT11 which had a wider range of relative error of 1-7%. Moreover, Kodali and Mahesh did a comparison study for measurement accuracy and cost-efficiency between DHT11, DHT22 and SHT71. The outcome of their studies shown that DHT22 is a better choice than the others in term of accuracy and cost-effectiveness for the ambient monitoring system shown in Table 1. Normally, a temperature acquisition device is used in a blood products delivery with logging capability. The recorded data required a computer to extract the logged data using USB interface after the delivery is completed [12][13]. Dionisio et al. [14] proposed a smart gateway that allow data to be monitored using a mobile application. The single board computer board such as Raspberry Pi has been used as a lab server for a reconfigurable remote experiment [15]. The used of off-the-shelf hardware platform could accelerate the development time and cost. The Wireless Sensor (WS) data communication using DHT11, Arduino, SIM900A GSM module, a mobile device and Liquid Crystal Display (LCD) has been developed to monitor the environment parameters. [16]. The used of GSM network ensured the coverage and unlimited distance. Ikhlef et al. [17] have developed a remote temperature control system controlled in real time through an Internet network for educational purpose. A graphical user interface has been developed a simple web browser to access the physical experiments.
However, previous studies have not shown any usage of mobile application-based temperature monitoring with location services in blood delivery service. Conventional temperature acquisition method only allows users to visualize and process the data after the acquisition completed. Therefore, the primary goal of this study is to develop an mobile application based mobile temperature monitoring system with location services, cloud and local storage system for redundancy. Building a mobile application for data visualization to display the recorded data and flight locations of each missions. Besides that, the developed system was be calibrated and integrated in a polystyrene cooler box. Such arrangement can be used to conduct several experiments based on different temperature condition for data comparison. This system allows user to know the quality and condition of the product during delivery and the laboratory staff can assured that blood products are in good condition once the delivery reaches its destination.

Materials and Methods
In this work, a temperature monitoring system was developed by using microcontroller Arduino Uno, temperature & humidity sensor DHT22, Real-Time Clock module DS3231, microSD card adapter, microSD card, and ESP8266 ESP-01 Wi-Fi module. The software used in this research are Arduino IDE, MIT App Inventor and ThingSpeak platform.

System architecture
The temperature monitoring system consists of DHT22, microSD card adapter, DS3231 and ESP8266 ESP-01 Wi-Fi module are the. The microcontroller used in this work is the Arduino Uno which offers a great platform for rapid prototyping. Figure 1 shows the block diagram of the temperature monitoring system. The 10-bit analog to digital convertor of the microcontroller digitized the analog signal acquired from DHT22. DHT22 was chosen as a temperature and humidity sensor used in the system due to its better measurement accuracy and relative low errors. The microcontroller acts as a master that responsible for initiating a communication with the slave (DHT22) using a single wire protocol. The temperature and humidity data with an updated local time and date were captured and send to microcontroller for storage and processing. The microSD card adapter enables the interface between Arduino Uno and microSD card for data storage purpose using SPI protocol. DS3231 was used as a real-time clock to synchronize the data with local time for data intelligibility. Addresses and data of DS3231 are connected in series and transferred via I2C protocol to main controller. In this work, the ESP8266 ESP-01 Wi-Fi module was used to store temperature and humidity data by connecting the Arduino Uno to a local network. Beside saving the data to the SD card, the acquired data will be uploaded to a cloud platform namely ThingSpeak. For the data security perspective, ThingSpeak is secured by a 16-digit read API key. ThingSpeak API servers support secure HTTPS and MQTT connections between connected devices and ThingSpeak. The Arduino Uno transferred the measured temperature and humidity data to the ThingSpeak server via TCP/IP protocol. UART protocol was used to establish a physical connection between the hardware and peripherals (Wi-Fi module -Arduino Uno). A mobile application was developed by using MIT App Inventor was used to retrieved data from ThingSpeak server and visualized the acquired temperature data. Figure 2 shows the flow chart of the temperature monitoring system development. Firstly, the program initialized the parameters and libraries needed for the system and setup peripheral devices that were linked to Arduino Uno. Then, the Arduino Uno established a connection with the local network for data transmission to ThingSpeak server. AT command was used for the setup and communication of the network. AT command is the instructions used to operate modems. These instructions' origin from Hayes command set which is used by Hayes smart devices. Finally, the program read the data from the sensor, DHT22 and transferred to ThingSpeak cloud server and store it to microSD card for data redundancy.

Software development
A mobile application was built using MIT App Inventor to display the data acquired by the developed system. The mobile application resulted a comprehensible and userfriendly system. Temperature and humidity data can be displayed in a graphical and numerical form depending on the user needs. Figure 3 shows the flow chart of the mobile application development.

Fig. 3. Flow chart of the mobile application process
In addition, the mobile application has feature to calculate estimated flight distance of a drone delivery by using location sensor. The latitude and longitude values of the locations were obtained using mobile GPS connection. By using the latitude and longitude, the flight distance can be estimated using Haversine Formula. After simplification, the formula used to calculate the estimated flight distance, d is shown in Equation (1)

Calibration of DHT22 temperature sensor
A comparison test was conducted between the DHT22 sensor and Fluke t3000 fc temperature monitoring system by obtaining the temperature reading within 30 minutes with a sampling time of 2 seconds. The test was carried out in two different conditions, which is cold temperature and ambient temperature. Figure 4 shows the test conducted in cold temperature. The scatter plot graphs for these two conditions were plotted using Microsoft Excel to compare the temperature readings of DHT22 and Fluke t3000 fc. Then, a linear regression line was drawn for the scatter plot graph and the intersection point was set to 0. The correlation coefficient for both method data was calculated.

Preliminary test
The developed system was integrated and soldered onto a strip board and powered by two 3.7 V LiPo batteries. Both data storage methods have been tested to ensure data logging accuracy and detect any data packet loss. The test started by placing the sensor in the polystyrene box with ice for 30 minutes. For data analysis purpose, the temperature and humidity data that stored in the cloud platform were exported from ThingSpeak to the CSV file. Besides that, as for redundancy, the temperature and humidity data stored is stored in the microSD card. It can be retrieved using microSD card reader if the data in the cloud platform is corrupted. Then, these data were compared to assess the accuracy of the developed system for data logging. Finally, a scatter plot graph was plotted based on the data retrieved from ThingSpeak server and the microSD card. A linear regression line was drawn from the scatter plot graph and the intersection point was set to 0. Thus, the correlation ratio between the two data was obtained. Results and Discussion

Preliminary test
The developed temperature monitoring system consists of Arduino Uno, DHT22, DS3231, microSD card adapter and ESP8266 ESP-01 Wi-Fi module. A mobile application was built to visualize the data in graphical and numerical display, estimate the flight distance and store data for each mission. All components were integrated on a strip board as shown in Figure 5. The system is powered by two 3.7V LiPo batteries with a switch for turning the temperature monitoring system on or off. For data storage to microSD card, a text file named "LOGGER.txt" was created. The data included date, time, temperature value and humidity value were written to the SD card in a table form as shown in Figure 6. The temperature and humidity data were sent to a different channel of ThingSpeak server. A mobile application was used to visualize the data by users. Both data was uploaded to their channels respectively every 15 seconds once the temperature monitoring system is turned on. The setup of the preliminary test is shown in Figure 7. For the preliminary test purpose, the developed system was placed inside a polystyrene box with ice for cold environment and without ice for ambient environment. With some enhancement later, the polystyrene box will be used as payload for the medical need's delivery such blood products and medicine.  The developed mobile application consist of several screens and the first screen is the login screen. Once the user log in, his ID will be recorded. The display screen in Figure 8(a) shows the real-time temperature and humidity data from ThingSpeak server before flight mission. The location screen is used to obtain and record location data. The location of the departure is obtained from a smartphone GPS. Once the GPS is connected, the current location will be shown, and the user can press the button "Save Departure" to save the location. For destination, the user can manually fill in the text box and press the button "Save Destination" to save the desired location. A map is displayed on the location screen based on the locations saved in the third screen. To show the markers which represent departure and destination, the user must press the button "Track". The button "Check Distance" is to display the calculated flight distance while the button "Information" is to label the destination for differentiation of the two locations. Figure 8 The history screen displays all the saved data from the system. The display data consist of ID user, mission date and time, average temperature, average humidity, and distance travelled. Button "Add Current Data" is to save the data from the current mission to the list. The saved data will be shown at the bottom of the list as shown in Figure  9(a). Users can inspect any of the previous drone mission. The mission screen displays the map based on the drone mission chosen from the history screen as shown in Figure  9(b). The distance travelled and the address for departure and destination will be shown at the top of the screen. The temperature and humidity screen as shown in Figure 10 displays flight mission's temperature and humidity data in graphical form. The mean temperature and humidity values are also shown in numerical form on the screen. The users have the option to go back to the history list by pressing the button "History".

Calibration of DHT22 temperature sensor & preliminary test
A data comparison for two different conditions was conducted. The correlation obtained in cold temperature was 0.964 as shown in Figure 11. In ambient temperature, the correlation obtained was 1.00 as shown in Figure 12. This means that the developed system performance is almost the same as Fluke t3000 fc on account of the correlation found is close to the value of 1. This conclude that the temperature reading from the developed system is reliable as compared to the reading obtained from Fluke t3000 temperature monitor.

Conclusion
The developed temperature monitoring system met the requirement for a basic data logger: compact, data logging to memory database and powered by a battery. The system was used to measure temperature in 3 different conditions, which is cold temperature, warm temperature, and hot temperature. Later, the result was compared to Fluke t3000 fc temperature monitor. The cold and ambient temperature's correlation coefficients were 0.964 and 1.00 respectively. The high positive correlation coefficient indicates the measurement of DHT22 is quite accurate. The developed mobile application can display temperature and humidity data stored on ThingSpeak server graphically and numerically. Additionally, the mobile application can also calculate the flight distance using the mobile GPS location. Both departure and destination marking can be displayed on the map. The mobile application can as well store the mission data on a cloud platform for future use.
Currently, a printed circuit board has been designed and developed to miniaturize the system and ensure the robustness of the system. A drone carriage that consists of active and passive cooling mechanism has been developed to ensure the cool environment during the flight mission. The developed payload will be attached to a self-assembled drone for medical needs delivery. Future works consist of drone endurance test, reliability test and capability of cooling especially for blood delivery. Syahril Amir Mohd is currently a MSc student in Department of Electrical, Electronic & System Engineering, Universiti Kebangsaan Malaysia. He is currently working on a project related to blood delivery using drone. His research interest is drone technology and embedded system development.
Tze Yee Ng has received her B.Eng. degree in Electrical & Electronic Engineering from Universiti Kebangsaan Malaysia. Her research interest is embedded system development.