7

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

BUS MONITORING SYSTEM

Submitted To

Dr. RaviKiran Y

Under the supervision of


Aarya Shah

Course Name: Internet of Things (EEE F411)

BITS Pilani

Submitted By Group 7:

Name BITS ID

K. V. SAI GANESH ARVIND 2022A3PS0715H

V. L. S. SREERAM 2022A3PS0593H

NIKHILESHWAR NANDIVADA 2022A3PS0577H

JATHIN KRISHNA 2022AAPS0293H

PRANAV MAREDDY 2022AAPS2029H

Birla Institute of Technology and Science, Hyderabad Campus


India

1
Table of Contents

1. Introduction

2. Hardware Implementation

3. Software Implementation

4. Major Problems Faced and Solutions Implemented

5. Comparison and Future Scope

6. Conclusion

2
Introduction

Project Overview
The BLE-Based Bus Notification System aims to modernize public transportation
through direct real-time mobile notifications via users’ devices of incoming buses that
are coming near specific bus stops, thus enhancing the comfort and optimizing the
travel time of passengers. The system brings the technology of Bluetooth Low Energy
(BLE), which gives buses the ability to generate unique signals that are recognized by
Raspberry Pi receivers - installed at bus stands/bus stations, thus establishing
communication between the bus and the user's mobile phone. The signals are then
subsequently processed and the users are notified of the arrival time of buses both
through a web app running on the internet connection or the Bluetooth connection on
the user's mobile phone.
This technology gives users a seamless experience that is based on real-time
interaction with the system, and that comes without the usual demands of traditional
mobile apps. What is more, such an ingenious approach is of course low-cost and time-
efficient, especially within large urban areas with the traffic congestion problem and the
need for frequent updates.

Key Objectives of this Project


Real-time Notifications:
Enable users to receive real-time arrival notifications when they are standing
near a bus stand.
Bluetooth Beacon Technology:
To apply the high-energy Bluetooth technology to each bus on the transit line so
that the commuting functionality is as simple as breathing for both the fleet and
the passengers.
User-Centric Solution:
Not a single app needs to be downloaded if a web-based solution is already
space, as the notifications will be sent through browsers on the mobile phone
that can access them via the web.
Cost-Efficiency:
Use a method that requires inexpensive hardware to make it available to a wide
number of users and also to urban areas with constraining budgets.

3
Hardware Implementation

HARDWARE COMPONENTS

A. Raspberry Pi
The Raspberry Pi is a series of single-board computers developed by the Raspberry
Pi Foundation in the UK. It has a wide variety of ports, such as USB, HDMI, and
Ethernet. It also has a GPIO header, which connects it to sensors and other devices.
The Raspberry Pi runs various operating systems, including Raspbian, Ubuntu, and
Windows 10 IoT Core.

The Raspberry Pi 3 Model B with 4 GB RAM has been used in this project. It is one
of the most important components in the setup. Ubuntu 22 is the operating system
we use in the Raspberry Pi.

The Raspberry Pi fulfills the following purposes:

· It provides a platform for the GUI to run on. Once connected to a


monitor, it is similar to a PC.

· It acts as a receiver that detects signals from BLE beacons.

Figure 1: Raspberry Pi 3 Model B+

4
5
B. BLE Beacons

There are two types of Bluetooth radios: Bluetooth Classic which we use in everyday
life like in smartphones and audio systems and Bluetooth Low Energy also known as
BLE. Compared to the classic version it sends small packets of data and goes into
sleep until the connection becomes active again.

BLE beacons are devices that transmit data at regular intervals of time and the
strength of the signals can be modified. This makes the devices run for months on a
single battery. The communication is one way which means that the beacon is
universally discoverable but cannot discover any devices.

Figure 2: BLE beacons

METHODOLOGY

We planned to install BLE beacons in every bus and program the beacons of the
buses of the same route to have distinct strings in the end e.g. ‘AB’ at the end of
their UUID (Universally Unique IDentifier) for the buses go through the route 12. All
these unique identifiers will be programmed into the Raspberry Pi. The Raspberry Pi
acts as a receiver. It detects the beacons within its range and then according to the
programmed data, it uploads the data to the web, which is dynamically updated.

6
7
IMPLEMENTATION (BEACON GENERATION USING RASPBERRY PI)

This implementation acts as an example which is very similar to the method used in
our actual project.

We have used Raspberry Pi as a beacon to test the strength and range. Below are
the commands and images of them.

Figure 3: Command to start the Bluetooth services

Figure 3 shows the command that uses the admin privileges to configure the
Bluetooth devices using the ‘config’ function which is a part of the ‘bluez’ module.
‘hci0’ refers to the first Bluetooth device connected and the ‘up’ starts up the service.

Figure 4: Setting mode of Bluetooth

Figure 4 shows the command that sets the Bluetooth into ‘leadv’ mode which means
LE (low energy) advertising. The number ‘3’ sets the device in universally detectable
mode.

Figure 5: Setting up beacon with message

Figure 5 presents the command which is used to start up the beacon. The part ‘-i
hci0’ tells the device to use the specified Bluetooth interface. It broadcasts a link on
Eddystone URL format. The other parts describe the payload, URL format,
transmitting power, and the encoded URL. The bits ’01 00’ represent the end of the
message.

8
Figure 6: Beacon scanning interface in Android mobile

Figure 6 shows an application called ‘nRF Connect’ on Android mobile used to scan
for the BLE advertisement by Raspberry Pi. The first network in the image is the
beacon which as you can see shows the transmitted message which is a URL of
YouTube. It also shows the type of connection and the strength of the signal.

9
Software Implementation

The software component is the brain of the bus notification system, ensuring that all the
hardware components (BLE beacons and receivers) and the users are coordinated
seamlessly. This is accomplished through data management, validation of signals, and
generation of user notifications. The whole operation runs on a local machine during
development, thus completing extensive tests before release.

Key Objectives:
1. Data Storage and Management:
Records the existence of buses, their particular BLE identifiers, UUIDs, and
routes in a structured database.
Ensures that each bus is uniquely referenced by a given UUID for successful
identification.
2. Signal Validation:
Analyzes UUIDs received by BLE beacons and verifies them with the database
to affirm the identity of the bus.
An error does not take place because it ensures that only valid signals trigger
notifications.
3. Monitoring Mechanism:
It updates the website to users when a bus is detected within the receiver's
range.
APIs are used for the backend-to-user communication with efficiency.
4. Local Development:
This enables the developers to emulate and test system functionalities without
requiring the web application to be deployed, hence making it overhead-free and
faster in development.

Technologies Used

1. Backend Development
Java – Spring: Provides a high-performance server-side runtime environment to
handle incoming requests from BLE receivers and deliver responses.
Simplifies the creation of RESTful APIs to interact with the database and BLE
receivers.

2. Database Management
SQLite: A lightweight database suitable for local testing. It stores bus and beacon
data, allowing for quick lookups and updates.

10
3. API Communication:
Postman: Used to test API calls, validating on the back-end server end in the
development process.

4. BLE Simulation:
Python Requests Library: Simulates BLE signals sent from a beacon simulating
UUIDs, and tests how your system responds from the backend server.

5. Frontend Development (Optional for Local Testing):


React.js: This can be used to develop an interactive frontend interface if needed
for additional testing or visualization.

6. Testing Frameworks (Example):


Mocha & Chai: Automates backend testing to ensure the correctness and reliability of
server endpoints.

Steps to Verify the Software Without Deployment

1. Backend Setup:

Install Java and Springboot


Develop and execute server-side code locally, in a file similar to `server.js`, to
establish the backend.

Fig: Database used in this project with random entries

11
2. Database Setup:
Initialize an SQLite database by creating a file called `database.db`. In this,
create defined tables like `buses`, `receivers`, etc.
Sample data can be inserted for ease of testing, such as this:

Fig: Insertion of values into the SQL tables

3. API Validation:
Test API endpoints like `/api/validate-uuid` and `/api/send-notification` using:
Postman: Simulate requests to the server.

Fig: Common API Endpoints involved in this project

4. BLE Signal Simulation:


Use Python to simulate BLE signals sent to the server:

Fig: Use of the ‘requests’ library to simulate BLE signals(another approach)

12
5. Log Monitoring:
- The server logs for error messages or anomalies

