You are on page 1of 35

Yarmouk University – Telecommunication Engineering

Wireless Body Area Network (WBAN)


Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

Chapter 1: Introduction

1.1 Wireless Networks

The development of wireless networks has enjoyed tremendous growth over the past

decades. Wireless network communication can be said to be the communication of

nodes of elements of a communication system without any form of wire. This

communication could be between the elements of the same network or to larger

networks or to even the Internet [1].

The drive for wireless networks arises as the result of:

 Ease of deployment and comparatively low cost.

 Ease of upgrading and low maintenance cost relatively to cabled networks.

 Its superior mobility and flexibility features.

Although wireless networks seem to have a slight edge over cabled networks in terms

of mobility, flexibility, cost and convenience it poses its own bottlenecks. These

challenges such as :

 Interference from other electronic and electrical equipment operating on the

same or similar frequency can possess a great deal to communication between

a transmitter and a receiver.

January 17, 2018 1


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

 Privacy and security Security are of a major concern when it comes to wireless

communication. This is because the medium for communication is radio waves

and hence anyone within the coverage area of a wireless network can attempt

to access the network.

 Health risk although the RF emitted by wireless devices have not been proven

to pose a danger, there is always health concern about the level of radiations.

 Frequency regulations the available frequencies are almost occupied and

therefore there is a need for effective coordination and a more prudent use of

the available spectrum [1].

1.2 Types of Wireless Networks

Wireless networks can be grouped either by coverage area or when they were

developed, referred to as generation. Grouping enable the identification of specific

needs and hence the development of standards to meet these needs. Wireless networks

can be classified into four major groups, namely:

 Wireless LANs.

 Wireless MAN.

 Wireless WANs.

 Wireless PANs [1,2].

January 17, 2018 2


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

A wireless LAN provides the exchange of data and information locally between

computers and devices through a radio wave medium. Basically, most wireless LANs

consists of transmitters/receivers known as transceivers and referred to as access point

and a wireless Network Interface Card (NIC). The access point provides the bridging

between the wired network and wireless network. The access point does the receiving,

buffering and transmission of data between the wireless and wired network. Wireless

LANs are short-range wireless networks that may span a few meters [2].

Wi-Fi is an IEEE 802.11 standard for wireless local area network (WLAN). Generally,

Wi-Fi technology comes with four standards (802.11 a/b/g/n) that runs in ISM band

2.4 and 5 GHz with a modest coverage of 100 meter. Wi-Fi permits users to transfer

data at broadband speed when connected to an access point (AP) or in ad hoc mode.

Wi-Fi network where Wi-Fi sensor nodes and users can transfer data using internet by

standard Wi-Fi router. In some modified version, Wi-Fi devices can be used in data

acquisition applications that allow a direct communication between the sensors and the

smart phones PC even without an intermediate router [2].

Wireless Metropolitan Area Networks (WMANs) are point – to – point or point–to–

multipoint networks that can span over a metropolitan city providing wireless

connectivity to users at different locations. These networks are larger than the WLANs

but smaller than WWANs [2].

January 17, 2018 3


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

Wireless WANs are computer data networks that may receive and transmit data using

radio signals over a large geographical area. This type of wireless network employs

cellular networks such as GSM, CDMA, UMTS, LTE and satellite communication to

transmit data [2].

A wireless PAN is a short-range wireless network designed to support mobile

computing and portable devices for communication. It provides an infrastructure for

home appliances to interconnect, enabling them to access the Internet in some cases.

Examples of such technologies are Bluetooth (IEEE 802.15.1) [2].

1.3 Internet of Things

The concept of Internet of Things (IOT) has evolved rapidly in various ways, as now

with the help of this huge number small networks which can remain connected to each

other and can directly send data to the main network without any human interaction.

Quality of service in healthcare has always been under constant criticism in the modern

era, as it is a very touchy subject. Health monitoring specially for elderly people is a

concern and as most people in the modern times are job holders and have so hectic life.

It is difficult to manage to keep a constant watch on the elderly of the house. Keeping

a nurse or housekeeper is also a very costly issue nowadays. In this situation, remote

