Abstract
Obstructive Sleep Apnea (OSA) is a common sleep disorder that often goes undiagnosed. It causes breathing to
stop and restart repeatedly during sleep, which can increase long-term risks for heart and metabolic health.
Polysomnography is the standard method for diagnosing OSA. However, it relies on lab equipment, overnight supervision,
and trained technicians, making it expensive and mostly impractical for use at home. This work proposes an IoT-based system
for preventing, detecting, and alerting about sleep apnea. The goal is to allow affordable, continuous monitoring a t
home. The design uses a n ESP32 microcontroller connected to a MAX30102 pulse oximetry sensor, an INMP441 digital
MEMS microphone, and an MPU6050 motion sensor. Together, these devices capture data on SpO₂ levels, heart rate, snoring,
body posture, breathing movement, and respiratory rate. The system filters and normalizes these signals, converting them
into Mel-Frequency Cepstral Coefficients (MFCC) and Short-Time Fourier Transform (STFT) features. This data goes to a
hybrid CNN-BiLSTM-XGBoost model, which evaluates sleep quality and the severity of apnea, categorizing it as Normal, Mild,
Moderate, or Severe. If a Severe episode is detected, the system uploads the information to Firebase Cloud, retrieves the
patient's location from a NEO-6M GPS module, and sends a n emergency SMS to registered caregivers via a SIM800L
GSM module. It also gently wakes the patient using a micro speaker that plays a softly rising tone and activates a relaycontrolled mini air pump for additional support.
A thematic review of related IoT, wearable technology, deep learning, contactless systems, a n d cloud-based
monitoring supports the proposed design and explains the integrated sensing- to-response process. Since this paper discusses
a proposed system instead of one that has been built and tested, it emphasizes design intent and expected functionality, rather
than actual results