Advantages of the Software

1. Scalability:
The backend design is to add more buses, routes, and receivers without major
structural changes.
Can scale from a single city to multiple cities or regions with minimal
reconfiguration.

2. Flexibility:
Running the system locally simplifies debugging, prototyping, and testing.
Developers can readily add caching or real-time analytics features among others.

3. Enhanced Commuter Experience:


This system reduces waiting and enhances mobility since the bus user is alerted in
real-time as the bus approaches.

4. Reliability:
Since the local environment simulates BLE signals and also user notifications,
problems can be realized and tackled beforehand before deployment.

Implementation Without Deployment

The system can be run in its entirety on a local laptop with the aid of tools such as Java
and SQLite for backend development and Postman or Python for API testing.
Advantages:
Does not require a live server, therefore, the costs of developing a deployment
will not be incurred.
Enables speedy prototyping and operational improvements.

13
Fig: Depicts the basic structure of the website directory.

14
This software platform shall be based on a smart, real-time bus notification system by
using contemporary technologies like Java (Spring-boot) SQLite, and BLE. With the
deployment of the backend locally, developers can ensure a strong, scalable, and user-
friendly system that may subsequently be rolled out to improve urban transportation
networks.

15
Problems Faced and Solutions Implemented

Is it better to keep the receiver on the bus stand or bus?

The decision to place the receiver at the bus stand or inside the bus is dependent on
the specific needs of the system, the coverage of BLE signals, and the type of
notifications to be distributed. Below is a detailed comparison of the two approaches:

Placing the Recipient at the Bus Stop

Advantages:
Localized notifications:
Receivers at the bus stand can discover when a bus is within range (10–20
meters) and will notify commuters waiting there.
It is very aptly applied to notification of the arrival of buses at selected bus stops.
Energy Efficiency for Consumers:
Because the receiver processes BLE signals, users' devices don't have to scan
for signals all the time and thus save their battery life.
Centralized Infrastructure:
A receiver on one bus stand can monitor many buses entering the range; this
eliminates the need for many receivers.
Easier to integrate with backend systems, as bus stand locations are fixed.
Cost-Efficient Maintenance:
The maintenance of bus stands is facilitated by their stationary nature, which
simplifies hardware servicing and mitigates operational complexities.
No interference between buses
Because the receiver is immobile, it can separately identify distinct signals of
different buses at the same stop.

Drawbacks:
Constricted Notice Scope:
Notifications are restricted to users near the bus stand. Users en route to the bus
stop won’t receive alerts.
Cannot trace buses between stops.
Infrastructure Dependence:
Needs a receiver to be located at each bus stop, which may lead to additional
deployment costs at very high-density bus stop networks.

16
Placing the Receiver in the Bus

Benefits:
Expanded Notifiing Scope:
Users can be informed even when they are not at the bus stand but within the
BLE range of the bus, thus allowing for dynamic and location-independent
notifications.
Mobile Monitoring:
The receiver in the bus can track the bus's progress in real time and send
updates to the backend server so users may be able to see the status of the bus.
Scalability Across Locations:
The installation and maintenance of hardware at each bus stand is unnecessary;
rather, the incorporation of a receiver on each bus facilitates deployment,
particularly in regions with numerous stops.
Advanced Features:
Users get real-time information about the current traffic load, the actual time of
arrival, as well as upcoming stops.

Disadvantages:
Signal Interference:
When it happens that multiple buses reach the platform simultaneously, BLE
signals may overlap each other, eventually making differentiation between them
complex.
Requires a well-defined filtering system to identify signals accurately.

User’s Device Dependency:


Users must rely on their devices to determine the presence of BLE signals, which
can drain battery life and dictate the need for active Bluetooth scanning.
Increased Power Demand for Buses:
The receiver deployed at the bus will have to operate continuously, thus
consuming more power and, possibly, requiring additional power sources.
Back-end Complexity:
Notifications must consider the current location of the bus and its proximity to the
user, thereby increasing the complexity of backend processing.

17
Fig: Summary of the possible advantages and disadvantages of the placement of
the receiver.