health monitoring based on IOT can help to solve the problem [1,3].

January 17, 2018 4


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

IOT is providing the means by which it is possible to collect and analyze data remotely

without any human interaction. So, this indicates that it is possible to detect and prevent

any future hazard with precision and possible to aware the concerning authority like

the family member or the physician if there is any alarming situation. The basic two

reasons IOT is important for this project is firstly it is automated, so no human

interaction is needed. And secondly, because of automation the process has less chance

of having errors i.e. having a more efficient system indicating a better quality in service

[4].

Monitoring health of elderly people is basically model for monitoring using different

sensors. The reason we chose elderly people for monitoring is because, elderly people

are usually more vulnerable to sickness and other aging factors. So, usually it becomes

difficult for working people to monitor the senior members of the family the whole

time. Even if it is possible to take care of the elderly during, they stay at home, it

becomes rather difficult to observe their activities and condition during the working

hours. Thus, it was eminent to come with a solution that is to make a health monitoring

system which can observe the daily basic activities of elderly people. A threshold value

will already be provided to the system. The system will collect data of daily activities

through sensors which will be placed according to the needs of the system. The

retrieved data will then be compared with the provided threshold values [5].

January 17, 2018 5


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

1.4 Body Area Network (BAN)

A body area network (BAN), also referred to as a wireless body area network (WBAN)

or a body sensor network (BSN) or a medical body area network (MBAN), is a wireless

network of wearable computing devices. BAN devices may be embedded inside the

body, implants, may be surface-mounted on the body in a fixed position Wearable

technology or may be accompanied devices which humans can carry in different

positions, in clothes pockets, by hand or in various bags. A WBAN system can use

WPAN wireless technologies as gateways to reach longer ranges. Through gateway

devices, it is possible to connect the wearable devices on the human body to the

internet. This way, medical professionals can access patient data online using the

internet independent of the patient location.

In modern technology wireless communication provides a lot of possibilities to be able

to share its information to each other at anytime and anywhere. Intelligent mobile

communication network and WLAN, Wi-Fi are applied to various sectors such as

education; health care service and industry in order to provide people a convenient way

to communicate with each other. As the demand of ubiquitous network is increased,

the devices for home, office and other information devices that can communicate

wireless in short range have been getting more attention. The standard and technique

development of ubiquitous network has rapidly put itself into the world market.

Wireless Body Area Network (WBAN) is becoming a special application of such

January 17, 2018 6


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

technique. WBAN differs with other wireless sensor networks (WSN) with some

significant points. First difference between a WBAN and WSN is mobility. In WBAN

user can move with sensor nodes with same mobility pattern whereas WSN is generally

used to be stationary. Energy consumption is much less in WBAN than other WSNs

arrangement. In addition, WBAN sensor devices are found cheaper than WSNs. For

reliability, node complexity and density, WBAN nodes are however traditional. WSNs

do not tackle specific requirements associated with the interaction between the network

and the human body [1].

The WBAN performs like Virtual Doctor Server, by keeping the different

responsibilities like- maintain the history of the patient, giving advices to the patient

in general/emergency (first aid help from second person) case etc. To understand the

communication approach of this emerging WBAN technology, we first need to know

the conceptual structure of WBAN so that, one can easily know the flow of

communication within the system and to the outside world, this has been achieved by

the demonstration of a simple WBAN communication architecture. Where this

architecture is mainly comprised with three different layers namely: Tier 1, Tier 2 and

Tier3 and these are further described better in the given figure 1.1 [6].

January 17, 2018 7


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

Figure 1.1: Architecture of Wireless BAN Communication.

1.5 Wireless Body Area Network

Wireless Body Area Network (WBAN) refers to such a network where data from

sensor nodes are collected wirelessly and may be stored in database for further

specification. In the medical sector wireless services play a formidable role. Patient

Health Monitoring systems can be built under such concept. For remotely monitoring

patient BAN (Body Area Network) provides a platform for the doctors. A doctor may

not be able to monitor a patient being physically present all the time. But if a system

is built using WBAN where there is going to be a part of sensors and then a part of

web server to store data coming from the sensors part and the doctor has the access to

view his patient information it will work wonders. Wireless communication without

any laptop, computer in between the WBAN-based device and the web server is the

January 17, 2018 8


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

main functionality of a WBAN system. Body Area Network is basically wearable

computing devices. Such computing devices can work wirelessly. WBAN offers

independent movement of the device. The sensors attached to body can be carried

anywhere the patient moves. Such flexibility of the wireless body area network puts

forward many other challenging applications of it. [6].

1.6 WBAN Architecture

WBAN is designed with special purpose sensor which can autonomously connect with

various sensors and appliances, located inside and outside of a human body.

Figure 1.2 demonstrates a simple WBAN architecture where the architecture is divided

into several sections. Here we have classified the network architecture into four

sections. The first section is the WBAN part which consists of several numbers of

sensor nodes. These nodes are cheap and low power nodes with inertial and

physiological sensors, strategically placed on the human body. All the sensors can be

used for continuous monitoring of movement, vital parameters like heart rate. and the

surrounding environment. There are vast monitoring systems are being used already

based on wired connections. Any wired connection in a monitoring system can be

problematic and awkward worn by a person and could restrict his mobility. So, WBAN

January 17, 2018 9


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

can be a very effective solution in this area especially in a healthcare system where a

patient needs to be monitored continuously and requires mobility [7].

Figure 1.2: WBAN Architecture.

The next section is the coordination node where the entire sensor nodes will directly

be connected with a coordination node known as Central Control Unit (CCU). CCU

takes the responsibility to collect information from the sensor nodes and to deliver to

the next section. For monitoring human body activities there is no such wireless

technology is fixed for targeting WBAN. Most popular wireless technologies used for

medical monitoring system are WLAN, Wi-Fi, GSM, 3G, 4G, WPAN (Bluetooth).

Except Cellular network standard all of these technologies are commonly available for

short distance communication. WMTS (Wireless Medical Telemetry Service) \ and

Ultra-Wide Band are another technology that could be used for body monitoring

system as they operate in low transmission power [7].

January 17, 2018 10


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

The third section is the WBAN communication which will act as a gateway to transfer

the information to the destination. A mobile node can be a gateway to a remote station

to send Mobile Message to a cellular network using GSM/3G/4G. A router or a PC can

be a remote node to communicate via email or other service using Ethernet. The last

section will be a control center consists of end node devices such as Mobile phone for

message, PC for monitoring and email and server for storing the information in the

database [7].

January 17, 2018 11


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

Chapter 2: Hardware Components

This chapter discusses the hardware required for the project implementation. To conduct this

project, we need sensors so that we can monitor the health condition of the people. In order to

do so, we chose different criteria to monitor the people. The criteria’s we chose are body

temperature, pulse heart rate of the host. So, for those criteria’s we chose the following sensors.

2.1 Temperature sensor

For collecting the temperature data from the host, we chose the model DS18B20. The

DS18B20 digital thermometer provides 9-bit to 12-bit Celsius temperature

measurements and has an alarm function with nonvolatile user-programmable upper

and lower trigger points (Measures Temperatures from -55°C to +125°C (-67°F to

+257°F)). The DS18B20 communicates over a 1-Wire bus that requires only one data

line for communication with a central microprocessor. In addition, the DS18B20 can

derive power directly from the data line eliminating the need for an external power

supply. This sensor is very easy to work with and provides with accurate data of

temperature. The sensor provides data in Celsius temperature scale, but we later

converted it to the Fahrenheit scale for our convenience. Whenever the host touches

the sensor, the sensor saturates itself with the body temperature of the host and shows

that temperature [8].

January 17, 2018 12


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

Figure 2.1: Temperature Sensor DS18B20

2.2 Pulse Heart Rate

A person’s heartbeat is the sound of the valves in his/her’s heart contracting or

expanding as they force blood from one region to another. The number of times the

heart beats per minute (BPM), is the heart beat rate and the beat of the heart that can

be felt in any artery that lies close to the skin is the pulse. Heart Beat can be measured

