Professional Documents
Culture Documents
AH-Real-Time Remote Heart Beat Monitoring and GPS Tracking For Pilgrims Using Internet of Things
AH-Real-Time Remote Heart Beat Monitoring and GPS Tracking For Pilgrims Using Internet of Things
AH-Real-Time Remote Heart Beat Monitoring and GPS Tracking For Pilgrims Using Internet of Things
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
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
2 Send data
Monitored
Pilgrim
Measure Heart
1b 4 View BPM and
Beat
locations
Doctor
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:
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:
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.
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:
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.
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