AH-Real-Time Remote Heart Beat Monitoring and GPS Tracking For Pilgrims Using Internet of Things

You might also like

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

‫مزاقبت مطتمزة ومباشزة إلاعدل دقاث قلب الحاج وجتبع مىقعه الجغزافي‬

‫باضتعمال إهترهت ألاشُاء‬


‫أمير محمد اإلانصف الحمامي‬
‫ حامعت شقزاء‬،‫ كلُت إدارة ألاعمال بعفُف‬،‫قطم الحاضب آلالي‬

Real-Time Remote Heart Beat Monitoring and


GPS Tracking for Pilgrim using Internet of
Things
Amir Muhammed Moncef Hammami
Computer Science Department, Faculty of Business and Administration, Afif Branch, Shaqra University

Arabic Abstract ‫ملخص البحث بالغة العربية‬


‫ًقدم هذا البحث هظام مزاقبت مباشز ومطتمز على شبكت ؤلاهترهت ًقىم بعزض معدل دقاث القلب للحاج باإلضافت إلى جتبع مىقعه‬
‫ ًجمع النظام البُاهاث وٍنقلها إلى معالج‬،Arduino ‫ فمن خالل اضتخدام أحهشة الاضتشعار اإلاتصلت بـلىحت‬.‫الجغزافي الخاص به‬
‫ ٌطتخدم‬.‫ الذي ًخشنها بشكل دوري على الطزفز في شبكت ؤلاهترهت وٍجعلها متاحت للطبِب اإلاتىاحد في مكان آخز‬Raspberry Pi
‫ من خالل‬ThingSpeak ‫ كىحدة شبكت إلرضال البُاهاث اإلاجمعت إلى ضزفز الىٍب‬GSM / GPRS ‫ ٌعتمد على‬Wi-Fi ‫النظام حهاس جىحُه‬
‫ ًزاقب الطبِب من خالل لىحت أحهشة القُاص معدل دقاث القلب وَطتعزض‬.‫البنُت التحتُت لإلهترهت إلاشغل شبكت ؤلاجصاالث‬
‫ ٌطاعد هذا النظام في اضتكشاف حاالث الطىارئ وإمكاهُت التدخل الطزَع من خالل‬.‫اإلاىقع الجغزافي للحاج على خزٍطت الىٍب‬
‫ وبهذه الطزٍقت ًقدم النظام حىدة عالُت للزعاًت الصحُت في مىضم الحج من خالل اإلازاقبت اإلاطتمزة‬.‫معزفت اإلاىقع الجغزافي‬
‫ ًدخل هذا اإلاشزوع في مفهىم إهترهت ألاشُاء الذي يهدف باألضاص إلى دمج العالم اإلاادي مع العالم الافتراض ي في شبكت‬.‫واإلاباشزة‬
.‫ؤلاهترهت‬

English Abstract ‫ملخص البحث باللغة إلانجليزية‬


This research proposed a web-based monitoring system that can help to view in real time heart beat rate of pilgrim
while tracking his GPS location. By using sensors connected to Arduino Microcontroller, the system collects data,
transmits them to the Raspberry Pi Minicomputer which stores them periodically on remote server and makes them
available to doctor located in another place. We use simple Wi-Fi Router based on GSM/GPRS Module as the network
unity to send collected data (Heart Beat Rate and GPS coordinates) to ThingSpeak web server through the Internet
infrastructure of the GSM operator. The doctor through a dashboard monitors heart beat rate and view pilgrim GPS
locations on web map. The system can help to resolve emergencies. In this way, it simultaneously improves the quality
of health care through constant attention. This project enters in the concept of Internet of Things which consists of
integrating the real-word into the Internet.

1 The Custodian of the Two Holy Mosques Institute for Hajj and Umrah Research, Umm Al-Qura University
1. Introduction
Nowadays Internet of Things (IoT) gained a great attention from researchers, since it becomes an important technology
that promises a smart human being life, by allowing a communications between objects, machines and everything
together with peoples. IoT represents a system which consists of things in the real world, and sensors attached to or
combined to these things, connected to the Internet via wired and wireless network structure. IoT promises many
applications in human life, making life easier, safe and smart. There are many applications such as smart homes,
transportation, energy, smart environment and E-Health.
On the other hand many pilgrims coming to Kingdom of Saudi Arabia are suffering from bad health because they don„t
have ready access to effective health monitoring and may be a suspected to be as critical situation patients. But with
small, powerful wireless solutions connected through the IoT, it is possible for monitoring these patients.
In order to enhance pilgrim security and safety, a system is proposed to allow monitoring heart beat rate of a specific
person while tracking locations in real time. Heart beat rate is a very vital health parameter that is directly related to the
soundness of the human cardiovascular system. Heart beat rate is the number of times the heart beats per minute,
reflects different physiological conditions such as biological workload, stress while performing Hajj rituals and
concentration on tasks, drowsiness and the active state of the autonomic nervous system.
The system has a great advantage since it allows monitoring a pilgrim using a simple Internet connection. Continuous
monitoring of pilgrim information is offered thanks to sensor connected to Arduino Microcontroller witch is also
attached to Raspberry Pi Minicomputer. The presence of GPS positions besides the health data is an important factor. In
case of dangerous situation, the location can be sent to the ambulance so that the patient can be taken to the nearest
hospital very quickly.
For this purpose we use Heart Pulse Sensor, GPS receiver and Wi-Fi module interconnected together with Arduino
Microcontroller and RPi. Pulse Sensor placed on a finger measures the heart beat rate and save the result in a variable
called BPM (Beats Per Minute). GPS module gets geographic coordinates from satellites (latitude, longitude, date, time,
speed, …) at regular time intervals. RPi board transmits and updates the pilgrim heart beat rate and location to a remote
server over Internet. A doctor can access a dynamic web page and visualize the heart beat rate on a chart. He can also
view pilgrim locations with Web Map.
The paper is structured as follows. Section 2 describes related works. Section 3 details more the concept of Internet of
Things. Section 4 describes the system architecture and features. Section 5 reports hardware components. Section 6
describes software components and gives implementation details. Finally section 7 concludes our paper and proposes
some directions for future enhancements.

2. Literature Review
We distinguish three axes depending on the content of the literature review: (i) The first axe deals with the subject and
the problematic of Heart Beat Rate Monitoring. (ii) The second axe deals with GPS Tracking issue. (iii) The third axe
focuses on technical aspect of the project implementation.

19th Scientific Forum for the Research of Hajj, Umrah and Madinah Visit - Scientific Bulletin for 4140AH 2
Heat Beat Rate Monitoring
In [1], authors designed a system that determines heart beat rate per minute and then sends short message service
(SMS) alert to the mobile phone. They measure ones heart rate through fingertip. They used Processing as the
programming language in order to implement a desktop application connected to Arduino Board. The application
monitors the heart beat rate. But the system is not connected to Internet and we cannot perform remote diagnostics.
[2] proposes a system that measures the heart beat rate and room temperature. In case of any sudden variations in the
heart beat rate, a message is sent to the doctor and family members using GSM modem for the immediate rescue of the
person concerned. The message is sent using SMS. GSM works just like a mobile phone and makes use of the mobile
operator. The difference from our study concerns the real-time transmissions of data to a remote server.

GPS Tracking
We cannot introduce GPS tracking system without talking about vehicle tracking devices. These devices are widely used
to locate cars in a passive mode. Passive mode means that GPS coordinates are stored on external storage and visualized
later after the car is stopped. In contrast, active mode means real time storage of data in a remote database. One can
view locations while the object is in movement.
[3] proposes Intelligent safety and location tracking device for old age and women using concept of Internet of Things.
In this work authors use ARM-LPC2138 as microcontroller connected to GPS and SIMCOM900A modules. They
developed a webpage using Microsoft ASP language.
Missing Pilgrims issue is also addressed in [4]. This research proposed centralize controlling system that can help to
track missing pilgrims during Hajj season. The system is still under study. Similar to our approach, the location of the
pilgrim is sent instantly to the web server in the form of GPRS packet through the GSM network. Our work adds Heart
Beat Rate Monitoring that can be extended to other health parameters like temperature and pressure.

Technical Aspects
From a technical point of view, data monitoring issue has been treated widely since the emergence of the Internet of
Things. We define three major roles: collect data, store values and finally access these values. Data collection can be
performed using sensors connected to Arduino MC or attached to Raspberry Pi Miniocomputer. Data storing can be
done locally on each board or remotely on servers located in the Inter-net. Finally data visualization can be performed
by direct access to Arduino or Raspaberry Pi if data is stored locally on the board. It can also be done via web browsers
that access web servers if data is stored remotely.

3. Internet of Things
Definition
IoT is referred to as “a set of technologies for accessing the data collected by various devices through wireless and wired
Internet networks” [5]. Although there are notable differences in the definitions of IoT, a common explanation is the

3 The Custodian of the Two Holy Mosques Institute for Hajj and Umrah Research, Umm Al-Qura University
ability to provide valuable and beneficial information by various devices connected to Internet. In another words it
consists of connecting real world to Internet. Things are objects from the surrounding environment like temperature and
light. Sensors and actuators are connected to remote servers through Internet.

Architecture
The architecture of Internet of Things is based on four layers as described in [6]: Physical Layer, Process Layer, Network
Layer and finally Application Layer. Number of researchers adds another layer called Business Layer. The bottom layer
the physical layer interacts with the real world. It is composed of two parts: sensors and actuators. Sensors are electronic
components which role consists of sensing and collecting data from real objects. A better term for a sensor is a
transducer [7]. A transducer is any physical device that converts one form of energy into another. So, in the case of a
sensor, the transducer converts some physical phenomenon into an electrical impulse that can then be interpreted to
determine a reading. There are many different types of sensors. Flow sensors, temperature sensors, voltage sensors,
humidity sensors, and the list go on. Another type of transducer that we encounter in many IoT systems is an actuator. In
simple terms, an actuator operates in the reverse direction of a sensor. It takes an electrical input and turns it into
physical action. For instance, an electric motor, a hydraulic system, and a pneumatic system are all different types of
actuators. The Process Layer is the brain part to control all connected devices. It can be composed of: Arduino
Microcontroller or Raspberry Pi Minicomputer. It contains hardware and software working together to achieve special
goal. The network Layer enables connectivity and it is responsible of sending and receiving data based on wired or
wireless network. On top of the architecture we find the Application Layer that illustrates the purpose of the IoT project.
An Internet navigator loads a dynamic web page acting as a monitor to visualize the collected data through sensors. It
may contain buttons to activate actuators for example.
From this architecture we can extract two different directions of flow of instructions: From bottom to the top and from
top to the bottom. The first direction typically concerns monitoring-based applications like GPS Tracking or Continuous
Health Monitoring System like the proposed one. These kinds of applications follow three main steps: (i) Data collection
from sensors, (ii) local or remote storage and (iii) Analysis step. Data collection is realized in the physical layer (called
also Perception Layer). It is used for gathering data from various sensors. The amount of data collected can increases in
an exponential manner. Here we talk about Big Data issues. After collecting data the next step deals with Storage. It can
be done locally on SD memory card for example or on remote database located on the Internet. Here we talk about
Cloud Computing. Finally the Analysis step deals with how to use these collected data and more interesting what
decision can be taken.
The second direction: from top to bottom includes projects where we activate actuators. From the Application Layer we
perform actions. These actions are transmitted to the bottom Layer (usually located on another device) and do
something. For example it is possible to turn on and turn off a fire extinguisher when fire ignites from outside by simple
Internet connection without risking injury.
In some projects we can combine these two flows and create an application witch collects data with sensors. If any
problem is happen we can activate actuators to modify the environment state.

19th Scientific Forum for the Research of Hajj, Umrah and Madinah Visit - Scientific Bulletin for 4140AH 4
4. System Architecture
The System proposed in this research has the following features:
- Acquisition of pigrim geographic coordinates (latitude, longitude, date, time, speed) in real time using GPS
Module,

- Measure of Heart Beat Rate using Pulse Sensor connected to Arduino Microcontroller,

- Transmission of collected data (GPS location and other values) to Raspberry Pi Minicomputer using USB
cable,

- Publishing values to a remote server (ThingSpeak) periodically after a predefined time interval (Push Mode(,

- A doctor monitors the collected data in real-time and can visualize positions on Web Map using Smartphone
or Laptop (Pull Mode) by simple Internet connection,

- With data collected and analyzed, the doctor can make decision about this pigrim and perform intervention.

The system follows a layered architecture that can be mapped to the Internet of Things layers. In particular the
Application Layer concerns the analysis layer based on web technologies. This architecture implements the previous
listed features.
Dashboard
Application Layer

Network Layer Wi-Fi Unity

Process Layer Arduino attached to Raspberry Pi

Perception Layer Pulse Sensor GPS Receiver

Fig1. Layered Architecture


From this architecture we identify four major steps to enable real-time data monitoring:
1. Capture data like heart beat rate and GPS coordinates. This is done using sensors connected to Arduino board,
2. Make the Arduino write the values to the Serial port to Raspberry Pi,
3. Have a Python program running in the Raspberry Pi that reads from the Serial port and then stores the values into
ThingSpeak server,
4. In the end, we can point the internet browser to a ThingSpeak website and get a plot of the collected data.

5 The Custodian of the Two Holy Mosques Institute for Hajj and Umrah Research, Umm Al-Qura University
Store data on remote
3
Satellite Web Server
Web Map

1a Collect GPS Coordinates

2 Send data
Monitored
Pilgrim
Measure Heart
1b 4 View BPM and
Beat
locations
Doctor

Fig2. Global Architecture


The proposed work is implemented in two steps i.e., in Hardware configuration and Software implementation which are
discussed below.

5. Hardware Components
The associated electronic components for the different layers and their functionalities are given below:

Perception Layer
Sensors convert various forms of physical energy into electrical energy, allowing microcontrollers to read changes in the
physical world. This layer is composed of Pulse Sensor and GPS Receiver.
Pulse Sensor Amped : is a plug-and-play heart-rate sensor for Arduino and Arduino compatibles. It can be used to easily
incorporate live heart rate data in many projects. Pulse Sensor adds amplification and noise cancellation circuitry to the
hardware. It's noticeably faster and easier to get reliable pulse readings:

Fig3. Pulse Sensor

19th Scientific Forum for the Research of Hajj, Umrah and Madinah Visit - Scientific Bulletin for 4140AH 6
GPS Receiver: GPS (Global Positioning System) is a satellite navigation system to locate the position of an object in the
earth. It provides information such as the location coordinates (latitude, longitude, altitude, date, time, speed, and so
on). NMEA (National Marine Electronics Association) protocol is a standard of data in the navigation system. The GPS
receiver collects these data from satellite. In our study we use U-Blox Neo-6M module:

Fig4. GPS Receiver

Process Layer: Arduino attached to Raspberry Pi


Raspberry Pi is a mini, fully functional computer. It runs Linux and there are many ready-to-use resources for it. It is
very easy to connect Raspberry Pi to the internet. Many USB devices are compatible with Raspberry Pi and can work
without installing the driver. Raspberry Pi provides up to 40 GPIO pins for programming; however that„s usually not
enough if we plan to build a serious project. In addition Raspberry Pi could not accept analog input via the GPIO pins,
and has only one pin that could output PWM with hardware, these factors limit the utility of Raspberry Pi in many
scenarios. That's why we add Arduino MC.
Arduino is a microcontroller, which will run the predefined program to process input/output on its GPIO pins. Better
than Raspberry Pi, Arduino has some GPIO pins that could accept analog input, and has several (usually 6) GPIO pins
that could generate PWM output with hardware. There are many well designed shields for Arduino, which could extend
Arduino to do specific job. Usually Arduino doesn„t have network connection, and could not work as USB host.
The main idea of this project is to use Arduino as the extension of Raspberry Pi, and make the best of both boards. We
can easily access the GPIO pins on connected Arduino, just like they are on Raspberry Pi; accept analog input and
generate accurate PWM output via the GPIO pins on Arduino. It is also possible to make use of the shields for Arduino,
indirectly on Raspberry Pi.

Fig5. Raspberry Pi Minicomputer and Arduino Microcontroller

7 The Custodian of the Two Holy Mosques Institute for Hajj and Umrah Research, Umm Al-Qura University
Our proposition consists of connecting several sensors to Arduino Microcontroller which is also attached to Raspberry
Pi using a standard USB cable. This solution allows us to make profit of the benefits of both boards.

Network Layer: W-Fi Router with SIM Card


Raspberry Pi will push collected data values to a remote server. The suitable solu-tion consists of using a Wi-Fi router
which has two interfaces: (i) an external interface and (ii) an internal interface. The external interface is based on
GSM/GPRS standard. It allows the router to be connected to Internet using the GSM network operator of the country.
GSM (Global System for Mobile communication) is digital cellular system used for mobile devices. It is an international
standard for mobile which is widely used for long distance communication. GPRS (General Packet Radio Services) is a
packet based wireless communication service that works with data rate of 56-114 kbps. GSM already has GPRS facilities
inbuilt. A SIM card (pre-paid) is required to implement the data monitoring system.
The internal interface is based on Wi-Fi local network. It allows Raspberry Pi to be connected to the Wi-Fi hotspot and
thus to Internet. The Wi-Fi hotspot acts as a bridge between Raspberry Pi and the Internet.
In this project we used HUAWEI E5330 as a mobile-Wi-Fi device. It is produced by Huawei technologies and it provides
Internet access through any W-Fi device. The device supports GSM/GPRS standard. It is possible to plug a pre-paid SIM
card and connect to the GSM network operator. By using this device we create our own secure mobile Wi-Fi hotspot.
This device is fast, reliable and easy to use.

Fig6. Wi-Fi Router

Application Layer: Dashboard based on Webpages


We have to make difference between two locations: Where the system is located and from where the doctor monitors
data. The first location denotes where the system is placed. The system is an autonomous box with power supply that
can be plugged with any pilgrim in condition that the GSM network is enabled. The reason of this constraint is to enable
Internet connections.
After transmitting values to a remote server, a doctor can visualize data on charts. A detailed description is given in the
next section.

6. Software Implementation
In the software implementation we distinguish three levels: Arduino, Raspberry Pi and ThingSpeak Server.

19th Scientific Forum for the Research of Hajj, Umrah and Madinah Visit - Scientific Bulletin for 4140AH 8
Arduino Level
Sensors convert various forms of physical energy into electrical energy, allowing microcontrollers to receive signals. This
microcontroller is Arduino Board. So we use Arduino IDE Program to write a sketch (C program) and flush this program
to the Arduino board. The program consists of two parts:
1. Initializing pins connected to sensors as inputs: setup() function,
2. Infinite loop responsible of reading values, send them to serial port and waits a delay.

Raspberry Pi Level
Where to put the data became the next question. A customized solution consists of building a private web server. This
web server contains dynamic webpages that interact with a database. A programming script like PHP can be used to
store data on tables and then perform selection queries. Using a plotting JavaScript library like Flot allows visualizing
data on charts.
Another solution which is a simplified approach consists of sending all collected data to a predefined remote server.
Such servers exist on Internet and are free for use for some period of time. We can cite Google Sheets , Dweet.io and
ThingSpeak.
In our project we decided to leverage services offered by ThingSpeak. It has an API and let us post and review the data
from anywhere. ThingSpeak is a platform providing various services exclusively targeted for building IoT applications.
The real-time collected data are visualized in the form of charts in ThingSpeak .The “ThingSpeak channel” is the core
element. It wills stores the data that we send to this remote server.
On Raspberry Pi we run a Python script. This program is going to read data from Arduino and then publish the values of
that data to our channel on ThingSpeak.

ThingSpeak Level
On ThingSpeak Website we should create a free account or login to an existing account. We create a new channel with
many fields according to environment data. The order of the fields is important later when we post data. We will also
need to write API key for the channel as it will be required to post data.
Currently we have tested our system with Pulse Sensor in order to measure Pilgrim Heart Beat Rate. Lots of experiments
have been done. If we check our channel on ThingSpeak we obtain the following charts:

Fig7. Hear Beat Rate Experiments

9 The Custodian of the Two Holy Mosques Institute for Hajj and Umrah Research, Umm Al-Qura University
In order to show pilgrim locations we developed dynamic webpage that loads latitude and longitude values from
ThingSpeak server and draw markers on Web Map. Whenever the docotor wants to know the pilgrim's locations he
accesses the webpage.

Fig8. GPS coordinates examples

Fig9. Web Map

7. Conclusion and perspectives


We have proposed an IoT based data monitoring system using sensors. We measure Heart Beat Rate using Pulse Sensor.
GPS Receiver is used to locate the pigrim. This system provides several advantages in compared to the traditional
method. Mainly it allows real-time monitoring that can be accessible from anywhere in the Internet. At present, we
tested each module separately using basic C and Python programs. Our objective is to make all pieces together and
perform overall experiments. The proposed system can be extensible with other sensors like tempearture and pressure
sensors. We can also improve the system by sending notification to the doctor if a value exceeds certain limits.
The presence of GPS positions besides the heart rate is an important factor. In case of dangerous situation, the location
can be sent to the ambulance so that the patient can be taken to the nearest hospital very quickly. Finally this idea can
be applied and implemented in many other fields and applications.

8. References
[1] Bandana M., Ajit K. P., 2016. Heart rate Monitoring System using fingertip through Arduino and Processing software,
International Journal of Science, Engineering and Technology Research (IJSETR), Volume 5, Issue 1, January 2016.
[2] Nagaravali T., Chandana S., Heart Rate and Activity Monitoring, International Journal of Computer Science &
Communication Network, Volume 5, Issue 3, Pages 173-176.
19th Scientific Forum for the Research of Hajj, Umrah and Madinah Visit - Scientific Bulletin for 4140AH 10
[3] Nitin S. W. and Ravindra P. S., Intelligent Safety & Location Tracking Device for Old Age & Women Using Concept of
Internet of Things, International Journal of Innovative Research in Science, Engineering and Technology. Vol. 5, Issue 10,
October 2016.
[4] Zahida P. and Kawther A.A., 2015. Missing Pilgrims Tracking System Using GPS, GSM and Arduino Microcontroller,
International Conference on Recent Advances in Computer Systems (RACS 2015).
[5] Gubbi J., Buyya R., Marusic S., Palaniswami M. “Internet of Things (IoT): A vision, architectural elements, and future
directions”, i Future Generation Computer Systems, Vol. 29, Issue7, September 2013, pp 1645-1660.
[6] M. Aazam, I. Khan and A. AbduAllah Alaffar, “Cloud of Things: Integrating Internet of Things and cloud computing
and the issues involved,” Proceedings of 2014 11th International Bhurban Conference on Applied Sciences &
Technology (IBCAST) Islamabad, Pakistan, 14th-18th January, 2014, IEEE.
[7] IoT Systems: Sensors and Actuators. From website: https://dzone.com/articles/iot-systems-sensors-and-actuators

11 The Custodian of the Two Holy Mosques Institute for Hajj and Umrah Research, Umm Al-Qura University

You might also like