0% found this document useful (0 votes)
64 views41 pages

Department of ECE, GMRIT

1. The document discusses a wearable health monitoring system that uses sensors to measure vital signs like temperature and pulse rate. 2. The system consists of sensors connected to an Arduino board that collects data and sends it wirelessly via WiFi to a smartphone app. This allows remote monitoring of a person's health. 3. The goal is to help monitor health in at-risk patients and reduce deaths from unpredictable conditions like heart attacks by detecting problems early.

Uploaded by

Anusha setti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views41 pages

Department of ECE, GMRIT

1. The document discusses a wearable health monitoring system that uses sensors to measure vital signs like temperature and pulse rate. 2. The system consists of sensors connected to an Arduino board that collects data and sends it wirelessly via WiFi to a smartphone app. This allows remote monitoring of a person's health. 3. The goal is to help monitor health in at-risk patients and reduce deaths from unpredictable conditions like heart attacks by detecting problems early.

Uploaded by

Anusha setti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

1.

INTRODUCTION

Internet of Things (IOT) is widely used in connecting devices and collecting data
information. Internet of Things is used with IOT frameworks to handle and interact with data and
information. In the system users can register their sensors, create streams of data and process
information. IOT are applicable in various methodologies of agriculture. Applications of IOT are
Smart Cities, Smart Environment, Smart Water, Smart Metering, Security and Emergency,
Industrial Control, Smart Agriculture, Home Automation, e-Health etc. ‘Internet of Things’ is
based on device which is capable of analyzing the sensed information and then transmitting it to
the user.
There are certain health conditions that are completely unpredictable. People who are at
risk of collapsing, cardiac arrest, heart attack and stroke are most likely to be found dead when it's
too late. According to CDC, heart-failure ranks first in their list of the top leading causes of death
while stroke ranks fourth.
Vital signs are measurements of the body's most basic functions. The four main vital signs
routinely monitored by medical professionals and health care providers include the following:
1.Body Temperature
2.Pulse Rate
3.Respiration Rate
4.Blood Pressure
Wearable Health Monitoring System is an innovative solution for detecting and locating
a person whose health is in grave danger. It's mostly designed as a remote rescue system for people
who are at risk of having stroke, cardiac arrest and heart attack .This mini project is a smartphone
synced mobile health monitoring bracelet capable of reading a human's vital signs (pulse rate and
body temperature).
This mini project helps us to know the health conditions of our beloved ones even when
we are not there with them. We can monitor their health remotely through an application in our
phone. This will eventually reduce death cases causing due to these type of unpredictable diseases.

Department of ECE, GMRIT Page 1


Wearables have been around far longer than most technology enthusiasts realize. As early as the
17th century, Chinese abacus rings allowed wearers to perform mathematical tasks long before
calculators were invented. Talk about problem solving at your fingertips!

Some early adopters of cool wearable tech sought the status that comes with being the first
to devices like smart watches and Google Glass .The potential benefits of wearables go beyond
style and status. In fact, wearable technology may be on the cusp of transforming health care.
Already, over 88% of physicians encourage patients to monitor their health stats at home, and
wearable technology such as fitness and sleep trackers can do just that. By 2018, the majority of
healthcare organizations worldwide are projected to invest in wearables, remote healthcare
monitoring, and consumer-facing apps. Wearables have the potential to even contribute to lower
hospital care costs and more affordable health insurance!

And that’s not all. Wearable technology has already proven its usefulness in the workplace,
with employees reporting an 8.5% increase in productivity when they are allowed to use wearable
devices on the job.

The need for such an autonomous system to sense and monitor human body struck us upon
reading news articles relating to death caused due to heart diseases. The major reason for death
today is due to heart attack followed by accidents. It is a challenge to know your body completely
and predict its malfunctioning. If a person is suffering a heart attack but is not noticed by someone,
or if noticed after a delay, can lead to fatal incidents. This can only be prevented by either being
healthy (exercise), eating healthy or by constantly monitoring the body parameters. Today human
is so immensely busy with his work that he seldom finds time to exercise.

With the evolution of fast food and vitamin tablets, humans lack a healthy food enriched
with natural proteins, fibers, energy, vitamins, etc. This has consequently led to improper diet
which is also an essential requirement for healthy body. All these issues lead to only one option
which is to monitor human body constantly.

Department of ECE, GMRIT Page 2


2.LITERATURE SURVEY
The vital body parameters are pulse rate, body temperature, blood pressure, etc. The pulse
rate or heart beats is monitored using ECG machines in hospitals. The machine consists of several
sensing nodes that are to be pasted on chest and are usable only once. Then there are wires that
connect the sensing nodes with dedicated The whole setup is large in size, more complex and
costly. Also, one must always be in a room in order to be monitored by these dedicated machines
constantly. The second body parameter, to be monitored is body temperature. The normal human
body temperature is 36.5–37.5 °C (97.7–99.5 °F) and during fever it is >37.5 or 38.3 °C (99.5 or
100.9 °F) as per survey of CDC. Along with this there is another condition known as Hyperpyrexia.
In this situation, the body temperature is >40.0 or 41.0 °C (104.0 or 105.8 °F). This is considered
a medical emergency and requires immediate treatment Hence, there is also a need for constant
monitoring of body temperature.

The next important parameter is blood pressure. To monitor this we must fasten a cuff on
our biceps. Then pressure is applied and the cuff is inflated and then slowly pressure is slowly
released. The then flowing blood gives the blood pressure of the human. These traditional
approaches lack one or the other thing for constant monitoring of the human body. Hence, there is
an indispensable need for a system which is less complicated and easy to use, which will monitor
the vital body parameters. To bridge the gap, such system is under development at an experimental
level. There are companies which offer similar products. But again there are some design issues,
hardware issues and so.

This band is nothing but a connection of Arduino Uno, pulse sensor, temperature sensor
and Wi-Fi module which is altogether. The band can be further made more convenient or minimum
in size by using wearable board.

The IOT technology explains the hardware architecture, network architecture and software
process control of the wearable health monitoring band. The software collects data from the sensors
in a feedback loop depending on that activates the control devices based on threshold value.

T. O. Takpor and A. A. Atayero are with Electrical and Information Engineering


Department, Covenant University, Nigeria have published a survey paper titled ‘Integrating
Internet of Things and EHealth Solutions for Students’ Healthcare’. This paper draws an attention

Department of ECE, GMRIT Page 3


towards the need for monitoring vital health parameters in case of students. The paper explains
how important a student’s health is for his academic and his co-curriculum achievements. It
mentions how being healthy and knowing our essential body parameters is, in order to be focused
on our daily activities. Similar project was under construction by a student from Philippines named
Angelo S. Casimiro who intended to demonstrate it in Google Science fair 2015. In his project,
Angelo had used Bluetooth module to connect the band with the smartphone. From smart phone,
the data would be then sent to his website. Here the vital conditions would be checked. There are
companies that are offering similar products, but the cost and usability of such product is not
convenient.

Department of ECE, GMRIT Page 4


3. PROBLEM IDENTIFICATION AND OBJECTIVES

Problem Identification:

Today, the humans are completely dependent on technology and are struggling hard to
make it more advanced. People have made their life more complex and busy. In their busy
schedule they don’t bother for their health. Hence, we have developed a project titled
“Wearable Health Monitoring System”. The purpose of this mini project is to
autonomously monitor the health of the person .This health band can sense body
temperature and pulse rate of a person.

Objective:

Our mini project focuses on application of IoT in health care. The proposed ideas of using
internet of things in healthcare consist of a smart health band, mounted with pulse and
temperature sensor. This band is used for live monitoring of the mentioned health
parameters. We can watch the patient’s health conditions from anywhere and necessary
precautions can be taken in case of emergency.

Department of ECE, GMRIT Page 5


4.BLOCK DIAGRAM OF WEARABLE HEALTH MONITORING SYTEM

This system is a four tier architecture, which consists of sensor module, communication
module, cloud module and android application module. Fig.4.1 gives a diagrammatic
overview of the system. Each tier performs the exact necessary task. The first tier, sensing
module consists of the two sensors, pulse sensor and temperature sensor. The sensed values
are then reverted to the Arduino Uno for calculations and conversions. The second tier is
the communication tier. This module focuses sending the collected values to the intended
machine / cloud / computing devices. It uses Wi-Fi module to connect to the internet and
to create a communication with the intended cloud platform. The third tier is the cloud
module consisting of the cloud that is used for storing and displaying data. The cloud
service used for this project is an open source cloud named Thing speak. The final tier is
the android application module which displays the data on the cloud.

ESP8266 Android
Pulse sensor - Cloud application
WIFI shield
Temperature www.thin
sensor gspeak.co
m

Figure.4.1. Block Diagram of wearable health monitoring system

Department of ECE, GMRIT Page 6


5.COMPONENTS

5.1 ARDUINO:

Arduino was born at the Ivrea to new needs and challenges, differentiating its offer from
simple 8-bit boards to products for IoT applications, wearable,3D printing, and embedded
environments. All Arduino boards are completely open source, empowering users to build them
independently and eventually adapt them to their particular needs. The too, is open-source, and it
is growing through the contributions of users worldwide.

Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller


platforms. The least expensive version of the Arduino module can be assembled by hand, and even
the pre-assembled Arduino modules cost less than $50.

Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX, and Linux
operating systems. Most microcontroller systems are limited to Windows.
Simple, clear programming environment - The Arduino Software (IDE) is easy-touse for
beginners, yet flexible enough for advanced users to take advantage of as well. For teachers, it's
conveniently based on the Processing programming environment, so students learning to program
in that environment will be familiar with how the Arduino IDE works.

