TECHNICAL DEEP DIVE

Learn More

Explore the technical details of our hybrid CNN-LSTM architecture and IoT sensor integration that powers intelligent patient health monitoring.

Machine Learning Model Architecture

Hybrid CNN-LSTM with Attention Mechanism

Our model combines the spatial feature extraction capabilities of Convolutional Neural Networks (CNN) with the temporal sequence learning power of Long Short-Term Memory (LSTM) networks, enhanced by an attention mechanism that focuses on critical health events.

Input Layer

Multi-sensor time-series data (Heart Rate, SpO2, Temperature, Humidity, Air Quality)

Shape: (batch_size, time_steps, features) = (32, 60, 5)

CNN Layers

Extract spatial correlations between different vital signs

3 Conv1D layers: 64, 128, 256 filters | Kernel size: 3 | Activation: ReLU | Max Pooling

LSTM Layers

Capture temporal dependencies and health trend patterns over time

2 Bidirectional LSTM layers: 128, 64 units | Dropout: 0.3 | Return sequences

Attention Mechanism

Focus on critical time windows when health deterioration occurs

Self-attention layer with learned weights | Softmax activation

Dense Layers

Final classification and prediction layers

Dense(64) → ReLU → Dropout(0.3) → Dense(3) → Softmax

Output Layer

Health status classification: Normal, Warning, Critical

3 classes with probability scores | Prediction confidence threshold: 0.85

Training Configuration

OPTIMIZER

Adam (lr=0.001, β1=0.9, β2=0.999)

LOSS FUNCTION

Categorical Cross-Entropy

BATCH SIZE

32 samples

EPOCHS

100 (Early stopping: patience=10)

Data Preprocessing

NORMALIZATION

Min-Max Scaling (0-1 range)

TIME WINDOWS

60-second sliding windows

SAMPLING RATE

1 Hz (1 reading per second)

FEATURE ENGINEERING

Rolling mean, std, gradients

Model Performance

ACCURACY

95%

INFERENCE TIME

0.12 seconds

MODEL SIZE

8.4 MB (TensorFlow)

PREDICTION HORIZON

30-60 minutes ahead

IoT Sensor Integration

Hardware Components

ESP32 Microcontroller

Main processing unit with WiFi/Bluetooth connectivity

$8

SPECIFICATIONS

  • Dual-core Xtensa 32-bit processor @ 240 MHz
  • 520 KB SRAM, 4 MB Flash memory
  • WiFi 802.11 b/g/n, Bluetooth 4.2
  • 12-bit ADC, multiple I2C/SPI interfaces
  • Low power consumption: <1W active

MAX30100 Pulse Oximeter

Heart rate and blood oxygen (SpO2) sensor

$12

SPECIFICATIONS

  • Red & IR LED for SpO2 measurement
  • Photodetector for pulse detection
  • I2C digital interface
  • Range: 0-100% SpO2, 0-200 bpm HR
  • Accuracy: ±2% SpO2, ±2 bpm HR

DHT22 Temperature & Humidity

Environmental and body temperature monitoring

$5

SPECIFICATIONS

  • Temperature range: -40°C to 80°C
  • Humidity range: 0-100% RH
  • Accuracy: ±0.5°C, ±2% RH
  • Digital signal output
  • Low power: 2.5mA max current

MQ135 Air Quality Sensor

Detects harmful gases and air pollutants

$3

SPECIFICATIONS

  • Detects: CO2, NH3, NOx, smoke, benzene
  • Analog output (0-5V)
  • Detection range: 10-1000 ppm
  • Preheat time: 24-48 hours
  • Operating voltage: 5V DC

Total Hardware Cost

Complete sensor array with ESP32 microcontroller

$50

(₹4,000 approx.)

Data Transmission

WiFi Communication

ESP32 connects to local WiFi network and transmits sensor data to cloud server via HTTPS/MQTT protocol.

Protocol: MQTT over TLS 1.2

Frequency: 1 Hz (every second)

Payload: ~200 bytes JSON

Bluetooth Backup

Local data logging to mobile app when WiFi unavailable, with automatic sync when connection restored.

Range: ~10 meters

Local storage: 24 hours buffer

Data Processing Pipeline

1

Sensor Reading

Raw analog/digital signals from sensors

2

Edge Processing

Basic filtering and validation on ESP32

3

Cloud Upload

Encrypted transmission to MongoDB database

4

Feature Engineering

Calculate statistical features and trends

5

AI Prediction

CNN-LSTM model inference on processed data

6

Alert Generation

Multi-tier notification based on predictions

Power Management

POWER SOURCE

5V USB / Battery (18650 Li-ion)

CONSUMPTION

Average: 0.8W | Peak: 1.2W

BATTERY LIFE

8-12 hours continuous operation

SOLAR OPTION

5W panel for remote areas

Reliability Features

WATCHDOG TIMER

Auto-reset on system hang

ERROR DETECTION

Sensor disconnect alerts

DATA BACKUP

Local 24-hour buffer storage

UPTIME

99.5% availability target

Security

ENCRYPTION

TLS 1.2 for all communications

AUTHENTICATION

Device certificates & API keys

DATA PRIVACY

HIPAA-compliant storage

OTA UPDATES

Secure firmware updates