based on optical power variation as light is scattered or absorbed during its path

through the blood as the heart beat changes using a sensor.

The heartbeat sensor is based on the principle of photo plethysmography. It measures

the change in volume of blood through any organ of the body which causes a change

in the light intensity through that organ (a vascular region). In case of applications

January 17, 2018 13


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

where heart pulse rate is to be monitored, the timing of the pulses is more important.

The flow of blood volume is decided by the rate of heart pulses and since light is

absorbed by blood, the signal pulses are equivalent to the heart beat pulses.

The basic heartbeat sensor consists of a light emitting diode and a detector like a light

detecting resistor or a photodiode. The heart beat pulses cause a variation in the flow

of blood to different regions of the body. When a tissue is illuminated with the light

source, i.e. light emitted by the led, it reflects (a finger tissue). Some of the light is

absorbed by the blood and the transmitted or the reflected light is received by the light

detector. The amount of light absorbed depends on the blood volume in that tissue. The

detector output is in form of electrical signal and is proportional to the heart beat rate.

BPM (Beats per minute) = 60*f, where f is the pulse frequency [9].

For collecting the pulse rate data from the host, we chose the model SEN-11574. The

Pulse Sensor is a plug-and-play heart-rate sensor for Arduino. It can be used by anyone

who wants to easily incorporate live heart-rate data. Essence it is an integrated optical

amplifying circuit and noise eliminating circuit sensor. It is very easy to use by clipping

the Pulse Sensor to the hosts earlobe or fingertip and plug it into the Arduino. This

sensor can give data’s like Pulse Rate, Cardio Graph and Inter Beat Interval. However,

for our convenience we only used the Pulse Rate per minute from the sensor. The data

from the sensor can be retrieved from the host via the host’s fingertip [9].

January 17, 2018 14


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

Figure 2.2: Pulse heart rate (model SEN-11574)

2.3 Wi-Fi Module

For the purpose of this project, we chose ESP-8266. The ESP8266 Wi-Fi Module is a

self-contained SOC with integrated TCP/IP protocol stack that can give any

microcontroller for our case the Arduino access to Wi-Fi network. The ESP8266 is

capable of either hosting an application or offloading all Wi-Fi networking functions

from another application processor. Each ESP8266 module is pre-programmed with

an AT command set firmware, meaning, it can be simply connected with the Arduino

device. The ESP8266 module is an extremely cost-effective board. The module helps

to transmit the sensor data to Blynk cloud storage. It remains connected with the

Arduino and connects with the server via internet and sends the data to that server [10].

January 17, 2018 15


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

Figure 2.3: ESP8266 Wi-Fi Module

The module can work both as an Access point (can create hotspot) and as a station (can

connect to Wi-Fi), hence it can easily fetch data and upload it to the internet making

Internet of Things as easy as possible. It can also fetch data from internet using API’s

hence could access any information that is available in the internet, thus making it

smarter. Another exciting feature of this module is that it can be programmed using

the Arduino IDE which makes it a lot more user friendly. This version of the module

has 8 pins (Ground, TX, RX, GPIO-2, CH_EN, GPIO - 0, Reset, RX, Vcc) [10].

Figure 2.4: ESP8266 Pinout

January 17, 2018 16


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

ESP8266-01 Features:

 Low cost, compact and powerful Wi-Fi Module.

 Power Supply: +3.3V only.

 Current Consumption: 100mA.

 I/O Voltage: 3.6V (max).

 I/O source current: 12mA (max).

 Built-in low power 32-bit MCU @ 80MHz.

 512kB Flash Memory.

 Can be used as Station or Access Point or both combined.

 Supports Deep sleep (<10uA).

 Supports serial communication hence compatible with many development

platforms like Arduino.

 Can be programmed using Arduino IDE or AT-commands or Lua Script.

2.4 Arduino Uno

Arduino is an open source programmable circuit board. This board contains a

microcontroller which is able to be programmed to sense and control objects in the

physical world. By responding to sensors and inputs, the Arduino is able to interact

