Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 68

BUS SERVICE FACILITY AT PEAK TIME

A NIRAL THIRUVIZHA PROJECT REPORT

Submitted By

MUBEEN S 812020205031
SUBASRI V 812020205048
RAJATHI S 812020205309

in the partial fulfillment for the award of degree


of
BACHELOR OF TECHNOLOGY
in

INFORMATION TECHNOLOGY

M.A.MCOLLEGE OF ENGINEERING AND TECHNOLOGY

ANNAUNIVERSITY: CHENNAI 600 025

MAY 2024

i
ANNA UNIVERSITY: CHENNAI 600025

BONAFIDE CERTIFICATE

Certified that this project report "BUS SERVICE FACILITY AT PEAK TIME " is the
bonafide work of Mubeen.S(812020205031), Subasri.V(812020205048),
Rajathi.S(812020205309) who carried out the project under my supervision.

SIGNATURE SIGNATURE
Dr. K. Geetha, M.E., Ph.D., Dr. K. Geetha, M.E., Ph.D.,

HEAD OF THE DEPARTMENT HEAD OF THE DEPARTMENT

Departmentof IT Department of IT
M.A.M College of Engineering M.A.M College of Engineering
and Technology and Technology

Tiruchirappalli – 621 105. Tiruchirappalli – 621 105.

Submitted for B.Tech degree viva-voce held at M.A.M College of Engineering and
Technology on ………………

INTERNAL EXAMINER EXTERNAL EXAMINER

ii
ACKNOWLEDGEMENT

With warm hearts and immense pleasure, I thank the almighty for his grace
and blessing bestowed on me, which drove me to the successful completion of this
project. I take this opportunity to express my sincere thanks to the respected
Chairman Dr. M.A. Maluk Mohammed, M.E., Ph.D., and Secretary &
Correspondent Mrs. Fathima Bathool Maluk , M.B.A., who is guiding light for
all activities in our college.

I express my sincere and humble tone of thanks to our Principal


Dr. X. Susan Christina, M.E., Ph.D., for providing me with all facilities needed
for the successful completion of my work.

I would like to thank our Head of the Department Dr.K. Geetha, M.E., Ph.D.,
for her cooperation, advice and suggestions at every stage of my project work.

I would also like to express with gratitude and my sincere thanks to my guide
Dr.K.Geetha, M.E., Ph.D., Head of the Department for motivating me
throughout the project work.

I am very proud to extend my sincere thanks and gratitude to our Project


Coordinator Mrs. B. Rama,M.E., Assistant Professor, Department of Information
Technology, M.A.M College of Engineering and Technology, for her excellent
guidance, advice and encouragement which boosted up our energy throughout the
project development.

I also thank all the teaching faculty and non-teaching faculty of the Department
of Information Technology, my parents and all my friends for their help and
support to complete this project successfully.

iii
ABSTRACT

The web application for requesting bus services during peak hours serves as a pivotal tool in

optimizing public transportation through intelligent transport systems. By leveraging this

application, users gain seamless access to real-time bus arrival information for specific

routes, specifying their journey's origin (FROM) and destination (TO). This innovative

system proves particularly invaluable during peak hours, empowering users to plan their

journeys with efficiency and precision. The applications core functionality allows users to

proactively request bus services in advance, introducing a proactive element to public

transportation that streamlines the overall process at bus stations during busy periods. This

enhanced level of control and convenience contributes to a more efficient and user-friendly

public transportation experience, ultimately promoting the widespread adoption of

intelligent transport solutions. In the web application's key features include real-time

information access, journey planning capabilities, and advanced bus service requests, all of

which collectively enhance the efficiency and effectiveness of public transportation,

particularly during peak hours. By facilitating proactive planning and reducing congestion at

bus stations, the application contributes to an improved and more user-centric urban

transportation system.

iv
CHAPTER NO. TITLE PAGE
NO.
ABSTRACT iv
LIST OF FIGURES vii
LIST OFABBREVIATIONS viii
1 INTRODUCTION 1
1.1 OVERVIEW 1
2 LITERATURE SURVEY 3

2.1 REAL TIME PUBLIC 3


TRANSPORTATION PREDICTION WITH
MACHINE LEARNING
2.2 MACHINE LEARNING BASED TRAFFIC
7
CONGESTION PREDICTION IN IOT BASED
2.3 OPTIONAL EXPANSION OF AUTOMATED
10
FAIR COLLECTION SYSTEM IN PUBLIC
TRANSPORTATION

2.4 TIME TRAVEL PREDICTION USING 15


MACHINE LEARNING

2.5 ACTIVE BUS TRACKING AND BUS 18


RECOMMENDATION SYSTEM USING IOT
AND MACHINE LEARNING
3 SYSTEM ANALYSIS 22
3.1 EXISTING SYSTEM 22
3.1.1 DEMERITS 23
3.2 PROPOSED SYSTEM 23
3.2.1 MERITS 25
4 SYSTEM REQUIREMENTS 26

v
4.1 HARDWARE REQUIREMENTS 26
4.2 SOFTWARE REQUIREMENTS 26
5 SYSTEM DESIGN 28
5.1 SYSTEM ARCHITECTURE 28
6 MODULES 22
6.1 ARDUINO MODULE 29
6.2 IR SENSORS MODULE 30
6.3 GPS MODULE 32
6.4 POWER SUPPLY 33
7 CONCLUSION AND FUTURE ENHANCEMENT 35
7.1 CONCLUSION 35
7.2 FUTURE ENHANCEMENT 35
APPENDICES 36
A. SOURCE CODE 36
B. SCREENSHOT 44
REFERENCES 47

vi
LIST OF FIGURES

FIGURE NO. TITLE PAGE NO.


3.2 Proposed System 24
5.1 System architecture 28
6.1 Arduino UNO 30
6.2 IR Sensors 32
6.3 GPS Module 33
B.1 LCD Display 44
B.2 Seat Occupied:0(LCD Display) 44
B.3 Seat Occupied:1(LCD Display) 45
B.4 Seat Occupied:2(LCD Display) 45
B.5 Seat Occupied:3(LCD Display) 45
B.6 Seat Occupied:4(LCD Display) 45
B.7 Seat Occupied:0(App) 46
B.8 Seat Occupied:1(App) 46
B.9 Seat Occupied:2(App) 46
B.10 Seat Occupied:3(App) 46

vii
LIST OF ABBREVIATIONS

STS Smart Transportation System


GPS Global Positioning System
AFC Automated Fare Collection System
IOT Internet of Things
DFD Data Flow Diagram
UML Unified Modelling Language
UAT User Acceptance Testing
BAT Business Acceptance Testing
UI User Interface

viii
CHAPTER-1
INTRODUCTION
1.1. OVERVIEW

The Mobile application for requesting bus services during peak hours marks a
significant leap forward in the realm of intelligent transport systems, aiming to
revolutionize and streamline the public transportation experience. In the contemporary
landscape, where urban mobility is a critical aspect of daily life, this application stands
out as a solution designed to address the challenges posed by peak-hour congestion and
inefficiencies in the bus service system. By providing users with real-time access to bus
arrival information and enabling advanced service requests between specified routes, the
application becomes a powerful tool for enhancing journey planning and overall
commuting convenience. The goal of this web application is to empower users to
navigate public transportation seamlessly, especially during peak hours when the
demand for efficient transit solutions is at its peak. Offering features such as proactive
service requests and precise journey planning, the application seeks to alleviate
congestion at bus stations and optimize the utilization of available resources. As cities
continue to grow and evolve, the demand for intelligent transport solutions becomes
increasingly pronounced, and this web application emerges as a timely and innovative
response to the challenges posed by the modern urban commuting landscape. The
proposed web application aims to revolutionize public bus transportation during peak
hours by introducing a user-friendly platform for efficient service requests and
information access. The system involves an Admin module for managing bus details, a
Data Storage module to securely store information, a User Interface module for user
interactions, and a Bus Information module for real-time updates. Admins can log in,
input bus details, and ensure system accuracy. Users log in, enter their journey details,
and view relevant bus information. The application streamlines peak-hour travel by
allowing users to proactively request services and access real-time data, addressing
challenges in traditional manual methods.

1
However, ensuring passenger safety and comfort, particularly during peak hours when
buses are often crowded, remains a significant challenge. To address this issue, integrating
infrared (IR) sensors into buses can offer a proactive solution. IR sensors are capable of
detecting the presence of passengers and estimating crowd density within the bus in real-
time. By strategically placing these sensors at key points within the vehicle, such as
entryways and aisles, the system can continuously monitor passenger occupancy levels.
When the number of passengers exceeds a predefined threshold, indicating a crowded
environment, the system triggers automated alerts or notifications. These alerts can be
transmitted to both onboard displays and external interfaces accessible to the public, such as
mobile applications or digital signage at bus stops. Through timely notifications, passengers
can make informed decisions about their travel plans, choosing alternative routes or modes
of transportation to avoid overcrowded buses. Ultimately, the integration of IR sensors for
crowd detection and public notification enhances passenger experience, promotes safety,
and optimizes the efficiency of public transportation systems in densely populated urban
areas. In bustling urban environments, navigating through traffic congestion and efficiently
managing public transportation systems poses considerable challenges, especially during
peak hours. To address these challenges and enhance commuter experience, real-time
tracking of public transport vehicles has become imperative. One such solution involves
leveraging GPS technology to precisely determine the latitude and longitude coordinates of
buses operating during peak times. By equipping buses with GPS devices and integrating
them into a centralized tracking system, transportation authorities gain the ability to monitor
the precise location of each bus in real-time. This allows for accurate tracking of buses
along their routes, enabling commuters to access up-to-date information regarding bus
locations and estimated arrival times. By providing commuters with visibility into the
current location of buses during peak hours, they can better plan their journeys, anticipate
delays, and make informed decisions about their travel routes.

2
CHAPTER-2

LITERATURE SURVEY

2.1 REAL-TIME PUBLIC TRANSPORTATION PREDICTION WITH


MACHINE LEARNING
ALGORITHMS Abstract

As part of Intelligent Transportation Systems (ITS) public transportation plays a


critical and essential role for the mobility in every modern city. In this paper, we
introduce a novel method for the real-time prediction of buss arrival times in the various
bus stops over a given itinerary. The proposed approach exploits machine and deep
learning algorithms, including optimal least square (OLS) linear regression, support
vector regression (SVR) and fully-connected neural networks (FNN). The experimental
results obtained show that the FNN approach outperforms, in terms of mean absolute
prediction error, both SVR (by 7, 62 %) and OLS (for 15,74 %).This article introduces a
novel machine learning approach dedicated to the prediction of the bus arrival times in
the bus stations over a given itinerary, based on the so-called Traffic Density Matrix
(TDM). The TDM constructs a localized representation of the traffic information in
a given urban area that can be specified by the user. We notably show the necessity of
disposing of such data for successful, both short-term and long-term prediction
objectives, and demonstrate that a global prediction approach cannot be a feasible
solution. Several different prediction approaches are then proposed and experimentally
evaluated on various simulation scenarios. They include traditional machine learning
techniques, such as linear regression and support vector machines (SVM), but also
advanced, highly non- linear neural network-based approaches. Within this context,
various network architectures are retained and evaluated, including fully connected
neural networks (FNN), convolutional neural networks (CNN), recurrent neural
networks (RNN) and LSTM (Long Short Term Memory) approaches. The experimental
evaluation is carried out under two types of different scenarios, corresponding to both
long term and short- term predictions. To this purpose, two different data models are
constructed, so-called
3
ODM (Operator Data Model) and CDM (Client Data Model), respectively dedicated to

4
long term and short-term predictions. The experimental results obtained show that
increasing the degree of non-linearity of the predictors is highly benefic for the accuracy
of the obtained predictions. They also show that significant improvements can be
achieved over state of the art techniques. In the case of long-term prediction, the FNN
method performs the best when compared with the baseline OLS technique, with a
significant increase in accuracy (more than 66%). For short-term prediction, the FNN
method is also the best performer, with more than 15% of gain in accuracy with respect
to OLS.

Introduction

Today, the concept of modern and smart cities cannot be envisaged without
mentioning the ITS (Intelligent Transportation Systems). Since the beginning of this
important domain, in the early 1970’s, there has been a lot of progress, innovation and
development. In recent years, the emergence of ITS-related applications has been
catalysed by the rapid growth of available data, as well by the increase of the
computational power that is naturally needed to process such data. Both public
institutions and private companies are proposing various solutions for gathering and
processing of its-related data. Among the various use cases considered, let us mention
trip planning, daily commute, real-live traffic information, trip cost, multi modality and
so on. Usually as end results, the corresponding services are provided in a form of
phone app or web portal, where the users can get the desired information. Traffic jam,
pollution, security, unreliable public transportation, limited parking facilities, are the
main problems that modern cities are facing today all over the world. Addressing and
minimizing such problems could bring some potential benefits for the society in terms
of safety for both pedestrians and vehicles, better traffic management, fuel/energy
consumption and environmental issues. In addition, let us underline that vehicular
transports in the urban areas performed by individuals or public transportation vehicles
contribute heavily on the carbon footprint, called greenhouse gas. The data provided by
the French government in 2015 gives an extensive overview of the key numbers related
to the production of the greenhouse gas. Transportation, in general, is responsible for
27% of the production of greenhouse gas. Transport operated by road represents 94,8 %
5
of them. The logical step to reduce such emissions is to decrease the number of
individual vehicles used for transportation, by privileging reliable public transportation
facilities. Let us underline that the question of reliability is highly important since the
user acceptancy of public transportation strongly depends on. Within this framework,
disposing of efficient traffic prediction tools, dedicated to public transportation, is a
highly challenging issue, for both users (which want to be informed precisely and in
real-time) and transportation operators (which aim at optimizing their transport
networks/itineraries). Different approaches attempt to address this issue. One solution
relates to the infrastructure and proposes building bigger lanes, bridges, roundabouts or
underground passages. Such a solution is applicable only in areas where the extension
of the infrastructure is possible, excluding hence most of the densely populated cities. In
addition, it is also the costliest solution. Another approach concerns the creation of areas
restricted to specific types of vehicles (such as public transportation or electrical
vehicles) and thus with low density traffic flow. Even though the proposed solutions are
achievable, they are not suitable for numerous urban areas. Seeking a response to such
problems, a new research domain, so-called Intelligent Transportation Systems (ITS)
has emerged in early 1970s and continuously evolved since then. ITS aims today at
bringing advanced techniques and technologies into the transportation systems such as
electronic sensors, data transmission and intelligent control technologies. Under this
framework, the required data can be obtained from different and diverse sources such as
smart cards, GPS, sensors, video streams, images, social media and so on. The main
purpose is to provide better services for both drivers and passengers and
to globally improve the whole transportation system. In this article, we are
investigating an ITS-related predictive approach, based on computer simulation and
machine learning techniques. The proposed methods are applied over existing systems
in an artificial environment (traffic simulator software) that can simulate real-life
scenarios. The main goal is to develop prediction algorithms that can improve the
efficiency of transportation over existing systems/infrastructures

6
Methodology

The initial goal is to improve the public transportation system by predicting bus
arrival time at desired station while taking to account the real-time traffic situations on
the whole bus itinerary. In order to do so, the traffic situation at each measurement
station is represented with the help of the TDM (Traffic Density Matrix) . Measurement
stations are points in space that detects and counts how many vehicles pass at a certain
period of time. The TDM(i,j) entry thus provides the number of vehicles that are present
in the bus station at time j. In real-life scenarios such sensors are most often the loop
detectors, but other sensors can perform similar task, like camera for vehicle counting.
For the convenience of the whole simulation, each bus stop location was considered as a
measurement station. In this particular scenario, the detection radius around the
considered measurement station was set to 100 meters. The objective is to inform the
user, in real-time, of the arrival of the buses in his location. To this purpose, we
estimate, for a given bus stop provided as input, the expected arrival time of the next
bus. In order to do achieve this goal, we sample the TDM and construct vectors that are
further used for prediction purposes. Such a vector is composed of the Nstops values
from the TDM matrix that correspond to a given time Rtime, which represents the
current time. In total, for the whole bus itinerary there are Nstops bus stops. In our
experiments, we have focused on bus line 89, which included 36 bus stops, since its
prediction is more difficult due to the presence of traffic jams . We have chosen 5
different bus stop stations, evenly sampling the itinerary, and denoted as Rstop: 11, 16,
21, 26 and 31. These are the bus stops that will be used to predict bus arrival time in
seconds. In order to construct the training vector, set, for each current time, randomly
chosen and denoted by tcrt, we determine the location of the closest bus Cstop, prior to
the current bus location Rstop. During the construction of the training data set, we make
sure to retain only valid trials, i.e., values for which in the simulations, at the current
time there exists a bus prior to current bus location

7
Merits:

 The accuracy of real-time bus arrival predictions and this adaptability allows the
system to continually improve its predictions as it encounters new data.

Demerits:

 It may not be accurate or fair.

2.2 MACHINE LEARNING BASED TRAFFIC

CONGESTION PREDICTION IN A IOT BASED SMART CITY


Abstract
In a smart city roads would be equipped with the sensors for analyzing the traffic
flow. Hence, free flowing of road traffic is important for faster connectivity and
transportation systems. Few traffic flow prediction methods use Neural Networks and
other prediction models which take presumably more time with manual intervention
which are not suitable for many real-world applications. So, here, we propose a machine
learning based traffic congestion prediction which can be used for analyzing the traffic
and predicting the congestion on specific path and notifying well in advance the
vehicles intending to travel on the congested path

Introduction

Road networks are the backbones of any country’s development structure. Free
flowing of road traffic is important for faster connectivity and transportation systems. In
a smart city roads would be equipped with the sensors for analyzing the traffic flow and
transportation. Accurate traffic flow information is desperately needed for various group
of road users like, commuters, private vehicle travelers and public transportation system.
This information will help road users to make better travel decisions, improve traffic
operation efficiency, reduce pollution and overcome traffic congestion. The purpose of
traffic congestion prediction is to provide information about the traffic congestion well
in advance. Traffic congestion prediction (TCP) has gained increasing popularity with
the rapid development and deployment of Smart transportation systems (STSs).Traffic

