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

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/305704720

AN IOT BASED SCHOOL BUS TRACKING AND MONITORING SYSTEM

Conference Paper · July 2016


DOI: 10.21125/edulearn.2016.2320

CITATIONS READS

4 11,900

4 authors:

Emad Badawi Aly Elhakim


University of Ottawa American University of Sharjah
6 PUBLICATIONS   9 CITATIONS    1 PUBLICATION   4 CITATIONS   

SEE PROFILE SEE PROFILE

Ahmed Abdulhameed Imran A. Zualkernan


American University of Sharjah American University of Sharjah
2 PUBLICATIONS   4 CITATIONS    160 PUBLICATIONS   2,015 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

performance analysis of differnet datacenter network topologies View project

Master's thesis View project

All content following this page was uploaded by Emad Badawi on 28 October 2017.

The user has requested enhancement of the downloaded file.


AN IOT BASED SCHOOL BUS TRACKING AND MONITORING
SYSTEM
Emad Badawy, Aly Elhakim, Ahmed Abdulhamid, Imran A. Zualkernan
American University of Sharjah (UAE)

Abstract
Smart education is one key component of smart cities. Smart education is often conceived as using
computers in the classrooms. However, there are many factors outside the classroom that can have
an impact on a child’s quality of education. One key factor in many countries is the quality and the
amount of time a child spends in the school bus each day to commute to and from their School. This
experience has been largely ignored. However, with currently available Internet of Things (IoT)
technologies, it is possible to build systems that can provide complete visibility into this aspect of a
child’s life. This paper presents the design and implementation of an IoT-based system that allows
parents, schools and regulatory bodies to track the conditions of comfort and safety inside a school
bus in a real-time manner. The proposed system directly interfaces with the bus using the OBD/CAN
interface and conveys these parameters to a central server using 3G/4G connectivity and the MQTT
protocol. A variety of reports for various stakeholder for bus comfort, safety and attendance are then
generated from this real-time data providing complete visibility into conditions inside each school bus.
Keywords: Internet of Things, smart cities, smart education, smart school bus, OBD-II, Arduino, RFID,
MQTT

1 INTRODUCTION
The recent emergence of Internet of Things (IoT) has enabled us to consider the contextual factors
that can have an impact on students’ life and consequently on their education and learning outcomes.
Children around the world spend an inordinate amount of time traveling to and from school. Many
children in developing to developed nations use school buses which may or may not be regulated by
the government. What happens inside a school bus including the environment, the amount of time
took etc. is generally not known. This is especially true when the school buses are operated by private
operators. A part of smart education is to bring more transparency into what goes on in a school bus
and to take appropriate regulatory and policy actions based on such data. For example, there should
be constraints on the maximum amount of time a child spends on a school bus as well as the
environmental, safety and traceability aspects of where a child is.
This paper proposes a system which instruments each school bus with sensors that collect information
about the conditions in a bus and transmit it in real time to a server using the telecom infrastructure.
This information about each bus is then analyzed and reports are generated for the school as well as
for the Ministry of Education on various aspects like environment, time, safety etc.
The remainder of the paper is organized as follows: In Section 2, a literature review is presented of the
work done concerning getting important data about the status and environmental conditions inside a
vehicle. The proposed system is the subject of Section 3. System implementation is addressed in
Section 4. Conclusions and Future Work are given in Section 5.

2 PREVIOUS WORK
Aravindhan Athavan et al., [1] presented a lifetime data acquisition framework for vehicles with
reduced memory requirements and real-time (quick) data access and analysis. Their system consists
of μBlox C027-G35 kit which is used as the main device for data acquisition and processing with built-
in GSM/GPRS modem, OBDII with CAN Interface, OBDII to CAN Converter, and remote (cloud)
server. The framework pre-processes the samples collected by the microcontroller and save it to the
server. This pre-processing significantly reduces the amount of data saved and communicated to the
server and makes the analysis simpler. First, the controller acquires in-vehicle data from the OBDII.
Then, the data is stored on the controller for the duration of the vehicle’s trip. Once the trip ends, the
data is communicated from the controller to the cloud server using the GSM/GPRS modem. Finally,
when data reaches the server, data analysis is performed and knowledge is created. In addition, the
authors provides steps of development of framework which include deciding the application, deriving
inputs and source of input data, designing data structure (size of data), defining protocol to transfer
data to the server, designing and configuring a data server, and identifying the suitable controller.
Furthermore, a test application has been created to implement the conceptual framework.
Michele Carignani et al., [2] built a system that aims to integrate the in-vehicle CAN/OBD network and
IoT network of wireless devices with an Intelligent Transport System. This system is capable of
delivering non-safety critical services to users and machines. The system consists of OBD and a
display connected to a CPU. In addition, a number of standards and protocols are used to
communicate with the WSN and the Internet. The considered protocols include GPRS/3G, IEEE
802.15.4, IEEE 802.11p, 6LoWPAN, CoAP, and RESTful web services. Moreover, a bridge is
suggested to abstract all on-board generated data. For example, WSN/ODB node has to abstract data
coming from OBD interface as a web resource where each resource can be addressed using a URI.
Using OBDII, it is possible to gather vehicle status information like engine RPM, engine coolant
temperature, vehicle speed, mass air flow, and oxygen voltage, throttle, and fuel system status.
E. Ceuca et al. [3] implemented an electrical vehicle tracking system using GPS/GSM and OBD
drivers. The system uses GPS/GSM to track the vehicle location, and to send the location coordinates
periodically to a storage server. The system also connected the vehicle with driver’s phone using
Automatic Link that can detect any kind of crash and use the smartphone to report the crash to 911
providing them with the needed information like the location, driver name and the vehicle description.
The OBD driver was used to read the vehicle speed and other information and to correlate this
information with energy recovery in order to decrease the energy consumption as described in [4]. The
OBD was also used to display friendly readable information about the vehicle state using a mobile
App.
Jheng-Syu Jhou et al. [5] presented a real time vehicle diagnostic system. This system used the
CAN/OBD-2 to collect essential information about car’s status like engine rpm, speed, coolant
temperature, fault codes and other information [4]. The system also used a GPS receiver to read
velocity, coordinates and estimated error location. After collecting the needed data, the system
encoded the information using CAN/OBD-2 encoder and sent it to Vehicle Diagnostic server (VDS)
using a 3.5G wireless network module. In VDS, an online expert system containing a knowledge base
was used to analyse the received data. Upon detection of an abnormal condition, the VDS informed
the driver or the qualified company to act accordingly.
Chin E. Lin et al. [6, 7] collected warning data from the vehicles using OBD. After collection, the data is
transmitted using 3G to a maintenance server to be processed in real time.
Zhuang Ji-Hui et al. [8] proposed a platform to acquire data from electric vehicles and transmit it to a
centralized server using a GPRS module. The in-vehicle data is collected and sent to centralized
server for analysis. The collected data can help predict important information like driving pattern,
control strategy, driving cycle, fault and reliability.
Sungur et al. [9] developed a smart bus stop-passenger information system. In this system, the instant
movement information of the vehicle is transferred to a central server through a GPS module that is
integrated with an embedded computer system and a web service. An embedded mini-computer
based system and a digital monitor were installed in each bus stop in order to present the information
related to the movements of all the public transportation vehicles and their approaches to the related
bus-stops. The software developed to manage the system provided the authorities with the
advantages of instant status observation, remote-informing/updating related to managing the status of
travel for the public transportation vehicles. In addition to the above, a database was developed in
order to record the information related to characteristics and the routes of the vehicles provide public
transportation in the city and bus stops and an application was developed to manage this information.
Eken et al. [10] proposed a location-aware smart bus stop system where any passenger with a mobile
device or a smartphone is able to scan QR codes placed at bus stops to view bus’s current location
and bus arrival times on a map. A user can view bus routes on the map including their geographic and
nongeographic attributes. The system used the C4.5 algorithm for estimating the bus arrival time.
Google Maps in addition to the GPS were used for displaying current locations of buses on the maps,
as well as the related route information. If the users were registered to the system, they could also get
information about routes and bus arrival times through SMS and e-mails.
Choi et al. [11] implemented a smart bus guide application which acts as a context-aware application.
This system is considered a location-aware application for smart buses in Seoul. The system guides
users to the nearby bus stops, and also provides users with useful information about the bus lines at
the buses stops. The computing device used was HP pocket PC with an integrated GPS system. The
main features of the system can be summarized in four parts; location-aware bus guide service based
on PDA and GPS, a simple and easy user interface, displaying bus stops on the map near by the
user's current position and showing bus line information at the required bus stop.
Baek et al. [12] proposed a new standard of electronic-control network to collect data from the
electronic-control devices. The proposed system uses external sensors such as GPS and camera to
collect video, timing, and data about the location that are required to make a judgment on the vehicle’s
current status. Design of a black box that can record only videos and images and that of EDR (Event
Data Recorder) systems that can record only driving data was presented. A Vehicle Driving State
System (VDSS) using the Media-oriented System Transport (MOST) and On-Board Diagnostics II
(OBD-II) were used to monitor the status of the vehicle and to estimate the cause of the accidents
which the vehicle might get into.
Shi-Huang Chen et al. [13, 14] used speech control interface to control a vehicle’s movement. Their
system used OBD to collect vehicle’s data and send it to a vehicle surveillance server for analysis.
The vehicle could also be controlled and operated using GPS-OBD system.
László Lengyel et al. [15] introduced Sensor HUB framework (SHF) that makes use of recent open-
source technologies to create IoT related applications and services. SHF is available as platform for
vehicle systems as well. The SHF is used for sensor data collection, processing, transmission, and
analysis. The framework consists of a Cloud based backend, Big Data Analytics and Management,
software components that can be used in a specific domain, applications, services, business
intelligence (BI) reports, and dashboards. The “Vehicle ICT” platform is implemented using SHF. The
data collection is done via OBDII/CAN.
Mario Gerla et al. [16] proposed the concept of the Internet of Autonomous Vehicles. The author
believes that the Internet of Vehicles will predict the customer intentions relying on its
communications, storage, intelligence and learning capabilities. In the vehicular network, the human
control will be removed and the autonomous vehicles will efficiently cooperate to keep a smooth traffic
flow in the roads and the highways. The concept will be implemented using the Vehicular Cloud.
Qiyan Wang et al. [17] proposed a security framework for CAN networks in vehicular systems entitled
VeCure. Since vehicle systems are no longer closed systems and are connected to the Internet
through many interfaces like Bluetooth, 3G/4G, GPS, Wi-Fi, and wireless sensor communication, this
framework provides a message authentication service to CAN messages in vehicles to protect them
from cyber-attacks by spoofing messages. The main advantages of VeCure are 1) Its compatibility
with current vehicle systems and 2) Offline message computation to minimize online message
processing, cost and delay, and imposing a trust group to enforce access control. After testing the
VeCure prototype on a testbed, the online message processing overhead was only 50us. These
results are better than any existing solution by 20 folds at least.
Kristian Smith et al. [18] presented a framework that saves logs of a large number of automobiles from
a variety of sensors like OBDII and GPS on the Web. The framework is built on top of the Arduino
microcontroller due to its affordability, network support, and overall adaptability. In a brief, the Arduino
microcontroller is connected to SIM900 GSM/GPRS Shield IComsat from ITEAD Studio, GPS Shield
from ITEAD Studio and SparkFun OBD-II-UART Board. The microprocessor is capable of accessing
and translating any available OBDII or CAN Bus protocol data. Moreover, the module can perform
some light on-board processing and send intensive computation to the server via the GSM/GRPS
module.
Fleischer et al. [19] proposed the design and development of a GPS/GSM system for real-time vehicle
tracking and alerting for accidents and robbery. The system consists of a microcontroller, GPS
module, and a GSM module in the vehicle. In addition, a management system, robbery alert system,
on-board location display and accident alert system are also integrated. The systems use a set of
APIs like Google Mapping, SMS Gateway and Crystal Reporting to achieve its function.
Jorge Zaldivar et al. [20] presented an Android-based application that monitors the vehicle through
OBDII interface for accidents detection. In case of accidents, the application sends immediate
email/SMS to predefined contacts. In addition, the application makes an automatic phone call to
emergency services. The system consists of OBDII, smartphone, and Android application. First, the
data retrieved from the vehicle through the OBDII module is sent to the smartphone via Bluetooth/Wi-
Fi. Then, the Android application installed on the smartphone uses the pre-mentioned services.
3 SYSTEM ARCHITECTURE
In this section, a detailed discussion of the overall system architecture is presented. In addition, an
interaction between each component of the system and the centralized server including the analytic
engine is shown. Finally, how different reports are generated for different stakeholders based on their
concerns using the same data source are also provided.

