Salah Uddin
Published © LGPL

Portable/Wearable Health Monitoring IoT System

This project presents a prototype of wearable health monitoring device, which is supported by DFRobot.

IntermediateFull instructions provided12 hours4,263
Portable/Wearable Health Monitoring IoT System

Things used in this project

Hardware components

DFRobot FireBeetle Board
The main controller board.
×1
ProtoCentral Pulse Oximeter & Heart Rate Sensor based on MAX30100
ProtoCentral Electronics ProtoCentral Pulse Oximeter & Heart Rate Sensor based on MAX30100
The pulse sensor.
×1
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable
×1
Li-Ion Battery 1000mAh
Li-Ion Battery 1000mAh
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Thinger.io Platform
Thinger.io Platform

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Hot glue gun (generic)
Hot glue gun (generic)

Story

Read more

Schematics

Circuit Diagram

Code

source code

Arduino
#include <WiFiClientSecure.h>
#include <ThingerESP32.h>

#define USERNAME "YOUR_USER_NAME"
#define DEVICE_ID "YOUR_DEVICE_ID"
#define DEVICE_CREDENTIAL "YOUR_DEVICE_CREDENTIAL"

#define SSID "YOUR_WIFI_SSID"
#define SSID_PASSWORD "YOUR_WIFI_PASSWORD"

ThingerESP32 thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);

int bpm;
int spo2;
unsigned long currentMillis;   //hold the current time

//pulse oximeter time period
#define REPORTING_PERIOD_MS     1000
PulseOximeter pox;
uint32_t tsLastReport = 0;
// Callback (registered below) fired when a pulse is detected

void onBeatDetected()
{
    Serial.println("Beat!");
}

//pulse sensor callback function
void measured_pulse(){
    // Make sure to call update as fast as possible
    pox.update();
    if (millis() - tsLastReport > REPORTING_PERIOD_MS) {
      bpm=pox.getHeartRate();
      tsLastReport = millis();
    }
    
}


void setup() {
  Serial.begin(115200);
  Serial.println("Initializing MAX30100");
  // Initialize the PulseOximeter instance and register a beat-detected callback
  pox.begin();
  pox.setOnBeatDetectedCallback(onBeatDetected);
  
  pinMode(LED_BUILTIN, OUTPUT);
  thing.add_wifi(SSID, SSID_PASSWORD);
  thing["spo2"] >> [](pson& out){out= pox.getSpO2();};
  thing["bpm"] >> [](pson& out){out =  bpm ;};
    // more details at http://docs.thinger.io/arduino/
  
 
}

void loop() {
  thing.handle();
  currentMillis = millis();
  measured_pulse();
  
}

Credits

Salah Uddin

Salah Uddin

44 projects • 147 followers
Technology and IoT Hacker, Robot Killer and Drone lover.

Comments