8
congestion prediction is considered as an important element for the successful
deployment of STS subsystems, particularly advanced traveler information systems,
advanced traffic management systems, advanced public transportation systems and
commercial vehicle operations. Hence, free flowing of road traffic is important for faster
connectivity and transportation systems. Few traffic flow prediction methods proposed
have used Neural Networks and other prediction models which take presumably more
time with manual intervention which are not suitable for many real-world applications.
TCP mostly depends on past and present real-time traffic data collected from various
sources of sensors, like mobile Global Positioning System, social media, RFIDs,
cameras, etc. In a smart city with the widely deployed traffic sensors and new emerging
traffic sensor technologies, traffic data are accumulated a lot. We can make use of these
data to find out interesting nuggets and utilize these knowledge for the prediction of
congestion like problems. So, here, we come up with an algorithm which makes use of
the data and predicts well in advance whether there would be a traffic congestion or not.
The proposed Machine learning based congestion prediction algorithm that used Logistic
Regression gives a simple, accurate and early prediction of the traffic congestion for a
given static road network which can be considered as a graph. The complexity of the
algorithm mentioned above would be constant. So, this is can be effectively used by any
devices which has a less computation capability and with less resources. As a future
direction the traffic congestion
prediction can be predicted using various Hybrid techniques which can give high
accurate results.analysis and congestion prediction.

Methodology
In this paper we propose a novel architecture which can be used by the systems deployed
at the road junction for analysis and congestion prediction. We assume that all the smart
cities are well developed and well connected, with all the sensors deployed at the crucial
junctions. The data is being gathered from different junction points through different
sensors. The data is assumed to be stream data which is time dependent. Our goal is to
predict the congestion on any specific path which is about to occur in the due time. For this
we divide the data into twodifferent parts based on the time frames namely T1 and T2. T1
9
data is used for training machine learning algorithm which learns a model based on the

10
data supplied. Since we are using the supervised classification algorithms for prediction, we
need to have a labeled data to train the classification algorithms. For this reason we take the
help of an algorithm called as CONGESTION ALGORITHM proposed by Suguna Devi .
The working procedure of the architecture can be explained as follows: First, the T1 data is
taken and for each sample the path is identified. The average speed of all the vehicles
travelling in the same path is determined. With the help of the CONGESTION
ALGORITHM, we try to label the data based on the condition, that if the average speed of
the vehicle is less than the defined threshold “t” we label it as congested otherwise not. In
this way all the data would be labelled and grouped in the next step to make it a collection
of dataset. Thus obtained dataset is used for training the different machine learning
algorithms to generate the models which can be used for predictions. Here in this context,
we have applied five different machine learning algorithms and trained them and predicted
the output of these algorithms. The results of these algorithms are discussed in the results
and discussion section. Now, for the generated model we can supply the test data T2 and
predict the accuracy of the learnt models. The model which gives the high accuracy and
recall can be considered the best prediction model. The data used for this proposed method
is assumed to have the following description. The data may have following five attributes,
Vehicle identification number Time stamp at which the data is collected Speed of the
vehicle at above mentioned time X and Y co-ordinates of the vehicle at the above
mentioned time. Congestion in the path on the path in which it is Travelling .The fifth
attribute is assigned a label using the CONGESTION ALGORITHM described in section
3. All the four attribute would be numerical whereas the fifth attribute would be nominal. It
is a synthetic data generated on the lines of road traffic analysis.

Merits:

 The traffic congestion prediction provides real-time insights into traffic


conditions, allowing for immediate response and adaptation to changing scenarios.

Demerit:
 Continuous monitoring of traffic using sensors raises privacy concerns, as it
involves tracking the movement of vehicles and, indirectly, individuals.

11
2.3 OPTIONAL EXPANSION OF THE AUTOMATED FARE

COLLECTION SYSTEM IN PUBLIC TRANSPORTATION


Abstract

The subject of this research is the automated fare collection system and the
possibility of its expansion. The purpose of the work is the optional expansion of the
automated fare collection system in public transport of the city of Kharkiv to improve
the transport network based on the use of GPS tracker. The following tasks are solved
in the article: analysis of the existing automated fare collection system, construction of
the structure of the automated system, construction of the data exchange model
between the server and the devices validating the system, assessing the capabilities of
the existing system, developing an extension for further improvement of the
system .The following methods are used process modeling using the IDEF0 charts. The
following results were obtained: The article proposes an optional extension of the
automated fare collection system for public transport in the city of Kharkiv to improve
the transport network based on the use of GPS tracker. The analysis of the working
system and its possibilities is carried out, namely: the analysis of data flow exchange
in the existing system has been performed in order to identify the possibilities of its
expansion; the structure of the existing system of automated payment of travel has been
developed. The proposed expansion is characterized by minimal costs, since it is based
on an already functioning system, which enables the provision of full dispatching and
logistics of public transport in the city of Kharkiv using the subsystem of analysis and
processing of information. The system is characterized by the ability to optimize the
route network by collecting and analyzing the statistics of travel paid , passenger traffic
and behavioral models of passengers, as well as information on road conditions and
routes. The proposed expansion of the automated payment system for public transport
in the city of Kharkiv can be applied without changing the hardware base of the system,
and will also achieve results such as increasing road safety, reducing time and energy
resources costs for travel, improving vehicle comfort, increasing the competitiveness of
carriers , improving public transport image.

12
Introduction

Nowadays, the lives of most citizens of the world is closely connected with the
use of information systems. Due to the significant advances in information technology,
the transport sector is undergoing significant changes: from smart ticket payments to
new initiatives multi modal mobility and autonomous vehicles. There is a rapid increase
in the popularity of cashless settlement [20]. At the time when most financial
settlements can be made even without leaving home, it becomes obvious that the method
of payment of travel in transport with the help of a paper ticket is completely outdated.
This article presents solutions for increasing the efficiency of the use of the existing
automated fare collection system (AFC).Nowadays, the global changes occurrence in the
services sector, which are expressed in the reorientation of the market towards the
consumer. This also applies to the sphere of transport services. In this regard, the
application of new managerial decisions in creating conditions for the provision of
transport services and public transport organization becomes essential. In particular, the
improvement of the existing automated fare collection system for public transport
services by involving modern methods of distribution, collection and processing of
information. Improvement of the system aims at bringing it to such a level that it will be
able to respond flexibly to the change of any components: density of passenger traffic,
road conditions, routes etc. The existing automated fare payment system is flexible and
has the ability to expand and align with other systems, using only its own hardware base,
by improving the software. Implementation of the GPS navigation system will cause a
9% increase in channel traffic, which is entirely within the current system and will not
require additional financial costs. The use of additional functions based on GPS
navigation will increase the competitiveness of the system and in the long run will allow
to transfer the entire system of vehicles management and monitoring, as well as workers,
into an electronic automated system. Referring to the information on the driver's
working time on the line, it is possible to introduce a payroll system for employees in
accordance with the data in the transport system.

13
Methodology

The article proposes an optional extension of the automated fare collection system
for public transport in the city of Kharkiv to improve the transport network based on the
use of GPS tracker. The analysis of the working system and its possibilities is carried
out, namely: the analysis of data flow exchange in the existing system has been
performed in order to identify the possibilities of its expansion; the structure of the
existing system of automated payment of travel has been developed. The proposed
expansion is characterized by minimal costs, since it is based on an already functioning
system, which enables the provision of full dispatching and logistics of public transport
in the city of Kharkiv using the subsystem of analysis and processing of information.
The system is
characterized by the ability to optimize the route network by collecting and analyzing
the statistics of travel paid , passenger traffic and behavioral models of passengers, as
well as information on road conditions and routes. The proposed expansion of the
automated payment system for public transport in the city of Kharkiv can be applied
without changing the hardware base of the system, and will also achieve results such as
increasing road safety, reducing time and energy resources costs for travel, improving
vehicle comfort, increasing the competitiveness of carriers , improving public transport
image.Many industries use new technologies in an effort to increase efficiency and
attract consumers to use innovations. Nowadays, most developed countries use an
automated payment and checking system for public transport as an alternative to cash
payments. The automated fare collection system is intended for fare payment and
control, sale and replenishment of electronic travel document on the basis of contact less
technology Mi fare Plus, as well as sales of one-time travel document. AFC is a new
stage in the development of passenger transportation. The automated fare collection
system plays an important role in the production activities of transport companies. They
allow to transfer payments for travel in non-cash form, increase the efficiency and
control of financial activities of transport companies, improve the culture and quality of
passenger services. The automated fare collection systems allow to effectively deal with
14
the problem of unlisted travel, forgery of travel document, as well as to carry out
the most accurate

