# Internet of Things- (IoT-) Based Real-Time Vital Physiological Parameter Monitoring System for Remote Asthma Patients

Authors: Khairul Islam; Farabi Alam; Abid Ibna Zahid; Mohammad Monirujjaman Khan; Muhammad InamAbbasi
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

In this paper, the design and implementation of an asthma patient monitoring system are presented. It can be categorized as an IoT-based device which can monitor heart rate, room temperature, humidity, air quality, nostril temperature, and oxygen saturation (SpO2) using an ESP8266 microcontroller and different sensors. All data will be sent to Firebase via Wi-Fi and then to patients and doctors via mobile applications and websites, respectively. Doctors can access this data via a website and instruct patients based on their specific needs. An ESP8266 microcontroller, a DHT11 temperature and humidity sensor, a MAX30100 pulse and SpO2 sensor, a MQ-135 air quality sensor, and an LM-35 temperature sensor have been used for the proposed system in this research. This system uses an efficient way to store all the data and information about the patient. It also carries their various test reports. The data is preserved in a proper way, which will help the patient or doctor retrieve any information in a smooth and swift manner. The software part of the system is divided into two parts. One of them is a mobile application that was designed by the Android Studio. The second one is the website, and it is also divided into two parts. HTML (hypertext markup language), CSS (cascading style sheets), and JavaScripts are designed for the front end of the website, and PHP (hypertext preprocessor) is used for the backend of the website. The device is tested on seven different real human test subjects, and the accuracy of that device is state of the art. It can measure the heart rate of a person along with their oxygen saturation with accuracy. Also, this device calculates the humidity properly as it changes the moment wet towels are put near the sensors and far from the sensors. It also shows the proper air quality as it has been tested with smoke to measure the extreme difference in the air quality. This system also has video calling and prescription features. Using this system, patients can consult with the doctor and get a prescription. Using this system, the vital physiological parameters of the remote patients can be measured and monitored. Any hospital or diagnostic center can be more efficient and organized by using a system. And patients are also freed from the hustle as they do not need to go and visit the doctor over and over again. The system is designed in such a way that it can look after the particular needs of a typical hospital or a diagnostic center and is able to provide easy and efficient storage of information related to patients.


---

## Body

## 1. Introduction

A remote health monitoring system is an additional part of a hospital where any patient can be monitored from a remote place. In general, it monitors the vital organs of patients, which can only be seen in a hospital or diagnostic center. Traditionally, these systems are built with massive and complex circuits that require a lot of power. But with the help of semiconductors and the constant advancement of technology, industries are now able to produce sensors and microcontrollers at a smaller size, with faster operation, less power consumption, and at a cheaper cost.From the dawn of time until now, health has been a major concern for humanity. This sector has always been advancing and growing, from the start till now. There have been numerous times throughout human history when various epidemics have occurred and resulted in a large number of deaths. For example, the coronavirus attack in China has spread all over the world and many people have died because of it. It devastates not only the Chinese economy but also the global economy. It is always preferable to use remote health monitoring systems to monitor patients, especially in areas where the epidemic has spread. So, for the current situation, a health monitoring system based on the internet of things (IoT) could be a very good solution [1].Asthma is one kind of respiratory disease. It causes breathing problems and can make physical activities challenging for people of all ages. It is a respiratory disorder that mainly affects the lungs. Asthma is a disease that affects anyone, from children to adults. Furthermore, the recent global pandemic of COVID-19, which occurred in China in 2020, increases the death risk of asthma patients. Also, it is really difficult to get an appointment with a doctor in a metro city because of the traffic congestion and road conditions. For those people who are from rural and remote areas, it is really difficult for them to consult a doctor. An IoT-based remote patient monitoring system is a good solution for this kind of situation.This remotely monitored system empowers observation of patients outside of customary clinical settings (e.g., at home), which expands access to human service offices and brings down expenses [2]. The primary goal of this research is to design and implement a system that can monitor any patient’s health using sensors and upload it to the cloud so that their relatives and loved ones can see their condition if there is a problem. Another goal of this research is to reduce healthcare costs by eliminating the need for people to visit doctors or physicians regularly for checkups. It reduces visiting fees, hospitalizations, and diagnostic testing procedures. There are major differences in the framework between short message service (SMS-) based monitoring and IoT-based monitoring. In IoT-based frameworks, patient monitoring can be seen by different clients [3]. On the other hand, the GSM-based system is based on utilizing GSM through SMS. Most rural places do not have much in the way of medical facilities for natives [4]. There is a huge ability to ignore any type of minor health concern, which is manifested in the early stages by changes in important elements such as body temperature and heartbeat rate. Once the health problem has progressed to the point that the person’s life is in jeopardy, they seek medical help, which might result in a needless waste of money. This is important to consider, especially when an epidemic spreads in a remote area where doctors cannot reach it. To prevent the transmission of disease, giving patients a smart sensor that can be monitored from afar would be a practical solution that could save many lives [5].There are a lot of models that use the remote patient monitoring framework. Previous work on this system has been proposed [6]. This framework monitors the ECG (electrocardiogram) signs of a patient with the arrangement of the Session Initiation Protocol (SIP) and ZigBee. This framework consists of a remote ZigBee module, a SIP register, an ECG sensor, a database server, a proxy web server, and other wireless devices. There is another system that is based on power line communication (PLC) and the ZigBee network that was proposed in [7]. The framework consists of many sensors, like a ZigBee/PLC portal and some software. The information is collected by the sensor and is sent to a centrally controlled server through a ZigBee/PLC passage. On the central server, this data is stored and broken down. Many patients can be monitored at the same time by using vital signals based on ZigBee technology, which has been discussed in [8]. The network load is regulated by an optimized source routing protocol. Again, for this work, wireless network and power-based problems, which include energy consumption and network lifetime delivery ratio, have been upgraded. In [9], a patient monitoring system based on a low-power microcontroller has been developed. Benders are a major concern in hospitals, so a resistive bend sensor is used. This system is capable of monitoring patients constantly with mobility and can replace wired systems. In [10], work on a local area network (LAN) or personal wireless data acquisition system has been seen. The IEEE 802.15 standard is used in this system for wireless communication with the help of Bluetooth technology. Patient monitoring from home is possible because of the internet and the home-based monitoring system. The remote patient monitoring system uses the internet of things (IoT) and the ZigBee protocol to monitor a patient [11]. This real-time system is capable of sending a report to the remote location once it has analyzed all the data. The system developed in [12] takes health parameters (temperature and pulse) wirelessly. It is also based on ZigBee and has very good accuracy. On the other hand, the improved system in [13] has a portable ECG to monitor and also enables data collection of patients’ real-time walking acceleration. After data analysis, the technology can detect patients who are falling.Whenever a patient goes to any hospital, clinic, or diagnostic center, sensors that are used in those devices sense the physiological signs, and these signs are then transformed into electrical signals [14]. After that, the electrical flag is changed to an advanced flag (computerized information), which will be put on the RFID. Computerized data is transmitted to the neighborhood server in these ways using the ZigBee protocol. ZigBee is the proper convention for this framework. It has the most cell hubs in the world. It is preferable to have gadgets that are less expensive and consume less energy. Information is exchanged with the therapeutic server from the nearest server through a wireless local area network (WLAN). The medicinal server is built around a large database. When the data is sent to the therapeutic server, it checks to see whether the patient has a previous medical record; then, the server adds the new data to that record and sends it to the specialist. If any patient does not have any past therapeutic records, then the server creates a new ID for them and stores the information in the database [15]. In [16, 17], the authors designed and developed a remotely controlled internet-of-things method for asthmatic patients. The IoT asthmatic monitoring program in this study also includes a cardiac pulse sensor. The paper [18] presented a higher unit on Arduino with a mobile network (GSM) cover to communicate with the online platform and send a text message wirelessly over the mobile network (GSM) to the user’s device by using the GSM library to establish a connection with the shield without using a cloud platform to save all the patient’s documentation for examining and diagnosing the patient.The authors of the paper [19] developed a medical device using the Arduino UNO framework to learn sensor files and transmit them to a computer, where they were then prepared, including an app to show a diagram of heart rate. In paper [20], they just use the design of a local computer to identify irregular heartbeats via ECG waveform without discussing how legal doctors will be informed in an emergency. As a result, this same information is sent through the online platform to a remote computer, so there will be a website to enable authorized people or medical specialists to observe the patient’s case and also the alerting process. The authors of the paper [21] developed an “ECG App for Android” that offers users a visual representation of real ECG waveforms as well as data acquisition capabilities in the meantime. In [22], the authors design a routing protocol to handle physical components and an infrastructure for data gathering, transfer, and analysis to create a much more customizable and personalized healthcare monitoring program.In the paper [23], the authors demonstrate how to gather, analyze, and collaborate data from IoT devices effectively, in addition to giving help to emergency medical care using a technology network for emergency medical care. In the paper [24], they developed an App for electrocardiography (ECG) patient monitoring. The authors of the paper [25] offer a cloud-based computer network location method for healthcare management that includes equipment to capture voice and EEG (electroencephalogram) waves in a flexible, genuine, and cost-effective approach. In [26], the authors offer a power implementation framework for healthcare devices that takes advantage of medical and residential care situations, which are often stationary and static because individuals’ movement is often limited to a particular room. A web-enabled internet-of-things (IoT) patient respiration information gathering approach that relies on vital signs was established in [27]. The fundamental flaw with this strategy is the lack of secure transmission. The author of [28] created a moderately monitored gadget for asthmatics. An activity sensor, a gas sensor, and a temperature and humidity sensor are all included in one gadget. Doctors can identify the condition of the patient based on the data collected. The author of [29] sought to connect personal gadgets, mobile devices, a centralized database, and stakeholders. In [30, 31], a mobile and web application-based online doctor-patient consultation system has been proposed. The authors have not integrated IoT-based patient monitoring devices with the system [30, 31]. A temperature and humidity monitoring system has been proposed in [32]. [33] created an Android-based pulse monitoring system. Using this system, only the heart rate of the patient can be measured, and the data is also seen in the mobile application [33]. According to the literature review, it is noticed that different authors have presented different systems. Some authors have designed the system with a limited number of sensors and features. Some systems have only web or mobile-based doctor-patient consultation systems, and some have only IoT-based systems with a limited number of sensors and features integrated with their systems.The main objective of this paper is to develop an internet of things- (IoT-) based real-time vital physiological parameter monitoring system for remote asthma patients. The major contribution of this paper is to develop an internet of things- (IoT-) based real-time physiological parameter monitoring system for remote asthma patients. This system can measure and monitor the real-time heart rate, SpO2, nostril temperature, room temperature, air quality, and humidity. Mobile application and web application have also been developed in this research study. After developing the whole system, it was tested on different real-life human test subjects.The novelty of this research is that it shows a system that has more features than any other paper reported in the literature review section. The novelty of this paper is to combine the IoT with telemedicine to develop a real-time vital physiological parameter monitoring system for remote asthma patients. This system has a mobile application, a web application, a video calling option for consultation, a prescription feature, and more sensors. There are some papers which show the very detailed work of real-time monitoring systems. However, they are unable to display the measured values in the mobile application. This paper uses a system that can show the value of the mobile application. Besides, other papers have communication systems that are lacking, as those systems are not able to connect patients and doctors. But this paper describes a system where there are separate accounts for both doctors and patients where they can create accounts and communicate with each other. For additional security on the patient account, the OTP (one-time password) is used to authenticate the user. Besides, doctors can monitor the vital organs of patients in real time and can also communicate with them via video calling. At the end of the session, doctors can also give prescriptions to the patients. This paper has both IoT-based systems with the integration of web and mobile applications. This is how this research beats the state of the arts.


## 2. Methods and Methodology

### 2.1. Introduction

The methods and methodology that are used to achieve the goal will be discussed in this section. The main focus of this system is to monitor a patient remotely so that they do not need to go to a doctor or a diagnostic center regularly for a checkup. Instead, they can monitor their vital organs and consult with a doctor online. The first subsection shows a basic block diagram of the system; after that, the design of the interface for both web and mobile applications and the hardware implementation of the system, including the cost breakdown, will be discussed in this section. Figure1 shows the complete outline of the system. The whole project will be divided into three parts. They are the planning stage, the designing stage, and the actual development stage. During the planning stage, problems will be identified and analyzed and related work will be sought. In the designing stage, the whole work is shown. This is the main stage of the project. In this part, the device, the application, and the website were built. In the final stage, the device is applied to a human body for testing.Figure 1
Outline of the system.


### 2.2. Block Diagram

The block diagram of the entire system is shown in Figure2. The entire system is divided into three different parts. Those are the hardware parts, the Android application, and the web application. The hardware part consists of various sensors, such as MAX30100, MQ-135, DHT11, and LM-35, which can measure SpO2, heart rate, air quality, humidity, room temperature, and nostril temperature. All of those devices are connected through system hardware. There are some important metrics to monitor in an asthma patient, like heart rate, SpO2, body temperature, and nostril temperature. Some external factors, like humidity, room temperature, and air quality, which can trigger asthma patients at any time, are also added. It is an IoT-based system that can work with both mobile and web applications. These devices will be attached to the patients’ bodies and monitor the activity of their vital organs. After that, all the measured values will be sent to the cloud (Firebase real-time database). Firebase works as a bridge between the hardware part, mobile application, and web application. All the data will be sent to the Firebase from the device first. Then that data will be sent to the mobile application and web application. The patient and doctor can both see this data. The doctors use web applications to see the patients’ data. On the other hand, the patient uses the mobile application to see their measured data. After viewing this data, the doctor prescribed for the patient. If any doctor needs to talk with any patient, the system has a video calling option. Using this option, a doctor can communicate with his or her patient.Figure 2
Block diagram of the web system.


### 2.3. ER Diagram

The ER diagram of the complete system is shown in Figure3. There are two users and an admin panel. The two users are a doctor and a patient. A patient can open an account with his or her name, email, phone number, and password. A patient can open their account only once. And the relationship between the registration and the patient is a one-to-one relationship. After opening the account, he/she can measure heart rate, SpO2, nostril temperature, room temperature, humidity, and air quality, which will be available in the measurement table. And the measurement’s relationship to the patient is a one-to-many relationship. Doctors can also open an account. To open the account, a doctor needs his or her name, phone number, email address, qualification, and password. All are stored in the doctor’s registration table, and the relationship between registration and doctor is a one-to-one relationship. To open the account, they need additional verification, which will be directly handled by the admin panel. To monitor these two users, there is an admin panel. The admin panel tracks all the activities of the users and can regulate them when needed.Figure 3
ER diagram of the web system.


### 2.4. Use Case Diagram

#### 2.4.1. Use Case for Patient

In Figure4, the use case diagram is shown for the system. Here, patients can open an account with their name, phone number, and password. After opening their account, they need to create their profile. To create a profile, a patient needs to fill in some basic information like their full name, age, weight, and email address. The mobile number and password will be taken from the patient’s registration table when he/she has been registered in the system. After creating a profile, they can measure their vital organs using external devices. And this measurement data goes to Firebase, which is a real-time database via Wi-Fi. They can also visit any doctor and get advice from them. Also, they can communicate with them via video conference.Figure 4
Use case diagram of the web system.


#### 2.4.2. Use Case for Doctor

To open an account for doctors, they need to take some additional steps. First, a doctor needs to register themselves in the system using the sign-up form. For registration, a doctor needs to fill in some important information, such as name, phone number, email address, qualification, and password. They have to show their papers, such as their license for practicing, as evidence. And after verifying them with the admin panel, they can see the vital signs of a patient. They can consult with them and also prescribe the desired medicine for their patient.


#### 2.4.3. Use Case for Admin

Admins are the guardians of the system. We also call them “super users” of the whole system. They can monitor everything in that system. Without the verification of them, no doctor can open an account. The same is applicable to users as well. They can monitor all the activity of the system. They can ban or regulate any doctor or user if they violate any of the guidelines of the system.


### 2.5. Hardware Design

The hardware system implementation is demonstrated in the block diagram in Figure5. The physical system has a breadboard, different sensors, microcontrollers, and a computer. To measure heart rate and SpO2, MAX30100 is used. DHT11 is used to measure humidity and room temperature. MQ-135 is for air quality, and LM-35 is for nostril temperature. Every single sensor is connected with a microcontroller ESP8266, which is capable of connecting to a WI-FI (wireless fidelity) network and making a simple IP connection. The system’s components are demonstrated and described in Table 1. The microcontroller is connected to sensors using jumper wires and is also powered by USB. The device uses an AC power supply. Sensors take the values from the environment and patients’ bodies, and, with the help of the microcontroller, the measured values are sent into the Firebase, which is a real-time database and capable of receiving data in real time. From Firebase, it is sent to the mobile application and the website. Patients and doctors can see those values from there.Figure 5
Hardware design of the system.Table 1
Description of components.
ComponentsDescriptionPictureESP8266 microcontrollerESP8266 is a cheap cost Wi-Fi microcontroller with full IP (internet protocol) stack. This microcontroller can connect to Wi-Fi network and make simple IP connection.Dth11 temperature and humidity sensorThe Dth11 is a low-cost digital temperature and humidity sensor.MAX30100 heart and SpO2 sensorThe sensor is an integrated pulse oximetry (SpO2) and heart-rate monitor sensor solution. It is run by 1.8 V and 3.3 V power supplies.LM-35The LM-35 is used to measure temperature. It is a temperature sensor that can precisely measure temperatures ranging from -55°C to 150°C.MQ-135The MQ-135 is a sensor that can measure air quality. It is capable of detecting NH3, benzene, CO2, and alcohol.BreadboardA breadboard is a construction base for prototyping electronics.AC power sourceTo power the microcontroller’s functions.Jumper wireFlexible wire with connectors at both ends which allows wire to connect to other jumper wires or a pin header without the hustle of soldering.Plastic boxA box which contains all the components together.The system is designed, implemented, and manufactured at a low and affordable price, as it is demonstrated in Table2. The system’s overall cost comes down to 1550 BDT (Bangladeshi Taka), which is not more than 20 dollars.Table 2
Cost of components.
ComponentModelQuantityPrice/unit (BDTK)Price (BDTK)MicrocontrollerESP82661220220Temperature sensorDHT1118585SPO2 sensorMAX301001480480Temperature sensor for noseLM-3518080Air quality sensorMQ-1351300300Jumper wiresGeneric3 (20 per unit)35105BreadboardN/A290180Plastic boxN/A1100100Total cost1170Implementation of the system is inexpensive, primarily because the innovation in the design of the system is at the software level, not the hardware. Table2 lists the breakdown of the cost of the components required to develop the system. The system was built affordably, coming in at TK 62650, which when converted to Taka, comes out to less than 80 USD (United States Dollar).


### 2.6. Software Design

The software part consists of two parts. The mobile application part and the web part. The mobile application was designed in the Android Studio. The web part is designed with HTML, CSS, and JavaScript. There is a sign-up and sign-in option for both the doctor and the user. If they do not have an account, they need to open an account. After being verified by the admin, they can open and operate their account. All the information of both the user and the doctor will be preserved in the cloud. Detailed information about the design of the mobile app and website is given in the following.


#### 2.6.1. Design of Android Application

To develop Android applications, Android Studio software is used. Android Studio is the official integrated development environment (IDE) for Google’s Android operating system. It supports all the programming languages IntelliJ offers, such as Java, C++, and Python. The XML format is used to design the application. Java is used for the backend. The application is connected to the Firebase SDK (software development kit), a real-time database. Firebase is used to store and collect data from the mobile application. Firebase also generates an OTP (one-time password) and sends it to the user’s mobile.


#### 2.6.2. Design of Website

The website is made for doctors. To design a website, HTML and CSS are used for the front end, and PHP is used for the backend. Detailed information about the website is described in the next section.(1) Frontend Tools. HTML, CSS, jQuery, bootstrap, and JavaScript are the technologies used in the frontend. The full form of HTML is hypertext markup language. It is a scripting language made up of tags that can give structure to web pages. Using this, users may create and structure sections, paragraphs, headings, links, and block quotes for web pages and applications. CSS stands for cascading style sheets, and it is used to beautify web pages by giving them colors and emphasis. A website is a collection of web pages. JavaScript is a programming language that is used to define what the elements on a webpage will do, such as what happens when a button is clicked, animations, or even how data is fetched as required by the website.(2) Backend Tools. The backend of a website makes it dynamic. It allows the website to save data or perform meaningful functions. The backend also structures all the web pages and transforms them into a website where data can be sent, saved, or received. The system is built with PHP and Firebase. The full form of PHP is Hypertext Preprocessor. PHP handles all the functionality of the backend of the system. Figure 6 shows the software design of the system.Figure 6
Software design of the system.


## 2.1. Introduction

The methods and methodology that are used to achieve the goal will be discussed in this section. The main focus of this system is to monitor a patient remotely so that they do not need to go to a doctor or a diagnostic center regularly for a checkup. Instead, they can monitor their vital organs and consult with a doctor online. The first subsection shows a basic block diagram of the system; after that, the design of the interface for both web and mobile applications and the hardware implementation of the system, including the cost breakdown, will be discussed in this section. Figure1 shows the complete outline of the system. The whole project will be divided into three parts. They are the planning stage, the designing stage, and the actual development stage. During the planning stage, problems will be identified and analyzed and related work will be sought. In the designing stage, the whole work is shown. This is the main stage of the project. In this part, the device, the application, and the website were built. In the final stage, the device is applied to a human body for testing.Figure 1
Outline of the system.


## 2.2. Block Diagram

The block diagram of the entire system is shown in Figure2. The entire system is divided into three different parts. Those are the hardware parts, the Android application, and the web application. The hardware part consists of various sensors, such as MAX30100, MQ-135, DHT11, and LM-35, which can measure SpO2, heart rate, air quality, humidity, room temperature, and nostril temperature. All of those devices are connected through system hardware. There are some important metrics to monitor in an asthma patient, like heart rate, SpO2, body temperature, and nostril temperature. Some external factors, like humidity, room temperature, and air quality, which can trigger asthma patients at any time, are also added. It is an IoT-based system that can work with both mobile and web applications. These devices will be attached to the patients’ bodies and monitor the activity of their vital organs. After that, all the measured values will be sent to the cloud (Firebase real-time database). Firebase works as a bridge between the hardware part, mobile application, and web application. All the data will be sent to the Firebase from the device first. Then that data will be sent to the mobile application and web application. The patient and doctor can both see this data. The doctors use web applications to see the patients’ data. On the other hand, the patient uses the mobile application to see their measured data. After viewing this data, the doctor prescribed for the patient. If any doctor needs to talk with any patient, the system has a video calling option. Using this option, a doctor can communicate with his or her patient.Figure 2
Block diagram of the web system.


## 2.3. ER Diagram

The ER diagram of the complete system is shown in Figure3. There are two users and an admin panel. The two users are a doctor and a patient. A patient can open an account with his or her name, email, phone number, and password. A patient can open their account only once. And the relationship between the registration and the patient is a one-to-one relationship. After opening the account, he/she can measure heart rate, SpO2, nostril temperature, room temperature, humidity, and air quality, which will be available in the measurement table. And the measurement’s relationship to the patient is a one-to-many relationship. Doctors can also open an account. To open the account, a doctor needs his or her name, phone number, email address, qualification, and password. All are stored in the doctor’s registration table, and the relationship between registration and doctor is a one-to-one relationship. To open the account, they need additional verification, which will be directly handled by the admin panel. To monitor these two users, there is an admin panel. The admin panel tracks all the activities of the users and can regulate them when needed.Figure 3
ER diagram of the web system.


## 2.4. Use Case Diagram

### 2.4.1. Use Case for Patient

In Figure4, the use case diagram is shown for the system. Here, patients can open an account with their name, phone number, and password. After opening their account, they need to create their profile. To create a profile, a patient needs to fill in some basic information like their full name, age, weight, and email address. The mobile number and password will be taken from the patient’s registration table when he/she has been registered in the system. After creating a profile, they can measure their vital organs using external devices. And this measurement data goes to Firebase, which is a real-time database via Wi-Fi. They can also visit any doctor and get advice from them. Also, they can communicate with them via video conference.Figure 4
Use case diagram of the web system.


### 2.4.2. Use Case for Doctor

To open an account for doctors, they need to take some additional steps. First, a doctor needs to register themselves in the system using the sign-up form. For registration, a doctor needs to fill in some important information, such as name, phone number, email address, qualification, and password. They have to show their papers, such as their license for practicing, as evidence. And after verifying them with the admin panel, they can see the vital signs of a patient. They can consult with them and also prescribe the desired medicine for their patient.


### 2.4.3. Use Case for Admin

Admins are the guardians of the system. We also call them “super users” of the whole system. They can monitor everything in that system. Without the verification of them, no doctor can open an account. The same is applicable to users as well. They can monitor all the activity of the system. They can ban or regulate any doctor or user if they violate any of the guidelines of the system.


## 2.4.1. Use Case for Patient

In Figure4, the use case diagram is shown for the system. Here, patients can open an account with their name, phone number, and password. After opening their account, they need to create their profile. To create a profile, a patient needs to fill in some basic information like their full name, age, weight, and email address. The mobile number and password will be taken from the patient’s registration table when he/she has been registered in the system. After creating a profile, they can measure their vital organs using external devices. And this measurement data goes to Firebase, which is a real-time database via Wi-Fi. They can also visit any doctor and get advice from them. Also, they can communicate with them via video conference.Figure 4
Use case diagram of the web system.


## 2.4.2. Use Case for Doctor

To open an account for doctors, they need to take some additional steps. First, a doctor needs to register themselves in the system using the sign-up form. For registration, a doctor needs to fill in some important information, such as name, phone number, email address, qualification, and password. They have to show their papers, such as their license for practicing, as evidence. And after verifying them with the admin panel, they can see the vital signs of a patient. They can consult with them and also prescribe the desired medicine for their patient.


## 2.4.3. Use Case for Admin

Admins are the guardians of the system. We also call them “super users” of the whole system. They can monitor everything in that system. Without the verification of them, no doctor can open an account. The same is applicable to users as well. They can monitor all the activity of the system. They can ban or regulate any doctor or user if they violate any of the guidelines of the system.


## 2.5. Hardware Design

The hardware system implementation is demonstrated in the block diagram in Figure5. The physical system has a breadboard, different sensors, microcontrollers, and a computer. To measure heart rate and SpO2, MAX30100 is used. DHT11 is used to measure humidity and room temperature. MQ-135 is for air quality, and LM-35 is for nostril temperature. Every single sensor is connected with a microcontroller ESP8266, which is capable of connecting to a WI-FI (wireless fidelity) network and making a simple IP connection. The system’s components are demonstrated and described in Table 1. The microcontroller is connected to sensors using jumper wires and is also powered by USB. The device uses an AC power supply. Sensors take the values from the environment and patients’ bodies, and, with the help of the microcontroller, the measured values are sent into the Firebase, which is a real-time database and capable of receiving data in real time. From Firebase, it is sent to the mobile application and the website. Patients and doctors can see those values from there.Figure 5
Hardware design of the system.Table 1
Description of components.
ComponentsDescriptionPictureESP8266 microcontrollerESP8266 is a cheap cost Wi-Fi microcontroller with full IP (internet protocol) stack. This microcontroller can connect to Wi-Fi network and make simple IP connection.Dth11 temperature and humidity sensorThe Dth11 is a low-cost digital temperature and humidity sensor.MAX30100 heart and SpO2 sensorThe sensor is an integrated pulse oximetry (SpO2) and heart-rate monitor sensor solution. It is run by 1.8 V and 3.3 V power supplies.LM-35The LM-35 is used to measure temperature. It is a temperature sensor that can precisely measure temperatures ranging from -55°C to 150°C.MQ-135The MQ-135 is a sensor that can measure air quality. It is capable of detecting NH3, benzene, CO2, and alcohol.BreadboardA breadboard is a construction base for prototyping electronics.AC power sourceTo power the microcontroller’s functions.Jumper wireFlexible wire with connectors at both ends which allows wire to connect to other jumper wires or a pin header without the hustle of soldering.Plastic boxA box which contains all the components together.The system is designed, implemented, and manufactured at a low and affordable price, as it is demonstrated in Table2. The system’s overall cost comes down to 1550 BDT (Bangladeshi Taka), which is not more than 20 dollars.Table 2
Cost of components.
ComponentModelQuantityPrice/unit (BDTK)Price (BDTK)MicrocontrollerESP82661220220Temperature sensorDHT1118585SPO2 sensorMAX301001480480Temperature sensor for noseLM-3518080Air quality sensorMQ-1351300300Jumper wiresGeneric3 (20 per unit)35105BreadboardN/A290180Plastic boxN/A1100100Total cost1170Implementation of the system is inexpensive, primarily because the innovation in the design of the system is at the software level, not the hardware. Table2 lists the breakdown of the cost of the components required to develop the system. The system was built affordably, coming in at TK 62650, which when converted to Taka, comes out to less than 80 USD (United States Dollar).


## 2.6. Software Design

The software part consists of two parts. The mobile application part and the web part. The mobile application was designed in the Android Studio. The web part is designed with HTML, CSS, and JavaScript. There is a sign-up and sign-in option for both the doctor and the user. If they do not have an account, they need to open an account. After being verified by the admin, they can open and operate their account. All the information of both the user and the doctor will be preserved in the cloud. Detailed information about the design of the mobile app and website is given in the following.


### 2.6.1. Design of Android Application

To develop Android applications, Android Studio software is used. Android Studio is the official integrated development environment (IDE) for Google’s Android operating system. It supports all the programming languages IntelliJ offers, such as Java, C++, and Python. The XML format is used to design the application. Java is used for the backend. The application is connected to the Firebase SDK (software development kit), a real-time database. Firebase is used to store and collect data from the mobile application. Firebase also generates an OTP (one-time password) and sends it to the user’s mobile.


### 2.6.2. Design of Website

