Skip to content

About

Wearable ESP32-based heart rate and SpO₂ monitoring system with BLE, WiFi, and AI-powered insights.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

❤️ LifeRhythm – Smart Heart Rate Monitoring System

LifeRhythm is a wearable heart rate monitoring system designed to detect abnormal pulse conditions such as bradycardia in real time. The system uses an ESP32 microcontroller and a MAX30102 pulse sensor to continuously measure heart rate and blood oxygen levels (SpO₂) and transmit the data wirelessly to a mobile application.

The mobile application provides live heart rate visualization and generates instant alerts through visual, audio, and vibration notifications when abnormal conditions are detected. This helps reduce delayed response during emergencies and promotes proactive health monitoring.

The system is designed to be compact, rechargeable, and suitable for everyday use. It also provides a foundation for future enhancements such as cloud connectivity, remote monitoring, and healthcare integration.


📸 Project Preview

🔌 Circuit Diagram

Circuit Diagram

🛠️ Hardware Prototype

Prototype

📱 Mobile Application

Main Dashboard

App Screen 1

Live Monitoring

App Screen 2

Additional Features

App Screen 3

App Screen 4

⚠️ Abnormal Condition Detection

Abnormal Condition

🔗 Device Connectivity

Connectivity


🚀 Features

  • Real-time heart rate monitoring
  • SpO₂ (Blood Oxygen) measurement
  • Bluetooth Low Energy (BLE) connectivity
  • WiFi and WebSocket communication
  • OLED display for local monitoring
  • Mobile application for live visualization
  • Audio, visual, and vibration alerts
  • AI-powered health insights using Gemini API
  • Rechargeable battery-powered operation

🧠 System Architecture

MAX30102 Sensor
        ↓
      ESP32
        ↓
 ┌───────────────┐
 │ OLED Display  │
 └───────────────┘

        ↓
   BLE / WiFi
        ↓
 Mobile App
        ↓
 Gemini AI Insights

🛠️ Hardware Components

  • ESP32 Development Board
  • MAX30102 Pulse Oximeter & Heart Rate Sensor
  • SSD1306 OLED Display
  • TP4056 Charging Module
  • Li-Po Battery
  • Breadboard and Jumper Wires

💻 Software Stack

Frontend

  • React
  • TypeScript
  • Vite
  • Capacitor

Mobile Platform

  • Android
  • Java

Embedded System

  • Arduino Framework
  • ESP32 Libraries
  • MAX30102 Libraries

Communication

  • Bluetooth Low Energy (BLE)
  • WiFi
  • WebSockets

AI Integration

  • Gemini API

📁 Project Structure

arduino/        ESP32 firmware
assets/         Images and project screenshots
components/     React UI components
services/       BLE, WiFi and AI services
android/        Android project files

🔧 Arduino Firmware

The ESP32 firmware is located in:

arduino/esp32_health_monitor.ino

Functions performed by the firmware:

  • Heart rate measurement
  • SpO₂ calculation
  • OLED display updates
  • BLE communication
  • WiFi/WebSocket communication
  • Finger detection
  • Real-time data transmission

⚙️ Setup

1. Clone the Repository

git clone https://github.com/nishanth1707/LifeRhythm.git
cd LifeRhythmApp

2. Install Dependencies

npm install

3. Configure Gemini API

Create a .env.local file:

VITE_GEMINI_API_KEY=your_api_key_here

4. Run the Application

npm run dev

This launches the web application in your browser.


📱 Android Deployment

Build the Web App

npm run build

Sync Capacitor

npx cap sync android

Open Android Studio

npx cap open android

Run the project on a physical device or Android emulator.


Running the App and Generating an APK

Follow these steps to launch the project in Android Studio, view it on an emulator, and build a shareable APK:

1. Open Android Studio After running the setup commands, Android Studio will automatically launch.

2. Wait for the Gradle Build Once Android Studio opens, look at the bottom-right corner of the window. You will see a Gradle build process running. Wait for this to complete entirely before moving on to the next steps.

3. Set Up an Emulator (Virtual Device) Next, you will need to run a virtual device to test the app.

  • Locate the Target Devices dropdown in the top-middle of the taskbar.
  • If you do not have a device set up yet: Click on Device Manager on the right side of the toolbar. Click the + icon, select *Create Virtual Device, and choose a phone (preferably the *Pixel 7). Follow the prompts to finish creating it.

4. Run the Demo App Select your virtual device from the target dropdown and click the green Run button (play icon). The emulator will start, and the demo app will launch on the virtual screen.

5. Build the APK To create a version of the app you can share with others:

  • Go to the menu bar at the top-left and click on Build.
  • From the dropdown menu, select Build Bundle(s) / APK(s).
  • Click on Build APK(s).

6. Locate the Shareable File Wait a few moments for the build to finish. A pop-up notification will appear in the bottom-right corner saying the build was successful. Click Locate on that pop-up. This will open your computer's file explorer directly to the newly generated .apk file.

This .apk file is your final application, which can now be shared with others and installed on Android devices.

🔮 Future Improvements

  • Cloud database integration
  • Doctor dashboard and remote monitoring
  • Health history analytics
  • Emergency SMS notifications
  • Custom PCB implementation
  • Cross-platform support

📌 Project Status

✅ Hardware Prototype Completed

✅ ESP32 Firmware Implemented

✅ Mobile Application Developed

✅ BLE Communication Working

✅ WiFi/WebSocket Communication Working

✅ Real-Time Monitoring Functional

✅ AI Integration Implemented


👨‍💻 Author

Nishanth M

Electronics and Instrumentation

LifeRhythm is a wearable IoT healthcare project focused on making heart health monitoring more accessible, proactive, and reliable.

About

Wearable ESP32-based heart rate and SpO₂ monitoring system with BLE, WiFi, and AI-powered insights.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages