You are on page 1of 38

1

SmartBus

1. INTRODUCTION
1.1 ABOUT THE PROJECT
Smart Bus aims to provide security of passengers while traveling on the bus.
The main goal of this project is to ensure the safety of passengers while entering
and leaving the bus. The features provided in this project include door control
system, location display, and location tracking with the help of GPS and speed
display for alerting passengers about the cases of rash driving.
People of all status rich or poor use public transport for their commute from
home or to any other specific location they need to travel. The system implements
a door control system which ensures the safety of the passenger while and entering
and leaving the bus. Whenever a passenger gets or leaves the bus, due to the lack
of concentration or proper timing the driver may not see who is entering or leaving
the bus and after a moment of time will start the bus to take off, causing the person
either entering or leaving to fall of the bus or get hurt while climbing the bus. So in
order to prevent this we are using a motion detection sensor to detect the footstep
of the person, entering and leaving the bus and based on the output there will be
decision of whether to open or close the bus.
The display of location or position of the bus is a very helpful factor so that
passengers will know where they are at that exact moment. Passengers travelling
long distance, or who are new to a particular place can rely on the location display
system to know where they are. This display of location is done with the help of
global positioning tracking system.

With the help of this tracking system,

passengers can identify the location. This will be helpful to newcomers and also
those traveling at night time during rain to identify the locations.
Rash driving is another factor. Rash driving is the careless driving without
thinking about the safety of driving. Bus drivers, when driving with high speed
will lead to rash driving causing harm to people inside and outside of the bus, but
Department Of Computer Science & Engineering

SJCET

SmartBus

when we know when the driver is over speeding we cannot complain. This is
because even if we complain the drivers wont slow down. So, for this purpose we
are setting a display which displays the speed.
The product will be easy to customize as per the above problems stated in order
to ensure the safety of passengers in the bus and providing full information of the
bus to the passengers.

Department Of Computer Science & Engineering

SJCET

SmartBus

1.2 ABOUT THE ORGANISATION


St. Josephs College of Engineering and Technology was established by the
Diocese of Palai, during the year 2002.The establishment led to the fulfillment of a
long cherished dream of providing amenities and scope for higher technical
education not only to the people of the diocese but also the neighboring areas as
well. All effort has been taken in creating a conductive environment.
The principles that guide the college in keeping its challenges and that
enable it in emerging as the Center of Excellence in technical education are
positive thinking, abiding faith in the Almighty, hard work and dedication towards
work. Also the college provide scope for eco-friendly environment and work ethics
that provided by the existing campus life of the college.
SJCET is a college with a difference that focuses in prevailing quality education
and this is implemented through its discipline and excellence in all aspects.

Department Of Computer Science & Engineering

SJCET

SmartBus

1.3 ABOUT THE PLATFORM


1.3.1 Embedded C
C is the most widely used programming language for embedded
processors/controllers. Assembly is also used but mainly to implement those
portions of the code where very high timing accuracy, code size efficiency, etc. are
prime requirements.
Embedded systems programming is different from developing applications on a
desktop computers. Key characteristics of an embedded system, when compared to
PCs, are as follows:
Embedded devices have resource constraints(limited ROM, limited RAM,
limited stack space, less processing power)
Components used in embedded system and PCs are different; embedded
systems typically uses smaller, less power consuming components.
Embedded systems are more tied to the hardware.
1.3.2 Features of Embedded C
Two salient features of Embedded Programming are code speed and code
size. Code speed is governed by the processing power, timing constraints, whereas
code size is governed by available program memory and use of programming
language. Goal of embedded system programming is to get maximum features in
minimum space and minimum time.
Embedded systems are programmed using different type of languages:
Machine Code
Low level language, i.e., assembly
High level language like C, C++, Java, Ada, etc.
Application level language like Visual Basic, scripts, Access,
etc.
Assembly language maps mnemonic words with the binary machine codes
that the processor uses to code the instructions. Assembly language seems to be an
obvious choice for programming embedded devices. However, use of assembly
language is restricted to developing efficient codes in terms of size and speed.
Also, assembly codes lead to higher software development costs and code
portability is not there. Developing small codes are not much of a problem, but
large programs/projects become increasingly difficult to manage in assembly
Department Of Computer Science & Engineering

SJCET

SmartBus

language. Finding good assembly programmers has also become difficult