with a large array of outputs such as LEDs, motors and displays. Because of its

flexibility and low cost. The programming of Arduino is done in C, C++. The IDE

January 17, 2018 17


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

provides various built in examples and codes that make working with Arduino an

effortless task [11].

We used Arduino Uno for the purpose of this project. All the sensors are connected

with the Arduino. 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 crystal, a USB connection, a power jack, an ICSP header and

a reset button. The sensors are powered from the Arduino Uno so is the Wi-Fi module.

The Wi-Fi module is getting the data from the sensors through this Arduino Uno [11].

Figure 2.5: Arduino Uno

January 17, 2018 18


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

Some of the digital I/O pins have special functions which are describe below:

 Pins 0 and 1 are used for serial communication. They are used to receive and

transmit serial data which can be used in several ways like programming the

Arduino board and communicating with the user through serial monitor.

 Pins 2 and 3 are used for external interrupts. An external event can be triggered

using these pins by detecting low value, change in value or falling or rising

edge on a signal.

 As mentioned earlier, 6 of the 14 digital I/O Pins i.e. 3, 5, 6, 9, 10, and 11 can

provide 8-bit PWM output.

 Pins 10, 11, 12 and 13 (SS, MOSI, MISO AND SCK respectively) are used for

SPI communication.

 Pin 13 has a built-in LED connected to it. When the pin is HIGH, the LED is

turned on and when the pin is LOW, it is turned off.

Arduino Uno has 6 analog input pins which can provide 10 bits of resolution i.e. 1024

different values. The analog pins on the Arduino UNO are labelled A0 to A5.

Additionally, some analog pins have specialized functionality. Pins A4 and A5 are

used for I2C communication.

There are different ways in which we can power the Arduino UNO board. The USB

cable, which is used to program the microcontroller, can be used as a source of power.

January 17, 2018 19


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

The UNO board has on-board voltage regulators for 5V and 3.3V, which can be used

as power supply for small external devices like LEDs [11].

2.5 Circuit Connection

The ESP-8266 has eight ports, one of them is the power port which is used to supply

power to the module, and this was connected with the Arduino’s 3.3v. ESP-8266 is

very sensitive to high power so it was not connected to the 5v power besides it works

better at 3.3v. Another port of the ESP-8266 is the ground port which is connected with

the Arduino’s ground. ESP-8266 sends and receives data with 2 different ports these

ports are called TX and RX ports. ESP-8266’s TX port was connected with Arduino’s

digital port number 0 and ESP 8266’s Rx port was connected with Arduino’s digital

port 1. There is a reset port on the ESP 8266 which was not used as we did not need it,

there is a port called ch-pd on ESP-8266 which is connected to the Arduino’s 3.3v port.

There are 2 GPIO ports on the ESP-8266, the GPIO1 is connected with the Arduino’s

3.3v and the other port, GPIO0 is left unused. The ESP8266 circuit diagram shown in

figure 2.6.

January 17, 2018 20


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

Figure 2.6: Circuit of ESP8266

The DS18B20 has 3 pins to operate. One pin, Vcc is for power and another pin is for

ground. The DS18B20 can operate with power from 3.0v to 5.0v. The Vcc port is

connected with the Arduino’s 5v through a 4.7kohm register. The ground port is

connected with Arduino ground. The other port of the DS18B20 is the data port. This

port is used to send temperature data to the Arduino, this port can also take power from

the Arduino if it needs any extra. The data port of the DS18B20 is connected to the

Arduino digital pin 2 through the same 4.7kohm register. So, basically one end of the

4.7kohm register is connected with the Vcc port and the other end of the register is

connected with the data port. This register is put with both these ports so that

overpower cannot harm the DS18B20 as the data port also may take power from the

Arduino.

The pulse sensor has three pins; one of them is the Vcc pin to power the pulse sensor

as usual. This pin is connected with Arduino’s 5v power supply. There is also a ground

January 17, 2018 21


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

pin in the pulse sensor which is connected with the Arduino’s ground port. The other

pin of the pulse sensor is the data pin. This pin sends analog data to the Arduino, so

we had to attach this pin with the Arduino’s analog pin 0. This way the Arduino will

be converting the analog data to digital and we can avoid using an extra analog to

digital converter. The complete circuit diagram of our project is shown in figure 2.7.

Figure 2.7: The complete circuit diagram of our project.

January 17, 2018 22


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

Chapter 3: Software Implementation

The Arduino IDE that allows you to program the Arduino UNO using the Arduino IDE and

its programming language.

3.1 Arduino Integrated Development Environment Overview

The Arduino integrated development environment (IDE) is incredibly minimalistic,

yet it provides a near-complete environment for most Arduino-based projects. The top

menu bar has the standard options, including “File” (new, load save, etc.), “Edit” (font,

copy, paste, etc.), “Sketch” (for compiling and programming), “Tools” (useful options

for testing projects), and “Help”. The middle section of the IDE is a simple text editor

that where you can enter the program code. The bottom section of the IDE is dedicated

to an output window that is used to see the status of the compilation, how much

memory has been used, any errors that were found in the program, and various other

useful messages [12].

The Arduino IDE is a cross-platform application (for Windows, macOS, Linux) that is

written in the programming language Java. It is used to write and upload programs to

Arduino board. The Arduino IDE supports the languages C and C++ using special rules

of code structuring. The Arduino IDE supplies a software library from the Wiring

project, which provides many common input and output procedures. User-written code

January 17, 2018 23


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

only requires two basic functions, for starting the sketch and the main program loop,

that are compiled and linked with a program stub main () into an executable cyclic

executive program with the GNU toolchain, also included with the IDE distribution.

The Arduino IDE employs the program argued to convert the executable code into a

text file in hexadecimal encoding that is loaded into the Arduino board by a loader

program in the board's firmware. Because programming a microcontroller is

somewhat different from programming a computer, there are a number of device-

specific libraries (e.g., changing pin modes, output data on pins, reading analog

values, and timers). This sometimes confuses users who think Arduino is

programmed in an “Arduino language.” However, the Arduino is, in fact,

programmed in C++. It just uses unique libraries for the device [12].

3.2 Mobile Application (Blynk Application)

Blynk is a platform with iOS and Android apps to control Arduino, Raspberry Pi and

the likes over the Internet. It's a digital dashboard where you can build a graphic

interface for your project by simply dragging and dropping widgets. It's really simple

to set everything up and you'll start tinkering in less than 5 mins. Blynk is not tied to

some specific board or shield. Instead, it's supporting hardware of your choice.

Whether your Arduino or Raspberry Pi is linked to the Internet over Wi-Fi, Ethernet

January 17, 2018 24


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

or this new ESP8266 chip, Blynk will get you online and ready for the Internet of Your

Things. As shown in figure 3.1 [13].

Figure 3.1: Blynk app overview

Blynk was designed for the Internet of Things. It can control hardware remotely, it can

display sensor data, it can store data, visualize it and do many other cool things. There

are three major components in the platform:

1. Blynk App: It allows you to create amazing interfaces for your projects using

various widgets which are provided.

2. Blynk Server: It is responsible for all the communications between the

smartphone and hardware. You can use the Blynk Cloud or run your private

Blynk server locally. It’s open-source, could easily handle thousands of devices

and can even be launched on a Raspberry Pi.

January 17, 2018 25


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

3. Blynk Libraries: It enables communication, for all the popular hardware

platforms, with the server and process all the incoming and outcoming

commands [13].

Now imagine, every time you press a Button in the Blynk app, the message travels to

the Blynk Cloud, where it magically finds its way to your hardware. It works the same

in the opposite direction and everything happens in a Blynk of an eye. As shown figure

3.2 [13].

Figure 3.2: Blynk cloud architecture.

Characteristics of Blynk are:

 Similar API & UI for all supported hardware & devices.

 Connection to the cloud can be done using Ethernet, Wi-Fi, Bluetooth, BLE

and USB (Serial).

January 17, 2018 26


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

 Set of easy-to-use Widgets.

 Direct pin manipulation with no code writing.

 Easy to integrate and add new functionality using virtual pins

 History data monitoring via History Graph widget

 Device-to-Device communication using Bridge Widget

 Sending emails, tweets, push notifications, etc.

3.3 Upload Code

Upload the code using Arduino IDE.

The code:

#define USE_ARDUINO_INTERRUPTS true // Set-up low-level interrupts for most acurate BPM math.
#include <PulseSensorPlayground.h> // Includes the PulseSensorPlayground Library .

//Variables
const int PulseWire = 0; // PulseSensor PURPLE WIRE connected to ANALOG PIN 0
int Threshold = 500; // Determine which Signal to "count as a beat" and which to ignore.
// Use the "Gettting Started Project" to fine-tune Threshold Value beyond default setting.
// Otherwise leave the default "550" value .
#include "OneWire.h"
#include "DallasTemperature.h"

OneWire oneWire(2);
DallasTemperature tempSensor(&oneWire);

PulseSensorPlayground pulseSensor;

#define BLYNK_PRINT Serial

#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

//You should get Auth Token in the Blynk App.


//Go to the Project Settings (nut icon).
char auth[] = "0510efd646ed48148ae99d3b281b1026;"

//Your WiFi credentials.


//Set password to "" for open networks.
char ssid[] = "TTA";
char pass[] = "tta.2016.";

//Hardware Serial on Mega, Leonardo, Micro...

January 17, 2018 27


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

#define EspSerial Serial

//or Software Serial on Uno, Nano...


#//include <SoftwareSerial.h>
//SoftwareSerial EspSerial(2, 3); // RX, TX

//Your ESP8266 baud rate:


#define ESP8266_BAUD 115200

ESP8266 wifi(&EspSerial);

