Professional Documents
Culture Documents
Final
Final
MONITORING SYSTEM
Submitted in partial fulfillment of the requirements for the
award of the degree of
BACHELOR OF ENGINEERING
in
ELECTRONICS AND COMMUNICATION
ENGINEERING
by
MANUKONDA ALEKHYA
GUBBALA MANIKANTA
KUKUNOORI S N M HANUMANTRAO
1
S.R.K.R.ENGINEERING COLLEGE
(Affiliated to JNTU, KAKINADA)
(Recognized by A.I.C.T.E., Accredited By N.B.A &N.A.A.C with ‘A+ Grade , NEW DELHI)
ENGINEERING
CERTIFICATE
This is to certify that this project work entitled
Mr./Miss…………………………………………………………………….
Regd.No……………………………..of final year B.E along with his/her
batch mates submitted in partial fulfillment of the requirement of the award
of Bachelor’s degree in ELECTRONICS &COMMUNICATION
ENGINEERING during the academic year 2020-2024.
2
S.R.K.R.ENGINEERING COLLEGE
(Affiliated to JNTU, KAKINADA)
(Recognized by A.I.C.T.E., Accredited By N.B.A &N.A.A.C with ‘A+’ Grade , NEW DELHI)
ENGINEERING
BONAFIDE CERTIFICATE
This is to certify that this project work entitled "HOLISTIC HEALTH
MONITORING SYSTEM USING IOT "is the bonafide work of
Miss.M.Alekhya(20B91A04E0),Mr.GManikanta(20B91A0484),Mr.J.Vija
y Babu (20B91A0494), Mr. K.S N M HANUMANTRAO (20B91A04C5)
of the final year B. Tech submitted in partial fulfillment of requirements for
the award of Degree in Bachelor of Technology in Electronics and
Communication Engineering during the academic year 2020-2024.
3
CERTIFICATE OF EXAMINATION
This is to certify that I have examined the concept and here by accord
my approval of it as a study carried out and presented in a manner
required for its acceptance on partial fulfillment for the award of the
degree of BACHELOR OF ENGINEERING ELECTRONICS
AND COMMUNICATIONS ENGINEERING for which it has
been submitted. This approval does not necessarily endorse or accept
every statement made, opinion expressed or conclusions drawn as
recorded in the report, it only signifies that acceptance of the report
for the purpose for which it is submitted.
4
ACKNOWLEDGEMENTS
We express our profound gratitude to our project guide Assistant Prof. Sri
departmental facilities and advice whenever needed. We thank one and all
this opportunity for the successful completion of our degree. We would like
to thank other teaching and non-teaching staff for their assistance and help
extended .I thank one and all that have contributed directly or indirectly to
my project.
---Project Team
5
CONTENT
6
ABSTRACT
The ESP32 collects data from these sensors in real-time. This data is then
securely transmitted to a Firebase database. Firebase ensures reliability and
accessibility, allowing both users and healthcare providers to access the
collected health data .To make the system user-friendly, a mobile
application is developed using the Flutter framework. This app provides
real-time access to health metrics obtained from the sensors. Additionally,
it facilitates direct communication between users and healthcare
professionals. Users can schedule virtual consultations, share their health
data securely, and receive personalized recommendations and interventions.
CHAPTER-1
7
INTRODUCTION
care solutions. This project sets out to harness the potential of this synergy
healthcare professionals.
temperature sensing, and a heart rate sensor, the ESP32 orchestrates real-
reliability and accessibility of health data for both users and healthcare
This innovative system not only fosters personalized care but also cultivates
INTERNET OF THINGS
9
The Internet of Things (IOT) is a system of interrelated computing devices,
provided with unique identifiers and the ability to transfer data over a
interaction. In the past decade, all human life changed because of the
internet. The internet of things has been heralded as one of the major
ability to collect and sense data from the world, and then share that data
across the internet where that data can be utilized and processed for various
part of internet: where every object is uniquely identified and access to the
network.
10
communication, bringing a large challenge to existing telecommunication
GPS, laser scanners, gas sensors and so on, can make anything join the
management.
large scale processing unit which processes in run time and it is also a very
low cost technology based on the IP. The application area of IOT includes
CHAPTER-2
SENSORS
11
SP02 SENSOR:
SpO2 sensors typically emit two wavelengths of light, usually red light
(around 660 nm) and infrared light (around 940 nm), through a transparent
Photo detectors on the other side of the body measure the intensity of the
transmitted light after it has passed through the tissue .The photo detectors
measure the intensity of the red and infrared light after passing through the
tissue. The sensor then calculates the ratio of absorption of the red and
infrared light, which is directly related to the oxygen saturation level in the
blood.
SpO2 sensors are calibrated to account for various factors that can affect the
12
oxygen saturation levels, providing valuable information for patient care
and management.
supply the energy your muscles need in order to function, which increases
during a sports activity. If your SpO2 value is below 95%, that could be a
13
highly accurate sensor that has its calibration done in a humidity calibration
The sensors are small and have a 20-meter signal transmission range while
humidity sensing technology to ensure that the product has very high
14
automatic control, data logger, weather station, home appliances, humidity
15
protocol and it can be used to measure temperature in the range of -
received data from the 1-wire can range from 9-bit to 12-bit. Because,
this sensor follows the single wire protocol, and the controlling of
advanced level protocol, where each sensor can be set with a 64-bit
serial code which aids to control numerous sensors using a single pin
temperature sensor. The resolution of this sensor ranges from 9-bits to 12-
bits. But the default resolution which is used to power-up is 12-bit. This
16
within the 2-byte register in the sensor, and after that, this sensor returns to
can provide read time slots next to the Convert T command. The sensor will
ECG SENSOR:
ECG allows you to access the electrical and muscular functions of the heart.
17
activity of the heart over a period of time using electrodes placed on the
skin. These electrodes detect the tiny electrical changes on the skin that arise
It is a very commonly the electrical impulse moves from the atria, which are
the top two chambers, to the ventricles down below, the voltage
how your heart is performing. This provides the person running the test with
A 3-lead ECG is used for continuous monitoring of heartbeat, heart rate, and
heart rhythm in critical situations like when the patient is under anesthesia,
18
ECG Waveform:
of ECG are very important intervals and segments between waves. Every
is delayed in AV node.
QRS Complex:
19
1. depolarization of inter-ventricular septum - the vector is oriented from
than the right ventricle, the vector oriented from right to left and posteriorly.
The Heartbeat rate information knowing is very useful while doing exercise,
overcome this problem, the pulse sensor or heartbeat sensor is used. This is
a plug & play sensor mainly designed for Arduino board which can be used
20
by makers, students, developers, artists who can utilize the heartbeat
information into their projects. This sensor uses an easy optical pulse sensor
this circuit, we can get fast and reliable heartbeat readings. This circuit can
the system, Pin-2 (VCC): Red Color Wire – It is connected to the supply
voltage (+5V otherwise +3.3V) of the system, Pin-3 (Signal): Purple Color
+5V otherwise +3.3V,This is a plug and play type sensor ,The current
21
issues applications.
WIFI:
Firebase database.
22
The ESP32 microcontroller, equipped with Wi-Fi capabilities, establishes a
collected health and environmental data to the Firebase database for storage
and analysis. This wireless communication eliminates the need for physical
robust security features, and high data transfer speeds make it an ideal
23
Wi-Fi enables wireless connectivity, high-speed data transmission, and
CHAPTER – 3
CONTROL BOARDS
ARDUINO BOARD :
24
ARDUINO is a both an open source software library and an open source
breakout board for the popular AVR micro-controllers. The Arduino IDE
Arduino board is the physical board that stores and performs the code
uploaded to it. Both the software package and the board are referred to as
"Arduino".
and software Arduino IDE to program it. Other external hardware like
Sensor Modules, motors, lights etc. could be attached with the board.
25
everything needed to support the microcontroller, simply connect it to a
to get started. The Uno differs from all preceding boards in that it does not
use the FTDIUSB-to- serial driver chip. Instead, it features the Atmega8U2
ESP32 BOARD:
ESP32 is far superior than Arduino UNO and an ESP8266, which does not
mean that it is ideal for any project, since to get the most out of this
microcontroller, lets learn what it is and how it works and what are its
26
special features when compared with other microcontroller boards. ESP32
is a series of SoC (System on a Chip) and modules which are low cost with
popular with its inbuilt WiFi). ESP32 not only has Built in WiFi but also
has Bluetooth and Bluetooth Low Energy. In other words we can define
chip’s quiescent current is less than 5 μA which makes it the ideal tool for
board that's widely used in IoT (Internet of Things) projects. It features dual-
core processors, Wi-Fi and Bluetooth connectivity, ample GPIO pins, and
support for various interfaces like SPI, I2C, and UART. It's popular for its
27
Overall, the ESP32 board is known for its versatility, low power
ARCHITECTURE:
28
The system Block Diagram revolves around the ESP32 microcontroller,
which serves as the central processing unit responsible for data aggregation,
The ESP32 collects data from these sensors in real-time and transmits it
29
platform for storing and retrieving health data, ensuring accessibility for
both users and healthcare professionals. The use of Firebase also enables
processing, and communication between the mobile app and the database.
Optional machine learning algorithms can analyze data for insights and
providers.
HARDWARE SET-UP:
• Arduino Board: The central control unit for interfacing with sensors
30
and transmitting data.
heart rate.
platform.
31
Humidity Sensor, and a Pulse Oximeter for oxygen saturation and heart rate
CHAPTER-4
REAL-TIME DATABASE
FIREBASE:
32
Firebase is a product of Google which helps developers to build, manage,
and grow their apps easily. It helps developers to build their apps faster and
storage. It uses No SQL for the database for the storage of data.
various backend services essential for building and scaling mobile and web
33
suitable for a wide range of applications .In addition to databases, Firebase
Facebook, Twitter), and more. This simplifies the process of managing user
SQL database that manages your data at the blazing speed of milliseconds.
34
35
INTERFACE WITH MOBILE:
Flutter is Google’s Mobile SDK to build native iOS and Android apps from
which the Flutter apps are built. The User Interface of the app comprises
many simple widgets, each handling one particular job. That is why Flutter
toolkit for building native interfaces efficiently. At its core are widgets,
which are not only the fundamental building blocks of the UI but also the
platforms.
One of Flutter's standout features is its support for both Material Design and
Cupertino, the design languages of Android and iOS respectively. This dual-
36
support allows developers to create apps that not only look native but also
like interfaces and Cupertino widgets for iOS-like interfaces, developers can
results in real-time without the need for lengthy compile times or manual
Mobile Application:
The mobile application developed using the Flutter framework serves as the
primary interface for users to interact with their health data. The application
temperature, humidity, and heart rate measurements. Users can view their
37
health metrics in graphical format, track trends over time, and set
One of the key features of the mobile application is its ability to facilitate
healthcare delivery.
Code:
import 'package:flutter/material.dart';
import 'package:firebase_database/firebase_database.dart';
import 'package:firebase_core/firebase_core.dart';
import 'dart:async';
import 'package:chart_sparkline/chart_sparkline.dart';
import 'setting.dart';
38
//String d="sdfgh";
Widget build(BuildContext context) {
return MaterialApp(
title: 'Final year project',
theme: ThemeData(
primarySwatch: Colors.blue,
),
debugShowCheckedModeBanner: false,
home: MyHomePage(),
);
}
}
@override
_MyHomePageState createState() => _MyHomePageState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.greenAccent,
title: Text('HOLISTIC HEALTH MONITORING',style:
TextStyle(fontSize: 15),),
actions: [
IconButton(
onPressed: () {
showDialog(
context: context,
39
TextButton(
child: Text("OK"),
onPressed: () {
Navigator.of(context).pop();
},
),
],
);
},
);
},
icon: Icon(Icons.sos),
),
],
),
body: _widgetOptions[_selectedIndex],
bottomNavigationBar: BottomNavigationBar(
items: [
BottomNavigationBarItem(icon: Icon(Icons.home), label:
'Home',),
BottomNavigationBarItem(icon: Icon(Icons.history), label:
'History',),
BottomNavigationBarItem(icon: Icon(Icons.settings), label:
'Settings',)
],
currentIndex: _selectedIndex,
selectedItemColor: Colors.greenAccent,
onTap: _onItemTapped,
),
);
}
}
class HomeScreen extends StatefulWidget {
@override
State<HomeScreen> createState() => _HomeScreenState();
}
40
String S='0';
String sr='';
String rq='°C';
String rq1='°F';
String we='%';
//double sps;
//Int bpm;
List<double> er = [];
List<double> r2List = [];
void dequeue() {
setState(() {
if (queueList.isNotEmpty) {
queueList.removeAt(0);
}
});
}
@override
void initState() {
super.initState();
_re = FirebaseDatabase.instance.ref().child('ECG/Value');
_ref = FirebaseDatabase.instance.ref().child('DHT11/Humidity');
_tem= FirebaseDatabase.instance.ref().child('DHT11/Temperature');
_r = FirebaseDatabase.instance.ref().child('DS18B20/Temperature');
_rq = FirebaseDatabase.instance.ref().child('PulseSensor/BPM');
_re.onValue.listen((DatabaseEvent event) {
setState(() {
r2 = event.snapshot.value.toString() ?? '';
if (r2.isNotEmpty && double.tryParse(r2) != null) {
double r2Double = double.parse(r2);
er.add(r2Double);
updateR2List(r2Double); // Add this line to update r2List
}
});
});
_tem.onValue.listen((event) {
setState(() {
r3 = event.snapshot.value.toString() ?? '';
});
});
_r.onValue.listen((event) {
setState(() {
r1 = event.snapshot.value.toString() ?? '';
});
});
double calculateSpO2(double bpm) {
// This is just a simple example formula for demonstration
purposes
// In real-world scenarios, you would use more sophisticated
41
models or lookup tables
double spo2 = 95 - ((bpm - 60) / 5); // Example formula
return spo2.clamp(70, 100); // Clamp the value between 70 and 100
}
_rq.onValue.listen((event) {
setState(() {
BPM = event.snapshot.value.toString() ?? '';
if (BPM.isNotEmpty && double.tryParse(BPM) != null) {
double BPR = double.parse(BPM);
double IR=BPR-40;
irString = IR.toString();
sps = calculateSpO2(IR);
//print('f:$IR');
print('IR: $sps');
//double bpr = double.parse(BPM); // Assuming default value
is 0 if parsing fails
}//BPM = bpm;
});
});
_ref.onValue.listen((event) {
setState(() {
_textData = event.snapshot.value.toString() ?? '';
});
});
}
@override
Widget build(BuildContext context) {
return Container(height: 646,
child: Center(
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(color: Colors.black,
height: 240,
width: double.infinity,
//decoration: BoxDecoration(
///color: Colors.black,
//borderRadius: BorderRadius.circular(10),
//),
child:Sparkline(
data: r2List,
lineColor: Colors.white,
42
),
),
Text("ECG GRAPH", style: TextStyle(fontSize: 20,),),
//SizedBox(height: 35),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_buildSensorBox('ECG DATA:',
r2,r4,Icons.monitor_heart_rounded),
_buildSensorBox('Body Temparature:',
r1,rq,Icons.thermostat_auto_outlined),
],
),
//SizedBox(height: 20),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_buildSensorBox('Humidity:',
_textData,r5,Icons.water),
_buildSensorBox('Temparature:',
r3,rq,Icons.thermostat),
],
),
//SizedBox(height:20),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_buildSensorBox('BPM:',irString,r4,Icons.favorite),
_buildSensorBox('SP02:',sps.toString(),we,Icons.health_and_safety_round
ed),
],
),
//_buildSensorBox('Temparature:', r3),
],
),
),
),
);
}
Widget _buildSensorBox(String title, String data,String
data1,IconData icon) {
return Container(
padding: EdgeInsets.all(10),
margin: EdgeInsets.only(bottom: 20),
width: 120,
decoration: BoxDecoration(
border: Border.all(color: Colors.green),
borderRadius: BorderRadius.circular(10),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: TextStyle(fontSize: 15, fontWeight:
43
FontWeight.bold),
),
SizedBox(height: 5),
Row(
children:<Widget>[
Icon(icon),
//Icon(Icons.favorite, color: Colors.red, size: 24.0),
Text(
data,
style: TextStyle(fontSize: 12),
),
Text(data1)
//Icon(Icons.warning),
//Icon(Icons.favorite, color: Colors.red, size: 24.0)
],
),
],
),
);
}
}
44
List<double> r2List = [];
void dequeue() {
setState(() {
if (queueList.isNotEmpty) {
queueList.removeAt(0);
}
});
}
@override
void initState() {
super.initState();
_re = FirebaseDatabase.instance.ref().child('ECG/Value');
_ref = FirebaseDatabase.instance.ref().child('DHT11/Humidity');
_tem= FirebaseDatabase.instance.ref().child('DHT11/Temperature');
_r = FirebaseDatabase.instance.ref().child('DS18B20/Temperature');
_rq = FirebaseDatabase.instance.ref().child('PulseSensor/BPM');
_re.onValue.listen((DatabaseEvent event) {
setState(() {
r2 = event.snapshot.value.toString() ?? '';
if (r2.isNotEmpty && double.tryParse(r2) != null) {
double r2Double = double.parse(r2);
er.add(r2Double);
updateR2List(r2Double); // Add this line to update r2List
}
});
});
_tem.onValue.listen((event) {
setState(() {
r3 = event.snapshot.value.toString() ?? '';
});
});
_r.onValue.listen((event) {
setState(() {
r1 = event.snapshot.value.toString() ?? '';
});
});
double calculateSpO2(double bpm) {
// This is just a simple example formula for demonstration
purposes
// In real-world scenarios, you would use more sophisticated
models or lookup tables
double spo2 = 95 - ((bpm - 60) / 5); // Example formula
return spo2.clamp(70, 100); // Clamp the value between 70 and 100
}
_rq.onValue.listen((event) {
setState(() {
BPM = event.snapshot.value.toString() ?? '';
45
if (BPM.isNotEmpty && double.tryParse(BPM) != null) {
double BPR = double.parse(BPM);
double IR=BPR-40;
irString = IR.toString();
sps = calculateSpO2(IR);
//print('f:$IR');
print('IR: $sps');
//double bpr = double.parse(BPM); // Assuming default value
is 0 if parsing fails
}//BPM = bpm;
});
});
_ref.onValue.listen((event) {
setState(() {
_textData = event.snapshot.value.toString() ?? '';
});
});
}
@override
Widget build(BuildContext context) {
return SingleChildScrollView(scrollDirection: Axis.vertical,
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'Temparature data',
style: TextStyle(fontSize: 24),
),
SizedBox(height: 20),
Container(
width: 300,
height: 200,
child: Sparkline(enableGridLines: true,
data: data,
lineColor: Colors.blue,
pointsMode: PointsMode.all,
pointSize: 8.0,
),
),
SizedBox(height: 35),
Text(
'heartbeat data ',
style: TextStyle(fontSize: 24),
),
Container(
46
width: 300,
height: 200,
child: Sparkline(enableGridLines: true,
data: data,
lineColor: Colors.blue,
pointsMode: PointsMode.all,
pointSize: 8.0,
),
),
SizedBox(height: 35),
Text(
'spo2 data ',
style: TextStyle(fontSize: 24),
),
Container(
width: 300,
height: 200,
child: Sparkline(enableGridLines: true,
data: data,
lineColor: Colors.blue,
pointsMode: PointsMode.all,
pointSize: 8.0,
),
),
],
),
),
);
}
}
47
name: 'J VIJAY BABU',
destination: 'B.tech',
),
ProfileRow(
photo: AssetImage('assets/profile_photo.jpg'),
name: 'G MANIKANTA',
destination: 'B.tech',
),
Text('Mentor',style: TextStyle(fontSize: 35),),
ProfileRow(
photo: AssetImage('assets/profile_photo.jpg'),
name: 'Sri.V. RAMA KRISHNA ',
destination: 'M.tech(Assistant Professor,Srkrec)',
),
] ),
),
);
}
}
const ProfileRow({
required this.photo,
required this.name,
required this.destination,
});
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.grey[200],
borderRadius: BorderRadius.circular(10),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
CircleAvatar(
radius: 30,
backgroundImage: photo,
),
SizedBox(width: 20),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
name,
style: TextStyle(fontSize: 20, fontWeight:
FontWeight.bold),
),
Text(
destination,
style: TextStyle(fontSize: 16, color: Colors.grey),
48
),
],
),
],
),
);
}
}
49
50
51
CHAPTER-5
RESULTS
52
53
54
ADVANTAGES:
PATIENTS:
locations.
DOCTOR:
CONCLUSION:
55
The proposed IOT-based Holistic health monitoring system represents a
well-being.
56
FUTURE SCOPE:
healthcare services.
in the field.
57
REFERENCES:
• https://www.ijert.org/research/iot-based-system-for-
heart-rate-monitoring-IJERTV9IS070673.pdf
• https://ieeexplore.ieee.org/document/8455124?arnumber
=8455124
• https://ieeexplore.ieee.org/document/8455124?arnumber
=8455124
• https://ieeexplore.ieee.org/xpl/RecentIssue.jsp?punumbe
r=5326
58