Mini Project Report
Mini Project Report
Mini Project Report
➢ GROUP
NO : 16
Title of
Project
Objectives RAMYA – Construction and developing code
JUSTIN RITHESH – Construction and Working of hardware
DHARUN – Integrating Node MCU
Hardware ➢ MAX30100 Sensor(3.3V)
used
➢ NODE MCU(ES8266)
➢ i2clcd 16x2(DISPLAY)
➢ JUMPER WIRES
Arduino provides a standard form factor that breaks the functions of the
micro-controller into a more accessible package.
Project #include<LiquidCrystal.h>
Code int rs=13,en=12,d4=11,d5=10,d6=9,d7=8;
LiquidCrystal lcd(rs,en,d4,d5,d6,d7);
#include<SoftwareSerial.h>
SoftwareSerial Serial1(6,7);
#include <OneWire.h>
#include <DallasTemperature.h>
#include <Wire.h>
#include "MAX30100_PulseOximeter.h"
#define REPORTING_PERIOD_MS 1000
#include "HX711.h"
#define LOADCELL_DOUT_PIN 5
#define LOADCELL_SCK_PIN 4
int relay=3;
HX711 scale;
float units;
#define ONE_WIRE_BUS 2
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
float temperature;
// Timer variables
unsigned long lastTime = 0;
unsigned long timerDelay = 30000;
PulseOximeter pox;
uint32_t tsLastReport = 0;
void Init_spo2();
void SEND_SMS( char *num1, char * str1 );
void onBeatDetected()
{
Serial.println("Beat Detected!");
}
void setup()
{
lcd.begin(16,2);
lcd.clear();
lcd.print("SALINE MONITORING");
lcd.setCursor(0,1);
lcd.print("SYSTEM");
pinMode(relay,OUTPUT);
digitalWrite(relay,LOW);
Serial.begin(9600); //Initialize serial
Serial1.begin(9600);
scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
scale.set_scale(calibration_factor); //This value is obtained
by using the SparkFun_HX711_Calibration sketch
scale.tare();
Serial.print("Initializing pulse oximeter..");
if (!pox.begin()) {
Serial.println("FAILED");
for (;;);
} else {
Serial.println("SUCCESS");
pox.setOnBeatDetectedCallback(onBeatDetected);
}
pox.setIRLedCurrent(MAX30100_LED_CURR_7_6MA);
Serial.print("SALINE MONITORING");
Serial.println("SYSTEM...");
delay(1000);
}
void Init_spo2()
{
Serial.print("Initializing pulse oximeter..");
if (!pox.begin()) {
Serial.println("FAILED");
for (;;);
} else {
Serial.println("SUCCESS");
pox.setOnBeatDetectedCallback(onBeatDetected);
}
pox.setIRLedCurrent(MAX30100_LED_CURR_7_6MA);
}
void loop()
{
int i=0;
while(i<10000)
{
pox.update();
BPM = pox.getHeartRate();
SpO2 = pox.getSpO2();
Serial.print("SpO2: ");
Serial.print(SpO2);
Serial.println("%");
lcd.clear();
lcd.print("BP:");
lcd.print(BPM);
lcd.setCursor(0,1);
lcd.print("SpO2:");
lcd.print(SpO2);
lcd.print("%");
// delay(1000);
if(BPM>150)
{
lcd.clear();
lcd.print("HEARTRATE IS");
lcd.setCursor(0,1);
lcd.print("HIGH");
Serial.println("HEARTRATE IS HIGH");
SEND_SMS("8310776314","HEARTRATE IS HIGH..");
// delay(1000);
}
tsLastReport = millis();
}
i++;
}
lastTime = millis();
// Init_spo2();
Weight();
TEMP_MEASUREMENT();
}
void Weight()
{
scale.set_scale(calibration_factor); //Adjust to this
calibration factor
units=scale.get_units()/10;
if(units <0)
{
units=0.0;
}
Serial.print("Weight: ");
Serial.print(units);
Serial.println("gms"); //Change this to kg and re-adjust the
calibration factor if you follow SI units like a sane person
Serial.println();
// delay(1000);
lcd.clear();
lcd.print("SALINE WEIGHT=");
lcd.setCursor(0,1);
lcd.print(units);
delay(1000);
if((units <20.0))
{
digitalWrite(relay,LOW);
lcd.clear();
lcd.print("SALINE LEVEL ");
lcd.setCursor(0,1);
lcd.print("IS LOW");
Serial.println("SALINE LEVEL IS LOW");
SEND_SMS("8310776314","SALINE LEVEL IS LOW..");
delay(1000);
}
else
{
digitalWrite(relay,HIGH);
}
}
void TEMP_MEASUREMENT()
{
sensors.requestTemperatures();
temperature = sensors.getTempCByIndex(0);
Serial.print("Temperature: ");
Serial.println(temperature);
lcd.clear();
lcd.print("Temperature: ");
lcd.setCursor(0,1);
lcd.print(temperature);
delay(1000);
if(temperature>30)
{
lcd.clear();
lcd.print("TEMPERATURE");
lcd.setCursor(0,1);
lcd.print("IS HIGH");
Serial.println("TEMPERATURE IS HIGH");
SEND_SMS("8310776314","TEMPERATURE IS HIGH..");
delay(1000);
}
Init_spo2();
}
Demonstrati
on Video https://drive.google.com/file/d/15M52OkZhSCTqXANSt2SBQv18KGmnXWYY/view?
(Youtube usp=sharing
Link)
Outcomes MAX30100 Sensor-
➢ The MAX30100 can detect heart rate and pulse oximetry, which indicates
the oxygen level of blood. However, it is unable to measure blood pressure.
NODE MCU-
➢ PROTOTYPING
➢ SENSOR INTEGRATION
➢ WEB SEVER CAPABILITY
➢ DEVELOP IOT APPLICATION
➢ PROVIDING VERSATILE
➢ COST EFFECTIVE
Future
Scope To do an extensive literature survey on existing “Implementation of non-invasive
blood glucose level monitoring system” and come up with a unique and innovative
idea for implementation of non-invasive system.
Reference
Links/ https://in.docworkspace.com/d/sINK47pNk1OjrrwY
Research
paper links
2
JUSTIN RATHISH 2360634 Construction and Working of hardware
3
DHARUN A 2363024 Integrating Node MCU