IoT wearable health monitoring system with a real-time hospital management dashboard. Submitted to Thapar University (2023) as a capstone project.
An Arduino-based wearable collects heart rate, SpO2, ECG, and body temperature from a patient and transmits the data to a Firebase Realtime Database. A Django web application retrieves these readings and displays them on a live patient dashboard with real-time charts.
flowchart TB
subgraph HW ["Hardware Layer"]
MLX[MLX90614<br/>Temperature] -- I2C --> UNO[Arduino Uno<br/>Sensor Read]
MAX[MAX30100<br/>Heart Rate + SpO2] -- I2C --> UNO
AD[AD8232<br/>ECG] -- Analog A0 --> UNO
UNO -- Serial CSV<br/>BPM,SpO2,ECG,Temp --> ESP[ESP8266 NodeMCU<br/>WiFi + Firebase]
ESP -- WiFi --> FB[(Firebase<br/>Realtime DB)]
end
subgraph SW ["Software Layer"]
SIM[Custom_Script.py<br/>Data Simulator] -- WebSocket<br/>ws://localhost:8000/ws/polData --> DC[DashConsumer<br/>Django Channels]
FB -- REST/SDK --> DC
DC -- group_send --> CH[Chart.js Dashboard<br/>details.html]
AUTH[Django Auth<br/>signup/signin/signout] --> PAT[Patient CRUD]
end
style FB fill:#f9f,stroke:#333,stroke-width:2px
style UNO fill:#00979D,color:#fff
style ESP fill:#00979D,color:#fff
The wearable reads patient vitals and prints them as a CSV line over Serial. The ESP8266 parses this line and pushes it to Firebase with an NTP timestamp. On the software side, a simulation script sends random data directly to a Django Channels WebSocket consumer, which broadcasts it to connected dashboard clients for real-time Chart.js visualisation.
Note: The Firebase-to-Django integration is deliberately not included in this repository. The simulation script (
Custom_Script.py) drives the dashboard directly via WebSocket for development, so the rest of the codebase can be tested independently. Once integrated, the system reads live sensor data from Firebase instead. The data stored in Firebase can also serve downstream analytics and machine learning use cases.
| Component | Purpose |
|---|---|
| Arduino Uno | Reads signals from all sensors |
| NodeMCU (ESP8266) | Wi-Fi SoC that transmits readings to Firebase |
| MAX30100 | Heart rate and SpO2 sensor |
| AD8232 | ECG sensor module |
| MLX90614 | Infrared non-contact temperature sensor |
DocAid/
├── healthdash/ # Main Django project (patient dashboard)
│ ├── healthdash/ # Project config (settings, urls, routing)
│ └── dashboard/ # App: models, views, templates, consumers
├── realtime/ # Django project for real-time graphs
│ ├── realtime/ # Project config
│ └── real/ # App skeleton
├── firmware/ # Arduino + ESP8266 embedded code
│ ├── uno/ # Sensor reads (ECG, temp, HR, SpO2)
│ ├── esp8266/ # WiFi + Firebase upload
│ └── README.md # Wiring, pinout, library reference
├── Custom_Script.py # WebSocket data simulator for testing
├── requirement_1.txt # Dependencies for healthdash
├── requirements_2.txt # Dependencies for realtime
├── assets/ # Images, reports, and other resources
│ ├── circuit_diagram.png
│ ├── patient_1.png
│ ├── patient_2.png
│ └── report.pdf # Capstone report (redacted)
requirement_1.txt— dependencies for thehealthdashDjango projectrequirements_2.txt— dependencies for therealtimeDjango projectCustom_Script.py— simulates sensor data via WebSocket (for development/testing)
The project capstone report (redacted) can be downloaded here:
University members or reviewers can request access to the unredacted version (with complete details) via the link below.
For the unredacted capstone paper, video, poster, and full documentation, request access via Google Drive.