Figure 1. Overall System Architecture


As Figure 1 shows, each school bus contains a variety of modules including an OBD-II Module, an
RFID Module, RFID card for each child, DHT22 temperature and humidity sensor and a smartphone
that acts as a mobile hotspot. First, each data collection module (e.g., temperature and humidity)
reads in real-time and feeds the data to an Arduino microcontroller. Next, the Arduino microcontroller
sends the collected data to a MQTT broker on the Cloud using the Wifly Shield and mobile hotspot
that provides Internet connection. An Application Server implemented using Node.js collects the data
from the MQTT broker through publish/subscribe mechanism and saves the data using the NSQL
Couch DB database. The saved data can optionally be routed to Data Analysis Engine like R to
generate various analytical reports for the different stakeholders.
As Figure 2 shows, an OBD-II module is physically attached to each bus using the standard OBD-II
connector available in most modern vehicles. Real-time data are collected by the OBD-II module and
sent to the Arduino microcontroller using the RS-232 interface. The Arduino microcontroller
subsequently forwards the data to a Cloud-based MQTT broker. The NodeJS Server acting as a
subscriber grabs values from the MQTT broker and saves them to the Couch DB database for further
processing. An As Figure 2 shows, an analytical engine like R can also be used to perform data
mining tasks to furnish analytic reports to a variety of stakeholders.
As Figure 3 show, each bus is also supplied with an RFID Reader at the gate and each student is
given an RFID Card. When a student enters/leaves the bus, a record is captured with a date and time
stamp using the Arduino microcontroller. Arduino publishes the record of each child’s entry and exit to
the MQTT broker. The Application Server based on NodeJS grabs this data from the MQTT broker
and saves the data to the Couch DB. This mechanisms allows one to track the presence as well the
amount of time a particular child spends in a bus for each day. This has both safety and regulatory
aspects. For parents, they can track exactly when their child boarded the bus at any point in time. A
regulator, on the other hand, can ensure that no child spends more than a specific amount of time on
a school bus while commuting. A subscribing parent can know exactly when their child boarded a bus.
Figure 2. OBD-II Module Diagram

Figure 3. RFID Module Diagram

4 IMPLEMENTATION
The hardware components used in the proposed system are shown in Figure 4. The system consists
of the following components:
1. Arduino Mega 2560 microcontroller that acquires data from all the modules.
2. OBD-II Module that provides real-time vehicle status information.
3. RFID Reader which monitors bus attendance and usage.
4. RFID Card that is given to each student.
5. DHT22 to collect temperature and humidity data.
6. WiFly Shield for providing Internet connectivity.
7. A Smart Phone that acts as an Internet Hotspot using 3G/4G services.

Figure 4. Hardware components of the proposed system


Figure 5, shows a sample document for the OBD-II Module stored on the Couch DB with the readings
collected from the bus.

Figure 5. Couch DB OBD-II Document


The PMV/PPD method in the ASHRAE 55-2010 Standard [21] was used to calculate a comfort index
for the bus. The standard uses a combination of temperature (ºC) and relative humidity (%). As Figure
6 shows, the blue region indicates whether the environmental conditions inside the bus satisfy comfort
parameters or not. The farther a point d is from the red line in the middle of the comfort zone, the less
the comfort level. A point outside the blue zone indicates uncomfortable conditions inside the bus.
Figure 7 shows a report showing the average speed of the bus for a specified date range. The chart
presents the average distance travelled by all the buses each day of the week. In addition, the alerts
for the days the average distance travelled is beyond the expected average are also generated. Figure
8 shows a report comparing the thermal comfort of two schools over time. The chart displays average
thermal comfort (%) of all the buses for each day of the week. Figure 9 shows a report showing how
many children traveled on each bus on a particular day of the week. Figure 10 shows the average time
a student spent in a school bus each week. Finally, Figure 11 shows the current position of the bus
using Google maps.
Figure 6. Comfort zone chart for the bus

Figure 7. Weekly distance report for a school bus

Figure 8. Weekly Average Thermal Comfort (%) Comparison Report


Figure 9. Weekly Average Attendance (%) Comparison Report

Figure 10. Weekly Average Time Spent By Student in Bus (%) Comparison Report

Figure 11. Google Map Integration


5 CONCLUSIONS
IoT enables one to perceive the world as billions of interconnected sensors and heterogeneous
devices working seamlessly and flexibly with the environment to make the planet smarter. Smart
education is one good candidate for IoT implementations. This paper showed how IoT technologies
can be used to make the school transportation system smarter. This implementation relies on the
state-of-art technologies and lightweight communication protocols to make an efficient and practical
solution. The system is stable, highly-scalable and reliable.

REFERENCES
[1] Aravindhan Athavan, Dr. Radhika. N, “Memory Optimized Lifetime Vehicle Data Acquisition
Framework”, 2015 Intl. Conference on Computing and Network Communications, Trivandrum,
India, ©2015 IEEE.
[2] Michele Carignani, Silvia Ferrini, Matteo Petracca, Mariano Falcitelli, and Paolo Pagano, “A
Prototype Bridge Between Automotive and the IoT”, Internet of Things (WF-IoT), 2015 IEEE 2nd
World Forum.
[3] E. Ceuca, A. Tulbure, A. Taut, O. Pop, I. Farkas, “Embedded System for Remote Monitoring of
OBD Bus”, 36th Int. Spring Seminar on Electronics Technology, 978-1-4799-0036-7/13/$31.00
©2013 IEEE.
[4] Diagnostic Trouble Code Definitions Equivalent to ISO/DIS 15031-6, SAE Standard J2012,
2002.
[5] Jheng-Syu Jhou, Shi-Huang Chen, Wu-Der Tsay, Mei-Chiao Lai, “The Implementation of OBD-
II Vehicle Diagnosis System Integrated with Cloud Computation Technology”, 2013 Second
International Conference on Robot, Vision and Signal Processing, 978-1-4799-3184-2/13, 2013
IEEE.
[6] Chin E. Lin, Chih-Chi Li, Sung-Huan Yang, “Development of On-Line Diagnostics and Real
Time Early Warning System for Vehicles”, SIcon/05 - Sensors for Industry Conference Houston,
Texas, USA, 8-10 February 2005.
[7] Chin E. Lin, Ying-Shing Shiao, Chih-Chi Li, Sung-Huan Yang, Shun-Hua Lin, and Chun-Yi Lin,
“Real-Time Remote Onboard Diagnostics Using Embedded GPRS Surveillance Technology”,
IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY, VOL. 56, NO. 3, MAY 2007.
[8] Zhuang Ji-Hui,Xie Hui, Yan Ying, “Research and Development of Electric Vehicle Data
Collection and Calibration Platform Based on GPRS and INTERNET”, IEEE Vehicle Power and
Propulsion Conference (VPPC), September 3-5, 2008, Harbin, China.
[9] Sungur, Cemil, Ismail Babaoglu, and Aysegul Sungur. "Smart Bus Station-Passenger
Information System." Information Science and Control Engineering (ICISCE), 2015 2nd
International Conference on. IEEE, 2015.
[10] Eken, Suleyman, and Ahmet Sayar. "A smart bus tracking system based on location-aware
services and QR codes." Innovations in Intelligent Systems and Applications (INISTA)
Proceedings, 2014 IEEE International Symposium on. IEEE, 2014.
[11] Choi, Joo-Yen, et al. "A Location-Aware Smart Bus Guide Application for Seoul." Third 2008
International Conference on Convergence and Hybrid Information Technology. IEEE, 2008.
[12] Baek, Sung-Hyun, et al. "Implementation vehicle driving state system with obd-ii, most
networks." Communications (APCC), 2011 17th Asia-Pacific Conference on. IEEE, 2011.
[13] Shi-Huang Chen, Jun-Yu Chen, Kuo-Yuan Lu, “The Use of Cloud Speech Recognition
Technology in Vehicle Diagnosis Applications”, 2011 Fifth International Conference on
Innovative Mobile and Internet Services in Ubiquitous Computing.
[14] Shi-Huang Chen, Yu-Ru Wei, “A Study on Speech Control Interface for Vehicle On-Board
Diagnostic System”, 2010 Fourth International Conference on Genetic and Evolutionary
Computing.
[15] László Lengyel, Péter Ekler, Tamás Ujj, Tamás Balogh, and Hassan Charaf "SensorHUB: An
IoT Driver Framework for Supporting Sensor Networks and Data Analysis" International Journal
of Distributed Sensor Networks, Volume 2015.
[16] Mario Gerla, Eun-Kyu Lee, Giovanni Pau, and Uichin Lee, “Internet of Vehicles: From Intelligent
Grid to Autonomous Cars and Vehicular Clouds”, 2014 IEEE World Forum on Internet of Things
(WF-IoT).
[17] Qiyan Wang and Sanjay Sawhney, “VeCure: A Practical Security Framework to Protect the
CAN Bus of Vehicles.” 2014 IEEE Intl. Conference on Internet of Things (IoT).
[18] Kristian Smith and Jeffrey Miller, “OBDII Data Logger Design for Large-Scale Deployments.”
2014 IEEE Intl. Conference on Internet of Things (IoT).
[19] Fleischer, Paul Benjamin, Nelson, Atso Yao, Sowah, Robert Adjetey, Bremange, and Appah,
“Design and Development of GPS/GSM Based Vehicle Tracking and Alert System for
Commercial Inter-City Buses.” 2012 IEEE Intl. Conference on Adaptive Science & Technology.
[20] Jorge Zaldivar, Carlos T. Calafate, Juan Carlos Cano, Pietro Manzoni, “Providing Accident
Detection in Vehicular Networks through OBD-II Devices and Android-based Smartphones.”
2011 5th IEEE Workshop on User MObility and VEhicular Networks.
[21] ASHRAE Standard 55 (2010). "Thermal Environmental Conditions for Human Occupancy"

View publication stats

You might also like