15
accounting of the number of passengers in public transport, to accumulate, store and
analyze this data. Ground transport is equipped with validators of contact less electronic
cards. Systems use non-contact cards of the Mi fare family. Contact less card Mi fare
PLUS is a plastic card, which works up to 10 cm away from the reader (card reader).
The PLUS card carries the UID, which is a unique identifier and additional memory that
can be overwritten. The PLUS card provides standard security in smart card
applications. The card can use the updated security level, the AES 128 algorithm for
authentication, data integrity and encryption. Information security of the validation
system is provided using hardware SAM modules. They are equipped with devices that
read contact less cards. The SAM module includes secure memory and supports crypto
graphic functions (encryption,electronic signature readout, authentication of
electronic signatures, etc.)
used to enhance the security of systems with contact less cards. The keys are
diversified,which means that each contact less card used in the system has its own
unique key issuedby the SAM module. In addition, data stored on contact less cards has
an electronic signature, and it is encrypted. The SAM module uses standard crypto
graphic algorithmsfor MAC signatures, for encoding 3DES and AES. The system uses
the FareOn control software. This software allows the system to continuously improve,
optimize, adapt to changing conditions, and take full advantage of the new technologies
potential. Fare On effectively evaluates and uses the received operational data. Its high
adaptability allows to program functions in accordance with the individual needs of the
client. Fare On also provides the ability to import data from other systems and provides
an efficient analysis of operational data. Openness of the system and the use of
advanced standards facilitate the work with data (for example: XML), data exchange
through web services, and integration with equipment subsystems such as payment
terminals, information boards, etc. On the ETD the required tariff is entered (full,
preferential). In the future, the maps can be repeatedly replenished with the help of self-
service devices. In the public transport the passenger apply an ETD to the
validator/turnstile. As a result, the fare is deducted orthe availability of travel document
is checked, payment information is recorded on the card and transmitted to the

16
processing and issuing center. Also, the validator has the function of payment for

17
another person (persons) and luggage.The controller checks the payment on the card
with a hand-held contact less electronic card reader. All informationon sales statistics
and the use of maps is collected automatically in the processing and issuing center and
is displayed in the analytic system.In such systems, for the provision of communication
through GSM channels, the power of local telecommunications operators is used,
which imposes certain restrictions on the volume, speed and data transmission
volumes. Within this system, a tariff plan with a traffic restriction of 700 MB per
month is used for each vehicle.Ground transport is equipped with validators of contact
less electronic cards. Systems use non-contact cards of the Mifare family. Contact less
card Mifare PLUS is a plastic card, which works up to 10 cm away from the reader
(card reader). The PLUS card carries the UID, which is a unique identifier
andadditional memory that can be overwritten. The PLUS cardmprovides standard
security in smart card applications. The card can use the updated security level, the
AES 128 algorithm for authentication, data integrity and encryption.Information
security of the validation system is provided using hardware SAM modules. They are
equipped with devices that read contactless cards. The SAM module includes secure
memory and supports cryptographic functions (encryption, electronic signature
readout, authentication of electronic signatures, etc.) used to enhance the security of
systems with contact less cards.The keys are diversified, which means that each
contactless card used in the system has its own unique key issued by the SAM
module.In addition, data stored on contact less cards has an electronic signature, and
it is encrypted. The SAM module uses standard cryptographic algorithms for MAC
signatures, for encoding 3DES and AES.The system uses the Fare On control software.
This software allows the system to continuously improve, optimize, adapt to changing
conditions, and take full advantage of the new technologies potential. Fare On
effectively evaluates and uses the received operational data. Its high adaptability allows
to program functions in accordance with the individual needs of the client. FareOn also
provides the ability to import data from other systems and provides an efficient analysis
of operational data. Openness of the system and the use of advanced standards facilitate
the work with data (for example: XML), data exchange through web services, and

18
integration with equipment

19
subsystems such as payment terminals, information boards, etc. On the ETD the
required tariff is entered (full, preferential).In the future, the maps can be repeatedly
replenished with the help of self-service devices. In the public transport the passenger
apply an ETD to the validator/turnstile. As a result, the fare is deducted or the
availability of travel document is checked, payment information is recorded on the card
and transmitted to the processing and issuing center. Also, the validator has the
function of payment for another person (persons) and luggage.The controller checks the
payment on the card with a hand-held contactless electronic card reader. All
information on sales statistics and the use of maps is collected automatically in the
processing and issuing center and is displayed in the analytics system.
Merit

 The proposed extension leverages the existing automated fare collection system,
minimizing the need for additional hardware or infrastructure investments.

Demerit

 The incorporate GPS tracking technology; if the system architecture is not


flexible, it may limit the effectiveness of the proposed improvements.

2.4. TIME TRAVEL PREDICTION USING


ML Abstract
This paper investigates the application of a Machine Learning technique to predict
the time that will be spent by a vehicle between any two points in an approximated area.
The prediction is based on a learning process based on historical data about the
movements performed by the vehicles taking into account a set of semantic variables to
get estimated time accurately. The paper also describes an experiment with real-world
data. Although this is preliminary work, the results were satisfactory.
Introduction
The development of new technologies, concepts and processes in the area of
Information Systems and also the specific branch of Computer Science have been

20
transformed in intensive systems in order to automate routines, methods and procedures
in several areas of knowledge. The spread of these technologies has produced large
volumes of data. These large volumes of data embody the knowledge of the organization,
processes and environments. Access to this knowledge is the result of data analysis
processes. However, database technology by itself is not comprehensive enough to
support data analysis. Complementary technologies and tools are required in this process,
mostly developed in the context of Data Mining and Machine Learning. The main
objective of these areas is to uncover knowledge through the analysis of data. By
uncovering knowledge, we mean the discovery of patterns, trends, classes and groups of
data. Recently, the areas of mobile computing, remote sensing and mobile telephony
experienced fast development and, as a result, produced large amounts of data.The
proposal of this paper is based on some concepts that have been studied by researchers
worldwide. These concepts include semantic of moving objects trajectories, pattern
detection, forecasting, location base services, and travel time prediction, among others.
This section intends to present an overview of some works related to the proposal of this
work. The concept of Trajectory Pattern introduced defines a sequence of geo-referenced
objects S of size m and a list of Temporal Annotations A of size (m - 1), whose values
represent the temporal distance between two consecutive geo-referenced objects
belonging to S. The information of the trajectory patterns, i.e., the geo-referenced objects
and temporal annotations, are extracted from a set of trajectories of moving objects (in
this case, a sequence of triple <latitude, longitude, timestamp>) by identifying regions of
interest (geo-referenced objects) often visited by moving objects. The computation of
temporal annotations is formalized as a problem of density estimate, whose values are
used to calculate the time difference between timestamps of two consecutive triples in a
trajectory.On the path between two stops of a vehicle there can be a variation of vehicle
speed, causing some parts to be slower than others. Segmenting portions of the
movement of vehicles allows us to represent this difference in speed over a movement.
This segmentation allows to estimate accurately know how long time the vehicle will
spend from the current position to the next known place (again, based on the application
context) location it will stop considering slices of the segment with different average

21
speed. Considering the movement between stops P1 and P2, four segments are defined:
S1, S2, S3 and S4. Segment S1 starts at the stop P1 and ends at the stop P2. Segment S2
starts at the position indicated in the figure and ends at stop P2. Segment S3 starts at the
position indicated in the figure and ends at stop P2.

Methodology
The methodology we propose in this paper uses a mechanism for estimating the
time that will be spent by a vehicle between any two points that: (1) pre-processes raw
trajectory data to create aggregated data; and (2) learns the behavior of the vehicles using
this aggregated data. 3.1 Moves and stops Any moving object moves and stops. The stops
have a goal (semantic) and a period of time: a person stops for 10 minutes at a bus
stationto take a bus or a vehicle stops for 5 minutes in a gas station to refuel. Figure 1
illustratesa situation in which a moving object made three stops P1, P2 and P3 along the
path between A and B in the space S. Taking into account the movements and stops
(later on the concept of stop is defined) of moving objects, the mechanism of travel time
prediction proposed in this paper uses data mobility (GPS coordinates with timestamp and
speed) to "learn" the behavior of vehicles (and their drivers) in a given region and
estimate the timea vehicle (driven by the same driver) in a given region will take to move
between two distinct points. The construction of the travel time estimating mechanism
involves the following steps: extracting the mobility data; processing the trafficked
segments; and creating the time estimation model. These steps are described in the next
subsections

Merits:

 Machine learning techniques can enhance prediction accuracy by analysing


historical data and identifying patterns that may not be apparent through traditional
methods.

 This can result in more precise travel time predictions compared to conventional
approaches.

Demerits:
 The module especially complex ones, can be challenging to interpret.
22
2.5.ACTIVE BUS TRACKING AND BUS
RECOMMENDATION SYSTEM USING IOT & MACHINE
LEARNING

Abstract

