Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

BioPatch Pro: Smart Wearable Sweat Patch for Physiological Trend Monitoring

Overview

BioPatch Pro is a low-cost wearable "sweat patch" that continuously tracks a person’s hydration levels, heat strain, psychological stress, and fatigue without interrupting daily activity. Unlike conventional medical setups that require blood draws or bulky electrode assemblies, this system reads indirect electrodermal and thermal signals to piece together a detailed physiological picture.

At its core is a Context-Aware Neural Deconvolution Engine that uses the ambient vapour pressure deficit (VPD) to mathematically peel away the lingering residue of old sweat from the galvanic skin response (GSR) signal using a Recursive Inverse Filter (RIF). This leaves behind only the clean sympathetic neural drive.

The firmware runs on an ESP32 Development Board, pushes live data to Firebase Firestore over WiFi, and is reflected in real-time on a companion Expo Go mobile dashboard.

Key Features

  • Derived Physiological Indices: Produces four practical indices anchored to the user's resting baseline:
    • Hydration Index (HI 0–100): Monitors hydration via conductance ratio, slope, and skin temperature.
    • Thermal Stress Index (TSI 0–10): Measures heat strain combining skin/ambient temperature elevation and failed cooling penalties.
    • Stress Response Index (SRI 0–10): Tracks sympathetic nervous system arousal isolated from thermal sweating.
    • Fatigue Index (FI 0–10): Models the build-up of accumulated physiological debt using a leaky integrator.
  • Personalised Baseline Calibration: A 120-second calibration window at startup establishes a personal resting baseline, making readings meaningful across different body types and climates.
  • On-Device Neural Deconvolution: Adapts to environmental humidity (VPD) to filter out noise and extract true neural drive.
  • WiFi & Cloud Integration: Atomic updates to a Firebase Firestore document with a 30-second non-blocking reconnect loop for offline resilience.
  • Self-Powered Solar Assistance: Combines a 3.7V LiPo with a 5V flexible solar panel and TP4056 module to effectively cancel out WiFi draw under full sun.

Hardware Components

  • Controller: ESP32 Development Board (Dual-core Xtensa LX6, WiFi, Bluetooth)
  • GSR Electrode: Measures skin conductance (GPIO34, ADC1 Ch6, 11 dB attenuation).
  • DS18B20: 1-Wire digital probe for skin temperature (GPIO32).
  • DHT22: Capacitive hygrometer for ambient temperature and relative humidity (GPIO15).
  • SSD1306 OLED: 128×64 I2C display for local alerts and data readouts.
  • Power Subsystem: 1000 mAh LiPo battery, TP4056 charging module, flexible solar panel.

System Performance and Results

  • Calibration: Settles reliably within 120 seconds when the user is resting quietly.
  • Cloud Latency: Firebase round-trip latency runs between 180 and 220 ms on a 4G hotspot (comfortably within the 3-second sampling window).
  • Sensor Stability: The DS18B20 digital interface remains completely unaffected by ADC noise artefacts from the WiFi radio.
  • Deconvolution Efficiency: The RIF brings the SRI down by roughly 0.8 to 1.5 units relative to raw phasic amplitude in humid conditions, confirming effective environmental de-coupling.
  • Fatigue Tracking: The leaky integrator differentiates short bursts of effort (FI recovers in 4–6 mins) from sustained load (FI climbs above 7.5 within 10–12 mins of continuous physical activity).
  • Battery Life: ~10 hours continuously on a 1000 mAh LiPo; the solar panel adds another 2 to 4 hours under direct sunlight.

Getting Started (Manual Configuration Required)

If you pull this code to use in your own project, you must manually fill in your own private credentials and configuration variables, which have been stripped from the repository for security.

1. ESP32 Firmware (biopatch.ino)

Before flashing the ESP32, replace the placeholder strings in the credentials section with your own network and Firebase details:

const char *WIFI_SSID = "YOUR_WIFI_SSID";
const char *WIFI_PASS = "YOUR_WIFI_PASS";
const char *FB_API_KEY = "YOUR_API_KEY";
const char *FB_PROJECT = "YOUR_PROJECT_ID";
const char *FB_COLLECTION = "YOUR_COLLECTION";
const char *FB_DOCUMENT = "YOUR_DOCUMENT";

2. Mobile Dashboard (app.js)

Similarly, update the Firebase configuration block in the React Native / Expo app with your web application credentials:

const FIREBASE_CONFIG = {
    apiKey: 'YOUR_API_KEY',
    projectId: 'YOUR_PROJECT_ID',
};
const FB_COLLECTION = 'YOUR_COLLECTION';
const FB_DOCUMENT = 'YOUR_DOCUMENT';

About

Wearable physiological monitor (GSR, skin temperature, hydration trends) with ESP32 firmware and live Firebase dashboard.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages