Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MediSense / MedCare

Smart Medication Adherence System using IoT, BLE, and TinyML

MediSense is an IoT-based smart medication adherence system designed to support elderly patients and caregivers through wearable sensing, gesture recognition, and smart pillbox monitoring.

The system combines TinyML-based wrist gesture detection, BLE communication, and a React dashboard to infer medication-taking behavior in real time.

The system is designed to support elderly users and caregivers by improving medication adherence monitoring through wearable sensing and smart IoT interactions.


Features

  • Smart pillbox lid monitoring using Arduino Nano 33 BLE
  • TinyML gesture recognition using IMU sensor data
  • BLE communication between wearable, pillbox, and dashboard
  • Medication reminder and snooze system
  • Guardian monitoring dashboard
  • Real-time medication adherence tracking
  • Multi-source evidence-based medication decision logic
  • Weekly adherence visualization and monitoring

System Architecture

Architecture

[Wearable Arduino Nano 33 BLE]
        ↓
[IMU Sensor Data]
        ↓
[TinyML Gesture Classification]
        ↓
[BLE Communication]
        ↓
[React Dashboard]
        ↓
[Medication Adherence Decision]

Medication Decision Logic

The system combines multiple evidence sources to infer medication adherence:

  • Pillbox lid open/close events
  • Wrist gesture classification
  • Reminder timing
  • Snooze interactions

These signals are fused into adherence states such as:

  • Taken
  • Probably Taken
  • Possibly Taken
  • Missed

This approach improves reliability compared to relying on a single sensor event.


TinyML Pipeline

The TinyML workflow includes:

  1. Motion data collection from wearable IMU sensors
  2. Feature extraction and preprocessing
  3. Dataset normalization
  4. TensorFlow model training
  5. TensorFlow Lite conversion
  6. Deployment to Arduino Nano 33 BLE

The wearable device classifies activities such as:

  • Pill-taking gesture
  • Water-drinking gesture
  • Other activity

The TinyML model runs directly on-device using TensorFlow Lite for Microcontrollers, enabling low-latency inference without cloud processing.


BLE Communication

BLE communication enables real-time synchronization between:

  • Wearable device
  • Smart pillbox
  • Monitoring dashboard

The system transmits gesture events, pillbox state changes, and adherence-related signals to the frontend dashboard.


Technologies Used

Frontend

  • React
  • TypeScript
  • Vite
  • Tailwind CSS
  • shadcn-ui

Embedded / IoT

  • Arduino Nano 33 BLE
  • BLE Communication
  • IMU Sensors

Machine Learning

  • TensorFlow
  • TensorFlow Lite for Microcontrollers
  • TinyML
  • Python

Project Structure

MediSense-MedCare/
├── app/                 # React frontend dashboard
├── arduino/             # Arduino BLE firmware
├── tinyml/              # TinyML training and export scripts
├── docs/                # Documentation, screenshots, demo video
├── README.md

Running the Project

Frontend

cd app
npm install
npm run dev

Arduino Firmware

Upload:

  • gesture_inference to the wearable Arduino Nano 33 BLE
  • pillbox_detector_ble to the pillbox Arduino Nano 33 BLE

Screenshots

Medication Reminder System

Medication reminders with snooze support and real-time adherence interaction.

Reminder


Demo Videos

The following demo videos show different components of the MediSense system in action.

Full Project Demonstration

Overview of the complete MediSense system including TinyML gesture recognition, BLE communication, smart pillbox interaction, and dashboard monitoring.

Watch Demo Video


Medication Reminder Demo

Demonstrates the medication reminder workflow, including reminder alerts, snooze functionality, and user interaction.

Watch Video


BLE Monitoring and Dashboard Demo

Demonstrates BLE communication between wearable devices, the smart pillbox, and the monitoring dashboard with real-time adherence updates.

Watch Video


Patient Setup Demo

Demonstrates medication setup, scheduling configuration, and patient management functionality within the dashboard.

Watch Video


Future Improvements

  • Mobile application support
  • Cloud synchronization
  • Federated learning personalization
  • Improved sensor fusion logic
  • Enhanced BLE reliability
  • Real-world clinical evaluation

Academic Context

This project was developed as part of the Mobile & Ubiquitous Computing module at the University of Birmingham Dubai.

The project focuses on IoT systems, context-awareness, wearable computing, BLE communication, and TinyML-based activity recognition for smart healthcare applications.


Team

Developed as a collaborative university project focused on smart healthcare and ubiquitous computing systems.

About

IoT-based smart medication adherence system using TinyML, BLE, wearable sensing, and React dashboard monitoring.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

Contributors

Languages