Live weight, heart rate, and BMI tracking — from Arduino sensors to a beautiful web dashboard in real time.
Apple Fitness–inspired dark dashboard with live KPI cards, real-time charts, workout recommendations, and health insights.
┌─────────────────────────────────────────────────────────────┐
│ HealthSync Dashboard ● LIVE │
├──────────┬──────────────────────────────────────────────────┤
│ │ Weight Heart Rate BMI Goal │
│ Sidebar │ 72.4 kg 78 BPM 22.1 2.4 kg │
│ │ ↓ trending → stable Normal ✓ above goal │
│ Home ├──────────────────────────────────────────────────┤
│ Dashboard│ Weight over time ────────────────────────────── │
│ Analytics│ ▁▂▃▂▄▅▄▆▇▆▇█ (live Chart.js graph) │
│ Workouts │ │
│ Insights │ BPM over time ─────────── BMI over time ───── │
│ Profile │ ▃▄▂▅▃▄▅▃▄▂▅ ▂▂▃▂▂▂▃▂▂▂▂ │
└──────────┴──────────────────────────────────────────────────┘
| Feature | Description |
|---|---|
| ⚡ Real-Time KPI Cards | Weight, BPM, BMI and goal weight — updated every 2 seconds with animated transitions and trend arrows |
| 📈 Live Charts | 5 Chart.js graphs (weight, BPM, BMI + 2 mini) with last 30 data points |
| 🧠 Health Insights Engine | Automatic BMI assessment, BPM risk detection, weight trend analysis |
| 🏋️ Smart Workout Plans | 17 workouts across 4 categories, filtered by BMI + age group |
| 🎯 Goal Tracker | Set a target weight, see how far you are in real time |
| 🌙 Dark / Light Mode | Synced across landing page and dashboard via localStorage |
| 📥 CSV Export | Download full history (weight, BPM, BMI) with timestamps |
| 📱 Fully Responsive | Works on mobile, tablet, and desktop |
| 🔴 Live Status Badge | Pulsing dot shows when data is fresh (< 10s old) |
| 🧪 Demo Mode | Simulates live data automatically if Firebase is not yet connected |
┌─────────────────────────────────────────────────────────────┐
│ DATA FLOW PIPELINE │
└─────────────────────────────────────────────────────────────┘
┌──────────────┐ Serial ┌──────────────┐
│ Arduino UNO │ ─────────────► │ bridge.js │
│ │ 57600 baud │ (Node.js) │
│ • HX711 │ └──────┬───────┘
│ • 4 load │ │
│ cells │ │ Firebase SDK
│ • Pulse │ ▼
│ sensor │ ┌──────────────────┐
└──────────────┘ │ Firebase │
│ Realtime DB │
│ │
│ data/ │
│ ├── weight: 72.4│
│ └── bpm: 78 │
└────────┬─────────┘
│
│ db.ref("data").on("value")
▼
┌──────────────────┐
│ index.html │
│ (Live Dashboard)│
│ │
│ • KPI Cards │
│ • Chart.js graphs│
│ • Health Insights│
│ • Workout Recs │
└──────────────────┘
| Component | Purpose | Connection |
|---|---|---|
| Arduino UNO | Microcontroller | USB to PC |
| HX711 Module | Load cell amplifier | Pins D4, D5 |
| 4× Load Cells | Weight measurement | Via HX711 |
| Pulse Sensor | Heart rate (BPM) | Pin A0 |
| I²C LCD (16×2) | Local display | SDA/SCL |
Arduino UNO
├── D4 → HX711 DOUT
├── D5 → HX711 SCK
├── A0 → Pulse Sensor Signal
├── 5V → VCC (all modules)
└── GND → GND (all modules)
I²C LCD → Address 0x27 (SDA/SCL)
health-project/
│
├── landing.html # Home page — project overview
├── index.html # Live dashboard
├── styles.css # Shared theme (Apple Fitness dark)
├── script.js # Firebase listener + all dashboard logic
│
└── bridge/
├── bridge.js # Node.js Serial → Firebase bridge
└── package.json # Dependencies (serialport, firebase)
- Node.js v16+
- Arduino IDE
- Firebase account (free Spark plan works)
- Open
arduino/health_monitor.inoin Arduino IDE - Install required libraries via Library Manager:
HX711_ADCLiquidCrystal_I2CPulseSensorPlayground
- Upload to your Arduino UNO
- Open Serial Monitor at 57600 baud
- Send
tto tare the scale, then enter your calibration weight in grams
You should see output like:
Weight: 65.20 kg | BPM: 78
Weight: 65.21 kg | BPM: 79
- Go to console.firebase.google.com
- Click Add Project → give it a name
- Go to Realtime Database → Create Database
- Select Start in Test mode → Enable
- Go to Rules tab → paste this → Publish:
{
"rules": {
".read": true,
".write": true
}
}- Go to ⚙️ Project Settings → Your apps → Add web app
</> - Copy your
firebaseConfigobject
Open script.js and replace the config at the top:
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_PROJECT.firebaseapp.com",
databaseURL: "https://YOUR_PROJECT-default-rtdb.firebaseio.com", // ← add manually
projectId: "YOUR_PROJECT_ID",
storageBucket: "YOUR_PROJECT.appspot.com",
messagingSenderId: "YOUR_SENDER_ID",
appId: "YOUR_APP_ID"
};Open bridge/bridge.js and paste the same config + set your COM port:
const SERIAL_PORT = "COM3"; // Windows: COM3, COM4 etc.
// Mac/Linux: /dev/ttyUSB0 or /dev/ttyACM0How to find your COM port:
- Windows → Device Manager → Ports (COM & LPT) → look for CH340 or Arduino
- Mac →
ls /dev/tty.*in Terminal- Linux →
ls /dev/ttyUSB*
cd bridge
npm install
node bridge.jsExpected output:
✅ Listening on COM3 at 57600 baud...
Arduino → Weight: 65.20 kg | BPM: 78
✅ Pushed → weight: 65.2 | bpm: 78
⚠️ Close Arduino IDE's Serial Monitor before running bridge.js — both cannot use the same COM port simultaneously.
Open landing.html in your browser → click Open Dashboard →
Or open index.html directly.
Your data will appear live within 2 seconds of the bridge running. ✅
| Section | What it shows |
|---|---|
| Dashboard | Live KPI cards + mini sparkline charts |
| Analytics | Full-size weight, BPM and BMI graphs over time |
| Workouts | Filtered plans by BMI category + age group |
| Insights | Auto-generated health observations |
| Profile | Height, age, gender, goal weight input |
BMI = weight (kg) / height (m)²
| BMI Range | Category | Colour |
|---|---|---|
| < 18.5 | Underweight | 🔵 Blue |
| 18.5 – 24.9 | Normal | 🟢 Green |
| 25 – 29.9 | Overweight | 🟡 Amber |
| ≥ 30 | Obese | 🔴 Red |
| BPM | Status |
|---|---|
| < 60 | Low (athlete level) |
| 60 – 100 | Normal ✓ |
| 101 – 120 | Elevated |
| > 120 | High 🚨 |
The bridge writes to Firebase in this exact structure:
{
"data": {
"weight": 65.2,
"bpm": 78
}
}The dashboard listens to db.ref("data") and updates on every change.
Never push your real Firebase credentials to a public GitHub repository.
Before pushing to GitHub, replace your credentials in script.js and bridge.js with placeholders:
const firebaseConfig = {
apiKey: "YOUR_API_KEY_HERE",
databaseURL: "YOUR_DATABASE_URL_HERE",
// ...
};Or simply keep your repository private.
| Layer | Technology |
|---|---|
| Microcontroller | Arduino UNO (C++) |
| Weight sensor | HX711 + 4× load cells |
| Heart rate | Pulse Sensor (analog) |
| Serial bridge | Node.js + serialport npm |
| Database | Firebase Realtime Database |
| Frontend | Vanilla HTML + CSS + JavaScript |
| Charts | Chart.js 4.4.0 (CDN) |
| Fonts | DM Sans + Instrument Serif (Google Fonts) |
| Problem | Fix |
|---|---|
bridge.js — port error |
Close Arduino IDE Serial Monitor first |
bridge.js — wrong port |
Check Device Manager (Windows) or ls /dev/tty.* (Mac) |
| Dashboard shows demo data | Your Firebase databaseURL is missing or wrong in script.js |
| Weight reads 0 or wrong | Send r in Serial Monitor to recalibrate |
| BPM always 0 | Ensure finger is firmly on pulse sensor, wait 10–15 seconds |
| Firebase permission denied | Set rules to ".read": true, ".write": true in Firebase console |
This project is open source and available under the MIT License.
- HX711_ADC Library — Olav Kallhovd
- PulseSensorPlayground — World Famous Electronics
- Chart.js — Chart.js Contributors
- Firebase — Google
- Design inspired by Apple Fitness and Apple Health
Made with ❤️ for IoT health monitoring
HealthSync — Your body speaks. We listen in real time.