Development of An IoT Based Sleep Apnea Monitoring
Development of An IoT Based Sleep Apnea Monitoring
Research Article
Development of an IoT-Based Sleep Apnea Monitoring System for
Healthcare Applications
Abdur Rab Dhruba ,1 Kazi Nabiul Alam ,1 Md Shakib Khan ,1 Sami Bourouis ,2
and Mohammad Monirujjaman Khan 1
1
Department of Electrical and Computer Engineering, North South University, Bashundhara, Dhaka 1229, Bangladesh
2
Department of Information Technology, College of Computers and Information Technology, Taif University, P.O. Box 11099,
Taif 21944, Saudi Arabia
Received 23 September 2021; Revised 9 October 2021; Accepted 16 October 2021; Published 3 November 2021
Copyright © 2021 Abdur Rab Dhruba et al. This is an open access article distributed under the Creative Commons Attribution
License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is
properly cited.
Sleep is an essential and vital element of a person’s life and health that helps to refresh and recharge the mind and body of a
person. The quality of sleep is very important in every person’s lifestyle, removing various diseases. Bad sleep is a big problem
for a lot of people for a very long time. People suffering from various diseases are dealing with various sleeping disorders,
commonly known as sleep apnea. A lot of people die during sleep because of uneven body changes in the body during sleep.
On that note, a system to monitor sleep is very important. Most of the previous systems to monitor sleeping problems cannot
deal with the real time sleeping problem, generating data after a certain period of sleep. Real-time monitoring of sleep is the
key to detecting sleep apnea. To solve this problem, an Internet of Things- (IoT-) based real-time sleep apnea monitoring
system has been developed. It will allow the user to measure different indexes of sleep and will notify them through a mobile
application when anything odd occurs. The system contains various sensors to measure the electrocardiogram (ECG), heart
rate, pulse rate, skin response, and SpO2 of any person during the entire sleeping period. This research is very useful as it can
measure the indexes of sleep without disturbing the person and can also show it in the mobile application simultaneously with
the help of a Bluetooth module. The system has been developed in such a way that it can be used by every kind of person.
Multiple analog sensors are used with the Arduino UNO to measure different parameters of the sleep factor. The system was
examined and tested on different people’s bodies. To analyze and detect sleep apnea in real-time, the system monitors several
people during the sleeping period. The results are displayed on the monitor of the Arduino boards and in the mobile
application. The analysis of the achieved data can detect sleep apnea in some of the people that the system monitored, and it
can also display the reason why sleep apnea happens. This research also analyzes the people who are not in the danger of
sleeping problems by the achieved data. This paper will help everyone learn about sleep apnea and will help people detect it
and take the necessary steps to prevent it.
the brain fails to send the necessary instructions or signals to based on sleep apnea. In [7], wearable e-textile sensors used
the system which controls our breathing and respiration. an IoT approach to collect real-time data on sleeping habits
Here, neurons fail to transmit signals to the breathing mus- and respiratory rate. The same concept is used in [8] as they
cle, which pauses the breath for a good amount of time, use signals of breathing collected from the sensor-based
maybe near 10 seconds [1]. And in rare cases, they can both mattress, which are generally used in operation theatres. A
take place, which is more than an emergency medical treat- polyvinylidene fluoride (PVDF) sensor is used with a poly-
ment issue, and alarming also. somnography (PSG) device to measure time-to-time AHI
Medical and clinical researches are going on regarding data [9]. Researchers used the “peripheral arterial tonome-
this issue, and some alarming scenarios are keeping us alert. try” (PAT) method to detect sleep apnea perfectly. They
Sleep apnea is responsible for a wide range of physical com- developed the WatchPAT device that records the pulse wave
plications and diseases, including strokes, hypertension, car- on a finger and derives sleep and sleep apnea features [10].
diac abnormalities, and depression [2]. According to In [11], a 3D camera was being used to check the movement
research, around 3 to 7% of men and 2% to 5% of women of abdominal muscles which they compared with the OSA
are suffering from sleep apnea. That sums up approximately detection process. The sound detection method used in
more than 100 million people in the world, including adoles- [12] is one that allows for precise measurement of sounds
cents. Interestingly, 80% of apnea cases remain undiagnosed. with very high frequencies. Besides, so much research has
Sleep apnea (OSA) affects approximately 1 to 4% of children taken place with the analysis of real-time ECG monitoring
aged 2 to 8, with 20% of them snoring. It varies in different and prereserved ECG data. Machine learning techniques
parameters, like who is affected, who is not [3, 4]. Some were implemented. In [13], the authors described the devel-
complications or risk factors related to this problem identi- opment of an android-based pulse monitoring system. To
fying process are excessive weight or obesity, being men measure the human heart rate, the author of this study used
(2-3 times higher risk), alcohol consumption, smoking, fam- only one sensor. In [14], an IoT device was built that extracts
ily history, neck circumference, nasal congestion, and medi- ECG data from the user and evaluates the result from the
cal conditions like high blood pressure, type-2 diabetes, and classification model- (SVM-) based system, which they
lung or other respiratory diseases. Patients with diseases like named the “Apnea MedAssist Service”. In [15–17],
Parkinson’s and after strokes are at risk of suffering from researchers implemented machine learning and deep learn-
central sleep apnea. Sleep apnea can cause a good number ing techniques to detect apnea from medical data.
of health complications and death in the very worst case. From earlier research, it is observable that researchers
Loud snoring, fatigue, drowsiness, weakness in the body, measured real-time parameters of sleep apnea, which they
and lack of concentration are the common symptoms of analyzed afterwards. But there is less use of parameters of
sleep apnea. High blood pressure caused by a lack of sleep sleep apnea like SpO2, heart rate, AHI, sleep time, or such
and a low oxygen level may also increase the risk of a heart important parameters being measured at a time. In particu-
attack. Apnea patients are three times more likely to have a lar, they measured data and analyzed it with advanced tools.
stroke. Lungs can be affected even more dangerously when Besides, in earlier research, these values were measured over-
the SpO2 level is reduced. Lung disability caused by a lack night, and then, they got the data, but in this system, the
of oxygen is a very common but very concerning complica- value will be measured in real time. If any complications
tion of sleep apnea. 43% of people suffering from mild sleep arise, someone concerned may be notified via IoT device.
apnea had “hypertension.” According to research, this apnea For example, if “oxygen saturation” falls, this is a severe
problem causes 15% of traffic accidents and costs approxi- medical emergency, and with a possible device, the atten-
mately 1000 lives in the United States. Over 38,000 people dant, doctor, or concerned personnel can get instant signals
in the USA die every year due to direct and indirect effects from this individual patient. Hence, this proposed system in
of sleep apnea, mostly affected by cardiovascular complexi- the research is novel work. Due to sleep apnea, people may
ties [5]. So, this is a matter of awareness as it is not being have a stroke, may have cardiac arrest, and may have heart
focused on yet or getting that much exposure, but we will failure or such complications. Real-time measurement of
try to identify it with ease with our research so that people these apnea parameters is a must to reduce such risks, as it
do not remain undiagnosed and can have a comfortable life may cause death. Another motivation is that regular apnea
with no life risk. screening devices are too costly to afford. They are mostly
The very basic parameters of health which are related to used in medical institutes for medical conditions or research
sleep apnea include AHI (apnea-hypopnea index), heart rate purposes, but a cost-effective device is needed so that the
(BPM), blood oxygen saturation (SpO2), body mass index general public can buy this and screen their apnea issues
(BMI), sleeping time, REM, blood glucose, age, and blood while staying at home, with no need to rely on costly clinical
cholesterol [6]. In different research, it has been seen that monitoring. Our research goal is to solve these issues, and
such parameters are covered on the basis of medical saving human lives is the ultimate goal of this study.
research. In most cases, they come up with a study of med- The objective of this study is to develop an IoT-based
ical data of a particular or group of patients, and they ana- sleep apnea monitoring system for health care applications.
lyze the results. Devices are mostly used: polysomnography An IoT-based sleep apnea monitoring system for healthcare
(PSG), electrocardiogram (ECG), and some clinical devices applications is developed in this study. In this research, the
like this. These devices are too costly to use for personal system will monitor the parameters of sleep apnea on a
use. Some advanced and fruitful research happened earlier real-time basis and will try to monitor the values of these
Computational and Mathematical Methods in Medicine 3
as efficiently as possible with diverse parameters. The main troller has the capacity to connect to other sensors or com-
parameters covered in this research are SpO2, heart rate, puters, allowing it to be used in many projects. It has 2 KB
ECG, skin response, and sound intensity to be measured at of SRAM (static random access memory) and 32 KB of flash
a time. An application is being made that will show the memory, 13 KB of which is utilized to store the set of
real-time data of these parameters so that patient’s attendant instructions in the form of code. It also includes a 1 KB
can get an instant and continuous update of patient’s health. EEPROM (electrically erasable programmable read-only
The rest of this paper is organized as this pattern: Section memory).
2 describes the methods and tools implemented in our This Arduino board has a total of 30 connections, with
research. All the modules (hardware and software) and their 14 digital pins and 6 analog pins for external connection.
workflows are being discussed here. Section 3 demonstrates The A0 to A5 analog pins are used to receive analog data
the results and outcomes we got from our system and their from external devices such as analog sensors. On the board,
broad qualitative analysis as well. In Section 4, the whole there are various digital and analog input and output pins
concept of this research is summarized, and we also dis- that operate at 5 V. These pins have conventional opera-
cussed how important and effective it is to monitor sleep tional current ratings of 20 to 40 milliamps. The DC power
apnea on a real-time basis, and we concluded the section jack may provide a voltage ranging from 7 V to 20 V, or
by discussing our ambitions and motivation for this work the USB connected to an external device can provide a 5 V
for the sake of lives. voltage. Data transmission is the key for IoT devices. To
receive, transmit data, and maintain serial communication,
2. Methods and Materials two pins called Pin 0 (Rx) and Pin 1 (Tx) work simulta-
neously. The Rx pin receives data, whereas the Tx pin trans-
2.1. Methodology Statements. This section discusses the mits data. Serial communication can also be done by other
methods, components and paths that are used to fulfill the input/output (I/O) pins of the board. The serial monitor of
goal. The aim of the system is to monitor the entire sleeping the Arduino IDE software is used to send or receive text data
period of a patient with sleeping disorders. This from the board. It is used to display the output data from the
microcontroller-based sleep apnea monitoring system for Arduino board.
sleeping disorder patients is combined with three different
layers. The main layer is a microcontroller unit which con- 2.3.2. Sensors. There are several sensors to monitor patient’s
nects the input layer and the output layer. In the input layer, condition during sleep. To monitor and analyze sleep apnea,
it is combined with four different sensors which will provide the system contains a few sensors that will fulfill the major
the analog signal to the Arduino UNO to measure the differ- goals. The heart rate module, SpO2, pulse sensor, ECG sen-
ent indexes of sleep condition. The output layer is combined sor, galvanic skin response (GSR) sensor, and sound sensor
with two parts, including the serial monitor of the Arduino to monitor the snoring sound of the patient during sleep
UNO and a mobile application to display the digital data have been used in the system. These six sensors will monitor
converted by the microcontroller. the patients during sleep and will provide analog data to the
Arduino UNO.
2.2. Outline of the System. A block diagram shows the full
system in Figure 1. The system consists of input, output,
(1) Heart Rate Pulse Sensor. Difficulties with breathing and
and a microcontroller board Arduino UNO shown in
sleep apnea problems are very much related to the heart rate
Figure 2. The Arduino board, which is also connected to
of the patient. The system contains a heart rate pulse sensor
the output layer, combined with the serial monitor of the
to monitor the heart rate of the patient throughout the sleep-
Arduino board, and a Massachusetts Institute of Technology
ing period. A high heart rate is one of the major risk factors
(MIT) App Inventor-based mobile application connected to
for sleep apnea. The normal heart rate of a healthy person is
a Bluetooth module show the converted digital data to the
in the range of 60-100 beats per minute (bpm). The heart
viewer.
rate varies from person to person. More physically active
Figure 1 shows the basic workflow of the system. The
people usually have a lower heart rate than less active people.
sensors provide the data to the Arduino UNO simulta-
A higher and unusual change in heart rate is a major sign of
neously, and the Arduino UNO passes the converted digital
sleeping disorders. Figure 3 shows the heart rate pulse
data to the Arduino IDE (Integrated Development Environ-
sensor.
ment)’s serial monitor and also to the mobile application
through the Bluetooth module at the same time.
The heart rate during sleep is usually lower than at other
2.3. Modules and Materials. The system is integrated with times of the day. The average heart rate of a person during
different kinds of components that are doing different tasks sleep is usually around 60-80 bpm, as shown in Figure 4,
in the system. Some are for the input, some are for the out- but a healthy and fit person has a lower heart rate in the
put, and some are used in the system to create a bridge range of 50-60 bpm during the sleeping period.
between the inputs and outputs. An unusual change in heart rate is one of the symptoms
of sleep apnea. A lower heart rate can occur due to a lack of
2.3.1. Arduino UNO. The Arduino UNO, shown in Figure 2, oxygen supply in the body. It could happen when the breath-
is system’s major component, and it is based on the VR ing of a person stopped due to any unusual reason. A higher
Microcontroller Atmega328. This programmable microcon- heart rate is also a result of sleep apnea. Because of
4 Computational and Mathematical Methods in Medicine
Max 30102
Viewing outputs Arduino monitor
ECG sensor
Arduino UNO Bluetooth
module
GSR sensor
Viewing outputs
Mobile
Sound sensor application
Figure 1: Full system block diagram by which the system works successfully.
DC power jack
USB port
Reset button
can provide the state of the heart during the sleeping period,
whether there is any kind of enlargement of the heart occur-
ring due to hypertension, and can also detect myocardial
infarction. The ECG varies person to person for several rea-
sons. A physically active person has a more stable ECG than
an inactive person’s ECG. The resting ECG is different from
the stress or exercise ECG. Figure 5 shows the AD8232 ECG
sensor used in this research. Figure 6 given below will show
the ECG values during sleep.
Figure 3: Heart rate pulse sensor. The system will contain an AD8232 ECG analog sensor
to monitor the ECG of a person shown in Figure 5. That sen-
hypertension and stress, a higher heart rate can occur. And it sor will be connected to the body and pass an analog signal
usually hampers the usual sleep of a person. It is one of the to the Arduino to convert the signal into a digital signal. This
main reasons for heart failure during sleep. sensor is connected with the Arduino via five pins. Among
The system will include a heart rate sensor to continu- them, two are for powering up the sensor. The input voltage
ously monitor person’s heart status. This is an analog sensor, of the sensor is 3.3 V. Other pins are the data pin, which is
and the sensing element of the sensor will be attached to per- connected to the analog pin of the Arduino, and others are
son’s body. This will send the analog signal to the Arduino the lead pins LO+ and LO-. This lead pin analyses the elec-
through the analog pin. The heart pulse sensor is depicted trode which is connected to the body and gives the data to
in Figure 3. The data pin of the sensor is connected with the Arduino. These ECGs can be excessively noisy at times.
one of the analog pins of the Arduino for data transmission.
This sensor operates on a voltage of 5 V and 4 mA current. (3) Max 30102 Finger Oximeter Heart Rate Module SpO2.
The amount of oxygen circulating in the blood is referred
(2) AD8232 ECG Sensor. An electrocardiogram, or ECG, is to as the blood oxygen level. Oxygen distribution throughout
very important in monitoring sleep apnea. An ECG provides the body is an indicator of detecting a healthy body and an
information about the heart rate and the rhythm of the unhealthy body. The blood oxygen level or oxygen satura-
heart. It also shows the unusual change in the heart rate. It tion level indicates how equally oxygen is distributed in the
Computational and Mathematical Methods in Medicine 5
Subject A : Healthy
100 Mean = 64.98
Time (min)
Subject B : Obstructive sleep apnea
100
Heart rate (bpm)
Mean = 64.95
90 SD = 4.68
80
70
60
50
0 5 10 15
Time (min)
Figure 7: Max30102 SpO2 sensor. 2.3.3. Bluetooth Module. Serial communication is the key to
this IoT-based paper. For that, the system contains a Blue-
Oxygen saturation during an apnea event tooth module HC-05. This Bluetooth module is the gateway
96 between the Arduino Uno and android application. Oper-
Oxygen saturation (%)
10
ADC
Control Signal
Hbo2 processing
Hb
0.1
RED IR
and the GSR sensor. Also, the data conversion and transmis-
sion parts are performed in this section, and the data passed
to the serial monitor, and mobile application happens in this
part. After pairing the Bluetooth module with the mobile,
the data is displayed on the serial monitor and also stored
for detailed analysis.
REM
Relaxation
2nd stage
SWS
Active awake
GSR
GSR Time
Start
Blutooth module pin setup
Loop
hours and analyzed how different parameters changed every oxygen saturation during the third and fourth hours of sleep.
hour. That is one of the symptoms of breathing problems. A low
rate of breathing declines the rate of oxygen supply to the
3.3.1. Heart Rate Analysis. Table 3 shows the results of the body, and it decreases the level of oxygen saturation. That
heart rate for the five people. It shows how the heart rates low SpO2 value is an indication of obstructive sleep apnea.
of different people change over hours. The values indicate The average value of oxygen saturation for different peo-
how the heart rate of a person changes from the start of sleep ple shown in Table 4 shows some variations. Although the
to the end of sleep. In the experiment, we measured the value variation is not significant, for person 5, the value is a little
of heart rate every second throughout the period and lower, and for person 3, the value is higher than the other.
checked the highest, lowest, and value that clicked most of Person 5 has a mean SpO2 of 94.55, while person 3 has a
the time. After checking the values, we took the decision to mean SpO2 of 97.81.
calculate the average heart rate in each hour. The average The line chart for SpO2 in Figure 21 shows how the level
value reflects the heart rate that the person had at their max- of oxygen saturation changes over time more precisely.
imum time in that specific hour. In the experiment for every The line chart for the five people in Figure 21 shows the
person, the values are in some specific pattern, and in all change in oxygen saturation during different hours of the
cases, they follow the body condition of the person. Person sleeping period. It reflects how oxygen distribution happens
1, who does not have any major health issues, has a very bal- in the bodies of those five people over the hours.
anced heart rate throughout the sleeping period. The results
do not provide any indication of sleep apnea. The same goes 3.3.3. Galvanic Skin Response (GSR) Analysis. Galvanic skin
for person 3, who is an athlete and has very good physical response (GSR) values for the five people are shown in
condition. His heart rate is in the range of 67-76 beats per Table 5. It shows every person’s electrodermal activity
minute during the period. That value is quite standard for throughout the sleeping period. The value indicates how a
a healthy person. But, for other people, the results do show person’s state of mind changes over time during sleep
some of the major hints about sleep apnea. Person 2 has because of stress or hypertension. During the experiment,
an uneven change in heart rate. This person has a heart rate the system monitors person’s electrodermal activity via the
of around 90 bpm. In the third hour of sleep, his heart rate sensor and shows the response of the skin every second.
falls. One of the most serious consequences of breathing dif- The response of the skin changes gradually for every person.
ficulties is a low heart rate, also known as Bradycardia. In For person 1, the response of the skin is quite balanced
that case, that low heart rate indicates obstructive sleep throughout the sleeping time, and it does not show any hint
apnea in that patient. On the other hand, people 4 and 5 of sleep apnea, and also for person 3, as his skin response is
have a higher heart rate. According to the history, person 4 highest among the others. But for person 2, person 4, and
has a major heart problem, which suggests that a higher person 5, the result shows an uneven change in skin
heart rate could be the cause of both the heart problem response. For person 2, the value of GSR goes down in the
and obesity. 3rd hour and also in the last two hours. It shows the chance
The average value of BPM of test subjects varied from of stress and hypertension problems during sleep. Person 4
person to person for different ages, physical conditions, has the lowest GSR value among all of the people the system
and previous health issues. There is quite a massive variation monitored. In the first two hours, the values of skin response
in the BPM of different persons. From Table 3, it is noted do not show any change, which can lead to a decision about
that the mean value of the heart rate for person one is sleep apnea. But from the 3rd hour to the end of the sleep,
74.47, while for person 4, it is noticed to be 91.39. the GSR value reflects the change of very low dermal activity,
For comparison of heart rate among the people, which can be the reason for sleep apnea. Person 5 also has
Figure 20 shows how heart rate changes because of the phys- quite a low skin response, but the value throughout the time
ical condition of the people. does not change significantly, and in that case, there is no
The line chart of heart rate in Figure 20 shows the aver- evidence for sleep apnea for person 5.
age heart rate of a person changing over the course of an The mean of galvanic skin response for five people in
hour. In the line chart, it is visible that most of the people Table 5 shows significant variations in the skin response
have an uneven change in heart rate. The differences over the hour. The lowest value (162.5) of GSR is noticed
between the lines of one person and another person indicate for person 2, whereas the highest value (225.54) is noticed
the difference in their age group and body condition. for person 1. The line chart shows the change in galvanic
skin response for the five people over the hour in
3.3.2. SpO2 Analysis. Table 4 shows the oxygen saturation Figure 22 more precisely.
for the five people. It shows the change of oxygen saturation
over hours. In the experiment, the system calculates the 3.3.4. Sound Intensity Analysis. Snoring, which is a symptom
SpO2 value every second with the sensor-based pulse oxim- of obstructive sleep apnea, was detected in three of the
eter. The SpO2 value always stayed within a particular range people the system monitored. The snoring sound followed
for all the people. For that reason, we took the average SpO2 a pattern for each person. In the experiment to detect
value for every hour of the sleeping period. All of the people snoring, the sensor collects data every second. The result
have quite good oxygen saturation levels throughout the shows that, for a specific person, the sound follows a sim-
monitoring period, except for person 5, who has very low ilar rhythm throughout the sleeping time. The graph in
12 Computational and Mathematical Methods in Medicine
110
110
100.24 98.48
97.12 100
100 90.02
Beats per minute (BPM)
Hours
Person 1 Person 4
Person 2 Person 5
Person 3
Figures 23(a)–23(e) depicts the snoring rhythms of the normal rate as the breathing cycle for person 5 took 4-6 sec-
people studied. onds. Both people faced problems with breathing during
Person 3 has a very balanced rhythm in the breathing sleep, which is a sign of sleep apnea.
cycles. There is no evidence of snoring visible in
Figure 23(c). The sound level stayed in the range of 35 dB- 3.3.5. ECG Analysis. Figure 24 depicts the heart rhythm or
40 dB, which is usually for room sound. But for person 4 ECG graph for test person 4. Person 1, person 2, person 3,
and person 5, there is a big problem with snoring, as it is vis- and person 5 have a very balanced ECG result. But the
ible in Figures 23(d) and 23(e). For person 4, the figure ECG graphs of person 4 show some uneven changes in the
shows that the snoring sound reached almost 60 dB, and rhythm of the heart.
every snoring cycle took 3-5 seconds. That is big evidence In Figure 24, there are six waves that are the top picks of
of problems with breathing and also a sign of obstructive the graph. Those spikes are also known as R-wave. It shows
sleep apnea. The same goes for person 5, as snoring intensity how time elapsed between endocardium to epicardium. It is
touches the 60 dB mark. The breathing rate is lower than the also helpful for some of the major heart issues. Loss of R-
Computational and Mathematical Methods in Medicine 13
100
100
83.21
98.37 98.36
98.11
97.7 80
98 88.63
97.22 97.49
97.12
Sp02 (%)
96.73
Sp02 (%)
96.45 96.45 96.67
95.87
99.71
95.96 96.12 95.73 96
96 95.97 95.94
95.68 95.96 95.81
95.56 95.83
94
94 94.15 93.78 94.12
93.63
40
92
1st 2nd 3rd 4th 5th 6th
Hours
Person 1 Person 4
Person 2 Person 5
Person 3
348.2 350
350 330
330 310
310 290.82 290
69.37 269.35
290 270
Micro siemens (us)
265.41
270 83.21 250
254.87 264.62 253.37
250 230
231.03 235.47
230 276.39 217.13 210
210 190.54 207.18 190
190 181.81 164.27 170
170 154.95 147.8 150
150.03 142.79
150 134.34 130
130 123.25
121.95
129.2
129.08 110
110 90
90 74.22 70
70 50
50
1st 2nd 3rd 4th 5th 6th
Hours
Person 1 Person 4
Person 2 Person 5
Person 3
wave indicates myocardial infarction, which is visible in the toring sleep apnea with similar kinds of parameters shown in
first R-pick in Figure 24. The gain of R-wave indicates car- Table 6. It also shows the parameters that were not used in
diomyopathy, which is the 5th R-pick of the graph. other research.
Most of the previous research to monitor sleep apnea is
3.4. Comparative Analysis. The outcome of the system has mainly based on one parameter. But this study combined
been compared to some other research that has been moni- five different parameters of the sleeping index. In this study,
14 Computational and Mathematical Methods in Medicine
75 75
60 60
45 45
30 30
15 15
0 0
2 4 6 8 10 12 14 16 18 Time (S) 2 4 6 8 10 12 14 16 18 Time (S)
(a) (b)
Sound intensity (dB) Sound intensity (dB)
75 75
60 60
45 45
30 30
15 15
0 0
2 4 6 8 10 12 14 16 18 Time (S) 2 4 6 8 10 12 14 16 18 Time (S)
(c) (d)
Sound intensity (dB)
75
60
45
30
15
0
2 4 6 8 10 12 14 16 18 Time (S)
(e)
Figure 23: Snoring cycle of 5 persons; (a), (b), (c), (d), and (e) show the sound intensity of person 1, person 2, person 3, person 4, and
person 5, respectively.
450.0
300.0
150.0
2.637 2.737
the decision was made after analyzing all the five parameters ing systems. Some other sensors could be added to the sys-
combined as one factor is dependent on another factor of tem to make it more applicable. An LM35 temperature
sleep. Another important aspect of this study is no other sensor could be added to the system. A DHT11 humidity
research focused on the galvanic skin response to detect sensor could also be added to this system to make this sys-
sleep apnea. However, this study establishes a link between tem more applicable, though those factors have a minor con-
skin response and sleep apnea monitoring. That opens an nection with sleep apnea.
important area for analyzing sleep apnea more precisely. In most research, ECG data and other data are used to
measure or monitor sleep apnea. Most were under medical
4. Conclusion observation in a clinical environment. But our device will
help patients to get even better output while staying at home
This research shows how IoT devices can monitor sleep and with ease of use. Real-time data will give instant updates
apnea. To implement the system, we used a basic microcon- about apnea indexes so that patients can take precautionary
troller and some of the major health-related sensors. The steps. And for senior citizens and the physically/mentally
mobile application has been created with a very simple app disabled, our device is an added benefit because it sends
developing web application. After monitoring five people, notification data to patient’s concerned person so that the
the system gives quite satisfactory results for making deci- person can take care of any difficulties that may occur at
sions about sleep apnea. From the given results, it is clear any time. We will further try to build our own dataset with
that two people do not have any symptoms of any kind of this real-time data and will analyze it through multiple
sleep apnea. One person who is in the age range of 36-50 machine learning models to analyze the whole system and
has major issues with sleep conditions. The system success- how our system can work with better efficiency. To have a
fully detects sleep apnea for that person. The system also healthy and sound life without a sleeping disorder is a bless-
detects obstructive sleep apnea in a person. After analyzing ing, and technology can undoubtedly assure that.
the results, it is clear that the person whose age is 50+ is a
patient with OSA. That kind of monitoring will help people
to detect sleep apnea at the early stage. Thus, this research Data Availability
can help people to learn about sleep apnea, the way to detect
it, and it will also help people to eliminate all their sleeping No data was utilized to support this research findings.
problems.
Nowadays, sleeping disorder rates are higher than
before. More people are suffering from hypertension, Conflicts of Interest
stress-related problems, and heart-related problems which The authors declare that they have no conflicts of interest to
cause sleep apnea. Our system will be very much more sus- report regarding the present study.
tainable to monitor sleep apnea and detect specifically the
duration of sleep apnea. That system can sustain itself at a
higher level. It not only detects sleep apnea but can also Acknowledgments
inform the patient to discuss with the doctor the data taken
from the system, which can make the lives of patients easier. The authors are thankful for the support from Taif Univer-
And the project can be sustained in the future if we add sity Researchers Supporting Project (TURSP-2020/26), Taif
higher technology like high-level X-rays and other monitor- University, Taif, Saudi Arabia.
16 Computational and Mathematical Methods in Medicine