Professional Documents
Culture Documents
Jimma Thesis
Jimma Thesis
Jimma Thesis
LIST OF MEMBERS:
Name ID No.
SOLOMON ABEBEI--------------------01959/03
SILEABAT DIRES-----------------------01483/03
MULUGETA MERGIYAW------------01596/01
HAREGEWOYN TEKILE-------------01046/03
WOLDEMESKEL ZIMELO-----------01702/03
HABTU BIRHANU-----------------------01019/03
This project paper is submitted in partial fulfillment of the requirement for BSc in Electrical and
Computer engineering at Jimma Institute of Technology.
This is to certify that the above declaration made by our effort is correct to the best of our
knowledge.
In doing so, we assure that we agree with all written above with our signature as follows.
Name ID Signature
1. Solomon Abebei 01956/03
2. Sileabat Dires 01483/03
3. Mulugeta Mergiyaw 01596/01
4. Woldemeskel Zimelo 01702/03
5. Habitu Birhanu 01019/03
6. Haregewoyn Kifle 01046/03
Name of Advisor Signature
i
Abstract
This paper will discuss about RFID based Customer Service Notification as a solution to solve
problems of Addis Ababa National Bus Station customers. The system can improve unwanted
place to place movement of people to find their bus. Each bus is assigned by automatically
display bus status information (weather the bus is inside station or outside station, the bus is
changed or already leave the station) to the customers using display board and website.
This paper will also discuss how can inform customers about booking information of buses for
future traveling from Addis Ababa before they buy tickets using website. And how customers
prevent themselves from extra payment either if they are late or the bus is already leave station
before they arrive.
Additionally, this paper discusses how we help the administrator of Addis Ababa National Bus
Station by developing an application to control station of information like bus information,
booking and ticketing information.
This system needs basic knowledge about RFID technology (Radio Frequency Identification)
and its basic components, how can interface it, work on C#, ASP.NET, SQL Server, Proteus and
building website driven database.
ii
Acknowledgement
The successful completion of any task would be impossible without the help of others. First of
all, we would like to express our gratitude to Jimma University, Jimma Institute of technology
and the School of Electrical and Computer Engineering for giving this opportunity to do our final
year project on RFID based Addis Ababa bus station customer service system out of the normal
environment.
We have a grateful thanks to our project advisor Mrs. Serawork Amsalu (M.Sc.) and co-
advisor Mr.Solomon B. (B.Sc.) for their guidance, inspiration and constructive suggestions that
has been helpful to us in the preparation of this project.
Our special thanks goes to our stream chairman Mr. Fitulwak A. (M.Sc.) for his continuous
motivation and support in the entire process of the project.
We would like to thank Engr. Kris C.Culpotura, MSME, MIT for giving us advice and
comments on our project.
We also thank to our Computer Engineering stream instructors (particularly, Engr. Jhun,
Mr.Gadisa Wakgari and Mr. Sisay Desita) and friends who have helped us in the successful
completion of our project.
Lastly, we would like to give thanks to our Computer and Communication engineering
laboratory assistance that she helps us by opening the computer laboratory class continuously
until we have finished our project.
iii
Table of Contents
Declaration ....................................................................................................................................... i
Abstract ........................................................................................................................................... ii
Acronyms ....................................................................................................................................... ix
1 Introduction ............................................................................................................................. 1
Chapter Two.................................................................................................................................... 5
2 Literature Review.................................................................................................................... 5
iv
2.1.6 Application of RFID ................................................................................................. 6
Chapter Three.................................................................................................................................. 8
v
4.4.1 Power supply........................................................................................................... 25
References ..................................................................................................................................... 41
Appendices .................................................................................................................................... 42
vi
List of Figures
Figure 1System Design flow [8]....................................................................................................... 4
Figure 2 System block diagram ...................................................................................................... 9
Figure 3 PIC18F45K22 [9]............................................................................................................. 12
Figure 4 PIC18F45K22 pin diagram............................................................................................. 13
Figure 5 EM18 RFID reader [1].................................................................................................... 13
Figure 6 EM18 RFID pin diagram [1] .......................................................................................... 14
Figure 7 RFID system principle [1]................................................................................................ 15
Figure 8 Typical RFID tag with antenna and a microchip............................................................ 16
Figure 9 20 x 4 character LCD display ......................................................................................... 17
Figure 10 20x4 character LCD pin diagram ................................................................................. 17
Figure 11 RS232 DB8 male and female connector [3]................................................................ 19
Figure 12 MAX232 pin diagram [9] .............................................................................................. 20
Figure 13 MAX232 basic connection with microcontroller [9] ..................................................... 22
Figure 14 Crystal oscillator........................................................................................................... 23
Figure 15 General flowchart of the system ................................................................................... 24
Figure 16 power supply ................................................................................................................ 25
Figure 17 RFID tag reading section .............................................................................................. 26
Figure 18 RS232 interface section............................................................................................... 26
Figure 19 LCD display section ..................................................................................................... 27
Figure 20 Usecase diagram ........................................................................................................... 29
Figure 21 SQL server relational database diagram ....................................................................... 30
Figure 22 Home tab section .......................................................................................................... 31
Figure 23 Registering new bus tab on administrator form .......................................................... 32
Figure 24 Updating bus information tab on administrator form ................................................... 33
Figure 25 Assigning bus for semirit tab on administrator form.................................................... 34
Figure 26 Update destination information tab on administrator form .......................................... 35
Figure 27 home page ..................................................................................................................... 36
Figure 28 Review page ................................................................................................................. 36
Figure 29 Station page .................................................................................................................. 37
Figure 30 Contact page ................................................................................................................. 37
Figure 31 About page................................................................................................................... 38
Figure 32 System database entity relationship diagram ............................................................... 42
vii
List of Tables
Table 1 EM18 RFID reader pin description ................................................................................ 14
Table 2 20x4 character LCD pin description ................................................................................ 18
Table 3 RS232 DB9 connector pin description .......................................................................... 19
Table 4 MAX232 pin description ................................................................................................. 21
viii
Acronyms
AIDC: Automatic Identification and Data Capture
DB: Database
PRO: Professional
ix
RFID: Radio Frequency Identification System
x
Chapter One
1 Introduction
Addis Ababa national bus station was originally founded when the Ethiopia road transport
authority (ERTA) is organized in the year of 1967. In 2005, the Ethiopian government
reorganized the transport sector and the station is responsible for ERTA. [7]
Addis Ababa bus station is one of the biggest and core of every national bus journey in the
country. This national bus station has around 750 service buses and it is estimated to travel
30,000 travelers per a day. Even though the station covers a wide range of customer travelling
service ,it works with traditional manual system which have poor method of announcement for
their customers when either a bus is changed or to call person with the help of speaker and sell
tickets with direct contact of customers even if there is a large number of peoples. Each bus
hasn’t a fixed time to start travelling that the travelers may not arrive their destination on the
desired time. This big station doesn’t have any automated notification system for their customer
(whether the bus is within the station or it doesn’t enter station). Not only have these, but also the
station doesn’t have a system (method) or access to notify an information for those customers
who are not nearby the station. This system also consumes the officers’ paper, pen, energy and
time. So, this problems must be solved so as to fulfill customers need and participate in the
economic development of the country.
Having this problem, we come up with a solution of the above all problems to help authorities
and customers of Addis Ababa National Bus Station by developing an automated system.
This project is designed and implemented by using RFID technology, which is one of the new
emerging technologies that use radio frequency wave to transfer data between a reader and a
movable item which is RFID tag, which is attached to the bus, to identify it.
1
1.1 Statement of the problem
Since we are coming at far distance from Addis Ababa, we use this station service. The
customers doesn’t get fast and comfort services. We have seen that the station officers use
traditional manual system and it is difficult to buy tickets because of large number of travelers.
So, we are initiated to design and develop an automated notification board and website for
customers of Addis Ababa bus station. Specifically, we design a system that solves problems
related with unwanted place to place movement of people to find their bus which faces them for
the robbers, replacing backward manual systems to show changes on services for the clients and
to indicate the bookings of the buses for future travelling from Addis Ababa before they buy
tickets.
1.2 Objectives
The objective of this project was categorized as the general objective and specific objective
discussed as follows.
To design an RFID based customer service notification system for Addis Ababa National
Bus Station.
To design a system that notify customers whether the bus is entering or living the station,
even changes made to this bus
To develop a website that is used to visit buses going from Addis Ababa to any
destination before customers are going to buy tickets
To develop a desktop application that used to register bus information of the station
To provide online services for the customers or travelers
To design a system which announces customers of the station about ticket price
To upgrade project and problem solving skills and team working
2
1.3 Scope of the project
This project is designed and developed based RFID technology for Addis Ababa national bus
station. This system covers some activities that were manually done in the current Addis Ababa
National Bus Station. This system basically have automated method:
To notify customers, both inside the station and not nearby using notification board and
website respectively, whether bus is inside, outside or changed, which they are assigned
for
Any change to the information is done by only the admin of the system
The Person who access the desktop application should have the knowledge of computer
The system is basically applicable only in English language
This system is limited to Addis Ababa National Bus station
1.5 Methodology
First we have focused on finding problems by observing our surrounding. Since we are
customers of Addis Ababa Bus station, we have observed problems related to customers service
notification. From the observations we decided to design and develop a system which notify
status of buses and booking information of the station to the customers. The Proteus simulation
was then developed with C code for the hardware in parallel with the software to show how the
overall system works.
3
Figure 1System Design flow [8]
4
Chapter Two
2 Literature Review
Nowadays use different technology to track items and inventories. Among this technologies
RFID and barcode are the most commonly used, each have their own advantage and
disadvantage.
RFID tags fall into two general categories; with battery and without battery. Those tags without
battery are called passive tags, use the interrogator’s radio wave energy to relay its stored
information back to the interrogator. The advantage of this tags is that the reader can much
farther away and still get the signal. A battery powered RFID tags, also called active tags,
embedded with a small battery that powers the relay of information. Such type of tags have a
virtually unlimited life span and are much smaller.
5
2.1.3 Benefits of RFID
Identification without visual contact
Read/write capability
Reliability and speed
Reusability
Data storage at point of origin
Barcode readers require a direct line of sight to the printed barcode; RFID reader do not
require a direct line of sight to either active RFID tags or passive RFID tags.
RFID tag can be read at much greater distances; an RFID reader can pill information
from a tag at distance up to 300 feet. The range to read a barcode is much less, typically
no more than fifteen feet.[6]
Barcodes have no read/write capability; i.e., one cannot add to the information written on
a printed barcode. RFID tags, however, can be read/write devices; the RFID reader can
communicate with the tag, and alter as much of the information as the tag design will
allow.[6]
RFID tags are typically more expensive than barcodes, in some cases, much more so.
6
People tracking
Hospital uses RFID tags for tracking their special patients. In emergency patient and
other essential equipment can easily tracked. It will be mainly very useful in mental care
hospitals doctors can track each and every activity of the patient. Hospitals are not the
only there are also other institution that use RFID technology to track peoples, for
example peoples tracking system will be used in jails. [6]
Access control
RFID tags are widely used in identification badges, replacing earlier magnetic stripe
cards. These badges need only be held within a certain distance of the reader to
authenticate the holder. Tags can also be placed on vehicles, which can be read at a
distance, to allow entrance to controlled areas without having to stop the vehicle and
present a card or enter an access code. [4]
Transportation and logistics
Yard management, shipping and freight and distribution centers uses RFID tracking. In
the railroad industry, RFID tags mounted on locomotives and rolling stock identify the
owner, identification number and type of equipment and its characteristics. This can be
used with a database to identify the lading, origin, etc. of the commodities being carried.
[4]
Tag collision: collision occur when multiple tags respond to the same reader
simultaneously. This means, many tags are present in a small area.
Reader collision: this occurs when the signals from two or more readers overlap. The tag
is unable to respond to simultaneous queries.
7
Chapter Three
Nowadays, lots of embedded system application are developed by adding many features and
technologies so as to minimize size and cost, and to maximize system reliability. RFID, Radio
Frequency Identification, new emerging technology is one this technologies. RFID, as the name
indicates, uses radio frequency waves to transfer data between a reader and a movable item
which is RFID tag, to identify, categorize and track items.
RFID based customer notification system for Addis Ababa National Bus Station is designed
according to the concept of embedded system, that integrate RFID reader to receive data from
dedicated RFID Tags within station, microcontroller for data processing and LCD display to
output data for customers of the station.
System control part: this part capable of processing data received from RFID reader and send it
to server part and to get desired message in response, so as to output reliable information for the
customers of station and check the validity and/or status of Tags, which is attached to the buses.
Output part: output should be seen for the customers using LCD display, for those customers
who are inside the station, website, for those who are outside station. Output is not needed only
8
for the customers of the station, but also the administrator also have to what is going happening
on the system, this is achieved by using buzzer, LED and massages.
Bus RFID Tag: Bus RFID tags are unique number/Tag number, which is given by authorized
body of the station, attached to the bus for identification purpose. This block is used to check
status of the bus like, is it incoming bus? Or is it changed bus? Or is bus living station. It is
sensed by the RFID reader when it is within the range of the reader. We are used 125 kHz
passive RFID tags.
9
RFID Reader: RFID reader is a device that is used to detect an RFID tags. It has inbuilt
antenna that generates and emits radio waves; the tag responds by sends back its data. It sends
back this data received from the tag to the microcontroller. In this project we have used EM18
RFID reader, which detects RFID tags.
Microcontroller: this block is used to control the whole system. It process data received from
the RFID reader and transmit this data to the server, for validation and further data processing. In
response, it fetches data from the server and provide output to the display. In this project we used
PIC18F45k22 microcontroller which support two UART. Since, we didn’t get PIC18F45k22, for
our demonstration purpose we have used PIC16F877A instead of PIC18F45k22 microcontroller.
DB Server: this is Backend or Back bone of the system, where information about the bus like
Tag Number, bus level, name, capacity, national bus number, owner information, destinations
and other information’s, stored. For this project we have used MS SQL server 2008 r2 as a
database server.
LCD Display: Liquid Crystal Display (LCD), display messages like Bus tag and status of the
bus (inside station, outside station or it is changed bus), which is send by the microcontroller
from the server. Here in this project we have used 20x4 alphanumeric display. Once again, we
have used 16 x 2 alphanumeric LCD display for the demonstration purpose.
DB driven website: it is like LCD display of the station, which gives full information about the
buses of the station, for those customers who are not nearby the station with additional features
like booking information destination for next journey and some other station information’s. This
is the Frontend of the system and it is designed using ASP.NET with C#.
10
Chapter Four
11
what external devices to attach without worrying too much if there enough pins to do the task.
One of the main advantages is that each pin have more than one function so that, it makes easier
to decide what the pin function do may tasks without adding another peripheral devices.
Features of PIC18F45K22
12
PIC18F45K22 pin diagram:
13
EM-18 RFID Reader pin diagram
14
Operation
EM18 RFID Reader Module generates and radiates radio frequency carrier signals of frequency
125kHz through its coils. When a 125kHz passive RFID Tag is brought in to this field, will get
energized from it. These RFID Tags are usually made using a CMOS IC EM4102. It gets enough
power and master clock for its operations from the electromagnetic fields produced by RFID
Reader. [1]
When an RFID Tag is bring in to the field of EM18 RFID reader it will read is tag number and
give output via TX terminal. The BEEP terminal become indicate valid tag detection. [1]
Typical applications
EPayment
Etoll Road pricing
ETicketing for events
Eticketing for Public Transport
Access control
PC Access
Authentication
Printer/ production Equipment
15
4.1.4 RFID Passive Tags
An RFID, Radio Frequency Identification, tag is a microchip combined with an antenna in a
compact package; the packaging is structured to allow the RFID tag to be attached to an object to
be tracked, in our case the bus. The tag’s antenna picks up signals from RFID reader and then
returns the signal, usually with some additional data like a unique serial number or other
customized information.
Even though RFID Tags comes in three forms, active, passive or semipassive, in this project we
have used passive RFID Tag. A passive tag is cheaper and smaller because it has no battery.
The command register stores the command instructions given to the LCD. A command is an
instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting the
cursor position, controlling display etc. The data register stores the data to be displayed on the
LCD. The data is the ASCII value of the character to be displayed on the LCD.
16
20 x 4 character LCD Features:
LCD can add a lot to applications in terms of providing a user interface for user,
debugging an application.
LCD has single line display, two line display, and four line display. Each line can has up
to 20 characters.
Builtin controller (S6A0069 or Equivalent)
+5V power supply (Also available for +3V)
1/16 duty cycle
LED backlight
17
20x4 character LCD pin description:
18
Due to the asymmetrical specification of interface, there are two different connector layouts,
DTE (data terminal equipment, originally used by teletype writers) and DCE (data
communication equipment, originally used by modems). Usually a male connector is available
on DTE device, while a female connector is provided at the DCE.
19
4.1.7 MAX232
MAX232 IC is used to convert the TTL/CMOS logic levels to RS232 logic levels during serial
communication of microcontrollers with PC. The controller operate at TTL logic level (0 – 5V)
whereas the serial communication in PC works on RS232 standards (25V to +25V). This
makes link between them to communicate with each other.
The intermediate link is provided through MAX232. It is a dual driver/receiver that includes a
capacitive voltage generator to supply RS232 voltage levels from a single 5V supply. Each
receiver converts RS232 inputs to 5V TTL/CMOS levels. The drivers (T1 and T2), also called
transmitter, convert the TTL/CMOS input level into RS232 level.
20
MAX232 pin description:
21
Figure 13 MAX232 basic connection with microcontroller [9]
4.1.8 Resistors
Resistor is a passive component that resists the flow of direct or alternating electric circuit. The
resistance of the resistor can be estimated by their color codes. There are some nonlinear
resistors whose resistance changes with temperature or light.
4.1.9 Capacitors
A capacitor is a passive twoterminal electrical component used to store energy electrostatically
in an electric field. Contain at least two electrical conductors (plates) separated by a dielectric
(insulator). Capacitors are used for smoothing power supply variations, coupling the various
stages of audio system, tuning in radio circuits, and store energy like in camera flash.
4.1.10 Crystal
Even though microcontroller has built in oscillator, it cannot operate without external
components which stabilize its operation and determine its frequency (operating speed of the
microcontroller). Depending on which elements are used as well as their frequencies, there are
four different oscillator modes: LP, Low Power Crystal, XT, Crystal/Resonator, HS, High
speed/Resonator and RC, Resistor/Capacitor. [8]
Crystals provides high initial accuracy and a moderately low temperature coefficient. Operation
is guaranteed over a range of conditions. Crystal oscillator modules and fully integrated silicon
oscillators are most common. Crystal oscillator modules provide accuracy similar to discrete
22
component circuits using crystals. Silicon oscillators are more precise than discrete component
RC oscillator circuits, and many provide comparable accuracy to ceramic resonatorbased
oscillators.
4.2.2 IDE
Proteus, ISIS Professional v7.8 SP2 for hardware simulation design
MikroC PRO for PIC for hardware programming
Microsoft Visual Studio 2012 for website and desktop application development
SQL Server Management Studio as backend
23
4.3 General flowchart of the system
24
4.4 Simulated Hardware circuit description
4.4.1 Power supply
This is the power supply unit we have used for generation of +5V input for all components.
Description
In above circuit we have used a regulated power supply, a Stepdown transformer TR2 is used
which gives 5 volt ac from 230V ac. Four IN 4007 diodes are used which forms a bridge. Three
capacitors C1 of 470µf, C2 of 0.01nf and C3 of 0.01nf are used for filter purpose. The regulated
IC 7805 is used for voltage regulating purpose.
Working principle:
A bridge rectifier which is made up of from four diodes rectifies the input 5 volt from the step
down transformer. This rectified output is given to C1 & C3 capacitors for filtering purpose. The
output from C3 is given to pin no.1 of 7805 IC. The 7805 is regulated IC which regulates the
voltage from C3 capacitor. +5V DC output is taken from pin no 3 of 7805 IC. The ground is
taken from pin no 2 of 7805 IC.
25
4.4.2 RFID tag reading section
Description
Since we didn’t get EM18 RFID reader simulation circuit inside proteus, in the above circuit we
have used virtual terminal simulator as EM18 RFID Reader so as to simulate the result.
Operation:
Depending on RFID tag number typed the virtual terminal transmit/send this number to the
PIC18F45K22 microcontroller through the RX1 pin for further processing.
26
Description
Since PIC18F45K22 microcontroller is the controlling unit and is interfaced with server PC
through RS232 protocol, MAX232 is used to convert the TTL voltage level of the
microcontroller to RS232 logic levels during serial communication of microcontrollers with PC.
The capacitors are used for internal charge pumps to generate +12V and 12V required for RS
232 communication.
Operation:
Whenever RFID tag is detected by the reader, the PIC18F45K22 microcontroller receives this
tags through pin RX1 and it sends to server computer through pin TX2. After tag is checked
inside the server message will be received by the microcontroller, pin RX2, to output to the 20 x
4 character LCD display.
27
Description
The PIC18F45K22 microcontroller also used to control the output. LCD (LM044L) is used to
display bus tag and status of the bus. There is resonating network which made up from C1, C2
and crystal. Microcontroller has an on chip oscillator. Variable resistor (010k) is placed for
setting the brightness of the LCD.
Operation:
After the tag number is checked inside the server database message will be received by the
microcontroller, status of the bus and tag number, this message is displayed on the LCD. When
LCD rows are filled and if another message comes previously displayed messages will move
upward. The LCD display present bus tag number and status of the bus by moving row contents
upward each time when 4th row is filled.
A Use Case is a UML modeling element that describes how a user of the system interacts with
the system to perform a discrete unit of work. It describes and signifies a single interaction over
time that has meaning for the end user (person, machine or other system), and is required to
leave the system in a complete state: the interaction either completed or rolled back to the initial
state.
A Use Case:
Typically have requirements and constraints that describe the essential features and
rules under which it operates.
Can have an associated Sequence diagram illustrating behavior over time; that does
what to whom, and when.
Typically has scenarios associated with it that describe the work flow over time that
produces the end result; alternative work flows (for example, to capture exceptions)
are also enabled.
28
The use case diagram explaining the tasks of RFID based Customers Notification System for
Addis Ababa National Bus Station was done as follows:
29
Database model
Database model shows the database design of the system, it describes how the data will be stored
and how data’s are related to one another in the system. RFID based Customers Notification
System model was done as follows:
30
Registering new bus and viewing registered buses
Updating bus information
Searching for bus information
Assigning bus for ‘semirit’
Changing buses from ‘semirit’
Searching, adding, updating and deleting station destinations
Searching, adding, updating and deleting destinations price
User help
Information about the software and the programmers
Home tab
This tab is used to change LCD display & system messages to administrator. It display list of
available buses and changed bus tag numbers. And it also help the admin of the system to know
what the LCD is displaying currently.
31
Registering new bus
This tab is used to register a new bus to server and to view list of buses that are already exist.
The bas tag number, owner/association, owner/association phone, bus number and base name are
entered and the picture of the bus, if any, is uploaded by the officer, the bus level and bus total
capacity are filled by system depending on officers choose.
32
Updating bus information
This tab is used to update bus information. Whenever the administrator enter bus tag number, the
whole information about the bus will be displayed on the text fields by the system if bus tag
exist/valid. If the administrator want to change any information he/she can edit any of the fields
after information is field by the system.
33
Assigning bus for Semirit
This tab is add/assign bus semirit. The admin only to choose bus tag then the system will fill
every information about the bus including the picture if any. The admin only enter number of
ticket sold and select date of travel & time at which the bus leave station. The price information
is calculated and filled by the system depending on the level, destination information provided
by the officer. Pricing is done depending on the how far the destination is from Addis Ababa.
34
Updating station destination information
The main objective of this website is to decrease customer’s chance of losing their bus and as a
result their ticket will be expired by creating an online system which will display all information
about station buses status. Customers can check their bus tag from anywhere so as to prepare
themselves for the journey.
Also this website provides a full information about booking and any pricing information of
different destinations like amount, rate added (if any) and kilometer information. So there is no
need to get in trouble between the customers and station officers.
35
Home page
This page display information about Addis Ababa bus station website why it is developed and
what information it has for the customers. It also help the station administrators to post
advertisements and latest news about the station.
Review page
36
This page display information like list of currently available buses & list of buses for future
journey with full booking information. This page also display some information about ticking
information of the station. Additionally, it display list of buses for tour and travel.
Station page
This page acts as LCD display inside the station. Information like available buses, incoming
buses, changed buses and list of all buses that are already leave the station is displayed here. In
addition, it helps customers to check there bus status in which they are assigned for.
Contact page
37
If any customers or any user wants to comment, suggest or question the station, he/she can use
this page. He/she can write his/her comment, suggestion or question on the text fields and send to
the station.
About page
This page contains information about background of Addis Ababa bus station and about website.
38
Chapter Five
As part of this project, the project team conducted some activities in an effort to assess the
feasibility of using RFID technology to better manage some problems of Addis Ababa National
Bus station by interfacing the RFID reader and reading from its serial port to the system
application software, building the database and interfacing it with the application software and
website for the station using (ASP.NET, C# and CSS).
The designed automated RFID system of Addis Ababa bus station can solve problems of the
customers like time and energy wasted to find their bus. The system also reduce customer’s
chance of losing their property and expiration of ticket. Additionally, this system informs
customers about booking information, like type and level of available buses with their pricing
information of future travels before they buy ticket. The system can help the officers and
administrators of the station by providing fast and comfort service for their customers. The
administrator can also easily control everything about station by using this automated system.
As a result of various activities conducted through this project, project team developed different
findings like RFID technology and its basic components and applications of RFID, Working on
complicated problems on C#, ASP.NET, SQL Server & Proteus, and Building website driven
database.
39
5.2 Recommendations
Based on the findings generate from the activities of this project, project team offers have the
following recommendation for better performance of the system:
Tracking exact location of the bus inside the station where it stops
Online payment system for the booking system
Text message announcement for the customers if they are late or miss the bus
Accident report to families of the customers and station officers like where accident
happened
The website and desktop application would be developed using Multilanguage rather now
we are limited to English so as to address every customers.
40
References
1. EM18 RFID reader module (https://electrosome.com/shop/em18rfidreadermodule/ ).
Retrieved May 11, 2015
2. UART interface with PIC16F877A (https://www.pantechsolutions.net/UARTinterface
withpic16f877a/). Retrieved May 11, 2015
3. The RS232 primer (http://www.ethernut.de/en/documents/rs232primer.html) Retrieved
May 19, 2015
4. Radiofrequency identification Wikipedia, the free encyclopedia
(http://en.wikipedia.org/ wiki/radiofrequencyidentification).Retrieved May 11, 2015
5. RFID Application, RFID Technology, Radio Frequency Identification (http://www.
fibre2 fashion.com/industryarticle/11/1023/rfidapplications1.asp). Retrieved June 10,
2015
6. RFID technology applications (http://www.technovelgy.com/ct/technologyarticle.asp).
Retrieved June 3, 2015
7. Ethiopian Road Transport Authority Wikipedia, the free encyclopedia(http://en.wikipedi
a.org/ wiki/ EthiopianRoadTransportAuthority). Retrieved June 10, 2015
8. mikroElektronika, (2009). PIC MicrocontrollersProgramming in C by Milan Verle,1st
edition
9. MikroC PRO for PIC, Proteus ISIS Professional v7.8 SP2, Visual Studio 2012, SQL
Server Management Studio help manuals
10. PIC18F45K22, EM18 RFID Reader, MAX232 Data Sheet
11. PIC Lab Manual1.doc by Munammet, September 12,2011
41
Appendices
42
Appendix B: Sample MikroC code
Configuring RFID reader and reading RFID tag
UART1_Write(10);
UART1_Write(13);
if(UART1_Data_Ready()){
for(i=0;i<4;) {
if(UART1_Data_Ready()){
mytag[i] = UART1_Read();
i++;
}}}
43
sbit LCD_D4_Direction at TRISB0_bit;
Void main(){
Delay_ms(1000);
Lcd_Out(1,1,"TagNo");
Lcd_Out(1,9,"Status");
if(dcol==3) {
Lcd_Out(2,6,"Inside Station");
Lcd_Out(2,1,output);
temp1[k]=output[k];
}dcol+=1;
else if(dcol==4) {
Lcd_Out(3,1,output);
44
if(temp1[k ] == output[k]) ++statch;
if(statch==4) status1=1;
if(status1){
Lcd_Out(3,6,"Leave Station");
status1=0;
statch=0;
}else{
Lcd_Out(3,6,"Inside Station");
status1=1;
statch=0;
temp2[k]=output[k];
}dcol+=1;
else if(dcol==5) {
Lcd_Out(4,1,output);
if(statch==4) status1=1;
45
if(statch2==4) status2=1;
if(status1){
Lcd_Out(4,6,"Leave Station");
status1=0; statch=0;
else if(status2){
Lcd_Out(4,6,"Leave Station");
status2=0; statch2=0;
}else{
Lcd_Out(4,6,"Inside Station");
status2=1; statch2=0;
temp3[k]=output[k];
} dcol+=1;
} else {
temp1[k]=temp2[k]; }
temp2[k]=temp3[k]; }
temp3[k]=output[k]; }
status1=status2;
46
status2=status3;
else statch2=0;
if(statch2==4) status3=1;
if(status1){
Lcd_Out(2,6,"Leave Station");
status1=0;
statch=0;
}else{
Lcd_Out(2,6,"Inside Station");
status1=1;
statch=0;
if(status2){
Lcd_Out(3,6,"Leave Station");
status2=0;
statch2=0;
}else{
Lcd_Out(3,6,"Inside Station");
status2=1;
statch2=0;
47
}
Lcd_Out(2,1,temp1);
Lcd_Out(3,1,temp2);
Lcd_Out(4,1,temp3);
dcol+=1;
}}
48
Appendix C: Sample C# code
Configuring and reading tags from RFID reader
using System.IO.Ports;
…….
SerialPort sp;
if (combPort.SelectedIndex != 1) {
sp.DataReceived+=new
SerialDataReceivedEventHandler(DataReceivedEventHandler);
sp.Open();
lblReaderStat.ForeColor = System.Drawing.Color.Green;
} else {
sp.Close();
lblReaderStat.ForeColor = System.Drawing.Color.Red;
}}
SerialPort sp = (SerialPort)sender;
string w = sp.ReadLine();
if (w != String.Empty) {
49
Connecting to database server
using System.Data;
using System.Data.SqlClient;
……
……
con=newSqlConnection(@"DataSource=localhost\sqlexpress;InitialCatalog=AACustomerServic
eDB;Integrated Security=True");
…..
try{
con.Open();
…….
finally {
con.Close();
…..
…..
50
Adding new bus
……
try{
byte[] img = null;
FileStream fs = new FileStream(imgLoc, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(fs);
img = br.ReadBytes((int)fs.Length);
int TagNum = Convert.ToInt32(txtBusTag.Text);
string OName = txtOwnerName.Text;
string BName = txtBusName.Text;
int BNum = Convert.ToInt32(txtBusNumber.Text);
string BLevel = comboLevel.Text;
int cap = Convert.ToInt32(comboCap.Text);
string query = string.Format(
@"INSERT INTO BusList VALUES ({0}, '{1}', '{2}', '{3}',{4},
'{5}',{6},@img)",
txtBusTag.Text, OName, txtOwnerPhone.Text, BName, BNum, BLevel, cap);
com.CommandText = query;
com.Parameters.Add(new SqlParameter("@img", img));
try {
con.Open();
com.ExecuteNonQuery();
MessageBox.Show("New Bus Registered!");
}finally {
con.Close();
com.Parameters.Clear();
}
} catch (Exception ex) {
MessageBox.Show(ex.Message);}
51
Appendix D: Sample ASP.NET codes
Mater page
52
<li id="About" runat="server"><a href="About.aspx" accesskey="5" title="About"
>About</a></li>
</ul>
<div id="LoginInfo">
<asp:Label ID="lblLog" runat="server" Text="Welcome Gust!"></asp:Label>
<img src="../_content/_pic/logimg.gif" alt="User Picture" style="height: 30px; width:
30px; " />
<asp:LinkButton ID="linkbtn" runat="server" OnClick="linkbtn_Click">Log
In</asp:LinkButton>
</div>
</div>
<div id="mainContent">
<asp:ContentPlaceHolder ID="CPHmmain" runat="server">
</asp:ContentPlaceHolder>
</div>
<div id="footer">
<p>All right is reserved © 2007</p>
</div>
</div>
</form>
</body>
</html>
53
Appendix E: Sample SQL Query
Select bus information by bus tag number and date of travel statement
54