Traveling by the bus is an option but in most cases the chance of a bus getting
delayed is high, this can be of various reasons like heavy traffic, engine problems, etc.
The objective of this project is to provide the real-time locations, routes of travel, also
recommending bus to a particular destination and best travel options that ensures
available bus routes, available buses to a destination, provide bus timing to reach the bus
stop and required time to reach the destination. IoT is used to provide real-time bus
location and machine learning to build recommendation engine. The recommendation
based on most scored, reviewed, budget, travel comments, similar travels. Cloud-based
database is used for storing and manipulating the data. Database stores the location
along with the update time. Machine learning server uses data in the database to
recommend the best route to travel and creates a model for future use. The user interface
provided by using an android application. This proposed system saves time and
increases the work efficiency of end- users because it reduces the user’s efforts to
traveling.Currently, buses are an important part of the public transport system. Traveling
by the bus is an option but in most cases the chance of a bus getting delayed is high, this
can be of various reasons like heavy traffic, engine problems, etc. The objective of this
project is to provide the real-time locations, routes of travel, also recommending bus to a
particular destination and best travel options, that ensures available bus routes, available
buses to a destination, provide bus timing to reach the bus stop and required time to
reach the destination. IoT is used to provide real-time bus location and machine
learning to build recommendation engine. The recommendation based on most scored,
reviewed, budget, travel comments, similar travels. Cloud-based database is used for
storing and manipulating the data. Database stores the location along with the update
time. Updating time and location can be used to calculate the time taken to travel and
average speed. If the bus is not running on that day, the proper indication is displayed

23
along with the location and the timing of the next bus through the route will be given.
Machine learning server uses data in the database to

24
recommend the best route to travel and creates a model for future use. The user interface
provided by using an android application. This proposed system saves time and
increases the work efficiency of end-users because it reduces the user’s efforts to
traveling for work and avoids the wastage of waiting time for the bus.

Introduction

The public transportation system plays a major role in daily routine. Sometimes
there are lots of problems arising because of the lack of information about the
availability of buses in a route at a time. Lots of technologies can be applied to
transportation systems, especially in buses, but they don’t run according to the
predefined timetable as described due to traffic jams, breakdown, engine problems, etc.
The bus corporations provide bus timetables on the websites, but such bus timetables
are usually static and provide only very limited information to the user. This project
focuses to solve problems facing every people in the public transportation system. This
information will help people in making better traveling decisions. Here explaining an
IoT based bus tracking system, deals with NodeMCU which serves as the central
controller acting as the brain of the system, by using GPS (Global Positioning System),
the geographic location of a vehicle can be determined, and the related information can
be transmitted to a remotely located server. This will locate the position of bus in google
maps through track requests. Machine learning is used for route recommendation
systems, which provide an available path and available buses to a destination. The user
uses an android application to access the service. The user selects the travel destination.
The app processes the data by accessing the database and shows the available
transport options to the destination at that specified time. The recommendation engine
builds by using content-based filtering and collaborative filtering algorithm. A cloud-
hosted database is used for storing and manipulating the real-time data and normal data
(user information, Bus details), which enables the fast and efficient use of the
application.The system in uses a GPS module that is attached to the Arduino system
inside the bus.

25
Methodology

This system is using Internet of Things (IoT) and Machine Learning to get the
data over the internet and building a recommendation system. In IoT, all devices are
connected in a network by using internet service for transmitting data. Affordable and
reliable devices and sensors are making IoT possible for more developments. IoT
development boards, also known as prototyping boards, are hardware platforms that are
widely used to build prototypes of developer's ideas. Here using an IoT board for
building the hardware portion. These boards can save you from a lot of repetitive tasks
and processes. A Recommender System refers to a system that can predict the future
preference of a set of items for a user and recommend the top items. Machine learning is
used for a route recommendation system, which provides an available path and available
buses to a destination. The outcome of the project gives to the user through a very
simple, effective, and friendly android application.A system described in aims in
automating the services of the system that can provide the real-time tracking experience
of the public transport buses. The RFID (Radio Frequency Identification) tags placed
inside buses and RFID readers will be placed at every bus stop. Arduino act as the
controller for this system. GSM (Global System for Mobile communication) module
will send the tracking messages to authorized persons for continuous monitoring. GPS
(Global Positioning System) is used to track the location of the buses. Users will get the
details of the bus as notifications in their mobiles through IoT. The inputs from RFID
readers are updated continuously to Arduino for processing the data. After processing,
the data is sent to the cloud which serves as the interface between the user and the
system.The designed in- vehicle device works using GPS and GSM/GPRS (General
Packet Radio Service) technology. The hardware part is embedded inside a vehicle
whose position is to be determined and tracked in real-time. A microcontroller is
employed to manage the GPS and GSM/GPRS modules. The GSM/GPRS module helps
to transmit and update the vehicle location to a database. A smartphone application is
employed for continuously monitoring the vehicle location. The Google Maps API
(Application Programming Interface) is helping to display the vehicle on the map.In this
system , the position of the bus is gathered by embedding GPS on the bus and the
26
location of the bus is sent by

27
GPRS service provided by GSM networks or by SMS or using RFID. The GPS device is
enabled on the tracking device and this information is distributed to a centralized
controller or directly to the bus stops using RF receivers. People can get the details
using LEDs that connected at bus stops, or by SMS, or using a web application or an
Android application.The system architecture describes , the development of a vehicle
tracker using the GPS and GSM modem is done with the aim of enabling users to locate
their vehicles with ease and in a convenient manner. That paper explains the
development of the vehicle tracking system's hardware prototype. The system will
utilize GPS to obtain a vehicle's position coordinate and transmit it using a GSM
modem to the user's phone through the network. The u-blox NEO-6Q GPS receiver
module, u- blox LEON-GIOO GSM module, and Arduino Uno microcontroller are the
hardware component of this system. The tracking system is using the integration of
GPS, GSM, and RFID. There is a need for accurate estimation of Bus location. Here
using a novel approach for location estimation called B-T-S (Bust Tracking System)
based on adaptive location estimation method and GPS approach. The evaluation of the
approach is done using java simulation tool by considering both simulation and real-
time analysis.The hardware components integrated inside the bus by providing power
from bus and a battery source. The system uses internet service to communicate and
update data on the server and later to the real-time database. The server receives the data
and stores it to the database and provides the data as input to the machine learning
model to crate suggestions to the user for better travel options. The user interface is
provided with an android application which gives the user access over the service
provide with a smartphone.

Merits:

 The active bus tracking system provides real-time information about bus
locations, reducing uncertainty and waiting times for passengers.

Demerits:

 The systems effectiveness may be limited to areas with proper IoT infrastructure
and network coverage, excluding remote or less developed regions.
28
CHAPTER 3

SYSTEM ANALYSIS

3.1. EXISTING SYSTEM

The existing system for bus services during peak times typically involves a
combination of scheduled routes, increased frequency of buses, and strategic
deployment of resources to manage the surge in demand. During peak hours, transit
agencies often adjust schedules to accommodate higher passenger volumes, with more
buses deployed on popular routes to reduce overcrowding and minimize wait times.
Additionally, dedicated bus lanes or priority signals may be implemented to expedite
travel and improve reliability. Real-time communication tools, such as mobile apps or
digital displays at bus stops, are also commonly utilized to provide passengers with up-
to-date information on arrival times and service disruptions. Despite these measures,
challenges such as congestion and capacity constraints may still arise, prompting
ongoing efforts to optimize operations and enhance the overall effectiveness of bus
services during peak periods.

GPS Tracking Systems:

Many transit agencies utilize GPS technology to track the real-time location of buses.
This information is often made available to passengers through mobile apps and
websites, allowing them to check bus arrival times and plan their journeys accordingly.

Smart Card and Mobile Ticketing:

Contactless payment methods, such as smart cards and mobile ticketing apps, have
become prevalent. Passengers can use these technologies for fare payment, reducing
boarding times and improving the overall efficiency of the boarding process.

Manual Data Management

Reliance on manual data management processes for bus schedules, leading to potential
inaccuracies and difficulties in maintaining up-to-date information.

29
3.1.1. DEMERITS:

 The collection of passenger data for analytics purposes raises privacy concerns.
Striking a balance between improving services and safeguarding passenger privacy
poses a challenge.

 In the GPS tracking and automated announcement systems, can be expensive for
transit agencies, potentially leading to increased operational costs.

3.2. PROPOSED SYSTEM

The proposed system endeavors to revolutionize the landscape of public bus


transportation through the introduction of a sophisticated web application, placing a
strong emphasis on enhancing the overall user experience. This innovative system
focuses on the seamless request and tracking of bus services, particularly during peak
hours, addressing the challenges associated with congestion and inefficiencies in
traditional public transportation. The key feature of the application lies in its provision
of real-time bus arrival information for specified routes, exemplified by popular
journeys like Trichy to Madurai. This functionality empowers users with valuable data
on travel timings, enabling them to plan their journeys effectively, with a special
emphasis on navigating the complexities of peak-hour commuting. Notably, the system
streamlines the process of requesting bus services at the station, introducing a level of
organization and timeliness that is crucial during high-demand periods. The
administrative functionalities embedded in the system are designed to facilitate the
collection and management of essential details, including from-to and timing
information. This administrative oversight contributes significantly to the efficiency and
intelligence of the entire public bus transportation system, ensuring that resources are
optimally utilized and operations are conducted in a well-coordinated manner. In
summary, the proposed system aims to bring about a paradigm shift in the public
transportation experience by integrating technology to improve accessibility,
convenience, and operational effectiveness during peak hours.

30
Fig 3.2 Proposed System

The functioning of the proposed web application for requesting bus services during
peak hours involves a streamlined process catering to both administrators and users. The
process begins with the administrative functionalities, where the admin can securely
access the system through a login page. Here, the admin has the capability to manage
user registrations and logins, ensuring that access is controlled and secure. Additionally,
the admin plays a pivotal role in inputting and updating critical bus information such as
timings and route details, contributing to the accuracy of the systems data. The heart of
the system lies in the effective storage and retrieval of this bus-related information,
facilitated by the web application's data storage module. This module ensures that the
details entered by the admin, including bus timings and data, are stored in a well-
organized and secure manner. The web application serves as a centralized repository for
this information, enabling quick and reliable access for both administrators and users.
The meticulous management of data within the application is crucial for maintaining the
efficiency and reliability of the public bus transportation system.

User side, the process involves a straightforward and user-friendly interface. Users
initiate their interaction by registering or logging into the system, providing a
personalized experience. Once logged in, users can enter their journey details,
specifying the origin (FROM) and destination (TO) locations, such as Trichy to Madurai
or other routes. This information is then processed by the system, which, in turn,
retrieves and displays relevant bus details based on the user's input.

31
3.2.1. MERITS

 Improved Efficiency: By leveraging real-time data and predictive analytics, the


system can optimize bus routes, schedules, and fleet allocation, leading to more
efficient operations and reduced congestion.

 Enhanced Passenger Experience: Passengers benefit from reduced wait times,


better service reliability, and increased convenience through features like accurate
arrival time predictions and improved communication about service disruptions.

 Increased Capacity: The system enables transit agencies to respond dynamically to


fluctuations in demand by deploying additional buses and adjusting routes as needed,
thereby increasing the overall capacity of the transit network.

 Better Resource Management: By utilizing data-driven insights, the system


facilitates more effective allocation of resources, including fuel, labor, and
infrastructure, resulting in cost savings and improved sustainability.

 Optimized Traffic Flow: Through measures such as dedicated bus lanes and
priority signals, the system helps to mitigate congestion and improve traffic flow,
benefiting not only bus passengers but also other road users.

 Support for Sustainable Transportation: By incentivizing public transit use and


reducing reliance on private vehicles, the system promotes sustainable transportation
practices, leading to environmental benefits such as reduced emissions and energy
consumption.

32
CHAPTER – 4

SYSTEM REQUIREMENTS

4.1 HARDWARE REQUIREMENTS

HARDWARE SYSTEM CONFIGURATION:-

• Arduino Microcontroller
• LCD Display
• GPS Location Tracker
• IR Sensors

4.2 SOFTWARE REQUIREMENTS

SOFTWARE SYSTEM CONFIGURATION:-

• Operating System : Windows 7 or 8

• Frontend: HTML,CSS

• Backend: python IDLE


• Arduino IDE

33
CHAPTER 5

SYSTEM

DESIGN

5.1 SYSTEM ARCHITECTURE


The system design for the project involves integrating IR sensors into bus seats, along with
a NodeMCU and GPS module, to effectively monitor crowd density within the bus and
track its location in real-time. The IR sensors are strategically placed on each seat to detect
occupancy, sending signals to the NodeMCU for processing. The NodeMCU processes the
combined data from the IR sensors and GPS module, determining crowd density within the
bus and correlating it with the current location. This integrated system provides real-time
insights into bus occupancy levels and location, enabling efficient management of public
transportation resources and enhancing passenger experience by facilitating informed
travel decisions.The integration of infrared (IR) sensors into every seat of the bus serves as
a critical component in accurately monitoring occupancy levels and determining crowd
density. Each IR sensor is strategically positioned beneath or within the seat, ensuring
optimal coverage and sensitivity to detect the presence of a person seated on it. When a
passenger occupies a seat, their presence obstructs the path of the IR sensor's emitted
infrared light beams. This interruption in the infrared signal triggers the sensor to detect
the presence of a person seated on the seat. The sensor then sends a signal or data packet to
the central processing unit, such as a NodeMCU, indicating that the seat is occupied.The
NodeMCU, acting as the brain of the system, receives these signals from all IR sensors
installed on each seat. It aggregates the data and processes it to determine the overall
occupancy status of the bus. By analyzing the collective signals from all seats, the
NodeMCU can ascertain whether the bus is crowded or not.The real-time data processed
by the NodeMCU is then transmitted to the application interface, providing users with
updated information on the current occupancy status of the bus. Through the application,
passengers can conveniently monitor the crowd density and make informed decisions
regarding their travel plans.Overall, the incorporation of IR sensors into every seat of the
bus enables precise and accurate detection of occupancy, allowing for dynamic monitoring
34
of crowd density in real-time.

35
Power Supply
Limit Switch

Transmitter Block:

S-1 16x2 LCD

S-2 Arduino UNO

RF Transmitter

S-3

S-4
SIM800A GSM

Neo-6M GPS
Module

Fig 5.1. System Architecture

36
CHAPTER-6

MODULES

6.1.ARDUINO MODULE

In modern transportation systems, the Arduino microcontroller serves as a vital


component in bus tracking applications, offering a versatile and cost-effective solution for
real-time monitoring and management. With its compact size, low power consumption,
and robust functionality, Arduino facilitates the integration of various sensors,
communication modules, and data processing capabilities required for efficient bus
tracking systems. One of the key roles of Arduino in bus tracking applications is its ability
to interface with GPS modules to accurately determine the bus's location in real-time. By
receiving GPS signals and processing location data, Arduino enables precise tracking of
the bus's movements, allowing transportation authorities and passengers to monitor its
position along the route. Moreover, Arduino microcontrollers play a crucial role in
integrating other sensors essential for bus tracking applications. For instance, Arduino can
interface with infrared (IR) sensors strategically placed on bus seats to detect occupancy
and assess crowd density. By processing data from these sensors, Arduino can provide
valuable insights into the availability of seating and overall bus occupancy, enabling
transportation authorities to optimize routes and improve passenger comfort. Additionally,
Arduino's compatibility with GSM and GPRS modules facilitates wireless communication,
allowing the bus tracking system to transmit real-time location data to centralized servers
or mobile applications.Furthermore, Arduino microcontrollers empower bus tracking
applications with data processing capabilities essential for analyzing sensor data and
generating actionable insights. Through the implementation of algorithms and logic
routines, Arduino can interpret incoming sensor data, perform calculations, and make
decisions based on predefined criteria. For example, Arduino can analyze GPS coordinates
to determine if the bus is deviating from its designated route or calculate average passenger
load based on data from IR sensors.Another advantage of utilizing Arduino in bus tracking
applications is its flexibility and ease of customization. With a wide range of compatible
sensors, shields, and expansion modules available, Arduino allows developers to tailor bus
37
tracking systems to specific requirements and integrate additional functionalities as needed.
Whether it's integrating environmental sensors to monitor air quality inside the bus or
incorporating RFID readers for passenger identification, Arduino provides a platform for
innovation and experimentation in bus tracking technology. In addition to its technical
capabilities, Arduino microcontrollers offer practical advantages such as affordability and
accessibility. Compared to proprietary hardware solutions, Arduino boards and
components are relatively inexpensive, making them an attractive option for budget-
conscious transportation authorities and developers. Furthermore, Arduino's open-source
nature and extensive online community support ensure access to a wealth of resources,
tutorials, and libraries, facilitating rapid prototyping and development of bus tracking
applications. Overall, the usage of Arduino microcontrollers in bus tracking applications
represents a powerful combination of hardware and software capabilities, enabling the
creation of reliable, cost-effective, and customizable solutions for monitoring and
managing public transportation systems.With Arduino's versatility, scalability, and
affordability, bus tracking systems can deliver enhanced passenger experiences, optimized
route planning, and improved operational efficiency in urban environments.

Fig.6.1Arduino UNO

6.2.IR SENSORS MODULE

The utilization of infrared (IR) sensors to detect the presence of passengers within a bus
and connecting these sensors to a microcontroller represents a pivotal aspect of modern

