Rucksikaa Raajkumar
Published © CC BY

COVID-19 Remote Health monitoring system ( IoT )

A cost-effective and open source system to data log health measurements in Google sheets and allows the doctor to monitor them from anywhere

IntermediateFull instructions provided2.5 hours13,695

Things used in this project

Hardware components

NodeMCU ESP8266 Breakout Board
NodeMCU ESP8266 Breakout Board
×1
Solderless Breadboard Full Size
Solderless Breadboard Full Size
×1
Heartbeat sensor module
×1
Gravity: DS18B20 Temperature Sensor (Arduino Compatible)
DFRobot Gravity: DS18B20 Temperature Sensor (Arduino Compatible)
×1
Pushbutton switch 12mm
SparkFun Pushbutton switch 12mm
×2
IR tracking sensor module
×1
5 mm LED: Yellow
5 mm LED: Yellow
×1
Two-colour LED module
×1
Resistor 10k ohm
Resistor 10k ohm
×2
Male/Male Jumper Wires
×1

Software apps and online services

Arduino IDE
Arduino IDE
Pushingbox
Google Sheets
Google Sheets

Story

Read more

Schematics

Schematic

I could not get all the components in Fritzing, so I decided to draw the schematic by myself.

Hardware setup

Connections - NodeMCU ESP8266 Breakout board

Code

Threshold value

Arduino
GettingStartedProject.ino
/*  PulseSensor Starter Project and Signal Tester
 *  The Best Way to Get Started  With, or See the Raw Signal of, your PulseSensor.com™ & Arduino.
 *
 *  Here is a link to the tutorial
 *  https://pulsesensor.com/pages/code-and-guide
 *
 *  WATCH ME (Tutorial Video):
 *  https://www.youtube.com/watch?v=RbB8NSRa5X4
 *
 *
-------------------------------------------------------------
1) This shows a live human Heartbeat Pulse.
2) Live visualization in Arduino's Cool "Serial Plotter".
3) Blink an LED on each Heartbeat.
4) This is the direct Pulse Sensor's Signal.
5) A great first-step in troubleshooting your circuit and connections.
6) "Human-readable" code that is newbie friendly."

*/
//  Variables
int PulseSensorPurplePin = 0;        // Pulse Sensor PURPLE WIRE connected to ANALOG PIN 0
int LED13 = 13;   //  The on-board Arduion LED

int Signal;                // holds the incoming raw data. Signal value can range from 0-1024
int Threshold = 550;            // Determine which Signal to "count as a beat", and which to ingore.

// The SetUp Function:
void setup() {
  pinMode(LED13,OUTPUT);         // pin that will blink to your heartbeat!
   Serial.begin(9600);         // Set's up Serial Communication at certain speed.

}

// The Main Loop Function
void loop() {

  Signal = analogRead(PulseSensorPurplePin);  // Read the PulseSensor's value.
                                              // Assign this value to the "Signal" variable.

   Serial.println(Signal);                    // Send the Signal value to Serial Plotter.


   if(Signal > Threshold){                          // If the signal is above "550", then "turn-on" Arduino's on-Board LED.
     digitalWrite(LED13,HIGH);
   } else {
     digitalWrite(LED13,LOW);                //  Else, the sigal must be below "550", so "turn-off" this LED.
   }


delay(10);


}

Google script

JavaScript
//-----------------------------------------------
//Originally published by Mogsdad@Stackoverflow
//Modified for jarkomdityaz.appspot.com
//Modified for Hackster.io by Stephen Borsay
//Modified for Hackster.io COVID19DetectProtect challenge by Rucksikaa Raajkumar
//-----------------------------------------------
/*
GScript, PushingBox and Arduino/ESP8266 Variables in order:

hData
cData
fData
----------------------------------------------------
*/
/* Using spreadsheet API */

function doGet(e) { 
  Logger.log( JSON.stringify(e) );  // view parameters

  var result = 'Ok'; // assume success

  if (e.parameter == undefined) {
    result = 'No Parameters';
  }
  else {
    var id = 'Your spreadsheet URL key';//docs.google.com/spreadsheetURL/d
    var sheet = SpreadsheetApp.openById(id).getActiveSheet();
    var newRow = sheet.getLastRow() + 1;
    var rowData = [];
    //var waktu = new Date();
    rowData[0] = new Date(); // Timestamp in column A
    
    for (var param in e.parameter) {
      Logger.log('In for loop, param='+param);
      var value = stripQuotes(e.parameter[param]);
      //Logger.log(param + ':' + e.parameter[param]);
      switch (param) {
        case 'hData': //Parameter
          rowData[1] = value; //Value in column B
          break;
        case 'cData':
          rowData[2] = value;
          break;
        case 'fData':
          rowData[3] = value;
          break;
        default:
          result = "unsupported parameter";
      }
    }
    Logger.log(JSON.stringify(rowData));

    // Write new row below
    var newRange = sheet.getRange(newRow, 1, 1, rowData.length);
    newRange.setValues([rowData]);
  }

  // Return result of operation
  return ContentService.createTextOutput(result);
}

/**
* Remove leading and trailing single or double quotes
*/
function stripQuotes( value ) {
  return value.replace(/^["']|['"]$/g, "");
}

Credits

Rucksikaa Raajkumar

Rucksikaa Raajkumar

43 projects • 93 followers
Amateur Arduino Developer. Undergraduate. YouTuber (https://www.youtube.com/c/RucksikaaRaajkumar/videos) and Blogger (Arduino Projects by R)

Comments