Recommended Approach:
If the main objective is to alert people waiting at a bus stop about approaching buses,
then the receiver is installed at the bus stop. If the objective is to alert passengers along
the bus route and enable them to track the bus: Mount the receiver on the bus. To
optimize the functioning, one may consider a hybrid system: Bus Stand receivers:
Informs passengers waiting at bus stations about the approaching buses.

18
Comparison and Future Scope

In the exploration of the alternative solutions for the bus notification system, several
alternatives were reviewed for their efficiency and cost-effectiveness as well as making
it user-friendly. Traditionally, GPS-based systems are effective for cases of real-time
monitoring, but they involve constant internet connectivity and resource use, which
makes them less ideal in deployment-cost-limited areas. Similarly, app-based solutions
require more effort from the customers in terms of downloading and configuring
applications, an aspect that may dissuade adoption, particularly where digital literacy is
restricted.

However, Bluetooth Low Energy technology allows for a lightweight and scaled variant.
Low-energy beacons provide a low-energy, proximity-based notification mechanism that
does not depend on a persistent Global Positioning System or cellular data. Using BLE
means that the notifications spread when users are in range; information is, therefore,
both timely and accurate without increasing system resource over utilization. This is an
environment-friendly method, hence less demanding in terms of infrastructure and user
requirements, and it's appropriate for public transportation systems, especially in
resource-poor environments.

Fig: Depicts a comparison between the BLE Technology and other alternative solutions.

19
Future scope

This can then be further developed into a more integrated and sophisticated solution for
smart transportation. Areas by which the project can be extended and developed are
outlined in subsequent sections:
Integration with Smart City Infrastructure.
Vision: The system shall align with citywide smart initiatives to transform urban
mobility.
Implementation:
The system must then be integrated into a smart transportation platform.
Also, it should be well connected with other public transport modes like trains,
metros, and taxis.
Real-time analytics and insights:
Vision: Use data collected by the system to analyze and then have improvements
made in public transportation.
Implementation:
Generate commuter traffic heatmaps to determine areas of high demand.
Develop actionable insights on route planning, scheduling, and fleet
management.
Advanced User Features
Provide customized accessible services to make the encounter memorable for a
user.
Implementation:
Enable customizable notifications (e.g., favorite routes or schedules).
Supporting multimodal alternatives for diverse demographics of travelers.
AI and Machine Learning Integration
Effectiveness of the system: Increase efficiency of making decisions through AI.
Implementation:
More accurate prediction of bus arrival times using real historical data and actual
traffic streams.
Provide predictive maintenance of buses based on anomalies in beacon signals
or user feedback.
Scalability for Rural and Global Use
Vision: Scale up the system for diverse geographies and transportation.
Implementation:
Adapt the system to suit rural areas with minimum infrastructure.
Scale globally, targeting cities of varying sizes with different transport systems
and regulations.

20
Conclusion

Because of the issuance of unique identifiers for buses and the deployment of
Raspberry Pi BLE transmitters and receivers, this system would allegedly allow almost
real-time communication between the bus and the commuter within range through the
provision of the required information. The system does not rely on GPS tracking or the
download of an application, which makes it accessible yet efficient at the same time,
costing less and using fewer energy units.

It reduces uncertainty, waiting time, and enhances the commuting experience, promotes
public transport usage. In turn, this helps in relieving congestion in an urban
environment and contributes toward environmental sustainability. The system is
scalable, and the inherent flexibility will allow its eventual expansion to incorporate AI-
driven analytics, multi-modal transport integration, and broader applications within the
smart city ecosystem. Conclusion This project forms a robust foundation for the future of
intelligent, environmentally sustainable transportation solutions.

21
References

Bluetooth Low Energy beacon - Wikipedia

Lighting the way with BLE beacons - Google Developers Blog

Bluetooth beacons: Everything you need to know

A New Framework of Intelligent Public Transportation System Based on the


Internet of Things | IEEE Journals & Magazine | IEEE Xplore

IoT-Based Context-Aware Intelligent Public Transport System in a


Metropolitan Area | IEEE Journals & Magazine | IEEE Xplore

IoT-Based Context-Aware Intelligent Public Transport System in a


Metropolitan Area | IEEE Journals & Magazine | IEEE Xplore

Renormalization Group Evolution from On-shell SMEFT

22

You might also like