38
transportation systems, enhancing safety, efficiency, and passenger experience. IR sensors,
equipped with infrared light-emitting diodes (LEDs) and photodiodes, detect changes in
infrared radiation caused by the presence of objects or individuals within their detection
range. By strategically placing IR sensors at various locations within the bus, such as near
seats or entryways, transportation authorities can effectively monitor passenger occupancy
and assess crowd density in real-time. To integrate IR sensors into a bus tracking system,
proper wiring and connections are essential to ensure accurate and reliable operation. The
process begins by selecting suitable IR sensors capable of detecting human presence and
interfacing them with a microcontroller, such as an Arduino or Raspberry Pi. Each IR
sensor typically consists of three pins: VCC (power supply), GND (ground), and OUT
(output signal). The first step in connecting IR sensors to the microcontroller involves
establishing power and ground connections. The VCC pin of each sensor is connected to
the microcontroller's power supply pin, while the GND pin is connected to the ground pin.
This ensures that the sensors receive the necessary power to operate and establish a
common ground reference with the microcontroller. Next, the output signals of the IR
sensors are connected to digital input pins of the microcontroller. The output pin of each
sensor, which provides a digital signal indicating the presence or absence of an object
within its detection range, is connected to a separate digital input pin on the
microcontroller. This allows the microcontroller to read the state of each sensor and
determine whether a passenger is occupying a seat or entering/exiting the bus. Proper
wiring and connections are crucial to ensure reliable communication between the IR
sensors and the microcontroller. It is essential to use appropriate cables and connectors,
ensuring secure connections and minimizing signal interference or loss. Additionally, care
should be taken to avoid signal cross-talk or short circuits by routing wires neatly and
using insulation where necessary. Once the IR sensors are properly connected to the
microcontroller, software programming is required to interpret sensor data, monitor
passenger occupancy, and assess crowd density. By processing data from the IR sensors,
the microcontroller can generate actionable insights, such as updating bus occupancy status
in real-time, triggering alerts for overcrowding, or optimizing seating arrangements based
on passenger demand.In conclusion, the usage of IR sensors in bus tracking systems, along
with proper wiring and connections to a microcontroller, enables transportation authorities
39
to effectively monitor passenger occupancy and assess crowd density within buses. By
implementing this technology, public transportation systems can enhance safety, optimize
resource allocation, and improve overall passenger experience in urban environments.

Fig.6.2.IR SENSORS

6.3 GPS MODULE


The utilization of a GPS module to track the location of a bus in latitude and longitude
coordinates and update this information in an application represents a significant
advancement in modern transportation systems, revolutionizing the way buses are monitored,
managed, and navigated. GPS (Global Positioning System) modules, equipped with a
network of satellites orbiting Earth, enable precise and real-time tracking of vehicles,
including buses, by determining their exact geographic coordinates.At the heart of this
technology is the GPS module, which communicates with satellites to receive signals
containing precise timing and location information. These signals are then processed by the
GPS module to calculate the bus's latitude and longitude coordinates with remarkable
accuracy. By interfacing the GPS module with a microcontroller or onboard computer
system, transportation authorities can access this location data and utilize it to monitor the
bus's movements in real-time. The integration of GPS modules into bus tracking systems
offers a multitude of benefits. Firstly, it provides transportation authorities with
comprehensive insights into the whereabouts of buses, allowing for improved fleet
management, route optimization, and schedule adherence. By accurately tracking the bus's
location, authorities can identify deviations from planned routes, respond to traffic
congestion or accidents, and make informed decisions to minimize delays and improve
service reliability. Furthermore, the use of GPS modules enables the implementation of real-
40
time tracking and monitoring functionalities in applications accessible to passengers and
stakeholders. These applications, often available on smartphones or web-based platforms,
display the bus's current location on interactive maps, along with estimated arrival times and
route information. Passengers can conveniently access this information to plan their journeys,
track the progress of their bus in real-time, and make informed decisions about their travel
routes and timings. In addition to enhancing passenger experience, the integration of GPS
modules into bus tracking applications offers operational benefits for transportation
authorities. By automating the collection and dissemination of location data, GPS-enabled
systems reduce the need for manual reporting and monitoring, streamlining administrative
processes and improving operational efficiency. Moreover, by analyzing historical GPS data,
authorities can identify patterns, trends, and areas for service improvement, enabling data-
driven decision-making and strategic planning. Proper integration of GPS modules into bus
tracking systems requires careful consideration of hardware, software, and communication
protocols. The GPS module must be securely mounted on the bus to ensure optimal
reception of satellite signals, and reliable wiring connections to the onboard computer or
microcontroller must be established. Additionally, software programming is required to
interpret GPS data, calculate latitude and longitude coordinates, and update this information
in the application interface.

Fig.6.3.GPS MODULE

6.4. POWER SUPPLY


The utilization of a reliable power supply system is critical for ensuring the optimal
operation and performance of Internet of Things (IoT) hardware, particularly when

41
integrating Arduino boards with IR sensors. The power supply serves as the backbone of
the IoT ecosystem, providing the necessary electrical energy to power the Arduino board,
IR sensors, and other peripheral components. This infrastructure is essential for
maintaining continuous functionality and facilitating seamless data collection and
processing in various IoT applications. In the context of connecting IR sensors to an
Arduino board, a robust power supply system plays a pivotal role in ensuring the stability
and longevity of the hardware setup. The Arduino board itself requires a stable and
regulated power source to operate efficiently, typically ranging from 5 volts to 12 volts
depending on the specific model and configuration. Therefore, selecting an appropriate
power supply unit with the correct voltage output is paramount to avoid potential damage
or malfunction of the Arduino board. Moreover, the integration of IR sensors adds an
additional power requirement to the system. While IR sensors typically operate at lower
voltages (e.g., 3.3 volts or 5 volts), they still necessitate a reliable and consistent power
supply to function optimally. Therefore, the power supply system must be capable of
supplying adequate power to both the Arduino board and the IR sensors simultaneously,
without compromising performance or stability. When designing the power supply system
for an IoT hardware setup with Arduino and IR sensors, several factors must be
considered to ensure efficiency and reliability. Firstly, the power supply unit should have
sufficient capacity to meet the combined power demands of all connected components,
including the Arduino board, IR sensors, and any other peripherals or modules.
Additionally, attention should be paid to the quality and stability of the power supply
output. Fluctuations or disruptions in power supply voltage can lead to erratic behavior or
malfunction of the Arduino board and connected sensors, potentially compromising the
integrity of data collection and processing. Therefore, utilizing a high- quality power
supply unit with built-in voltage regulation and protection features is essential for
maintaining consistent and reliable power delivery to the IoT hardware. Furthermore, the
physical layout and wiring of the power supply system should be carefully planned to
minimize interference and ensure proper heat dissipation. Adequate insulation and
shielding should be employed to protect against electrical noise and external
environmental factors that may affect the performance of the IoT hardware.

42
CHAPTER 7

CONCLUSION AND FUTURE ENHANCEMENT

7.1 CONCLUSION

In conclusion, the development of a web-based application for public bus


transportation, with distinct modules catering to administrative control, data storage,
user interface, and bus information retrieval, represents a significant stride towards
enhancing the efficiency and accessibility of urban transit systems. The Admin module
ensures secure and authorized management of bus details, while the Data Storage
module acts as the backbone, safeguarding and organizing the collected information.
The User Interface module provides a user-friendly gateway for commuters to input
their journey details, and the Bus Information module plays a pivotal role in delivering
accurate and timely information.

7.2 FUTURE ENHANCEMENT

Future enhancements for bus services during peak times aim to address the
challenges of overcrowding, delays, and inefficiencies, ensuring a smoother and more
reliable commuting experience for passengers. One potential enhancement
involves the implementation of advanced predictive analytics and machine learning
algorithms to accurately forecast demand patterns and optimize bus schedules
dynamically. By analyzing historical data, traffic patterns, and passenger behavior,
transit authorities can adjust service frequencies and routes in real-time to match the
fluctuating demand during peak hours. Additionally, the integration of smart
technologies such as IoT sensors and real-time GPS tracking enables better monitoring
of bus occupancy levels and allows for proactive management of overcrowding
situations. Dedicated bus lanes, priority signals, and traffic management systems can
further expedite bus travel times, reducing delays and improving overall service
reliability.

43
APPENDICES
A. SOURCE CODE

from django import forms