nowadays. Hence high level languages are preferred for embedded systems
programming.
1.3.3 Advantages of Embedded C
Use of C in embedded systems is driven by following advantages
It is small and reasonably simpler to learn, understand, program and
debug.
C Compilers are available for almost all embedded devices in use
today, and there is a large pool of experienced C programmers.
Unlike assembly, C has advantage of processor-independence and is
not specific to any particular microprocessor/ microcontroller or any
system. This makes it convenient for a user to develop programs that
can run on most of the systems.
As C combines functionality of assembly language and features of
high level languages, C is treated as a middle-level computer
language or high level assembly language.
It is fairly efficient.
It supports access to I/O and provides ease of management of large
embedded projects.
Many of these advantages are offered by other languages also, but what sets
C apart from others like Pascal, FORTRAN, etc. is the fact that it is a middle level
language; it provides direct hardware control without sacrificing benefits of high
level languages.

Department Of Computer Science & Engineering

SJCET

SmartBus

2. SYSTEM STUDY
2.1 STUDY OF EXISTING SYSTEM
There are many systems that have been developed for ensuring the safety of
passengers while entering and leaving the bus. Many of these systems provide only
the basic security which is closing the door of the bus while moving and opening
the door when the bus is halted.
The existing system discusses about the safety of passengers while
travelling in buses in Kerala. Here the safety of the passengers is maintained to an
extent but not always. Due to rash driving and carelessness, many accidents are
occurring.
2.2 DRAWBACK OF EXISTING PACKAGES
No proper mechanism for opening and closing the door.
Staff on the bus is more.
o Currently in the existing systems, there is a bus door keeper for
opening and closing the doors of the bus.

2.3 PROPOSED SYSTEM


What makes Smart Bus different from this is our lists of features that are aimed to
be of utmost safety of passengers are ensured. The system incorporates motion
detection sensors on the lowest step of the bus to detect the presence of person by
sensing the footstep and if the person is standing on the footstep neither the door
will open nor will it close and also the bus wont move. Another improvement
done is that when the door is open or closed until the passenger removes its feet
from the sensor the brake system of the bus will be locked. Similarly with the help
of GPS we can track the location of the bus and display it on the LED to highlight
Department Of Computer Science & Engineering

SJCET

SmartBus

where the bus will halt, what are the stops. The next feature added is the display of
speed.
2.4 ADVANTAGES OF PROPOSED SYSTEM
The product will be easy to customize as per the above problems to ensure the
safety of passengers. Different features include:
Door Control System with a motion detection sensor
Brake Lock/Unlock System
Location Tracking Using GPS
Speed Display

Department Of Computer Science & Engineering

SJCET

SmartBus

3. SYSTEM REQUIREMENTS

3.1 SOFTWARE REQUIREMENTS


The different software that is required for the creation of a Smart Bus system
is described as follows: Proteus Professional Version 8 to check if the program written is correct
on the model version of the circuit board.
MikroC Pro for PIC Microcontroller writing programs to program the
PIC microcontroller.
Eagle Software designing of the software board
MPLAB Software to burn the program to microcontroller with the help
of a PICKIT.
3.2 HARDWARE REQUIREMENTS
Processor: - 4th Generation Intel Core i5 processor
Main Memory 4GB
Components for the Circuit
o PIC 16F877A
o PCB Board
o Speed Sensor (Motion Detection Sensor)
o Footstep Sensor (Motion Detection Sensor/Switch)
o CD Drive with CD motor
o DC Motor
o Relay Switch
o Push Button Switch
o LCD Display
o LED Display
o Power Supply
Department Of Computer Science & Engineering

SJCET

SmartBus

o Crystal Oscillator
o Resistors 1k and 10k
3.3 SELECTION OF SOFTWARE
3.3.1 Embedded C
C is the most widely used programming language for embedded
processors/controllers. Assembly is also used but mainly to implement those
portions of the code where very high timing accuracy, code size efficiency, etc. are
prime requirements.
Embedded systems programming is different from developing applications on a
desktop computers. Key characteristics of an embedded system, when compared to
PCs, are as follows:
Embedded devices have resource constraints(limited ROM, limited RAM,
limited stack space, less processing power)
Components used in embedded system and PCs are different; embedded
systems typically uses smaller, less power consuming components.
Embedded systems are more tied to the hardware.
3.3.2 Difference Between Embedded C and C
Though C and embedded C appear different and are used in different
contexts, they have more similarities than the differences. Most of the constructs
are same; the difference lies in their applications. C is used for desktop computers,
while embedded C is for microcontroller based applications. Accordingly, C has
the luxury to use resources of a desktop PC like memory, OS, etc. While
programming on desktop systems, we need not bother about memory. However,
embedded C has to use with the limited resources (RAM, ROM, I/Os) on an
embedded processor.
Thus, program code must fit into the available program memory. If code
exceeds the limit, the system is likely to crash. Compilers for C (ANSI C) typically
generate OS dependant executables. Embedded C requires compilers to create
files to be downloaded to the microcontrollers/microprocessors where it needs to
run. Embedded compilers give access to all resources which is not provided in
compilers for desktop computer applications. Embedded systems often have the
Department Of Computer Science & Engineering

SJCET

10

SmartBus

real-time constraints, which is usually not there with desktop computer


applications. Embedded systems often do not have a console, which is available in
case of desktop applications.
3.3.3 Proteus Professional Version 8
Proteus professional version 8 is a software used to create PCB layouts and
implement the embedded C programs in it and run it in order to test if the code
can be executed or not.
The Proteus schematic capture module lies at the heart of the system, and is
far more than just another schematics package. It combines a powerful design
environment with the ability to define most aspects of the drawing appearance.
Whether your requirement is the rapid entry of complex designs for simulation
and PCB layout, or the creation of attractive schematics for publication, Proteus
Capture is the tool for the job.
3.3.4 Mikro C Pro for PIC Microcontroller
The mikroC PRO for PIC is a powerful, feature-rich development tool for
PIC microcontrollers. It is designed to provide the programmer with the easiest
possible solution to developing applications for embedded systems, without
compromising performance or control.
PIC and C fit together well: PIC is the most popular 8-bit chip in the world,
used in a wide variety of applications, and C, prized for its efficiency, is the
natural choice for developing embedded systems. mikroC PRO for PIC provides
a successful match featuring highly advanced IDE, ANSI compliant compiler,
broad set of hardware libraries, comprehensive documentation, and plenty of
ready-to-run examples.

Department Of Computer Science & Engineering

SJCET

11

SmartBus

3.3.5 Eagle Software


A Printed Circuit Board or PCB is thing which holds your entire project
hardware together! It links and connects various electronic components together on
a common physical platform. PCB design is a key process in the electronics
industry because this process actually broadcasts the craftsmanship to production.
One can call this process in technical terms as designing of tracks & pads,
realizing the PCB and fabrication of various electronic components on the board.
Although PCB fabrication is a costlier process, but due to mass production
through automated process, the overall cost of the product decreases. The major
advantage, apart from the cost of fabrication and reduced complexity, is the final
product is professional, well finished and the performance of the system increases.
EAGLE, an acronym for Easily Applicable Graphical Layout Editor, is
design software by Cadsoft Computers. It is widely used by educationalists,
students, hobbyists and professionals because of its rich yet simple interface with
large component library cross-platform support on Windows, Mac and Linux too!
Since windows is the widely used OS, the inclination of this tutorial will be
towards EAGLE on a Windows computer, but dont worry there is almost no
difference on a Mac or Linux. PCB designing is like maturing wine, the more you
practice the better you will be at designing professional level PCBs.
3.3.6 MPLAB Software
MPLAB IDE is a software program that runs on your development environment
for your embedded microcontroller design. The design cycle for developing an
embedded controller application is:
1. Do the high level design From the features and performance desired,
decide which PICmicro or dsPIC device you need, then design the
associated hardware circuitry.
2. Knowing which peripherals and pins control your hardware, write the
software. Use either assembly language, which is directly translatable into
machine code, or using a compiler that allows a more natural language for
creating programs. With these Language Tools you can write and edit code

Department Of Computer Science & Engineering

SJCET

12

SmartBus

that is more or less understandable, with constructs that help you organize
your code.
3. Compile or assemble the software using a Language Tool to convert your
code into machine code for the PICmicro device. This machine code will
eventually

becomes

firmware,

the

code

programmed

into

the

microcontroller.
4. Test your code. Usually a complex program does not work exactly the way
you might have imagined, and bugs need to be removed from your
design to get it to act properly.
5. Burn your code into a microcontroller and verify that it executes
correctly in your finished application.

Department Of Computer Science & Engineering

SJCET

13

SmartBus

4. SYSTEM DESIGN
4.1 ELEMENTS OF DESIGN
4.1.1 Feasibility and Critical Factors
Feasibility factors are those factors that determine whether the software
developed satisfies the stipulated requirements that describe systems behavior. There
is always a set of conditions that can completely describe the system; when changes
are applied on the system, it may change its overall state by changing the state of any
of the conditions that constitute the description set. Requirements can be of two
types:

Functional

requirements,

Nonfunctional

requirements.

A functional

requirement describes the interaction between the system and its environment. A non
functional requirement describes the constraint on the system that limits the choices
for construction of a solution to the problem.
System design is the stage of transition from user requirement specification to a
specification for the software personnel. The importance of the design can be stated
with a single word Quality. Design is the place where quality is fostered in software
development. The phase acts as the bridge between the user specification and
implementation phase, which satisfies the user specification. While analysis
essentially logical, design is creative. An elegant design achieves its objective with
minimum use of resources. The resources are always limited but an acceptable design
often proves to be a compromise between a number of factors like cost, reliability,
accuracy, security, control, integration, and expansibility.
System Design consists of:
Physical Design
Logical Design

Department Of Computer Science & Engineering

SJCET

SmartBus

14

4.1.2 Physical System Design


Physical design produces working system by defining specification and the
necessary programs are written based on this, which performs necessary calculations
through the existing database produce report and maintains updated database at all
times.
Physical design consists of:
Input Design
Output Design
Program Design
4.1.2.1 Input Design
Input design is the process of converting user-originated inputs to a computer
based format. The goal of designing input data is to make data entry as easy and free
from errors as possible.
Well-designed inputs serve five purposes
1 Control work flow
2 Reduce redundancies
3 Record data
4 Increase clerical accuracy
5 Allow easier checking of data
4.1.2.2 Output Design
Outputs from the computer system are required primarily to communicate the
results of processing to the users. Output design is an ongoing activity during the
study phase. The objective of output design is to define the contents and format of all

Department Of Computer Science & Engineering

SJCET

15

SmartBus

documents and reports in an attractive and useful format. Other reasons for output
generations are:
1 To provide proper communication of data to the user.
2 To re-input to the computer for being connected with other data and further
processing.
3 To provide permanent storage
Output generally refers to the results and information that are generated by the
system. It can be in the form of operational documents a report. Since some of the end
users will not actually operate the information system or input through workstations.
4.1.2.3 Program Design
The most creative and challenging phase of the system development life cycle
is the system design. The term design describes the final system and the process by
which it is developed. It refers to the technical specifications that will be applied in
implementing the candidate system. The first step is to determine how the output is to
be produced and in what format, sample outputs are to be presented.
Design is the process of creating alternative solutions evaluating the choice and
drawing up the specifications for the chosen alternatives. System design work follows
logically from system analysis. Identifying where a system may be improved leads on
how the system can be improved and in particular advantage of computer use.
Application design consists of taking the compiled list of requirements and
turning it into detailed specification describes the new system. Many of the tools used
in the analysis phase can be used in phase to clarify the different aspects of the
proposed system. Dataflow diagrams can be used in this phase to clarify the different
aspects of the proposed system.
The general purpose that use here for object oriented design has a number of
stages:
1 a. Understand and define content and the modes of use of the system.
2 b. Design the system architecture
Department Of Computer Science & Engineering

SJCET

SmartBus

16

3 c. Identify the system objects in the system


4 d. Develop design models
5 e. Specify object interface
4.1.3 Logical System Design
The data flow oriented design has been adopted for the system. The main
attraction of the data flow oriented design is that it is amenable to wide range of
application areas. Data flow diagrams show the logical flow of the system and define
boundaries of the system. It describes the inputs (source), output (destination),
database (data sources) and procedures (data flows), all in a format that meets the
users requirements. While preparing the logical system design, it is tried to specify
the user needs at all level of detail that virtually determines the information flow into
and out of the system. The required data sources and the specific objectives of the
design where also considered. The outline design of the needed reports and input
forms was defined.
Data is the key to the overall system and it is structured to meet the user
requirement. Each item of data is uniquely and defined in a database. The relationship
between various items of data was identified. The data are analyzed to determine
whether they are normalized. Then the procedures handled by the computer and
human beings are also determined.

Department Of Computer Science & Engineering

SJCET

17

SmartBus

4.2 ARCHITECTURAL DESIGN


4.2.1 Use Case Diagram

Figure 4.2.1: - Use Case Diagram of SmartBus System

Department Of Computer Science & Engineering

SJCET

18

SmartBus

4.2.1.1 Use Case Reports


4.2.2 Sequence Diagrams Speed Control

Figure 4.2.2: - Sequence Diagram Speed Control

Department Of Computer Science & Engineering

SJCET

19

SmartBus

4.2.3 Sequence Diagrams Door Opening and Closing

Figure 4.2.3: - Sequence Diagram Door Opening and Closing

Department Of Computer Science & Engineering

SJCET

20

SmartBus

4.2.4 Sequence Diagrams Location Tracking

Figure 4.2.4: Location Tracking

Department Of Computer Science & Engineering

SJCET

21

SmartBus

4.3 PCB Layout

Figure 4.3: - PCB Layout


4.4 Circuit Layout

Department Of Computer Science & Engineering

SJCET

22

SmartBus

Figure 4.4 Circuit Layout

5. SYSTEM IMPLEMENTATION
5.1 INTRODUCTION
A product software implementation method is a systematically structured
approach to effectively integrate software based service or component into the
workflow of an organizational structure or an individual end-user. A product
software implementation method is a blueprint to get users and/or organizations
running with a specific software product. The method is a set of rules and views to
cope with the most common issues that occur when implementing a software
product: business alignment from the organizational view and acceptance from the
human view.
The complexity of implementing product software differs on several issues.
Examples are: the number of end users that will use the product software, the
effects that the implementation has on changes of tasks and responsibilities for the
end user, the culture and the integrity of the organization where the software is
going to be used and the budget available for acquiring product software. An
example of larger product software is the implementation of an Enterprise
Resource Planning system. The implementation requires in-depth insights on the
architecture of the organization as well as of the product itself, before it can be
aligned. Next, the usage of an ERP system involves much more dedication of the
end users as new tasks and responsibilities will never be created or will be shifted.
Process modeling, used to align product software and organizational
structures, involves a major issue, when the conclusion is drawn that the product
software and the organizational structure do not align well enough for the software
to be implemented. In this case, two alternatives are possible: the customization of
the software or the redesign of the organizational structure, thus the business
processes.
Department Of Computer Science & Engineering

SJCET

23

SmartBus

Customizing the software actually transforms the product software in tailor


made software, as the idea of standardized software no longer applies. This may
result in loss of support on the software and the need to acquire consultancy when
issues arise in the usage of the software. Customizing however results in a
situation where the organizational integrity is not adjusted, which puts less
pressure on the end users, as less changes or shifts in workflows are required. This
fact may positively add to the acceptance of any new product software application
used and may thus decrease the implementation time and budget on the soft side of
the implementation budget.
Redesigning business processes is more sensible for causing resistance in
the usage of product software, as altered business processes will alter tasks and
responsibilities for the end users of the product software. However, while the
product software is not altered, better support, training and service levels are
possible, because the support was created for the specific integrity of the software.
Another issue on the implementation process of product software is the
choice, or actually the question, to what extent an implementation method should
be used.

Implementation methods can on the one hand be used as a guiding

principle, indicating that the method serves as a global idea about how the
implementation phase of any project should run. This choice leaves more room for
situational factors that are not taken into account in the chosen method, but will
result in ambiguity when questions arise in the execution of the implementation
process.

Department Of Computer Science & Engineering

SJCET

24

SmartBus

5.2 System Perspective


This system consists of four modules: - door control, display system,
location tracking with GPS and speed control. The door control system is used to
ensure the safety of passengers while entering the bus, the decision when to open
the bus and to close the bus, for this purpose we are fitting a sensor which is placed
on the lowest step of the bus, when the passenger steps on the step having the
sensor, the sensor detects that a passenger is entering into the bus and hence locks
the brake system of the bus, hence preventing the driver from taking the bus when
a passenger is entering into the bus. The display system is used to display the
major bus stops that a bus will stop at while travelling to a particular destination.
The display system will be displayed similar to the one in metros where it will
highlight when a stop has reached. With the location tracking system serves as a
viable notification system that will effectively assist the passengers in making the
decision of whether to wait for the bus or not which is achieved with the help of
GPS. Speed control can be obtained by displaying the current speed that the driver
is going on to the passengers, which makes the passengers aware hence placing a
step in the reduction of rash driving related accidents.

