Professional Documents
Culture Documents
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.
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.
SJCET
SmartBus
SJCET
SmartBus
SJCET
SmartBus
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.
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
SJCET
SmartBus
3. SYSTEM REQUIREMENTS
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
SJCET
11
SmartBus
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.
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
SJCET
SmartBus
14
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
SJCET
17
SmartBus
SJCET
18
SmartBus
SJCET
19
SmartBus
SJCET
20
SmartBus
SJCET
21
SmartBus
SJCET
22
SmartBus
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
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.
SJCET
24
SmartBus
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
6. TESTING METHODOLOGY
SJCET
27
SmartBus
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
7. CONCLUSION
7.1 SUMMARY
Department Of Computer Science & Engineering
SJCET
30
SmartBus
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/
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;
SJCET
33
SmartBus
//Value to be decoded
char
//LOOKUP
TABLE
void door()
{
if(!open_sw )
{
if( speed==0 && foot_sense) //speed =0 and footsense =0
{
door_motA=1;
//door opened
door_motB=0;
relay=0;
}
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;
}
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++;
}
}
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();
}
}
SJCET