The website is made for doctors. To design a website, HTML and CSS are used for the front end, and PHP is used for the backend. Detailed information about the website is described in the next section.(1) Frontend Tools. HTML, CSS, jQuery, bootstrap, and JavaScript are the technologies used in the frontend. The full form of HTML is hypertext markup language. It is a scripting language made up of tags that can give structure to web pages. Using this, users may create and structure sections, paragraphs, headings, links, and block quotes for web pages and applications. CSS stands for cascading style sheets, and it is used to beautify web pages by giving them colors and emphasis. A website is a collection of web pages. JavaScript is a programming language that is used to define what the elements on a webpage will do, such as what happens when a button is clicked, animations, or even how data is fetched as required by the website.(2) Backend Tools. The backend of a website makes it dynamic. It allows the website to save data or perform meaningful functions. The backend also structures all the web pages and transforms them into a website where data can be sent, saved, or received. The system is built with PHP and Firebase. The full form of PHP is Hypertext Preprocessor. PHP handles all the functionality of the backend of the system. Figure 6 shows the software design of the system.Figure 6
Software design of the system.


## 2.6.1. Design of Android Application

To develop Android applications, Android Studio software is used. Android Studio is the official integrated development environment (IDE) for Google’s Android operating system. It supports all the programming languages IntelliJ offers, such as Java, C++, and Python. The XML format is used to design the application. Java is used for the backend. The application is connected to the Firebase SDK (software development kit), a real-time database. Firebase is used to store and collect data from the mobile application. Firebase also generates an OTP (one-time password) and sends it to the user’s mobile.


## 2.6.2. Design of Website

The website is made for doctors. To design a website, HTML and CSS are used for the front end, and PHP is used for the backend. Detailed information about the website is described in the next section.(1) Frontend Tools. HTML, CSS, jQuery, bootstrap, and JavaScript are the technologies used in the frontend. The full form of HTML is hypertext markup language. It is a scripting language made up of tags that can give structure to web pages. Using this, users may create and structure sections, paragraphs, headings, links, and block quotes for web pages and applications. CSS stands for cascading style sheets, and it is used to beautify web pages by giving them colors and emphasis. A website is a collection of web pages. JavaScript is a programming language that is used to define what the elements on a webpage will do, such as what happens when a button is clicked, animations, or even how data is fetched as required by the website.(2) Backend Tools. The backend of a website makes it dynamic. It allows the website to save data or perform meaningful functions. The backend also structures all the web pages and transforms them into a website where data can be sent, saved, or received. The system is built with PHP and Firebase. The full form of PHP is Hypertext Preprocessor. PHP handles all the functionality of the backend of the system. Figure 6 shows the software design of the system.Figure 6
Software design of the system.


## 3. Results and Analysis