void setup)(
{
// Debug console
Serial.begin(9600);
tempSensor.begin;)(

// Set ESP8266 baud rate


EspSerial.begin(ESP8266_BAUD);

Blynk.begin(auth, wifi, ssid, pass);

//Configure the PulseSensor object, by assigning our variables to it .


pulseSensor.analogInput(PulseWire (
// pulseSensor.blinkOnPulse(LED13); //auto-magically blink Arduino's LED with heartbeat.
pulseSensor.setThreshold(Threshold);

// Double-check the "pulseSensor" object was created and "began" seeing a signal .
if (pulseSensor.begin{ ))(
Serial.println("We created a pulseSensor Object !");
}

void loop)(
{
int myBPM = pulseSensor.getBeatsPerMinute(); // Calls function on our pulseSensor object that returns BPM as
an "int."

// Serial.println(x); // "myBPM" hold this BPM value now .

if (pulseSensor.sawStartOfBeat() ) { // Constantly test to see if "a beat happened ."


Serial.println("♥ A HeartBeat Happened ! "); // If test is "true", print a message "a heartbeat happened."
Serial.print("BPM: "); // Print phrase "BPM " :
Serial.println(myBPM/2); // Print the value inside of myBPM .
Blynk.virtualWrite(V0,myBPM/2);
delay(20);// considered best practice in a simple sketch.
}

tempSensor.requestTemperaturesByIndex(0);

Serial.print("Temperature:");
Serial.print(tempSensor.getTempCByIndex(0));
Serial.println(" C");
Blynk.virtualWrite(V1,tempSensor.getTempCByIndex(0));

delay(10);

Blynk.run;)(
}

January 17, 2018 28


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

Chapter 4: Results and Conclusions

4.1 Results

In this chapter after implementing the code we will discuss how it is displayed in the

Blynk account of a user. First of all, you need to download the Blynk app. It is available

for both Android and IOS. After downloading, open the app. It will ask you to log in.

In the Blynk server it takes 5 second delays for each data entry. The data entered in the

storage is then graphically portrayed in the display. The data entered in the storage is

the channel's doctor. The patient who is under observation of that doctor is then

appeared in the doctor’s channel. Figure 4.1 shows the log in Blynk account.

Figure 4.1: Log in Blynk account

January 17, 2018 29


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

The temperature we send is in degree Celsius scale. So, our retrieved data for

temperature remains in Celsius scale. Figure 4.2 shows the temperature with a human

touch and again goes back to room temperature when touch is removed along with the

time of entry.

Figure 4.2: Temperature remains in Celsius

For the convenience of this project we only selected the pulse rate data as a criterion

for monitoring. After implementing the ESP-8266 code with this pulse sensor data, it

January 17, 2018 30


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

is formed in the Blynk as shown in figure 4.3. Initially there are some values which are

a little high because of noise. But, with time normal pulse starts to appear as we can

see in Figure 4.3.

Figure 4.3: Pulse Heart Rate graph

4.2 Conclusion

Our main objective in this project was to successfully monitor the basic two criteria’s

namely temperature and pulse, and their reaction during emergency situation. We

January 17, 2018 31


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

wanted to make a mark on the field of IoT with the health sector. With the rise demand

of IoT, the era of technology is moving towards a far superior dimension. In order to

keep pace with new technologies, this project can sure make a way for the advancement

in this sector. Though our model is tested and implemented, it will be difficult to

continue the project without superior quality hardware support along with a lot of new

integration. The real benefit of this work can only be fully realized when it can be

implemented in full scale.

4.3 Challenges

There are three basic challenges we face during the project implementation.

 ESP-8266 Wi-Fi Module

The Wi-Fi module works in its own specific language. So, we had to face a lot

problem regarding the ways of its language. Sometimes the Wi-Fi module itself

cannot connect with the local network, as a result the data sending got

interrupted many times. So, a better hardware support for Wi-Fi module is

expected to send data smoothly.

 Pulse Sensor

January 17, 2018 32


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

The data that is retrieved from the pulse sensor can give some error reading

sometimes. Due to unavailability of better pulse sensor in Jordan. This delayed

our implementation of the project in some ways as pulse sensor is an integral

part of this project.

 Temperature sensor

The data that is retrieved from the Temperature can give some error reading

sometimes. Due to inaccuracies in the sensor readings.

4.4 Future works

 Integrating more sensors for more specific data acquisition and analysis.

 Will be applicable in army services in active situation.

 Will be used to provide health service to rural areas in affordable price.

 Huge database will be built for doctors to diagnose people from different areas

and cultures.

Our project can be considered as platform to develop in the field of IoT on the health

sector. In developing countries like ours, this kind of innovative and cost-effective

project can improve the future of technology. So, we are looking forward to

implementing the project in order to make an impact in this new era of technology.

January 17, 2018 33


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

References

[1] www.wikipedia.com.

[2] www.commotionwireless.com.," Types of Wireless Networks".

[3] www.hindawi.com.," Internet of Things: Architectures, Protocols, and Applications",

Pallavi Sethi and Smruti R. Sarangi, 2017.

[4] www.talend.com.," Sensors, Environment and Internet of Things (IoT)", Zeeshan Javeed,

December 2016.

[5] www.ncbi.nlm.nih.gov.," Remote Health Monitoring for Older Adults and Those with

Heart Failure: Adherence and System Usability", Jun 2016.

[6] www.ncbi.nlm.nih.gov.,"A Review on Telemedicine-Based WBAN Framework for

Patient Monitoring", Aug 2013.

[7] www.file.scirp.org.," Wireless Body Area Network: An Overview and Various

Applications", Md. Taslim Arefin, Mohammad Hanif Ali1, A. K. M. Fazlul Haque, 2017.

[8] www.components101.com.," DS18B20 Temperature Sensor", May 2018.

[9] www.elprocus.com.," Heartbeat Sensor – Working & Application".

[10] www.instructables.com.," ESP 8266 Wi-Fi".

[11] www.arduino.cc.," Introduction".

January 17, 2018 34


Yarmouk University – Telecommunication Engineering
Wireless Body Area Network (WBAN)
Done By: Hamza Abusiam, Mosab Smadi, Mohammad sameeh, Ahed Araidah

[12] www.digikey.com.," Introduction to the Arduino IDE", by Maker.Io Staff, 2018.

[13] www.blynk.cc,.

January 17, 2018 35

You might also like