Mini Project Report

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

MINI PROJECT

➢ GROUP
NO : 16

# Student Name Register No


1 S RAMYA 2362202
2 JUSTIN RITHESH R 2360634
3 DHARUN A 2363024

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

Software Arduino IDE


used
Arduino is a prototype platform (open-source) based on an easy-to-use
hardware and software. It consists of a circuit board, which can be programed
(referred to as a microcontroller) and a ready-made software called Arduino
IDE (Integrated Development Environment), which is used to write and
upload the computer code to the physical board.

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

#define calibration_factor 200

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;

float BPM, SpO2;

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();

if (millis() - tsLastReport > REPORTING_PERIOD_MS)


{
//
Serial.print("BP: ");
Serial.println(BPM);

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();
}

void SEND_SMS( char *num1, char * str1 )


{
char buff[10],i=0;
//while(i<3)
//{
Serial1.write('A');
delay(100);
Serial1.write('T');
delay(100);
Serial1.write('E');
delay(100);
Serial1.write('0');
delay(100);
Serial1.write('\r');
//i++;
// recvResponse(buff);
//Serial.print("AT sent");
//*****************************************
Serial1.write("AT+CMGF=1\r"); //Initialize GSM For mobile
delay(2000);
//Serial.print("cmgf sent");
// sendSMS("9071295134","hiiiii");
// recvResponse(buff);
delay(2000);
//Serial.print("ATcmgf sent");
Serial1.write("AT+CMGS=\"");
delay(2000);
Serial1.write(num1);
delay(2000);
Serial1.write("\"\r");
// gsmSerial.write("AT+CNMI=0,0,0,0\r"); //Disabling
unsolicited sms indication.
// recvResponse(buff);
//recvResponse(buff);
Serial1.write(str1);
delay(2000);
Serial1.write(26);
delay(2000);
Serial.print("sms sent");
//}
}
Hardware
Setup
(Photo)

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.

* To learn the different hardware and software involved in designing non-invasive


blood glucose level monitoring device and develop a platform to display the blood
glucose concentration level.
* To make the device as portable and enable to data transfer with cloud.
To design a portable blood glucose level monitoring device using Noninvasive
method.
* To design inexpensive, continuous self-monitoring device for Diabetic Patients.
*To enable the doctor to remotely monitor the glucose concentration using web
application.

Reference
Links/ https://in.docworkspace.com/d/sINK47pNk1OjrrwY
Research
paper links

# Team Member Register No Contributions in Project


1
S RAMYA 2362202 Construction ,developing code and report
writing.

2
JUSTIN RATHISH 2360634 Construction and Working of hardware

3
DHARUN A 2363024 Integrating Node MCU

You might also like