from django.contrib.auth import (authenticate,get_user_model)
User = get_user_model()
class UserLoginForm(forms.Form):
username = forms.CharField()
password =
forms.CharField(widget=forms.PasswordInput) def
clean(self, *args, **kwargs):
username =
self.cleaned_data.get('username') password =
self.cleaned_data.get('password') if
username and password:
user = authenticate(username=username, password=password)
if not user:
raise forms.ValidationError('This user does not exist')
if not user.check_password(password):
raise forms.ValidationError('Incorrect password')
if not user.is_active:
raise forms.ValidationError('This user is not active')
return super(UserLoginForm, self).clean(*args, **kwargs)
class UserRegisterForm(forms.ModelForm):
email = forms.EmailField(label='Email address')
email2 = forms.EmailField(label='Confirm
Email')
password =
forms.CharField(widget=forms.PasswordInput) class Meta:
model = User

44
fields = [ 'username','email', 'email2', 'password']
def clean(self, *args, **kwargs):
email = self.cleaned_data.get('email')
email2 =
self.cleaned_data.get('email2')

45
if email != email2:
raise forms.ValidationError("Emails must match")
email_qs = User.objects.filter(email=email)
if email_qs.exists():
raise forms.ValidationError( "This email has already been registered")
return super(UserRegisterForm, self).clean(*args, **kwargs)
rom django.db import models
class Bus(models.Model):
bus_name = models.CharField(max_length=30)
source = models.CharField(max_length=30)
dest = models.CharField(max_length=30)
nos = models.DecimalField(decimal_places=0, max_digits=2)
rem = models.DecimalField(decimal_places=0, max_digits=2)
price = models.DecimalField(decimal_places=2, max_digits=6)
date = models.DateField()
time = models.TimeField()
class Meta:
verbose_name_plural = "List of
Busses" def str (self):
return self.bus_name
class User(models.Model):
user_id = models.AutoField(primary_key=True)
email = models.EmailField()
name = models.CharField(max_length=30)
password = models.CharField(max_length=30)
class Meta:
verbose_name_plural = "List of
Users" def str (self):
return self.email
class Book(models.Model):
BOOKED = 'B'
46
CANCELLED = 'C'
TICKET_STATUSES = ((BOOKED, 'Viewed'), (CANCELLED, 'Cancelled'),)
email = models.EmailField()
name = models.CharField(max_length=30)
userid =models.DecimalField(decimal_places=0, max_digits=2)
busid=models.DecimalField(decimal_places=0, max_digits=2)
bus_name = models.CharField(max_length=30)
source = models.CharField(max_length=30)
dest = models.CharField(max_length=30)
nos = models.DecimalField(decimal_places=0, max_digits=2)
price = models.DecimalField(decimal_places=2, max_digits=6)
date = models.DateField()
time = models.TimeField()
status = models.CharField(choices=TICKET_STATUSES, default=BOOKED,length=2)
class Meta:
verbose_name_plural = "List of
Buses" def str (self):
return self.email
from django.urls import path
from . import views
urlpatterns = [
path('', views.home, name="home"),
path('findbus', views.findbus,
name="findbus"),
path('bookings', views.bookings, name="bookings"),
path('cancellings', views.cancellings, name="cancellings")
path('seebookings', views.seebookings, name="seebookings"),
path('signup', views.signup, name="signup"),
path('signin', views.signin, name="signin"),
path('success', views.success, name="success"),
path('signout', views.signout, name="signout"),
47
]

48
from datetime import datetime
from django.contrib import messages
from django.shortcuts import render
from decimal import Decimal
from django.shortcuts import render, redirect
from django.http import HttpResponse, HttpResponseRedirect
from .models import User, Bus, Book
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.models import User
from .forms import UserLoginForm, UserRegisterForm
from django.contrib.auth.decorators import login_required
from decimal import Decimal
def home(request):
if request.user.is_authenticated:
return render(request,
'myapp/home.html') else:
return render(request,
'myapp/signin.html')
@login_required(login_url='signin')
def findbus(request):
context = {}
if request.method == 'POST':
source_r = request.POST.get('source')
dest_r = request.POST.get('destination')
date_r = request.POST.get('date')
date_r = datetime.strptime(date_r,"%Y-%m-%d").date()
year = date_r.strftime("%Y")
month =
date_r.strftime("%m") day =
date_r.strftime("%d")
49
if bus_list:
return render(request, 'myapp/list.html', locals())

50
else:
context['data'] = request.POST
context["error"] = "No available Bus Schedule for entered Route and Date"
return render(request, 'myapp/findbus.html', context)
else:
return render(request, 'myapp/findbus.html')
login_required(login_url='signin')
def bookings(request):
context = {}
if request.method == 'POST':
id_r = request.POST.get('bus_id')
seats_r = int(request.POST.get('no_seats'))
bus = Bus.objects.get(id=id_r)
if bus:
if bus.rem > int(seats_r):
name_r = bus.bus_name
cost = int(seats_r) * bus.price
source_r = bus.source
dest_r = bus.dest
nos_r = Decimal(bus.nos)
price_r = bus.price
date_r = bus.date
time_r =
bus.time
username_r =
request.user.username email_r =
request.user.email userid_r =
request.user.id
rem_r = bus.rem - seats_r
Bus.objects.filter(id=id_r).update(rem=rem_r)
book = Book.objects.create(name=username_r, email=email_r,
51
userid=userid_r, print('------------bus id ', book.id)
# book.save()

52
return render(request, 'myapp/bookings.html', locals())
else:
context["error"] = "Sorry select fewer number of seats"
return render(request, 'myapp/findbus.html', context)
else:
return render(request, 'myapp/findbus.html')
@login_required(login_url='signin')
def cancellings(request):
context = {}
if request.method == 'POST':
id_r = request.POST.get('bus_id')
#seats_r = int(request.POST.get('no_seats'))
try:
book = Book.objects.get(id=id_r)
bus = Bus.objects.get(id=book.busid)
rem_r = bus.rem + book.nos
Bus.objects.filter(id=book.busid).update(rem=rem_r)
#nos_r = book.nos - seats_r
Book.objects.filter(id=id_r).update(status='CANCELLED')
Book.objects.filter(id=id_r).update(nos=0)
messages.success(request, "Viewed Bus has been cancelled successfully.")
return redirect(seebookings)
except Book.DoesNotExist:
context["error"] = "Sorry You have not that bus"
return render(request, 'myapp/error.html', context)
else:
return render(request, 'myapp/findbus.html')
@login_required(login_url='signin')
def seebookings(request,new={}):
context = {}
id_r = request.user.id
53
book_list = Book.objects.filter(userid=id_r)
if book_list:
return render(request, 'myapp/booklist.html', locals())
else:
context["error"] = "Sorry no buses"
return render(request, 'myapp/findbus.html', context)
def signup(request):
context = {}
if request.method == 'POST':
name_r = request.POST.get('name')
email_r = request.POST.get('email')
password_r =
request.POST.get('password')
user = User.objects.create_user(name_r, email_r, password_r, )
if user:
login(request, user)
return render(request, 'myapp/thank.html')
else:
context["error"] = "Provide valid credentials"
return render(request, 'myapp/signup.html', context)
else:
return render(request, 'myapp/signup.html', context)
def signin(request):
context = {}
if request.method == 'POST':
name_r = request.POST.get('name')
password_r =
request.POST.get('password')
user = authenticate(request, username=name_r, password=password_r)
if user:
login(request, user)
54
# username =
request.session['username']
context["user"] = name_r

55
context["id"] = request.user.id
# return HttpResponseRedirect('success')
else:
context["error"] = "Provide valid credentials"
return render(request, 'myapp/signin.html',
context) else:
context["error"] = "You are not logged in"
return render(request, 'myapp/signin.html', context)
def signout(request):
context = {}
logout(request)
context['error'] = "You have been logged out"
return render(request, 'myapp/signin.html', context)
def success(request):
context = {}
context['user'] = request.user
return render(request, 'myapp/success.html', context)

56
B. SCREENSHOT

Fig.B.1. LCD display Fig.B.2. Seat Occupied -0(LCD Display)

57
Fig.B.3.Seat occupied 1 (LCD Display) Fig.B.4.Seat Occupied 2 (LCD Display)

Fig.B.5.Seat Occupied 3 (LCD Display) Fig.B.6. Seat Occupied 4 (LCD Display)

58
Fig.B.7.Seat occupied:0(App) Fig.B.8. Occupied :1(App)

Fig.B.9.Seat occupied:2(App) Fig.B.10.Seat occupied:3(App)

59
REFERENCE

1. Akshay K, Abhisek Chowdhury, Keerthana D, Manjula K, Rajeswari S‛ A Survey on


Online Bus Pass Generation System using Aztec code.
2. Azza Allouch, Anis Koubaa, Tarek Abbes, and Adel Ammar”Road Sense: Smartphone
Application to Estimate Road Conditions using Accelerometer and Gyroscope”
3. C. Brakewood, A. Ziedan, S. J. Hendricks, S. J. Barbeau, and A. Joslin, “An evaluation
of the benefits of mobile fare payment technology from the user and operator
perspectives,” Transport Policy.
4. D. Panovski, V. Scurtu and T. Zaharia, "A Neural Network-based Approach for Public
Transportation Prediction with Traffic Density Matrix", 2018 7th European Workshop
on Visual Information Processing (EUVIP), pp. 1-6, 2018.
5. Edward B. Panganiban, Jennifer C. Dela Cruz, “RFID-Based Vehicle Monitoring
System”,School of EECE, Mapua University, IEEE 2017.
6. J. Ke, H. Zheng, H. Yang and X. Chen, "Short-term forecasting of passenger demand
under on-demand ride services
7. P.Sharmila ,A.Ponmalar and SkandaGurunathan R," Bus Pass and Ticket automation
System”, International Journal of Computer Engineering In Research Trends, Volume
3, Issue 8, August-2016, pp. 389-393.
8. R. Adducul and I. Adducul, “Mobile bus ticketing system: Development and
adoption,” Int. J., vol. 9, pp. 189–196, Dec. 2020.

9. Suguna Devi, T. Neetha, A Novel Algorithm for predicting road traffic congestion in a
IOT based smart city. IJERD, Special Issue SIEICON-April, 2017, p-ISSN : 2348-
6406
10.Wang, L., & Lee, S. (2023). "Optimizing Bus Services During Peak Hours: A Study
on the Effectiveness of the Bus Information Module."
60

You might also like