In Figure7, the block diagram of the device is presented. DTH11, along with MAX30100, MQ-135, and LM-35 sensors, is used here to measure the room temperature, humidity, heart rate, oxygen saturation (SpO2), air quality, and nostril temperature of the patient. The main part of this device is the ESP8266 microcontroller. All the sensors are connected to the ESP8266 by jumper wires. The ESP8266 is a development board that includes the ESP-12E module. It supports RTOS and operates between 80 MHz and 160 MHz. It also has 128 KB of RAM and 4 MB of flash memory for storing and preserving data and programs. It has built-in Wi-Fi, which helps transmit data from the sensor to the Firebase. It can be powered by any external source, such as an alternating current or a power bank. The MQ-135 is used here to measure the air quality. It is a gas sensor that can detect carbon dioxide, sulfur, ammonia, and many harmful gases. It also detects smoke. This sensor has digital and analog output pins. In this device, it is connected to the A0 pin of the NodeMCU, which is an analog port. Again, to measure heart rate and oxygen saturation, MAX30100 is used. It has a photodetector and a low-noise signal processing feature to detect pulse and heart rate signals. It is connected to the D1 and D2 pins of the NodeMCU. To measure nostril temperature, LM-35 is used. It is a temperature sensor that can operate between 55 and 150 degrees Celsius. It is connected to the A0 pin of the NodeMCU. DHT11 sensors are used in the device to measure room temperature and humidity. It has two parts. One is a humidity sensor, and the other one is a thermistor. It has a temperature range of 0 to 50 degrees Celsius and a humidity range of 20 to 50%, with a precision of 1 degree Celsius and 1%. It is also connected to the A0 pin of the NodeMCU. The value is sent into the Firebase database from the NodeMCU. And after that, patients and doctors can see the measured value on a mobile application and website. All the sensors are run at 3 V, and only the MQ-135 air quality sensor needs 5 V to operate. A real-life prototype of the device and the testing of the system on different human test subjects are shown in Figures 8(a)–8(c).Figure 7
Block diagram of the devices.Figure 8
(a) Prototype of the hardware of the system and (b, c) testing the prototype of the system on different people.
(a)(b)(c)Figure9(a) shows the MAX30100 sensor testing on the human body. The sensors are connected to the D1 and D2 pins of the ESP8266. It measures the heart rate and oxygen saturation of the body. When the device is turned on, it shows a light, which means it will take data from the human body. After that, it will be on the Firebase real-time database via ESP8266. The result will be displayed on a serial monitor, which is seen in Figure 9(b).Figure 9
Testing heart rate and oxygen saturation using MAX30100 sensor.
(a)(b)In Figure10(a), the DHT11 is displayed, which is capable of measuring room temperature and humidity. It also has an LED (light-emitting diode) light that shows it is turning on and it can take input from the environment. It is connected to the A0 pin of the ESP8266. It is also tested with a match stick, and the temperature and humidity change as the fire reaches the sensors, which is shown in Figure 10(b). The values of SpO2 and heart rate are already stored in Firebase since they were tested right before this testing, which is the reason those values are also shown in the application.Figure 10
Testing room temperature and humidity using DHT11.
(a)(b)In Figure11(a), an MQ-135 is displayed, which is capable of measuring air quality. It also has an LED light like the DHT11 and MAX30100. It is also connected to the ESP8266 on pin A0 with ground and VCC. When the light is on, it means it is capable of receiving data from the environment. As soon as the smoke was near the sensor, the value increased. The value decreased as soon as the smoke went off, which is seen in Figure 11(b). The values of SpO2, heart, room temperature, and humidity are already stored in the Firebase since they were tested right before this testing, which is the reason those values are also shown in the application.Figure 11
Testing air quality using MQ-135.
(a)(b)In Figure12(a), the LM-35 temperature sensor is presented. It is capable of measuring precise temperatures. It is used to measure nostril temperature. It is connected to the ESP8266 with the A0 pin. It can measure the temperature of the exhaled breath of a human being and calculate its temperature. Unlike the other three sensors, it has no LED light. The results can be seen on the serial monitor, which is displayed in Figure 12(b). The values of SpO2 and heart rate, room temperature, humidity, and air quality are already stored in the Firebase since they were tested right before this testing. This is the reason those values are also shown in the application.Figure 12
Testing nostril temperature using LM-35.
(a)(b)In Table3, the average range of temperature, heart rate, SpO2, nostril temperature, humidity, and air quality have been shown. Taking this as a standard, the device is tested on some people to see its accuracy. The average room temperature should be 20–25°C. The normal heart rate of an adult person is 60-100 and 70-100 for an underage person. Air quality is very important for asthma patients, and the ideal air quality is 50 PPM (parts per million). These are the ideal scenario cases, and the test results are shown in Table 4.Table 3
Average range of temperature, heart rate and SpO2, and air quality.
MeasurementAverage normal rangeTemperature(20-25°C)Heart rate70-100 BPM (6-15)60-100 BPM (18 and over)Nostril temperature2-3°C more than room temperature.SpO295 to 100%Humidity30-70% based on temperatureAir quality50 ppmTable 4
Result of the asthma patient monitoring system.
NameAgeSexRoom temp. (°C)Air qualityNostril temp.Heart rateSpO2HumidityAhnaf20Male2550 ppm28°C80 BPM98%65%Insaf30Male2952 ppm32°C85 BPM99%65%Farabi24Male2654 ppm29°C77 BPM98%55%Mim18Female2551 ppm29°C70 BPM98%42%Din13Male2648 ppm28°C86 BPM97%70%Rumana17Female2850 ppm32°C72 BPM99%74%Ruman26Male2656 ppm30°C72 BPM96%52%Average2650 ppm30°C77 BPM98.85%60%In Figure13(a), the sign-up page of the mobile Android app has been shown. Here, any person can open an account by writing their name, phone number, and adding a password. After that, they need to click the submit button. After that, the data will be uploaded into the real-time data server of Firebase and an OTP (one-time password) will be sent to their mobile. Putting this one-time password together, a patient can register and create his or her account. In Figure 13(b), the doctor’s sign-up page for the web app has been shown. Here, they need their name, email, and phone number. They need to set a password as well. After clicking the sign-up button, all the data will be stored in the real-time database of Firebase and their registration will be finally approved by the admin panel.Figure 13
Patient sign-up page in the mobile app and doctor sign-up in the web app.
(a)(b)In Figure14, the OTP verification page of the mobile app is displayed. After finishing sign up, a one-time password will be sent to the user’s phone by SMS (short message service) as the mobile authentication of Firebase is enabled. Firebase randomly produces OTP, and after putting the value of the OTP in the password section, Firebase will verify the verification code. If the verification code is matched, then people can finally be able to enter the mobile application.Figure 14
OTP to verify the sign-up in the mobile app.In Figure15(a), the log-in page for patients in the mobile app is shown. It will require a user name and password, and after clicking the submit button, this data will be sent to Firebase. If this data matches with the data that is stored in the Firebase, they can log into the main application; otherwise, it will show an error. Besides, there is a register button down there. If any patient has not registered yet, they can register from there. Besides, if someone forgets their password, they can retrieve their account by clicking “forget password.”Figure 15
Patient log-in page in the mobile application and doctor log-in page in the web application.
(a)(b)Figure15(b) also shows the doctor’s web app log-in page. It only needs his or her email and password. After his/her email and password are submitted, they will be sent to Firebase. If all this data is correct, then they will finally be able to enter the website. There is an option to “remember me,” so there is no chance to log out in case of closing the windows. There is another option, which is “I forgot my password,” which is used to recover a password if there is a chance of forgetting the password. Also, there is another option named “Register a New Membership” that leads a doctor to a sign-up page where they can register themselves to create an account.In Figure16(a), the home page (left) for patients of the mobile application is displayed. There is a welcome message along with the logo of the company. There is also a home button, and besides that, there is another button on the left. All the features that the app has will be shown after clicking that button. There is another white button on the top right. By clicking that button, anyone can log out of the application.Figure 16
Feature page of the mobile app and dashboard page for the web app.
(a)(b)All the features of the application (left) have also been displayed. In the top left corner, there is a picture of the patient or user, his or her name, and contact number. After that, there is the home page, which we discussed before, and the profile of the user. There is a feature called “Doctor.” They can see which doctor is available and can also consult with them. The user or patient can see the prescription which is provided by the doctor in the “Prescription” feature and gallery where all the photos will be preserved. Patients can live monitor their vital organs’ signs by getting into the “monitor” feature. When they connect the device to their body, the data will be measured and sent to Firebase. After that, they can see it from their mobile phones.Figure16(b) shows the admin’s dashboard page for the web app. Here, the admin can see how many doctors are active on the site. And how many patients are there to be treated? They can also see the patient list and their basic and detailed information. They can also see all the information about the patients and doctors too.In Figure17, the list of doctors is displayed in the web app. Here, anyone can see the list of doctors and their qualifications. And they can make an appointment with them by clicking on the “take treatment” option.Figure 17
Doctor page in the web app.In Figure18, here is the option for the admin panel in the web app. Here, which admin is present now to control the site at the backend will be seen. It can also be handled by multiple admins at the same time. They can update information about the doctor and the patient. And admins have the power to remove anyone from the site at any time.Figure 18
Admin panel in the web app.In Figure19(a), Firebase is used to connect the application with the website. Firebase is a platform developed by Google for creating mobile and web applications. Here, Firebase is used to connect websites and apps and also handle the database. The data, which is measured by the device, will come to the Firebase first, and after that, it will go to the mobile application and the website as per need. Figure 19(b) depicts the measured value of a patient in the Firebase real-time database.Figure 19
Firebase (real-time database for web and mobile apps).
(a)(b)In Figure20(b), the information, along with the measured value of a patient’s vital organ, is displayed in the web app for a doctor.Figure 20
Measured value readings in the mobile app and patient page with measured value in the web app.
(a)(b)The information, along with the measured value of a patient’s vital organ, is displayed in the web app for a doctor in Figure20(b). All the measured values will come from external devices via Firebase. A doctor can view all of a patient’s vital organ data here. Also, doctors can see the basic information about a patient, such as their blood group and age. All this data will be fetched from the Firebase. Also, doctors can communicate with patients through video calls in the treatment option. Doctors can also write prescriptions for patients.In Figure21, the video call option is shown. Both patients and doctors can communicate with each other via video conference. It would be really beneficial for both the patient and the doctor. Patients can show their problems directly to the doctor, and doctors can also understand the condition of a patient by watching their conditions live. Using the video call option makes the session between the doctor and the patient more live and dynamic. Patients can consult about their medical condition with their preferred doctor using the video call option of this proposed system.Figure 21
Video call between doctor and patient.To create a video conference, the doctor needs to enter the site, and after that, he has to share the URL link with the patient. And when the patient clicks on that link, he or she will be able to communicate with the doctor. It is a third-party system, and it is completely free. The site is hosted on 000webhost, which is completely free and supports PHP and JS, which are used to develop the video conference site.Figure22(a) shows a prescription for a patient that will be provided by the doctor using a web app. Whenever a patient consults a doctor, the doctor can write a prescription for the patient. Doctors can write reports about the progress of the patient. Also, they can write medicine names. They can also put their signature and date there. Patients can also collect the prescription through their app. In Figure 22(b), you can see the patient’s prescription in mobile view. A patient can view their prescription here, which was provided by the doctor they saw.Figure 22
Prescription for a patient in web application and prescription in mobile application.
(a)(b)In Figure23, this is the landing page of the website. There is some basic information about the site. Also, if a patient does not have any accounts, they can still consult a doctor. By visiting the URL of the website, anyone can get treatment and consultation from the doctor.Figure 23
Landing page of hole system.