Open source and extensible software - The Arduino software is published as open source
tools, available for extension by experienced programmers. The language can be expanded through
C++ libraries, and people wanting to understand the technical details can make the leap from
Arduino to the AVR C programming language on which it's based. Similarly, you can add AVRC
code directly into your Arduino programs if you want to.

Arduino UNO:

The UNO is the best board to get started with electronics and coding. If this is your first
experience tinkering with the platform, the UNO is the most robust.

Department of ECE, GMRIT Page 7


The UNO is the most used and documented board of the whole Arduino family. Uno" means one
in Italian and was chosen to mark the release of Arduino Software (IDE) 1.0. The Uno board and
version 1.0 of Arduino Software (IDE) were the reference versions of Arduino, now evolved to newer
releases. The Uno board is the first in a series of USB Arduino boards, and the reference model for
the Arduino platform; for an extensive list of current, past or outdated boards see the Arduino index
of boards. Arduino board is shown in Fig. 5.1.
Arduino Uno is a microcontroller board based on the ATmega328P. It has 14 digital input/output
pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz

Figure.5.1. Arduino Uno

crystal, a USB connection, a power jack, an ICSP header and a reset button. It contains everything
needed to support the microcontroller; simply connect it to a computer with a USB cable or power
it with a AC-to-DC adapter or battery to get started. You can tinker with your UNO without
worrying too much about doing something wrong, worst case scenario you care place the chip for
a few dollars and start over.

Arduino pin description:


