close
Skip to content
prateek11raiPublic

About

[Thapar University, Capstone-2023] IoT wearable device made using Arduino and sensors along with complete hospital management support for all the wearables linked through the software.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

DocAid

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.


Architecture

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
Loading

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.


Tech Stack

Python Django Django Channels Firebase Arduino HTML5 CSS3 Chart.js

Hardware

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

Circuit Diagram

Circuit Diagram

UI Screenshots

Homepage Patient Dashboard

Project Structure

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)

Requirements

  • requirement_1.txt — dependencies for the healthdash Django project
  • requirements_2.txt — dependencies for the realtime Django project
  • Custom_Script.py — simulates sensor data via WebSocket (for development/testing)

Report

The project capstone report (redacted) can be downloaded here:

assets/report.pdf

University members or reviewers can request access to the unredacted version (with complete details) via the link below.

Request

For the unredacted capstone paper, video, poster, and full documentation, request access via Google Drive.

About

[Thapar University, Capstone-2023] IoT wearable device made using Arduino and sensors along with complete hospital management support for all the wearables linked through the software.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Used by

Contributors

Languages