Automated Railway Ticket Issuing System For Sri Lanka
Automated Railway Ticket Issuing System For Sri Lanka
Automated Railway Ticket Issuing System For Sri Lanka
CERTIFICATION
This is to certify that this project, the entire design and creation of the Automated Sri Lanka
Railway Ticket Issuing System was carried out and submitted as true work of Sivasankar
Sutharshan of Registration number DZ63843 under the supervision of senior lecturer & Project
Coordinator Mr. Anis saboordeen of the Department of school of computing, British College of
Applied Studies Sri Lanka in partial fulfillment of the requirements for the award of BTEC
HND in Computing Systems Development.
-------------------------------------------Date
Acknowledgement
I would like to thank my lecturer Mr.Anis Saboordeen for offering his precious time, continuous
help and support regarding this project for its success. My heartfelt of gratitude goes to you
for helping me at every step with necessary guidance.
Secondly, I wish to thank BCAS library for providing books efficiently which helped me
extremely, to gain knowledge on the subject matters and as guidance for this project.
Thirdly, I would like to thank my friends and batch mates for everything that they have done to
help me with this project, and also my parents for providing me with all necessary equipment
and support.
Finally, I thank BCAS to giving me such individual project to gain my knowledge most practical
in Project Design Implementation and Evaluation.
Abstract
In present situation, the Sri Lanka Railway ticketing Issuing system is more tedious. People
are standing in long queues for getting tickets especially in public mode of transportation. This
leads to unnecessary time wastage and energy waste. Some Railway departments without
taking tickets causing and lead huge loss to the transport department of Sri Lanka Railways.
This paper attempts to provide a feasible solution for this problem of manual ticketing by the
implementation of Automated Railway Ticket Issuing System.
This report also presents the details on the architecture, integration and different design
aspects of Automated Railway Ticket Issuing System. Wide operating range, low cost of
equipment and reliability are some of the major advantages of this proposed project. It is
envisioned that the Automated Railway Ticket Issuing System shall eventually replace the
manual ticketing systems of Sri Lanka Railways and hence provide a feasible way for better
transportation facilities.
This report gives a detailed description about the project including feasibility study, research,
cost analysis, project millstones and final outcome of the project. It also suggests further
improvements that can be carried out for achieving a better system in future.
Abbreviations
IDE - Integrated Development Environment
RTIS - Railway Ticket Issuing System
ARTIS - Automated Railway Ticket Issuing System
RTC - Real Time Clock Module
I2C - Interface to Communicate
LCD - Liquid-crystal display
VDC - Volts Direct Current
GND - Ground
SDA - Serial Data Line
SCL - Serial Clock Line
Contents
Acknowledgement ............................................................................................................................. 3
Abstract ................................................................................................................................................ 4
Abbreviations ...................................................................................................................................... 5
1.
Introduction ............................................................................................................................... 10
1.1. Aim of the Project ................................................................................................................... 10
1.2.
2.
3.
4.
5.
Hardware Requirements......................................................................................................... 19
5.1. Arduino Mega 2560 ................................................................................................................ 20
5.2.
5.3.
5.4.
5.5.
5.6.
5.7.
5.8.
5.9.
6.
7.
8.
9.
8.1.
8.2.
8.4.
8.5.
8.6.
Tiny RTC I2C real time clock module block Diagram & Coding ................................. 50
9.3.
5x4 Matrix 20 Key Membrane Keypad block Diagram & Coding ............................... 53
9.4.
I2C Serial Enabled 16x2 LCD Module Block Diagram & Coding ................................ 56
9.5.
Ywrobot Relay (5VDC) with Coin Acceptor Block Diagram & Coding ....................... 57
9.6.
9.6.1.
9.6.2.
9.6.3.
9.6.4.
9.7.
9.8.
9.9.
9.10. Actual Output of the Automated RTIS System once the entire code implemented.. 71
10.
Testing .................................................................................................................................... 72
Evaluation .............................................................................................................................. 75
11.1 Current Status of Manual SL Railway Ticket Issuing System Evaluation ................. 76
11.2. Current Failures of Manual SL Railway Ticket Issuing System Evaluation ............. 77
11.3. Best Solution to Overcome Current issues Evaluation ............................................... 77
11.4. User Friendly of Automated RTIS Evaluation ............................................................... 78
11.5. Performance speed of Automated RTIS Evaluation .................................................... 78
11.6. Conclusion ............................................................................................................................. 79
12.
13.
Conclusion ............................................................................................................................. 82
14.
1.Introduction
Assessment is looked into a service sector as a whole to progress the established and
proposed network systems and techniques used. Railway is been considered which is one of
the major public service sector in Sri Lanka.
Background and the idea is develop an automated railway ticket issuing system. Considering
such a goal reveals cost effectiveness and the ability and capability of its use that suits the
best for Sri Lankan railway department. Further this idea of establishment would reduce time
wastage, better use of replacement, reduction in cost of labour, satisfaction for customers,
reduction of frauds, easy accessibility and overall better service for passengers.
These description are the objectives that would derive to our problem definition of Automated
Railway Ticket Issuing System being implemented to reduce the long ticket queues which
occur in peak hours, as the aim of this project is to incur a low cost and efficient model of a
system which can be used to reduce the congestion at ticketing queues.
11
2. Literature Review
The system implementation of automated ticket issuing grabs the efficiency and reduction on
labour act which results the passengers to deal directly, feel free to operate as no third party
interaction.
The solution allows to overcome the extreme human intervention to the current ticket
issuance process. The proposed system will be an automated system so that SLRD will be
able to manage their ticketing transaction efficiently.
http://www.slideshare.net/razmik1/railway-ticket-issuing-system-online
As for the proven statement of fact, the act of the system concretes its output once it is been
implemented. The highlighted gained betterment would be overall less interaction of labour
and efficient.
MobiTiki is an automated train ticketing system designed to reduce the long ticket queues
which occur in peak hours.
http://lms.uom.lk/sf/shantha/Project-web-sites/2007-08/Grp-04Mobitiki/Website/documents/Mobitiki%20DraftReport_Group04_final_ver1.pdf
As for the fact, it is clearly stated or proved that automated ticketing system reveals reduction
on queues as it keeps control during busy hours. Therefore the designed system achieves its
aim for sure, efficient model at lower cost.
In Pakistan passengers get a ticket at the counter, it is a time consuming process and
create problems if passengers are in hurry during rush hours. So it becomes necessary
to implement an automatic train ticketing machine, which contain all destination tickets and
easy to use for all passengers for 24 hours.
http://www.taibahu.edu.sa/iccit/alliccitpapers/pdf/p707-qureshi.pdf
This statement clearly highlights the problem definition of the assessment and also the exact
solution is mentioned as the implementation of automated ticket machine which clearly states
the concrete path at which the assessment is progressed.
These facts supports and strengthens the mention solution of suggestion and it leads to its
implementation on Sri Lankan Railway Operation as well.
12
13
14
Example: This problem is clearly visible in the morning and in the evening, just after
office hours have ended.
Issue of ticket and dealing with the money:
Issue of ticket and change of transactions are performed manually. The consumption
of time leads to more queues and error of transaction is possible which leads to
misunderstanding.
15
Example: when a passenger is questioning, wrong message are delivered or for the
sake of saying. Different labours work at each counters and as per their turns, the
passenger will not be able to check out with the same person.
Language issue:
Normally at public service sector the majority of the labours stick to their mother
tongue and the flexibility in other languages are very poor. This leads to a barrier as
the passenger would be willing or be comfort at his/her preferred language.
Example: if the labour has to assist a foreigner as for his/her needs, the preferred
language by the passenger should at least be managed by the labour.
Ticket details and print:
Details mentioned on the tickets are not clearly visible and print is manually done at
low quality. Issue of tickets are manually done where the efficiency lacks as the
labours are active enough.
Example: Date mentioned on back of the ticket is not usually clear enough as a result
fraud is possible.
Collection of tickets and manual records:
Collection of tickets at each station manually seeks an idea or just a record of saying
the number of tickets issued and collected. Collection of tickets are not followed
properly to figure the exact records. Possibilities for frauds are high.
16
18
4. Software Requirements
For the development of Automated Railway Ticket Issuing System, the following development
tools and software packages are required and will be used as identified:
Arduino IDE 1.5.5 (used for development of the prosed system)
Adobe Dreamweaver CS6 (used for the purpose of creating a website as part of the
system)
Fritzing IDE (used for the purpose of drawing diagrams)
Adobe Photoshop CS6 (used for the purpose of drawing diagrams)
5. Hardware Requirements
The proposed Automated Railway Ticket Issuing System must require following system
requirements in order to run smoothly.
Processor : 3000 MHz
RAM : 1GB (minimum)
Hard Disk : 40 GB (minimum)
Monitor : 17 inches (favorable)
Operating System: Windows XP/Vista/ or 7
The Automated Railway Ticket Issuing System must require following hardware components
in order to build it.
Arduino Mega 2560 R3
Arduino Ethernet shield R3 with micro SD connector
Coin Acceptor 4 Coin Programmable
Thermal Receipt Printer
I2C Serial Enabled 16x2 LCD Module Display Screen
5x4 Matrix 20 Key Membrane Switch Keypad
Piezo Buzzer - PS1240
Breadboard
Tiny RTC I2C real time clock module
Ywrobot Relay (5VDC)
Jumper Male and Female Wires
19
a computer with a USB cable or power it with an AC-to-DC adapter or battery to get started
on the board.
The Mega 2560 R3 also adds SDA and SCL pins next to the AREF additionally. There are
another two new pins placed near the RESET pin; one is the IOREF which is used to allow
the shields to adapt to the voltage provided from the board and other pin is a not connected
and is reserved for future purposes.
The Mega2560 R3 differs from all previous boards in that it does not use the FTDI USB-toserial driver chip. Instead, it features the ATmega16U2 programmed as a USB-to-serial
converter which means this board now uses an ATMega16U2 instead of the ATMega8U2 chip.
This allows for faster transfer rates and more memory.
Revision 2 of the Mega2560 board has a resistor pulling the 8U2 HWB line to ground, making
it easier to put into DFU mode.
This Mega 2560 R3 Arduino board has chosen for RTIS project because Arduino based ARTIS
has many advantages over existing microcontroller based ARTIS, some of these advantages
are; simple structure, high reliability, speed, an open-source platform, flexible, easy-to-use
hardware and software, number of input/output ports, performance and less power
consumption which are all very important in every design.
Apart from this, Arduino board designed to make it easier to control projects and Mega 2560
R3 has more FLASH memory and extended interface features with add-on shields to build
complex circuits within the project.
20
Microcontroller
ATmega2560
Operating Voltage
5V
7-12V
6-20V
16
21
40 mA
50 mA
Flash Memory
SRAM
8 KB
EEPROM
4 KB
Clock Speed
16 MHz
to an Arduino board using long wire-wrap headers which extend through the shield. This keeps
the pin layout intact and allows another shield to be stacked on top.
The Ethernet Shield has a standard RJ-45 connection, with an integrated line transformer and
Power over Ethernet enabled. The shield also includes a reset controller, to ensure that the
W5100 Ethernet module is properly reset on power-up.
This Arduino Ethernet Shield has chosen for RTIS project to act as webserver to host a
Railway Website for the Railway Administrators to change the tickets prices and to do
administrative works. Apart from this there is an onboard micro-SD card slot in this shield,
which can be used to store files of website for serving over the network. It is compatible with
the Arduino Mega.
The shield must be assigned a MAC address and a fixed IP address using the Ethernet Begin
function on the sketch. A MAC address is a globally unique identifier for this device. This
Ethernet shields come with a sticker indicating the MAC address to should use with them. To
use the shield, all require is, mount it on top of an Arduino Mega board.
Arduino Ethernet Shield(NA)
22
Arduino communicates with both the W5100 and SD card using the SPI bus (through
the ICSP header). This is on D11, D12, and D13 on "classic" format Arduino models,
and pins D50, D51, and D52 on the Arduino Mega.
D10 is used to select the W5100 and cannot be used for general I/O.
D4 is used for the SD card and can only be used for general I/O if the SD slot is not
occupied.
D2 is used if a solder bridge is placed across the "INT" pads to connect it to the W5100's
INT pin.
On the Mega, the hardware SS pin, D53, is not used to select either the W5100 or the
SD card, but it must be kept as an output or the SPI interface won't work.
A0 is connected to the SD slot's write protect (WP) pin and A1 is connected to the card
detect switch. Both are pulled high by 10k resistors on the Ethernet shield. These pins
therefore cannot be used for analog input with the shield unless they are bent back or
clipped off before inserting the shield into the Arduino Mega.
23
When a valid coin is inserted, the output line will pulse for 20-60ms (which is configurable).
The acceptor looks for diameter, thickness, dropping speed, etc to determine if a coin is valid.
This coin acceptor also has a coin reject, so can be programmed the controller can tell the
coin acceptor not to take any more coins, as well as a (very loud) alert beeper.
This coin acceptor has chosen for RTIS project because its widely used in amusement
facilities, vending machines and so on with high reliability and less cost effective compare to
other acceptors. As per my project, this will be used to accept coins as set on the controller in
order to get a receipt of a railway transport ticket.
Main Features of Coin Acceptor
Capable of accepting all worldwide coins.
Enable to recognize 6 groups of coins in different denomination.
Enable to forbid accepting all coins
Enable to release coins in jam
Intelligent control and high accuracy
Self-programming without PC
Automatic self-test for problems and prevent not only electric shock but also from
electromagnetic interference.
Serial or Pulse-Width Output with Selectable Speed/Baud Rate
Coin Acceptor - Programmable (6 coin types) - COM-11636 (NA)
24
Pin Definition:
Coin Acceptor
DC+12V (V+)
Ground(GND
25
The thermal printer takes 2.25" (57mm) wide thermal paper with a max roll diameter of 1.5
(39mm). The back panel has 2 3-pin connectors; one for power and one for serial
communications. The thermal printer ships with default 19200bps baud rate. It will also need
a 5 to 9VDC regulated power supply which can provide 1.5A or more during the high-current
print when taking prints.
The print head has a rated life of 50km which means this printer can handle a distance of 30
miles of printing before the head hits its rated limit.
This Mini Thermal Receipt Printer has chosen for RTIS project because its widely used in
ticket machine print, weight machine print, queue machine print and so on with high reliability
and less cost effective compare to other mini thermal printers. This printer also suits RTIS
because its easy to make Bold, underline, inverted text, variable line spacing, left/center/right
justification, barcodes in 11 standard formats with adjustable height and custom bitmap
graphics. As per my project, this will be used to take print of Railway tickets that as set on the
Arduino controller.
Thermal Receipt Printer (NA)
26
27
Pin Definition:
Thermal Receipt Printer
Green Wire
Digital Pin 5
Yellow Wire
Digital Pin 6
Black Wire
GND
(+) Plus
Power Jack
(-) Mines
Power Jack
Table 3: Thermal Printer Pin Definition
Red wire and Black wire which comes from the Printer DC should be connected to 2.1mm jack
adapter as shown below according to pin definition:
28
2lines
with
LCD-STN
contrast setting and support LED backlight-white to turn on or turn off the LED backlight with
program control LED backlight to save power and including pull-up resistors to "pull-up" the
signals to prevent SCL line & SDA line from floating.
With this I2C interface LCD module, its able to realize data display via only 2 wires. This I2C
interface LCD module has chosen for RTIS project because it uses only two pins on
microcontroller and works over the I2C/TWI bus, widely used in all projects and this module
actually cost no more resources at all compare to other LCD modules.
Serial IIC/I2C/TWI 1602 16x2 Character LCD Module, NA
Features of I2C Serial Enabled 16x2 LCD
Easy to use, make your project convenient and concise.
I2C 16X2 LCD, less pins and easy to be controls
Two line (2 x 16) characters
29
1. Trimpot Variable Resistor 10K 10%, 0.5w to fine adjust LCD contrast to any desired
contrast setting.
2. JP4 Jumper & JP5 Jumper (Default) connect to pull up resistors for enable pull up resistors
to "pull-up" the signals to prevent SCL line & SDA line and set default value (5Vdc) when
there is no signal at the input. SCL is a serial clock line and SDA is a serial data line.
3. Microchip MCP23008 provides 8bit I/O port expander with serial interface which can
interface to several devices up to 8 devices on one bus. Each device must have a different
address, three address pins, parallel I/O expansion for I2C bus or SPI applications, highspeed I2C interface 3400 KHz, voltage supply 1.8V to 5.5V, current 1mA.
4. A2, A1, A0 Jumpers will be set device address to interface conneted device. This I2C LCD
Blue Board sets address = 0 (Default). A2, A1, A0 jumpers are disable.
5. I2C Bus Connector to connect other boards on I2C bus are SCL line and SDA line. I2C bus
connector consists of +5V, SCL, SDA and GND pin.
30
6. JP6 Jumper will be set RW pin to write data to LCD or read data from LCD This I2C LCD
Blue Board sets default to write data to LCD by solder JP6 jumper to connect GND. RW pin
is cleared (0). Optional is set RW pin to read data from LCD by de-solder JP6 jumper to
disconnect GND. RW pin is (1).
7. Pin Header 16pins connect between I2C and LCD.
Pin Definition:
I2C Serial Enabled 16x2
LCD Module
Pin 1
GND
Pin 2
VCC (+5V)
Pin 3
Pin 4
Only need 9 microcontroller pins (4-columns and 5-rows) to scan through the key pad. This
5x4 Matrix Keypad has chosen for RTIS project to provides a useful human interface
component for the people who using it.
31
Pin 1 (Colum)
Digital Pin 27
32
Pin 2 (Colum)
Digital Pin 28
Pin 3 (Colum)
Digital Pin 29
Pin 4 (Colum)
Digital Pin 30
Pin 5 (Row)
Digital Pin 22
Pin 6 (Row)
Digital Pin 23
Pin 7 (Row)
Digital Pin 24
Pin 8 (Row)
Digital Pin 25
Pin 9 (Row)
Digital Pin 26
33
: 30 0.5mm
Height
: 20 0.5mm
Weight
: 7.5g
Rated Voltage
: 12v DC
Pin Definition:
Piece Piezo Buzzer
Black Wire
GND
Red Wire
34
This is the Real Time Clock (RTC) Module which uses the
DS1307 to keep track of the current year, month, day as well
as the current time.
The end of the month date is automatically adjusted for
months with fewer than 31 days, including corrections for leap
Figure 13: RTC I2C
year.
The clock operates in either the 24 hour or 12 hour format with AM/PM indicator. The DS1307
RTC module has a built-in power-sense circuit that detects power failures and automatically
switches to the backup supply. Timekeeping operation continues while the part operates from
the backup supply.
The DS1307 RTC is accessed via the I2C protocol, low power, full binary-coded decimal
(BCD) clock/calendar plus 56 bytes of NV SRAM. Address and data are transferred serially
through an I2C, bidirectional bus. The module comes fully assembled and pre-programmed
with the current time (MST).
This I2C RTC DS1307 Real Time Clock module has chosen for RTIS project because its
widely used in data logging, clock-building, time stamping, timers, and alarms and keep track
of time even if it is reprogrammed, or if the power is lost. This includes a small CR1225 Lithium
coin cell battery that will run the RTC for a minimum of 9 years (17 years typical) without an
external 5V power supply. As per my project, this allows Arduino microcontroller to provides
seconds, minutes, hours, day, date, month, and year information for the Railway Ticket to be
printed whenever Railway ticket purchased by users.
Features of I2C RTC DS1307 Real Time Clock module
Real-Time Clock (RTC) Counts Seconds, Minutes, Hours, Date of the Month, Month,
Day of the week, and Year with Leap-Year Compensation Valid Up to 2100
56-Byte, Battery-Backed, General-Purpose RAM with Unlimited Writes
I2C Serial Interface
24C32 32K I2C EEPROM Memory
Programmable Square-Wave Output Signal
Automatic Power-Fail Detect and Switch Circuitry
Consumes Less than 500nA in Battery-Backup
Mode with Oscillator Running
35
Tiny RTC-Module
DS1307
VCC
5V (VCC)
GND
GND
SDA
D20 (SDA)
SCL
D21 (SCL)
logic).
36
VCC
5V (VCC)
GND
GND
IN
6.Cost Analysis
A cost analysis is used to evaluate the total anticipated cost of a proposed RTIS project
compared to the total expected benefits in order to determine whether the proposed
implementation is worthwhile for Sri Lanka Railway Department before start to work on project.
Based on the cost analysis, the decision can be taken further to work on it or not. As per the
project which I have done is cost and benefit for Sri Lanka Railway Department.
The cost analysis as follows:
Product components
Quantity
Price in
$
Price in
(LKR)
$39.95
5217.47 Rs
$49.95
$58.95
7698.28 Rs
$45.00
5876.55 Rs
$24.95
3258.22 Rs
$9.95
1299.37 Rs
$1.50
195.88 Rs
$9.00
1172.34 Rs
48
$24.95
3258.22 Rs
$1.44
187.51 Rs
$265.64
34600.00 Rs
6523.47 Rs
38
Cost
Electricity
3,000 Rs
Internet
2,000 Rs
Maintenance
4,000 Rs
9,000.00 Rs
Cost
1000 Rs
40000 Rs
Training cost
5000 Rs
45,000 Rs
Cost
34,600.00 Rs
9,000.00 Rs
45,000 Rs
88,600 Rs
39
WBS
1.0
Task name
1.1
2.0
Starting date
Finishing date
DD/MM/YYYY
DD/MM/YYYY
01/06/2014
01/06/2014
Project approval
01/06/2014
01/06/2014
Initiation research
02/06/2014
05/06/2014
2.1
02/06/2014
02/06/2014
2.2
Project planning
03/06/2014
05/06/2014
2.2.1
03/06/2014
03/06/2014
2.2.2
04/06/2014
04/06/2014
2.2.3
Time management
05/06/2014
05/06/2014
06/06/2014
Project analysis
06/06/2014
3.0
3.1
3.1.1
Gathering requirements
06/06/2014
06/06/2014
3.1.2
Problem analysis
06/06/2014
07/06/2014
3.1.3
08/06/2014
09/06/2014
10/06/2014
11/06/2014
3.2
System design
40
3.2.1
10/06/2014
10/06/2014
3.2.2
Sketch design
11/06/2014
11/06/2014
12/06/2014
14/ 07/2014
12/06/2014
18/06/2014
12/06/2014
13/06/2014
14/06/2014
18/06/2014
19/06/2014
19/06/2014
23/06/2014
24/06/2014
25/06/2014
26/06/2014
27/06/2014
28/06/2014
07/07/2014
08/07/2014
13/07/2014
14/07/2014
16/07/2014
4.0
Code Implementation
4.1
Creation of Railway
ticketing Webpage
4.1.1
HTML coding
4.1.1
Coding PHP
4.2
4.3
5.0
5.1
On time testing
5.2
14/07/2014
14/07/2014
41
5.3
15/07/2014
16/07/2014
Implementation on Actual
Railway Department
17/07/2014
18/ 07/2014
6.1
17/07/2014
17/07/2014
6.2
18/07/2014
18/07/2014
19/07/2014
21/07/2014
6.0
7.0
Re-work
Training
7.1
Staff training
19/07/2014
20/07/ 2014
7.2
Users training
20/07/ 2014
8.0
Documentation and
submitting the project
22/07/2014
9.0
Close out
24/07/2014
24/07/2014
42
8.System Design
8.1. The Overview of RTIS System Design
The ticket issuing process of railway is currently done manually. This process involves a
significant amount of human resources. It is highly time consuming and has resulted in long
queues. Therefore by combining the existing manual system with an automated system can
provide an effective solution. The system RTIS I am developing can be installed at any place
in Sri Lanka for Railway Ticket issuing.
The Automated Railway Ticket Issuing System design and implementation on Arduino Mega
2560 R3 is proposed, this is because Arduino based ARTIS has many advantages over
existing microcontroller based ARTIS, some of these advantages are; simple structure, high
reliability, speed, an open-source platform, flexible, easy-to-use hardware and software,
number of input/output ports, performance and less power consumption which are all very
important in every ARTIS design. This system is implemented on the basis of City station
machine by using Arduino. The proposed system consist of two parts Web part and the coin
acceptance part. The information of a regular train tickets can be edited through the web by
the Railway department administrators. This is become possible by using Arduino Ethernet
shield R3. This system accepts coins in any sequence that are appropriate, and deliver tickets
when the desired amount is deposited, it also give error messages if inserted coin is not valid
or if the system handles in an unappropriated way. This is processed by Coin Acceptor (4 coin
Programmable). The Thermal Printer is used for printing railway tickets. RTC I2C real time
clock module is used to take the current time and date which is to be printed in the receipt.
The Ywrobot Relay (5VDC) is used to switch off/on the Coin acceptor to run accurately. This
system can be extended in future without changing any hardware, just by reprogramming the
system it can be enhanced for stations.
For the Implementation of proposed Automated Railway Ticket Issuing System, I use the
following components:
1. Arduino Mega 2560 R3
2. Arduino Ethernet shield R3 with micro SD connector
3. Coin Acceptor 4 Coin Programmable
4. Thermal Receipt Printer
5. Serial Enabled 16x2 LCD - White on Black 5V
6. Button Pad 4x4 - LED Compatible
7. Piezo Buzzer - PS1240
43
As for the Flow chart, the operation of the system takes place in an automated progress. Firstly
the passenger has to mention the destination number as for the given information. As for the
selected destination, ticket prices will be displayed. In this case the passenger will have to
select the number of full tickets and/or half tickets that are required.
As for the selected tickets, total cost will be displayed. Following this, passenger will have to
insert the coin and once the payment is made, the receipt will be printed automatically.
Following these all steps as standard, finally the ticket will be issued.
44
As for the Flow chart, the system can be fixed on the required station as for the following
requirements. This process is controlled by the Railway Department Administrator. Firstly the
IP address has to be mentioned as required when D press in the keypad. Following this step,
it require port number to establish the connection which is need to be given by the
administrator appropriately. Next will be the station ID, as for where the machine is to be fixed
and also the default station ID can be changed by the admin as for the station.
45
This web interface accessibility belongs to Sri Lanka Railway Department Administrators
where they can add/ edit/ delete railway station details and ticket prices. The web site
programmed by using Html and PHP through Adobe Dreamweaver. This web interface
become possible by adding Arduino Ethernet shield to Arduino board. By this, the Arduino can
be act as webserver to host the website and provide access to administrators through the
internet.
Arduino Hardware that used for the RTIS
The Arduino Mega 2560 R3 board is where the code wrote for the system is executed. The
board can only control and respond to electricity, so specific components are attached to it to
enable it to interact with so many purposes. These components can be sensors, which convert
some aspect of the physical to electricity so that the board can sense it, or actuators, which
get electricity from the board and convert it into as needed.
Arduino Software that used for the RTIS
Software programs are called sketches. Theses sketches will be created on a computer using
the Arduino integrated development environment (IDE). The IDE enables to write and edit
code and convert this code into instructions that Arduino hardware understands based on the
codes that programmed. The IDE also transfers those instructions to the Arduino board to be
work smoothly and efficiently.
46
47
Additional commands are found within the five menus: File, Edit, Sketch, Tools, and Help. The
menus are context sensitive which means only those items relevant to the work currently being
carried out are available.
Tutorial 03: Arduino IDE and Sketch Overview (NA)
48
9.Implementation of RTIS
9.1. Block Diagram of the Automated Railway Ticket Issuing System
49
9.2. Tiny RTC I2C real time clock module block Diagram & Coding
50
void setup () {
//Initialize the serial port, wire library and RTC module
Serial.begin(9600);
Wire.begin();
RTC.begin();
//If we remove the comment from the following line, we will set up the module time and
date with the computer one
RTC.adjust(DateTime(__DATE__, __TIME__));
}
void loop () {
DateTime now = RTC.now();
//We print the day
Serial.print(now.day(), DEC);
Serial.print('/');
//We print the month
Serial.print(now.month(), DEC);
Serial.print('/');
//We print the year
Serial.print(now.year(), DEC);
Serial.print(' ');
//We print the hour
Serial.print(now.hour(), DEC);
Serial.print(':');
//We print the minutes
Serial.print(now.minute(), DEC);
Serial.print(':');
//We print the seconds
Serial.print(now.second(), DEC);
//We check the time and sent through the serial port every 3s
hr_24=now.hour();
if (hr_24==0) hr_12=12;
else hr_12=hr_24%12;
// Serial.print(hr_12, DEC);
if (hr_24<12) {
Serial.print(' ');
Serial.print("AM");
Serial.println();
delay(1000);
51
52
Actual output of RTC I2C module once the wiring is been implemented:
9.3. 5x4 Matrix 20 Key Membrane Keypad block Diagram & Coding
53
54
Actual output of 5x4 Matrix 20 Key Membrane Keypad once the wiring is been
implemented:
55
9.4. I2C Serial Enabled 16x2 LCD Module Block Diagram & Coding
void setup()
{
lcd.init();
56
9.5. Ywrobot Relay (5VDC) with Coin Acceptor Block Diagram &
Coding
57
58
59
60
Serial Port RS232 Signal Output Format A4 (can alter the format if needed)
Press button B to select coin acceptor parameters as needed, and press button A to next
group of Coin Acceptor parameters A5.
Serial or Parallel Port Option A5
61
Dip Switch
SW1
SW2
SW3
SW4
functions
Port Level
Security
Transmitting
Inhibiting
ON
NC
Special
RS232
< +1V
OFF
NO
Normal
Pulse
> +3V
Mode 1N.O.
When SW1 is on OFF position,
On standby, coin receiving output NPN transistor is open collector; on acceptance of enough
coins ( no less than machine charge amount), NPN transistor is turned on to short circuit for a
period of 25ms/45ms/65ms/100ms (+/-20%).here output voltage should be less than 0.7V and
max 100mA is available for electric current.
Note: it can set the period of 25ms/45ms/65ms/100ms in coin acceptor parameter A2.
Mode 2N.C.
When SW1 is on ON position,
On standby, coin receiving output NPN transistor is short circuit, max 100mA is available for
electric current; on acceptance of enough coins ( no less than machine charge amount), NPN
transistor is turned on to open circuit for a period of 25ms/45ms/65ms/100ms (+/-20%).
Note: It can set the period of 25ms/45ms/65ms/100ms in coin acceptor parameter A2.
Coin Identification Security
When SW2 is on "OFF" position, it means the high security of coin acceptor identifies coins.
When SW2 is on "ON" position, it means the low security of coin acceptor identifies coins,
acceptor can accept some defected coins.
Serial Output Signal Format
Note: This option is not suitable for parallel port output mode.
62
64
65
68
69
70
9.10. Actual Output of the Automated RTIS System once the entire
code implemented
71
10. Testing
Automated Sri Lanka Railway Ticket Issuing System Test Plan
Outcome
Inputs or test data
Actual outcome
Expected outcome
succeeded
() or not ()
message
and
Error
messages
Invalid Tickets
processed
message
and Error
messages
processed
message
and Error
messages
0.
processed
to
total
message
Display
to
balance
get printed.
72
The
Correct
message
Enter
Destination Successful
Button.
The
Exact
station
Bambalapitiya
details
must
be
Bambalapitya
shown
with
the
tickets Details.
Successful
message
tickets
Prices
Clicks
on
given
Enter
The
Button. Bambalapitya
Exact
details,
and
station ID 3.
station
details,
tickets
total
cost,
insert
coins
Total cost = 12 Rs
Insert Coins
message
and
Inserted = 6 Rs
No error message
and error function.
must
be
Successful
message
total amount charged for Green Led Blinks for each amount and inserted
charged coin
amount
Inserted Charged = 12 Rs
tickets.
Example,
amount
12Rs,
Id 3.
must
The
ticket
need
to
printed
be
receipt
be
get
from
the
printer.
73
message
loaded
again
for
passenger.
coin
screen
must
loaded
for
passenger.
message
and
on
Enter
Ticket
Issuing
id
given
The
welcome
Message
Railway
entered.
be
display
Current
other
be
with
location:
Bambalapitiya. The
Green Led blinks.
10.1. Conclusion
Test plan is the scheduled plan for the testing work to be done. It is not a test design
specification it involves in Automated Railway Ticket Issuing system testing process,
establishing process and describing the tests that should be carried out before delivering to
the client.
The given test plan is processed in the developed system and there were some errors in the
beginning process identified through the test plan that are Keypad doesnt work (no output),
coin acceptor doesnt give pulses whenever coin inserted and the I2C LCD doesnt give
display. These errors are identified in the beginning through the testing. The rework is done is
to solve these issues and again processed to the test stages as planned. The current results
of the test plan has no errors and the Automated Railway Ticket Issuing system functions
would be done correctly to achieve its objective and it ensures that the error handling will be
processed efficiently whenever the user inputs given error. Further, Evidence of this test plan
can be check through the ARTIS developed system.
74
11. Evaluation
The process evaluation was executed by the distribution of questionnaires as a major data
collection from the people who travel by Sri Lankan Railways. The gathered data has its weight
as its a direct feedback and also the people who filled their questionnaire seemed
comfortable, was easy going process as their body language revealed their thoughts.
Questionnaires method have selected to get users Feedback because large amounts of
information can be collected from a large number of users in a short period of time and this
evaluation method happen to get users feedback of Automated RTIS.
Compared to other methods, questionnaires is the cheapest method of data gathering and
frequently viewed as quick and easy to do. When data gathered, it can be used to compare,
easy to measure problems or failures and changes. The time taken to do questionnaires are
less time consuming compared to other method. Questionnaires has multiple-choice and
likert-scale-type questions which make the questionnaire easier to fill in and allow the results
to be analyzed more efficiently. This is ensuing the selection of questionnaire method is well
enough for this evaluation report.
For the purpose of getting feedback, the questionnaires will be given to 10 people who travel
by Sri Lankan Railways and the analysis will be done based on their answers. From the
following questionnaires responses, the system failures and strengths of RTIS system
identities and proper solutions taken in order to do solve the issues. The sample of
questionnaires is given below:
75
This evaluation analysis shows, the more number of people agreed that the current SL Railway
Ticket Issuing System status is Poor. This is ensuring the people who travel by Railways
require a better new efficient system to increase the performance than current manual system.
76
This evaluation analysis shows, the more number of people stated that more time consuming
taken, no security and third party involvement in current SL Railway Ticket Issuing System.
This is guaranteeing the current is system is not suitable and there should be system need to
be introduce to overcome these failures. This become possible by Implementing Automated
Railway Ticket Issuing System.
analysis
suggest
best
of
Automated
RTIS.
77
This Analysis shows that Automated RTIS is user friendly for the number of people. Even
though is user friendly, still more features and enhancements need to be implemented to cover
the rest of people who dont think the flexibility not enough.
78
11.6. Conclusion
As for their feedback currently progressing SL railway ticket issuing system scores poor as
highly marked (08 people) where as good (02 people), options excellent and very good as
none. Weight of the response highlights the situation as poor and also its time for change in
the system of operation to make sure the customers are at least knowledgeable and
experiencing the automated system.
The purpose and introducing of automated ticketing is worth for use and probability of its
success is high as for the response from the crowd. All of the questionnaires are facing failures
in the current process, where more time consuming (10 people) and security concerns (07
people). Highly rated failures are scored or featured mainly by the automated SL railway
ticketing systems as this reveals the strength of its implementation.
Rated solutions to overcome the issues, Automated RTIS (06 people), mobile application (03
people) and web application (01 person). At this situation the implementation of automated
ticketing is supported by its high rate of selection in comparison to other given options. Also
the flexible and possibilities are high enough for its use for the Sri Lankan environment more
than the mobile application and web application as solutions.
Use of automated RTIS is flexible is rated as yes (06 people) and no (04 people), where the
support and implementation would highly be satisfied by the passengers. On the other hand,
the selected option No indicates the reasons as passengers who are not willing to change
or finding the process as difficulties as use of knowledge is less, pattern or addiction of use.
Impact of speed by Automated RTIS, working speedy (07 people) and not enough speed (03
people), as the people who sees Automated RTIS as not flexible may influence the use of
speed. Their way of approach or less knowledge in operation leads to more time consuming
than usual, as a result of this the procedure of the overall speed lacks. However the automated
ticketing use is highly recommended to break the addiction or pattern of ticketing operation in
Sri Lanka to step forward.
79
Problem
Description
Possibility
(High/Medi
um/Low)
Railway system
project might be
01
Project is over
High
budget
failure
Less profit
Virus Attack
High
The
viruses
80
Data
04
High
Corruption
the
Natural
08
Disasters may
attack the
system such
system will be
damaged.
Medium
system
as typhoons,
get
disasters,
floods and
damaged
the
require
by
natural
data
or
earthquakes
Development
09
as
expected with
Automated
Medium
RTIS.
81
13. Conclusion
The entire project talks about the current railway ticketing operation its issues and replacement
of an automated railway ticketing operation to solve the problems of current ticketing issues
in Sri Lanka Railway Ticketing.
Highlighted areas includes the present situation as the current network infrastructure of
operation and its techniques are looked into to figure out its major drawbacks and its problem
to the passengers. Each problem has been analyzed to figure its requirement. Proposed
solutions are satisfied by the use of automated ticketing system.
Operation of the system, proposed solutions, implemented cost and available features are
proposed to implement the RTIS. Testing, highlight any fault and its upgrades to learn the
product and feedback from the questionnaires were evaluated to rate the expected and current
situations. Finally project progress plan of estimation was shown in the form of a gantt chart.
These leads to reach the aim of this project To come up with a low cost and efficient model
of a system which can be used to reduce the congestion at ticketing queues and its objectives
that stepped forward to derive/ achieve the problem definition.
Areas for the future research directions are looked into the performance of the automated
ticketing as well its possibilities of implementation in SL railway.
In the developed countries of Europe and in the USA there are automated ticketing systems
which use smart cards. Through the use of these cards they have successfully addressed the
above questions. In fact most of these smart card systems have almost eliminated the queues.
In some countries this transaction can be done via the users credit card.
This is current situation in developed countries, the possibilities are could be deserved if Sri
Lankan government is willing to invest such cost, advance use of technology and if the
passengers are been adopted to such circumstances.
Operation of the ticket issuing system by the use of mobile application and web application
are recommended by the passengers and its possible depending on the approach and service
support by the government. The knowledge and reach on operation mode among the
passengers too plays a major role.
Suggestion about the Automated Railway Ticketing Issue highlights the use of coins and notes
and online reservations. These are directions of future enhancement as for the developed
automated ticketing machine. The possibilities are high, once the reach of its implementation
82
as
their
primary
self-service
ticket
issuing
system.
http://www.taibahu.edu.sa/iccit/alliccitpapers/pdf/p707-qureshi.pdf
This fact highlights its possibilities at Britain and its privatization of operation takes over the
betterment of the operation. This lies on the hands of Sri Lankan government to hand over to
a privatization of operation for such procedure for the betterment or control by its power and
proceed the possibilities under the government act.
These are the further directions where the automated machine can be enhanced and as the
railway operation works efficiently, its operation of success and satisfaction among the
passengers would be high to reach demand for SL Railway Transportation.
83
Ticketing
System
Using
Verilog
HDL
[Online],
NA,
Available
at:
(NA),
Arduino
Board
Mega2560
[Online],
NA,
Available
at:
Available
at:
(NA),
Arduino
Ethernet
Shield
[Online],
NA,
(NA),
Mini
Thermal
Receipt
[Online],
NA,
Available
at:
th
(NA),
Piezo
Speaker
[ONLINE],
NA,
Available
at:
th
84
http://www.dfrobot.com/wiki/index.php/Real_Time_Clock_Module_(DS1307)_(SKU:D
FR0151) [12th Jun 2014]
Hobbyist (NA), Step 2: Interfacing the relay modules to the Arduino [ONLINE], NA
Available at: http://www.hobbyist.co.nz/?q=interfacing-relay-modules-to-arduino [15th
Jun 2014]
Open source hardware group (NA), Tutorial 03: Arduino IDE and Sketch Overview
[ONLINE], NA, Available at: http://opensourcehardwaregroup.com/arduino-shortcourse-public-pages/section-0-familiarization/tutorial-3-arduino-ide-and-sketchoverview/ [20th Jun 2014].
85