5.3 Product Functions


Department Of Computer Science & Engineering

SJCET

25

SmartBus

With the door control system, the bus driver and conductor can ensure the
safety of the passengers getting into the bus. With the display system, the
passengers become aware of the places when he is travelling in order to know if he
has reached a particular stop. With the location tracking using GPS the passenger
can decide whether or not to wait for a particular bus. With the speed control the
passengers are made aware of the current speed the driver is going in, which in
turn alerts the driver to go slow down since he knows that everyone knows the
speed in which he is going.
5.3 Module Descriptions
5.3.1 Module 1: - Door Control System
With the help of motion detection sensors and the use of DC motor we open and
close the door. The system implements a door control system which ensures the
safety of the passenger while and entering and leaving the bus. Whenever a
passenger gets or leaves the bus, due to the lack of concentration or proper timing
the driver may not see who is entering or leaving the bus and after a moment of
time will start the bus to take off, causing the person either entering or leaving to
fall of the bus or get hurt while climbing the bus. So in order to prevent this we are
using a motion detection sensor to detect the footstep of the person, entering and
leaving the bus and based on the output there will be decision of whether to open
or close the bus
5.3.2 Module 2: - Brake Control System
With the help of relay switch, we can lock and unlock the brake.
Entering of the passenger on the bus.
The footstep sensor detects whether there is a passenger on the lowest step of the
bus, i.e. entering the bus, if so the footstep sensor will set as 1 which indicates
there is a person on the lowest step and sends a signal to the relay switch that a
person is entering the bus, thus locking the brake control system and preventing
the user from taking the bus and closing the door.
Department Of Computer Science & Engineering

SJCET

26

SmartBus

Leaving of passengers from the bus.


While a passenger is leaving the bus, the footstep sensor will detect the presence of
the passengers footstep at the lowest step of the bus, thus the footstep sensor will
set its value as 1 which indicates the presence of the passenger on the lowest step,
and sends a signal to the relay switch which then locks the brake system.
5.3.3 Module 3: - Location Tracking Using GPS
The location tracking using GPS system and its display enables the users to
know the current location and display it with the help of LEDs. The display of
location or position of the bus is a very helpful factor so that passengers will know
where they are at that exact moment. Passengers travelling long distance, or who
are new to a particular place can rely on the location display system to know where
they are. This display of location is done with the help of global positioning
tracking system. With the help of this tracking system, passengers can identify the
location. This will be helpful to newcomers and also those traveling at night time
during rain to identify the locations.
5.3.4 Module 4: - Speed Display
Rash driving is another factor. Rash driving is the careless driving without
thinking about the safety of driving. Bus drivers, when driving with high speed
will lead to rash driving causing harm to people inside and outside of the bus, but
when we know when the driver is over speeding we cannot complain. This is
because even if we complain the drivers wont slow down. So, for this purpose we
are setting a display which displays the speed.

6. TESTING METHODOLOGY

Department Of Computer Science & Engineering

SJCET

27

SmartBus

6.1 TESTING OBJECTIVES


There are several rules that can serve as testing objectives. They are:
Testing is a process of executing a program and finding a bug.
A good test is one that has a high probability of finding an undiscovered
error.
A successful test is one that uncovers an undiscovered error.
If testing is conducted successfully according to the objectives as stated above,
it would uncover errors in the software. Also testing demonstrates that software
functions appear to be working according to the specification, that performance
requirements appear to have been met.
There are three ways to test a program:
For correctness
For implementation efficiency
For computational complexity
Tests for correctness are meant to verify that a program does exactly what it
was designed to do. This is much more tedious than it may at first appear,
especially for large programs.
Tests of implementation attempts to find ways to make correct program
faster or use less storage. It is a code refining process, which re-examines the
implementation phase of algorithm development. Tests for computational
complexity amount to an experimental analysis of the complexity of an algorithm
or an experimental comparison of two or more algorithms, which solve the same
problem.
The defects in the software are detected using Software Testing. It helps to
test the correctness, completeness and consistency of the project.
Testing involves three strategies:
1 Unit Testing
Department Of Computer Science & Engineering