## 4. Comparative Analysis

Table5 shows the comparative analysis of software and hardware with other papers. The proposed system in this study establishes a remote health monitoring system for patients with asthma. In [16], the authors designed and developed a remotely controlled internet-of-things method for asthmatic patients. The IoT asthmatic monitoring program [16] also includes a heart rate sensor. It has [10] a system that is remarkably similar to this one but misses out on the SpO2 and nostril temperature sensors. It also does not have doctor-patient consultation and prescription features. Only humidity, air quality, and an activity sensor were used in [10], and it is also an IoT-based system. On the other hand, Ref. [14] uses merely a pulse, humidity, and air quality sensor. It is also an IoT and app-based system. From Table 5, it is noted that our proposed work has more features compared to other available systems in the open literature. Our system is IoT-based and has web application, mobile application, video calling, and prescription features. After logging in to the system, a patient can also consult with the doctor and get a treatment plan. The vital physiological parameters of the remote patients can be monitored in real time.Table 5
Comparative analysis for software and hardware with other papers.
No.ReferenceIoTZigBeeMobile appWeb appVideo calling1This paperYesNoYesYesYes2Ref. [16]YesNoNoNoNo3Ref. [27]YesNoNoYesNo4Ref. [28]YesNoNoNoNo5Ref. [29]YesNoYesNoNo6Ref. [30]NoNoYesYesYes7Ref. [31]NoNoNoYesYesA comparative analysis of sensors with other papers is shown in Table6. Analysis shows that some papers have worked with one or two, maximum of three sensors, and some have only worked with application-based or web-based sensors, but this system has worked with mobile apps and websites with six sensors. It can monitor more parameters compared to the other systems reported in Table 6.Table 6
Comparative analysis for sensors with other papers.
No.ReferenceHeart rateSpO2Room temp. & humidityAir qualityNostril temp.ECGBody temp.1This paperYesYesYesYesYesNoNo2Ref. [16]YesNoNoNoNoNoNo3Ref. [27]NoNoNoNoNoNoYes4Ref. [28]NoNoYesYesNoNoNo5Ref. [29]YesNoYesYesNoNoNo6Ref. [30]NoNoNoNoNoNoNo7Ref. [31]NoNoNoNoNoNoNo


## 5. Conclusion

In this paper, the design and implementation of an IoT-based asthma patient monitoring system are discussed. Asthma is a lung disease that can be very dangerous for a patient. It inflames and narrows the airways, making it hard to breathe. It cannot be cured fully, but with constant monitoring, it can be controlled. An asthma patient monitoring system is a solution for constant monitoring of a patient. It is a system that allows an asthma patient to monitor their vital organs and surroundings. This measured data is uploaded into cloud storage, and from there, doctors can see that data from a website. Doctors and patients can communicate with each other via video conference. Doctors can also make prescriptions for patients. It is a system that is regulated by multiple admins. In this system, patients can book an appointment with a doctor. Also, if a patient does not have an account, they can still consult with a doctor by visiting the URL of the website. This proposed system can measure in real time the heart rate, SpO2, and nostril temperature of the human body. It can also measure the air quality, room temperature, and humidity of the room. The device works very well and shows pinpoint accuracy throughout the testing period. The proposed system has been tested on different people to show the accuracy of this device, and the accuracy was near perfect. It was also tested with fire and wet towels to measure the extreme difference in temperature and humidity. Also, smoke is used to measure the extreme difference in air quality. Although advancements in information technology and mobile computing provide numerous potential for providing timely healthcare, the use of unreliable devices for remote health monitoring exposes privacy and information quality concerns. In this paper, a framework for secure remote health-monitoring systems is given. It has a health monitoring architecture that leverages a special monitoring unit that plays the central role in security by providing critical security services including authentication, one-time password (OTP), and key management. For future work, implementation of the framework and evaluation in a real setting are planned. By using this system, the pain and hustle of asthma patients can be reduced. They do not need to go to the doctor regularly for checkups as the system provides a means to communicate with the doctor virtually. There will be huge benefits for people, especially for senior citizens and those who live in rural and remote areas, as they will not need to go to the doctor on a regular basis. Besides, in this pandemic situation, it will be best to avoid going out often. So this system could be very useful for the people of Bangladesh.


## 6. Future Work

There are four sensors used in this device that can measure heart rate, oxygen saturation, room temperature, nostril temperature, air quality, and humidity. However, more sensors capable of measuring blood pressure, ECG, and blood glucose levels can be added to this system in the future.



---

*Source: 1191434-2022-03-11.xml*