Each of the 14 digital pins on the UNO R3 can be used as an input or output (they operate at 5
Volts and provide/receive a maximum of 40mA and has an internal pull-up resistor (disconnected
by default) of 20-50 Kohms.

Department of ECE, GMRIT Page 8


In addition, some pins also have specialized functions:

• Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.

These pins are connected to the corresponding pins of the ATmega8U2 USB-toTTL

Serial chip.

• External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value.
• PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.

• SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication
using the SPI library.
• LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value,
the LED is on, when the pin is LOW, it’s off.
• The UNO R3 has 6 analog inputs, labelled A0 through A5, each of which provide

10 bits of resolution (i.e. 1024 different values). By default, they measure from ground to 5
volts, though is it possible to change the upper end of their range using the AREF pin and
the analogReference () function.

Additionally, some pins have specialized functionality.

5.2 LM35 TEMPERATURE SENSOR

It is a small thermistor type temperature sensor. The sensor outputs 0.5V at 0oC, 0.75V at
25oC. The sensor gives a 10mV power for change in every degree Celsius. Performing an analog
to digital conversion, will give the body temperature in digital format. The sensor has to be in
contact with the body for constant monitoring of body temperature. This wearable e-textile
technology is developed by Leah Buechley and SparkFun. It was designed by considering the
necessity to be able to sew it into clothing. The sensor is 20mm or 0.2cm in diameter and 0.8mm
thick. This makes the sensor to be freely used anywhere. The sensor has three pins namely, ‘S’,
‘+’, ‘-’ for connecting to any microprocessor..

Department of ECE, GMRIT Page 9


LM35 is having 3 pins, namely:

• VCC: Supply voltage

• Vout: Output

• GND: Ground

Figure.5.2. lm35 temperature sensor

It give the readings in centigrade(degree Celsius)since its output voltage is linearly proportional
to temperature. It uses the fact that as temperature increases, the voltage across diode increases

Figure.5.3. Specifications of lm35

Department of ECE, GMRIT Page 10


known rate(actually the drop across base-emitter junction of transistor). Its disadvantage is its
sluggish response. Check above fig 5.2 and 5.3 for lm35 sensor.

Interfacing Temperature Sensor and Arduino:

The ‘Vout’ terminal of temperature sensor is connected to the A0 pin of Arduino. The ‘+’ terminal
to the 5V pin and ‘-’ to the GND pin of Arduino. The Analog to Digital Converter (ADC) converts
analog values into a digital approximation based on the formula ADC Value = sample * 1024 /
reference voltage (+5v). So with a +5 volt reference, the digital approximation will = input voltage
* 205. The connections for connecting the soil temperature sensor LM35 to the Arduino are as
follows. Connections are shown in Fig 5.4.

• VCC of LM35 to 5V of Arduino

• GND of LM35 to GND of Arduino

• Vout of LM35 to A0 of Arduino

Figure.5.4. Interfacing Temperature Sensor and Arduino

Department of ECE, GMRIT Page 11


5.3 PULSE SENSOR:

Pulse sensor used for this mini project is a simple plug and play heart-rate sensor for Arduino.
The sensor is a combination of a simple optical heart sensor with amplification. The circuitry also
consists of noise cancellation circuit which makes the sensor fast and more reliable. The power
requirement of this sensor is very less i.e., just 4mA current draw at 5V. This sensor is 1.59cm in
diameter and 0.32cm in thickness. The sensor comes with a 24 inches or 60cm long cable to
connect to an Arduino with a male connector at the end.
The working principle of the sensor is pretty simple. It consists of an infrared led, as
transmitter, and an ldr, as receiver, which is embedded on a circuit. The human heart beat pulses
causes a variation in the flow of blood. A part of the light from the infrared led is absorbed by the
tissues and the remaining light is reflected back. This reflected light is received by the receiver an
ldr. The amount of light absorbed by the ldr depends on the blood volume in the tissue from where
the light is reflected. The output of the sensor is in the electrical signal and is proportional to the
human heart beat rate . This is then further calculated for beats per minute(bpm). The sensor has
three wires ‘+’, ‘-’ and ‘GND’ with colors green, yellow and blue respectively. The picture of
pulse sensor is shown in fig 5.5.
This DHT11 sensor is having four pins, namely:
• VCC: Supply voltage

• GND:Ground

Figure.5.5. Pulse Sensor

Department of ECE, GMRIT Page 12


Pulse Sensor interfacing with Arduino:

To connect pulse sensor to Arduino, the green wire of pulse sensor (+) is to be connected to
3.3V pin of Arduino. Then the yellow wire (-) is to be connected to A0 pin of Arduino. At last the
blue wire (GND) is to be connected to the GND pin of Arduino. Connections are shown in fig.5.6.

Connect the pulse sensor with Arduino as follows

• GND pin of pulses sensor to GND of Arduino


• VCC of pulse sensor to 5V of Arduino
• A0 of pulse sensor to A0 of Arduino

Figure.5.6. Pulse Sensor interfacing with Arduino

5.4 WIFI MODULE (ESP8266):

ESP8266 is a Wi-Fi module which will give your projects access to Wifi internet. It is a
very cheap device, but it will make your projects very powerful. It can communicate with any
microcontroller and make the projects wireless. It is in the list of most leading devices in the IOT
platform. It runs on 3.3V and if you will give it 5V then it will get damage. We will use ESP8266
Wi-Fi module for connecting the Arduino to the webserver. Here we have used Local webserver
to demonstrate the working of this Garbage Monitoring System. The ESP8266 WiFi Module is a
self contained SOC with integrated TCP/IP protocol stack that can give any microcontroller access

Department of ECE, GMRIT Page 13


to your WiFi network. The ESP8266 is capable of either hosting an application or offloading all
Wi-Fi networking functions from another application processor. Each ESP8266 module comes pre-
programmed with an AT command set firmware, meaning, you can simply hook this up to your
Arduino device and get about as much WiFi-ability as a WiFi Shield offers (and that’s just out of
the box)! The ESP8266 module is an extremely cost effective board with a huge, and ever growing,
community.
ESP8266 is a 3V WiFi module very popular for its Internet of Things applications. ESP8266
maximum working Voltage is 3.6V and its very important to note. You must know how to power
it, how to serialconnect it with Arduino safely, how to ping and many other things. You should use
software like Circuito.io, Tinkercad, Fritzing to simulate and work with the board safely.You
should also use Logic Level Controller to use with ESP8266 module. ESP8266 has eight pins as
shown fig 5.7. VCC and GND are powering pins. RX and TX are used to communicate.

Figure.5.7. ESP8266 Wi- fi module

ESP8266 Interfacing with Arduino

The five pins of Wi-Fi shield are connected as: Tx pin of WiFi module to the Tx3 pin on
Arduino Uno. Then the Rx pin is connected to the Rx2 pin of Arduino. The Vcc and CHPD are to
be made short and is connected to +3V pin of Arduino Uno. After all this connections, to configure
and to connect the Wi-Fi shield to an access point we have to run few commands on the serial
monitor of Arduino IDE. Fig 5.8 shows the representation of interfacing.

The first command is ‘AT’ which gives an ‘OK’ response if all the connections are proper
and ESP is ready to connect. Second command to be entered is ‘AT+CWMODE’ which selects
the Wi-Fi mode for Arduino Uno. Now to list all the nearby available access points, ‘AT+CWLAP’
is used. To connect to a specific access point, type ‘AT+CWJAP=“SSID”, “Password”’. These
commands will connect the Arduino to internet using ESP8266 Wi-Fi shield.

Department of ECE, GMRIT Page 14


Figure.5.8. ESP8266 interfacing with Arduino

Powering ESP8266:

There are many ways to power ESP8266 WiFi module: you can use 2 AA sized batteries for
powering, PC port if you have a TTL-Serial-toUSB adapter You can use LIPO batteries to power
the ESP Dev Thing board. You can use LM117 3.3V voltage regulator. The ESP8266’s maximum
voltage is 3.6V, so the thing has an on board 3.3V regulator to deliver a safe, consistent voltage to
the IC. That means the ESP8266’s I/O pins also run at 3.3V, you’ll need to Logic Level Controller
any 5V signals running into the IC. Alternatively, if you have an external, regulated supply you’d
like to deliver directly to the ESP8266, you can supply that voltage through the 3V3 pin (on the
I2Cheader). While this voltage doesn’t have to be 3.3V, it must be within the range 1.7-3.6V. Power
the ESP8266 as shown in Fig 5.9.

Department of ECE, GMRIT Page 15


Figure.5.9. Powering ESP8266

AT commands

The connections can be tested, and ESP’s connectivity can be verified by running the following
AT commands on the serial monitor:
Table.5.1. Different AT Commands

AT Command Response

Function

Working AT OK

Restart AT+RST OK

Firmware AT+GMR AT+GMR 0018000902


version

Department of ECE, GMRIT Page 16


Wifi mode AT+CWMODE=1 OK

List Access AT+CWLAP


AT+CWLAP+CWLAP:(4,"Roch
Points efortSurLac",38,"70:62:b8:6f:6d:
58",1)+CWLAP:(4,"LiliPa d2.4",-
83,"f8:7b:8c:1e:7c:6d",1)

OK

Joint AT+CWJAP? Query AT+CWJAP?

Access AT+CWJAP="SSID", +CWJAP:"RochefortSurLac" OK

Point "Password"

Get IP AT+CIFSR AT+CIFSR 192.168.1.180

Address OK

Department of ECE,
GMRIT
Page 17
TCP/UDP AT+ CIPMUX? Query
Connectio
AT+ CIPMUX=0 Single
ns
AT+ CIPMUX=1 Multiple

Start a connectio id = 0-4, type = TCP/UDP, addr = IP


address, port= port
n (AT+CIPMUX=0)

AT+CIPSTART=

<type>, <addr>, <port>

(AT+CIPMUX=1)

AT+CIPSTART=

<id><type>, <addr>, <port>

AT+CIPSTART=4,"TCP",

"184.106.153.149" ,80

(this command establishes


connection with the server with
IP address

(184.106.153.149)

Department of ECE,
GMRIT
Page 18
Set as server AT+CIPSERVER= <mode>, mode 0 to close server mode;
<port> mode 1 to open;

Eg.

AT+CIPSERVER= 1,80

Set the length of AT+CIPSEND=4,44 OK


the data that will
be sent

5.5. BREADBOARD AND CONNECTING WIRES:

Breadboard:

A modern solderless breadboard socket consists of a perforated block of plastic with


numerous tin-plated phosphor bronze or nickel silver alloy spring clips under the perforations. The
clips are often called tie points or contact points. The number of tie points is often given in the
specification of the breadboard. A breadboard is a device for temporary prototype with electronics
and test circuit designs. Most electronic components in electronic circuits can be interconnected
by inserting their leads or terminals into the holes and then making connections through wires
where appropriate. Check fig 5.10 below.
The breadboard has strips of metal underneath the board and connect the holes on the top
of the board. The metal strips are laid out as. Note that the top and bottom rows of holes are
connected horizontally and split in the middle while the remaining holes are connected vertically.

Department of ECE,
GMRIT
Page 19
Figure.5.10. Breadboard

Connecting wires:

A jump wire (also known as jumper, jumper wire, jumper cable, wire, or DuPont cable –
named for one manufacturer of them) is an electrical wire or group of them in a cable with a
connector or pin at each end (or sometimes without them – simply "tinned"), which is normally
used to interconnect the components of a breadboard or other prototype or test circuit, internally
or with other equipment or components, without soldering. Individual jump wires are fitted by
inserting their "end connectors" into the slots provided in a breadboard, the header connector of a
circuit board, or a piece of test equipment.
Solid tips are used to connect on/with a breadboard or female header connector. The
arrangement of the elements and ease of insertion on a breadboard allows increasing the
mounting density of both components and jump wires without fear of short-circuits. The jump
wires vary in size and colour to distinguish the different working signals. Check fig 5.11 below.

Department of ECE,
GMRIT
Page 20
Figure.5.11. Connecting Wires

5.6. ARDUINO IDE:

The Arduino Integrated Development Environment - or Arduino Software (IDE) - contains a


text editor for writing code, a message area, a text console, a toolbar with buttons for common
functions and a series of menus. It connects to the Arduino and Genuino hardware to upload
programs and communicate with them as shown in fig 5.12..
It consists of:

Figure.5.12. Arduino IDE

Department of ECE,
GMRIT
Page 21
Writing sketches:

Programs written using Arduino Software (IDE) are called sketches. These sketches are
written in the text editor and are saved with the file extension.ino. The editor has features for
cutting/pasting and for searching/replacing text. The message area gives feedback while saving
and exporting and also displays errors. The console displays text output by the Arduino Software
(IDE), including complete error messages and other information. The bottom righthand corner of
the window displays the configured board and serial port. The toolbar buttons allow you to verify
and upload programs, create, open, and save sketches, and open the serial monitor.

.
Tabs, Multiple Files, and Compilation:

Allows you to manage sketches with more than one file (each of which appears in its own
tab). These can be normal Arduino code files (no visible extension), C files (.c extension), C++
files (.cpp), or header files (.h).

Uploading:

Before uploading your sketch, you need to select the correct items from the Tools > Board
and Tools > Port menus. The boards are described below. On the Mac, the serial port is probably
something like /dev/tty.usbmodem241 (for an Uno or Mega2560 or Leonardo) or
/dev/tty.usbserial-1B1 (for a Duemilanove or earlier USB board), or /dev/tty.USA19QW1b1P1.1
(for a serial board connected with a Keyspan USB-to-Serial adapter). On Windows, it's probably
COM1 or COM2 (for a serial board) or COM4, COM5, COM7, or higher (for a USB board) - to
find out, you look for USB serial device in the ports section of the Windows Device Manager. On
Linux, it should be /dev/ttyACMx , /dev/ttyUSBx or similar. Once you've selected the correct serial
port and board, press the upload button in the toolbar or select the Upload item from the Sketch
menu. Current Arduino boards will reset automatically and begin the upload. With older boards
(preDiecimila) that lack auto-reset, you'll need to press the reset button on the board just before
starting the upload. On most boards, you'll see the RX and TX LEDs blink as the sketch is
Department of ECE,
GMRIT
Page 22
uploaded. The Arduino Software (IDE) will display a message when the upload is complete or
show an error.

Libraries:

Libraries provide extra functionality for use in sketches, e.g. working with hardware or
manipulating data.To use a library in a sketch, select it from the Sketch > Import Library menu.
This will insert one or more #include statements at the top of the sketch and compile the library
with your sketch. Because libraries are uploaded to the board with your sketch, they increase the
amount of space it takes up. If a sketch no longer needs a library, simply delete its
#includestatements from the top of your code.

Serial monitor:

This displays serial sent from the Arduino or Genuino board over USB or serial connector.
To send data to the board, enter text and click on the "send" button or press enter. Choose the baud
rate from the drop-down menu that matches the rate passed to Serial.begin in your sketch. Note
that on Windows, Mac or Linux the board will reset when you connect with the serial monitor.
Please note that the Serial Monitor does not process control characters; if your sketch needs a
complete management of the serial communication with control characters, you can use an external
terminal program and connect it to the COM port assigned to your Arduino board. The board
selection has two effects: it sets the parameters (e.g. CPU speed and baud rate) used when
compiling and uploading sketches; and sets and the file and fuse settings used by the burn
bootloader command. Some of the board definitions differ only in the latter, so even if you've been
uploading successfully with a particular selection you'll want to check it before burning the
bootloader. You can find a comparison table between the various boards here.

Department of ECE,
GMRIT
Page 23
5.7 THINGSPEAK

The Internet of Things (IoT) is a system of ‘connected things’. The things generally
comprise of an embedded operating system and an ability to communicate with the internet or with
the neighboring things. One of the key elements of a generic IoT system that bridges the various
‘things’ is an IoT service.
An interesting implication from the ‘things’ comprising the IoT systems is that the things
by themselves cannot do anything. At a bare minimum, they should have an ability to connect to
other ‘things’. But the real power of IoT is harnessed when the things connect to a ‘service’ either
directly or via other ‘things’
In such systems, the service plays the role of an invisible manager by providing capabilities
ranging from simple data collection and monitoring to complex data analytics. One such IoT
application platform that offers a wide variety of analysis, monitoring and counter-action
capabilities is ‘ThingSpeak’.
ThingSpeak is a platform providing various services exclusively targeted for building IoT
applications. It offers the capabilities of real-time data collection, visualizing the collected data
in the form of charts, ability to create plugins and apps for collaborating with web services, social
network and other APIs. According to its developers, "ThingSpeak is an open-source Internet of
Things application and API to store and retrieve data from things using the HTTP protocol over
the Internet or via a Local Area Network.
To use ThingSpeak, we need to signup and create a channel. Once we have a channel, we
can send the data, allow ThingSpeak to process it and also retrieve the same. Let us start exploring
ThingSpeak by signing up and setting up a channel as shown in fig .13.

Department of ECE,
GMRIT
Page 24
Figure.5.13. ThingSpeak Sign-up Page

Now you should see a page with a confirmation that the account was successfully created. The
confirmation message disappears after a few seconds and the final page should look as in the below
screen fig 5.14:

Figure.5.14. Channel Page

Go ahead and click on ‘New Channel’. You should see a page like the below fig 5.15:

Department of ECE,
GMRIT
Page 25
Figure.5.15. Channel Settings Page

You can change the name to fit your need and you can add a description corresponding to the
channel. You can add any other useful description into the metadata field. In the same page, you
should see the fields for Latitude, Longitude and Elevation. Also, when you scroll down you should
see a check box that says, ‘Make Public?’. Let us consider the significance of the various fields
and the tabs:

• Latitude, longitude and elevation - These fields correspond to the location of a ‘thing’ and
are especially significant for moving things.
• Make Public? - If the channel is made public, anyone can view the channel's data feed and
the corresponding charts. If this check box is not checked, the channel is private, which
means for every read or write operation, the user has to pass a corresponding API key.
• URL - This can be the URL of your blog or website and if specified, will appear on the
public view of the channel.
• Video ID - This is the ID corresponding to your YouTube or Vimeo ID. If specified, the
video appears on the public view of the channel.
• Fields 1 to 8 - These are the fields which correspond to the data sent by a sensor or a

Department of ECE,
GMRIT
Page 26
‘thing’. A field has to be added before it can be used to store data. By default, Field 1 is
added. In case you try posting to fields that you have not added, your request will still be
successful, but you will not be able to see the field in the charts and the corresponding data.
You can click on the small box before the ‘add field’ text corresponding to each field to
add it. Once you click the ‘add field’ box, a default label name appears in the text box
corresponding to each field and the ‘add field’ text changes to ‘remove field’ as shown in
fig 5.16.

Figure.5.16. Channel Field Value

You can edit the field text that appears by default when a field is added to make more sense.
For example, in the below screen, I have modified Once you have edited the fields, click
on ‘Save Channel’ button. You should now see a page like the below in which the ‘Private
View’ tab is defaulted:

Department of ECE,
GMRIT
Page 27
Figure.5.17. Channel Chart

The Private View shows a chart corresponding to each of the fields that we have added.

Now click on the ‘Public View’ tab. This should look exactly similar to the what we see in the
‘Private View’ tab since our channel is public. In case your channel is not public ('make public'
check box not checked in the ‘channel settings’ tab), the public view tab shows a message that
‘This channel is not public’.
Now click on the ‘API Keys’ tab. You should see a screen similar to the below. The write
API key is used for sending data to the channel and the read API key(s) is used to read the channel
data. When we create a channel, by default, a write API key is generated. We generate read API
keys by clicking the ‘Generate New Read API Key’ button under this tab. You can also add a note
corresponding to each of the read API keys. Check the above fig 5.17.

Department of ECE,
GMRIT
Page 28
Figure.5.18. Channel API KEYS

Now click on the ‘Data Import/Export’ tab and you should see a screen similar to the below. This
tab is used to import the ‘Comma Separated Values(CSV)’ data from a file into the channel as in
fig 5.18. You can also download the channel’s feed from here in CSV format. This tab also outlines
how to send and view data by providing the URIs to the send and view APIs.

Department of ECE,
GMRIT
Page 29
5.8 ThingView Application

ThingView enables you to visualize your ThingSpeak channels in an easy way by just entering the
channel id.For public channels the application will respect your windows settings: color,
timescale, chart type and number of results. The current version supports line and column charts,
the spline charts are displayed as line charts. For private channels, the data will be displayed using
the default settings, as there is no way to read the private windows settings with the api key only
as shown in fig 5.19.

Figure.5.19. Home page of thingview app

When we click on the channel appearing on the home page the readings in the manner of graph will be shown
here.For better understanding of values on the graph we have to give a tap on the graph.Then a dialog box
showing numerical values will be appeared.This application will work on any type of internet connection. The
below figure shows the practical graph appeared on the screen as in fig 5.19.

Department of ECE,
GMRIT
Page 30
Figure.5.20. Graphical representation of values on thingview application

First of all we will connect the ESP8266 with the Arduino. ESP8266 runs on 3.3V and if you will
give it 5V from the Arduino then it won’t work properly and it may get damage. Connect the VCC
and the CH_PD to the 3.3V pin of Arduino. The RX pin of ESP8266 works on 3.3V and it will not
communicate with the Arduino when we will connect it directly to the Arduino. So, we will have
to make a voltage divider for it. Three 1k resistors connected in series will do the work for us.
Connect the RX to the pin 3rd of the Arduino through the resistors as shown in the figure below
and also the TX of the Arduino to the pin 2 of the Arduino. Now it’s time to connect the humidity
& temperature, soil moisture, water level sensors according to their interfacing rules with arduino.

Department of ECE,
GMRIT
Page 31
6.PROGRAM CODES

Code: initialize serial monitor at


9600 initialize esp8266 at 9600
initialize

LCD

while true read temperature from

DHT11 read humidity from DHT11

read soilmoisture from fc-28 read

waterlevel from waterlevel sensor

print temperature on serial monitor

print humidity on serial monitor

print soilmoisture on serial monitor

print waterlevel on serial monitor

display temperature on lcd display

humidty on lcd display soilmoisture

on lcd display waterlevel on lcd

Department of ECE,
GMRIT
Page 32
call:

writethingspeak

delay 20000

endwhile

function writethingspeak pass in:

nothing call: startThingSpeakCmd

str getStr "GET /update?api_key="

append key to str append

field1,temperature to getStr append

field2,humidty to getStr append

field3,soilmoisture to getStr append

field4,waterlevel to getStr call:

sendThingspeakGetCmd pass out:

nothing Endfunction function

startThingspeakGetCmd pass in:

nothing str cmd

"AT+CIPSTART=\"TCP\",\"184.1
Department of ECE,
GMRIT
Page 33
06.153.149\",80" write cmd to

esp8266 print "Connecting to

Thingspeak" print cmd delay 2000

if Error

print "AT+CIPSTART error"

pass out: nothing

Endfunction

function sendThingSpeakGetCmd pass

in: str representing AT command str

cmd "AT+CIPSEND=" + getStr.length

write cmd to esp8266 print getStr.length

delay 2000 if ">" is found in repsonse

write getStr to esp8266

clear lcd print "data

sent" on lcd

delay 3000

else
Department of ECE,
GMRIT
Page 34
write "AT+CIPCLOSE" to esp8266

print "error while sending data" clear lcd

print "Sending failed" on lcd pass out:

nothing

Endfunction

Department of ECE,
GMRIT
Page 35
7. RESULTS
After interfacing pulse sensor and temperature sensor with Arduino all the experimental setup will
be ready.ESP8266 will upload all the sensor values to the cloud thingspeak which we can see over
internet.After fixing this band to person’s hand it will take the heartbeat and temperature of the
person.ESP8266 will fetch these readings and display over thingspeak.In thingspeak channel we
can see the graph which have beats/min over Y-axis and date on X-axis for pulse sensor and
temperature over Y-axis and date on X-axis. Depending on our pulse rate the plotting will be
done.The heart beat ranges of a person is given in below table7.1

Fig 7.1.Heart rate and lm35 readings channel result

Figure.7.2. Experimental setup

Department of ECE,
GMRIT
Page 36
Above is the hardware setup of the wearable health monitoring system.LCD display enables the user to see his
health values.

Figure.7.3. LCD display values of pulse rate

Figure.7.4. Pulse rate in numerical meter

Department of ECE,
GMRIT
Page 37
8. FUTURE ENHANCEMENT
This project will be a benchmark in the medibusiness due to its reliability and remote
monitoring. This idea tries to digitalize health monitoring activities so that the people can check
on the requirements of the patients and accurately predict their health condition. This concept
will surely accelerate their business to reach new heights and also be more profitable. The
implementation of our project largely depends upon the awareness among people and elders,
which, we believe will be easily created due to its numerous advantages. In future this system
can be improved by adding several modern techniques like location tracking and many more
conditions.

Department of ECE,
GMRIT
Page 38
9. CONCLUSION

‘Internet of Things’ is far and wide castoff in relating devices and gathering statistics. This health
monitoring system serves as a reliable and efficient system and corrective action can be taken.
Wireless monitoring of health reduces the human power and it also allows user to see accurate
changes in human’s body. It is cheaper in cost and consumes less power. The smart health
monitoring system has been designed and synthesized. The developed system is more efficient and
beneficial for everyone mainly elders. It gives the information about the temperature and heart rate
through an application , if it fallout from optimal range. Therefore, the people can predict
temperature and heart rate. The system can be monitored from their anywhere. The lives which
are in grave danger can be saved.

Department of ECE,
GMRIT
Page 39
10. REFERENCES

[1] http://www.instructables.com/id/HealthBand/

[2] Temitope O. Takpor and Aderemi A. Atayero, “Integrating Internet of Things and eHealth Solutions

for Students’Healthcare”, WCE 2015, July.

[3] https://pulsesensor.com

[4] https://www.sparkfun.com/products/11574

[5] https://www.elprocus.com/heartbeat-sensor-working-application/

[6] https://www.sparkfun.com/products/8777

[7] https://www.espressif.com/sites/default/files/0a-esp8266ex_datasheet_en_1.pdf

[8] Siddharth Kokalki, Ritesh Sontakke, Pawan Mundada,Akshay Mali “A novel Temperature Sensing

and Monitoring Using IoT”

[9] http://www.instructables.com/id/Temperature-Sensing-and-Monitoring-Using-Arduino-a/

[10] Davi d Lake, Rodolfo Milito, Monique Morrow and Rajesh Vargheese Internet of Things:

Architectural Framework for eHealth Security.

[11] Srijani Mukherjee, Koustabh Dolui, Soumya Kanti Datta “Patient health management system using

e-healthmonitoring architecture

[12] Fritzing Software – www.Fritizing.org

[13] https://www.arduino.cc/en/main/software

[14] https://thingspeak.com/
Department of ECE,
GMRIT
Page 40
Department of ECE,
GMRIT
Page 41

You might also like