SJCET

28

SmartBus

2 Integrated Testing
3 Validation Testing
6.2 UNIT TESTING
Unit testing concerns itself with the concept of unit changes. The attention is
mainly concentrated on the detail of a module and the data flow across the module
interface. Each module is considered as a separate unit.
In Unit Test all validations and conditions are tested in the module level. All
error handling paths are tested. Unit testing focuses verification effort on the
smallest unit of software designs the module. To check whether each module in the
software works properly so that it gives desired outputs to the given inputs. All
validations and conditions are tested in the module level in the unit test. Control
paths are tested to ensure the information properly flows into, and out of the
program unit under test.
Output is obtained for the various operations implemented in the website
and the testing was successful.
6.3 INTEGRATION TESTING
Integration Testing is planned so that when a failure occurs, we have some
idea of what caused it. In addition, the order in which the components are tested
affects our choice of test cases and tools. Though each program works
individually, they should work after linking them together. At times data may be
lost across the interface and at time subroutines may not have the function desired
by the main routine. In this type of testing, the programs are tested in small
segments.
Data can be lost across an interface, one module can have an adverse effect
on the other sub-functions, when combined may not produce the desired functions.
Integrated testing is the systematic testing to uncover the errors within the
interface. This testing is done with simple data and the developed system has run
Department Of Computer Science & Engineering

SJCET

29

SmartBus

successfully with this simple data. The need for integrated system is to find the
overall system performance. In integration testing, we combine various modules.
6.4 VALIDATION TESTING
The validation testing focuses on user visible actions and user
recognizable outputs from the system. In this testing, the entire software system is
tested. Testing here focuses on the external behavior of the system; the internal
logic of the system is not emphasized. Validation testing can be defined in many
ways, but a simple definition is that validation succeeds when the software
functions in a manner that can be reasonably accepted by the user/customer.
Software validation is achieved through a series of black box tests that demonstrate
conformity with requirements. After validation test has been completed, one of the
following two possible conditions exists:
1) The function or performance characteristics confirm to the specification and are
accepted.
2) A deviation from specification is uncovered and a deficiency list is created.
Deviation or

errors discovered at this step in this project is corrected prior to the

completion of the project is the help of users by negotiating to establish a method


of resolving deficiencies.
Thus, the proposed system under consideration has been tested by using
validation testing and found to be working satisfactory.

7. CONCLUSION
7.1 SUMMARY
Department Of Computer Science & Engineering

SJCET

30

SmartBus

Project SmartBus, ensures that the safety of passengers, giving the


information of location and alerting on over speed conditions. These features are
used to ensure the safe entry and exit of the passengers. It also provides a safe door
control mechanism for the opening and closing of the door and a brake control
system to control the bus.
7.2 RECOMMENDATIONS FOR FUTURE WORK
Implementing Bluetooth and WiFi Modules.
Light variation using sensors to open and close the door.
Sound alert of location

Department Of Computer Science & Engineering

SJCET

31

SmartBus

8. REFERENCES
WEB PAGE RESOURCES
http://www.agilemodelling.com/artifacts/useCaseDiagram.htm
http://www.agilemodelling.com/artifacts/sequenceDiagram.htm

http://www.gis2gps.com/GPS/GPSDEF/gpsdef.html
http://whatis.techtarget.com/definition/use-case-diagram
https://www.lucidchart.com/pages/what-is-a-sequence-diagram-in-UML
http://www.eetimes.com/document.asp?doc_id=1278363
http://www.aesys.com/LED-signs-and-LED-display/bus-systems/stationarysystems/bus-station-display-system
https://en.wikipedia.org/wiki/Micro-Controller_Operating_Systems
https://en.wikipedia.org/wiki/Embedded_C
http://www.math.utah.edu/~wright/misc/matlab/matlabintro.html
http://geniusdevils.com/2013/03/what-is-proteus-software/
http://www.mikroe.com/mikroc/pic/

Department Of Computer Science & Engineering

SJCET

32

SmartBus

APPENDIX A
PROGRAM LISTING
sbit open_sw at RA0_bit;
sbit close_sw at RA1_bit;
sbit buzzer at RA2_bit;
sbit buzzer_dir at TRISA2_bit;
sbit foot_sense at RA4_bit;
sbit door_motA at RB3_bit;
sbit door_motB at RB4_bit;
sbit door_motA_dir at TRISB3_bit;
sbit door_motB_dir at TRISB4_bit;
// LCD module connections
sbit LED_1 at RB1_bit;
sbit LED_2 at RB2_bit;
sbit LED_3 at RA3_bit;
//sbit LED_4 at RD3_bit;
sbit LED_1_Direction at TRISB1_bit;
sbit LED_2_Direction at TRISB2_bit;
sbit LED_3_Direction at TRISA3_bit;
sbit LED at RC2_bit;
sbit LED_Direction at TRISC2_bit;
sbit relay at RB7_bit;
sbit relay_dir at TRISB7_bit;
// End LCD module connections
//unsigned char output[80];
//unsigned char uart_dat,txt_arr_ptr,chr_count,plus_check;

Department Of Computer Science & Engineering

SJCET

33

SmartBus

unsigned char sub_time=0;


unsigned char str[4]={0,0,0,0};

//Value to be decoded

unsigned int d_no=0;


unsigned int speed=0,speed_cap=0,speed_count=0;
unsigned char sec=0;
const
mask[]={0x81,0xCF,0x92,0x86,0xCC,0xA4,0xA0,0x8F,0x80,0x84};

char
//LOOKUP

TABLE
void door()
{
if(!open_sw )

//Open Switch When Pressed

{
if( speed==0 && foot_sense) //speed =0 and footsense =0
{
door_motA=1;

//door opened

door_motB=0;
relay=0;

// wheel will not rotate

}
else
{
door_motA=0;
door_motB=0;
buzzer=1;
delay_ms(200);
buzzer=0;
relay=1;
}
}
else if(!close_sw ) //close switch pressed
Department Of Computer Science & Engineering

SJCET

34

SmartBus

{
if( speed==0 && foot_sense) //speed = 0 and footsense=0
{
door_motA=0;
door_motB=1;
relay=1;

//door will close


//wheel will rotate

}
else
{
door_motA=0;
door_motB=0;
buzzer=1;
delay_ms(200);
buzzer=0;
relay=0;
}
}
else
{
door_motA=0;
door_motB=0;
}
}
void display(void)
{
LED_1=0;
LED_2=0;
Department Of Computer Science & Engineering

SJCET

35

SmartBus

LED_3=0;
PORTD=mask[str[d_no]];
switch(d_no)
{
case 0:
{
LED_1=1;
break;
}
case 1:
{
LED_2=1;
break;
}
case 2:
{
LED_3=1;
break;
}
}
d_no++;
if(d_no>2)
d_no=0;
}

void interrupt(void)
Department Of Computer Science & Engineering

SJCET

SmartBus

36

{
if(PIR1.TMR2IF)
{
LED_Direction=0;
PIR1.TMR2IF=0; //Clear interrupt flag
sub_time++;
display();
if(sub_time>124)
{
LED=~LED;
sub_time=0;
sec++;
if(sec>30)
{
sec=0;
speed_cap=speed_count;
speed_count=0;
}
}
}
else if(INTCON.INTF)
{
INTCON.INTF=0;
speed_count++;
}
}

Department Of Computer Science & Engineering

SJCET

37

SmartBus

void main()
{
ADCON1=0x07;
// TRISA=0x00;
// TRISB=0x01;
TRISD=0;

//Initializing PORTB

//Initializing PORTD

// TRISC=0;
buzzer_dir=0;
door_motA_dir=0;
door_motB_dir=0;
relay_dir=0;

LED_1_Direction=0;
LED_2_Direction=0;
LED_3_Direction=0;
T2CON=0x4F; //Set timer2 for overflow rate of 125hz
PR2=124;

speed=0;
buzzer=1;
Delay_ms(1000);
buzzer=0;
Department Of Computer Science & Engineering

SJCET

SmartBus

38

uart1_init(9600);

INTCON=0xC0;
INTCON.INTE=1;
PIE1=0x02;
while(1)
{
speed=speed_cap;
str[0]=(speed/100)%10;
str[1]=(speed/10)%10;
str[2]=speed%10;
// PORTC=0x34;
door();
}
}

Department Of Computer Science & Engineering

SJCET