You are on page 1of 6

IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308

TRAIN TICKETING SYSTEM USING SMARTCARD

Abu Abraham Mathews1, Amal Babu P2


1
III YEAR, Department of Electronics and Instrumentation Engineering, Karunya University, Tamilnadu, India
2
III YEAR, Department of Electronics and Instrumentation Engineering, Karunya University, Tamilnadu, India

Abstract
The goal of our project is to attain improved travel information and electronic ticketing using smart cards. The smart cards are
similar to that of an ATM, so that they can be recharged and can be reused often. Smart cards are secure portable storage devices
used for several applications especially security related ones involving access to the system’s database. This looks into current trends
in smart card technology and highlights what is likely to happen in the future. The smart card has a microprocessor or memory chip
embedded in it that, when coupled with a reader, has the processing power to serve many different applications. The smart cards are
user- friendly and so it can be used for Public Transport Networks (PTNs).It can also be noted as a service-oriented architecture.
Railways are the important key aspect for the development of the Indian revenue. Many people are in need of train transportation
than any other means of transportation because a number of people may travel at the same time. So people may prefer smart cards for
the traveling purpose instead of booking the tickets. The existing fare booking system can be replaced by smart cards.

Keywords: - Public Transport Networks (PTNs), Synchronous Serial Port (SSP), Power-on Reset(POR) and Power-up
Timer(PWRT)
-------------------------------------------------------------------------***--------------------------------------------------------------------

1. INTRODUCTION As the Indian Railways is one of the largest organizations in


the world, and the country’s revenue is mainly dependent on
Every man since came into existence, the thrust for knowledge the railways. This may be affected by the above issues so it
and invention has been an unquenchable process, thanks to can be eliminated from our project’s proposed work. In future
which man has giant leaps in technology which couldn’t have improved assessment of the above technique is that we may
been ever thought before. One such contribution is the debit the amount required to recharge the smart card directly
development of microcontroller and smart card. from our personal account. This new smart card payment is
efficient for revenue management.
There are many applications of smart card that are widely
being used. This project aims at smart card based ticketing The objective of our project is introducing smart card based
system will carry all modes of ground transportation ticketing system in railway. So the passenger to get the ticket
nationwide including railways. Railway has a valuable role in easily and it can be recharged also. It helps to save time and
economic development of each country. In railways the energy.
ticketing system in India is done in two ways till now. The
first one is that the individual himself goes to the counter and
1.1 Overview of Project Work
book the ticket i.e., reservation ticket. The second is an
alternative provided by the Indian Railways is to use A new technique for ticketing system in railway by using
Information Technology so that passengers may use online smart card. We can see that effective use of technology could
booking of rail tickets. We may also book tickets through the enhance its contribution to the development of the nation. A
agents approved by indian railways. smart card based ticketing system will carry all modes of
ground transport nationwide including railways. When it
Though the existing method has advantages there are many comes to public transit, passenger demands are clear
SERIOUS problems, some are to book a general class ticket, commuters want convenient, affordable and efficient options
one has to go to the railway station or book from the for travel. Smart card solutions in the form of electronic
authorized agents, but this process is quite time consuming ticketing promise to deliver on those demands. Smart cards are
and people don’t like to stand in queues because in every more convenient, they can be purchased and "reloaded” using
important junctions and platforms due to arrival of trains there automated processes and in some cases at home on the
may be a lot of crowd. Due to this reason, people are afraid of Internet. Because cards can be personalized, they can be
losing the train, so some people travel without ticket. This has cancelled if stolen. They are also more efficient to use: the
become the most serious issue for our country’s development. contact functioning of many cards allows more rapid
movement through stations and onto different modes of travel.

_________________________________________________________________________________________
Volume: 03 Special Issue: 03 | May-2014 | NCRIET-2014, Available @ http://www.ijret.org 133
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308

2. PROPOSED METHOD The project module consists of micro controller, power supply
unit, keypad, printer, display, smart card drive, etc….
2.1 Introduction
The proposed advancement of our project is the introduction The micro controller (16F877A) is a 40 pins IC where all the
of smart cards. The smart cards are a type of ATM cards, by details such as train name, ticket details, and locations are pre-
which the passengers may travel from one place to another programmed in this microcontroller. The 12v supply can be
simply by scratching the card in the driver machine. The more retarded to 5v by the power supply unit, the keypad used is
number of driver machine (or) the vending machine placed in 3*4 keypad. The keypad is used to enter the region where a
every railway station helps to verify the codes and prints the passenger has to move. in addition we use the thermal printer
ticket for the passenger [6]. to print the tickets.

We may also recharge the card at any times and may use 3.1 PIC
often, this is the most advantage of our proposed ticketing PIC stands for Peripheral Interface Controller coined by
system. This is the hottest development in the Indian Microchip Technology Inc., USA.
Railways. The codes can be verified by the vending machine
and we may also check the remaining balance also.
3.1.1 Features
2.2 Advantages  PIC is a popular microcontroller Worldwide.
 High performance, cost effective, field programmable
 Smart cards are small, they fit everybody's pocket. embedded control solutions.
 Smart cards are very secured, can't be read, copied,  PIC microcontrollers are one of the most secure
manipulated with, counterfeited, and duplicated. products of its kind on the market today.
 Smart card protect privacy where needed.  Wide Applications Area.
 Smart cards are re-writable and can be recharged  RISC Architecture makes for easy programming.
thousands of times.
 Smart card can contain digital log with location, date,
3.1.2 Core Features
time, person's stamp to record every transaction.
 Smart card can contain money value in electronic  High performance RISC CPU with 35no.of
form, kind of small system. instruction set only.
 Smart card can contain weekly pass, monthly pass or  All single cycle instructions except for program
simply ticket that expires by certain date. branches which are two cycle.
 Smart card fare system eliminates cash from the  Operating speed: DC-20MHz clock input with DC to
payment systems. 200ns instruction cycle.
 Smart card fare systems remove burden of handling  Up to 8K x14 words of FLASH Program Memory.
cash by drivers. It reduces crime.  Up to 368 x 8 bytes of Data Memory(RAM).
 Up to 256 x 8 bytes of EEPROM Data Memory.
2.3 Applications  Interrupt capability(up to 14 sources).
 Direct , indirect and relative addressing modes.
 Avoiding long Queue
 Power-on Reset(POR) and Power-up Timer(PWRT)
 Easy to get the train
 Oscillator Start-up Timer(OST)and Selectable
 Save the Time
oscillator options.
 It is very much used in Metro Cities
 Watching Timer(WDT) with its own on-chip RC
oscillator for reliable operation.
3. BLOCK DIAGRAM
 Programmable code protection and Power saving
SLEEP mode.
 Low power, high speed CMOS FLASH/EEPROM
technology.
 Fully static design with In-Circuit Serial
Programming (ICSP)via two pins.

3.1.3 Peripheral Features


 Timer0: 8-bit timer/counter with 8-bit prescaler
 Timer1: 16-bit timer/counter with prescaler, can be
incremented during SLEEP via external crystal/clock.
Fig 1 Block diagram
_________________________________________________________________________________________
Volume: 03 Special Issue: 03 | May-2014 | NCRIET-2014, Available @ http://www.ijret.org 134
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308

 Timer2: 8-bit timer/counter with 8-bit period register Smart card is one of the greatest achievements in the world of
, prescaler and postscaler. information technology. Similar in size to today's plastic
 Synchronous Serial Port(SSP) with SPI.(Master payment card, the smart card has a microprocessor or memory
mode)and 12C.(Master/Slave) chip embedded in it that, when coupled with a reader, has the
 Universal Synchronous Receiver Transmitter processing power to serve many different applications. As an
(USART/SCI) with 9-bit address detection. access-control device, smart cards can be used to access server
 Parallel Slave Port(PSP)8-bits wide, with external remotely over the Internet and they can make personal and
RD,WR and CS controls business data available only to the appropriate users. Smart
 Brown –out detection circuitry for Brown-out Reset cards provide data portability, security, convenience.
(BOR).
Smart cards help businesses evolve and expand their products
3.1.4 PIC Family and services in a changing global marketplace. The scope of
uses for a smart card has expanded each year to include
PIC family of microcontrollers is built on Hardware applications in a variety of markets and disciplines. In recent
architecture, in which program code and date are stored in years, the information age has introduced an array of security
separate memory locations. The CPU executes each and privacy issues that have called for advanced smart card
instruction during the cycle following its fetch, pipelining security applications.[7]
instruction fetches and instruction execution to achieve the
execution of one instruction every cycle. This sequence of
execution is broken and an additional cycle is introduced when
executing GOTO instruction. The PIC controllers are available
in different types of packages. We will focus on PIC16F877A
controller for our explanation.
Speed: PIC executes most of its instruction in 0.2µs or five
instruction per µs.
Instruction Set Simplicity: The instruction set consists of just
35 instructions.
Instruction of Operational Features: Power on reset and
brown-out protection ensure that the chip operates only when
the supply voltage is within the specification. A watchdog
timer resets if the chip ever malfunctions and deviates from its
normal operation.
 Programmable Timer Options
 Interrupt Control Chart 1 Smart card Market
 Powerful Output Pin Circuit
 I/O port Expansion 3.2.1 Smart Card Reader
 Serial Programming via two pins A smart card reader is an electronic device that reads smart
 EPROM and RWM options cards and can be found in the following forms
 Some keyboards have a built-in card reader.
3.2 Smart Card  External devices and internal drive bay card reader
Smart cards are secure portable storage devices used for devices exist for personal computers (PC).
several applications especially security related ones involving  Some laptop models contain a built-in smart card
access to system’s database either online or offline. For the reader and/or utilize flash upgradeable firmware.
Future of smart card to be bright, it is important to look into
several aspects and factors especially those resulted due to the
rapid advancement in information and communication
technology. This is looks into current trends in smart card
technology and highlights what is likely to happen in the
future. The other aspects in order to identify the core concepts
that are of interest to smart card developers and researchers.
More emphasis is given to four key characteristics of smart
cards: portability, security, open platform, and memory
management, as they are believed to be at the heart of many
smart card applications.

_________________________________________________________________________________________
Volume: 03 Special Issue: 03 | May-2014 | NCRIET-2014, Available @ http://www.ijret.org 135
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308

3.3 Flow Chart STEP 3 : To select our option from these two options
1.Recharge, 2.Ticket. If we select option 2, the following steps
to be proceed.
STEP 4 : Select our destination place and number of tickets.
STEP 5 : Then the following details will be displayed ticket
price, number of seats, seat availability.
STEP 6 : The printed ticket will be collected from the printer
else if we select option 1,the following steps to be proceed.
STEP 7 : Enter the amount to recharge
STEP 8 : Confirm the amount to recharge or cancel
STEP 9 : Then the following details will be displayed
successfully recharged and remove your card.

3.4 Software
 PIC COMPILER
 Proteus 7.6

4. SIMULATION RESULTS
As soon as the process begins the smart card is inserted and
our system requires the cards unique password

RXD

3
TXD

RTS
A 1 2 3 R1
CTS 10k
B 4 5 6 R2
10k

U1
C 7 8 9
13 33
R3
OSC1/CLKIN RB0/INT
14 34
OSC2/CLKOUT RB1
RB2
35
D 0 # 10k
2 36 R4
RA0/AN0 RB3/PGM
3 37
RA1/AN1 RB4
4 38
RA2/AN2/VREF-/CVREF RB5 10k
5 39
RA3/AN3/VREF+ RB6/PGC
6 40
RA4/T0CKI/C1OUT RB7/PGD
7
RA5/AN4/SS/C2OUT
15 LCD1
RC0/T1OSO/T1CKI LM016L
8 16
RE0/AN5/RD RC1/T1OSI/CCP2
9 17
RE1/AN6/WR RC2/CCP1
10 18
RE2/AN7/CS RC3/SCK/SCL
23
RC4/SDI/SDA
1 24
MCLR/Vpp/THV RC5/SDO
25
RC6/TX/CK
26
RC7/RX/DT
VDD
VSS

VEE

RW

19
RS

D0
D1
D2
D3
D4
D5
D6
D7

RD0/PSP0
E

20
RD1/PSP1
21
RD2/PSP2
1
2
3

4
5
6

7
8
9
10
11
12
13
14

22
RD3/PSP3
27
RD4/PSP4
28
RD5/PSP5
29
RD6/PSP6
30
RD7/PSP7
PIC16F877A

Fig 2 Flow chart

3.3.1 Algorithm
STEP 1 : Insert the SMARD CARD and enter the secret Fig 3 Entering password
password.
STEP 2 : Check whether the entered password is correct or
not .If the password is correct it will go to the next step. If it is
wrong it will go to the previous step.

_________________________________________________________________________________________
Volume: 03 Special Issue: 03 | May-2014 | NCRIET-2014, Available @ http://www.ijret.org 136
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308

Now, our system provides the smart card user with two After the place is selected our system checks for seat
options 1.Recharge and 2.Tickets availability.

RXD RXD

3
TXD TXD

RTS
A 1 2 3 R1 RTS
A 1 2 3 R1
CTS 10k CTS 10k
B 4 5 6 R2
B 4 5 6 R2
10k 10k

U1
C 7 8 9 C 7 8 9
R3 U1 R3
13 33 13 33
OSC1/CLKIN RB0/INT OSC1/CLKIN RB0/INT
14 34
OSC2/CLKOUT RB1
RB2
35
D 0 # 10k 14
OSC2/CLKOUT RB1
RB2
34
35
D 0 # 10k
2 36 R4 2 36
3
RA0/AN0 RB3/PGM
37 3
RA0/AN0 RB3/PGM
37
R4
RA1/AN1 RB4 RA1/AN1 RB4
4 38 4 38
RA2/AN2/VREF-/CVREF RB5 10k RA2/AN2/VREF-/CVREF RB5 10k
5 39 5 39
RA3/AN3/VREF+ RB6/PGC RA3/AN3/VREF+ RB6/PGC
6 40 6 40
RA4/T0CKI/C1OUT RB7/PGD RA4/T0CKI/C1OUT RB7/PGD
7 7
RA5/AN4/SS/C2OUT
15 LCD1 RA5/AN4/SS/C2OUT
15 LCD1
RC0/T1OSO/T1CKI LM016L RC0/T1OSO/T1CKI
8 16 8 16 LM016L
RE0/AN5/RD RC1/T1OSI/CCP2 RE0/AN5/RD RC1/T1OSI/CCP2
9 17 9 17
RE1/AN6/WR RC2/CCP1 RE1/AN6/WR RC2/CCP1
10 18 10 18
RE2/AN7/CS RC3/SCK/SCL RE2/AN7/CS RC3/SCK/SCL
23 23
RC4/SDI/SDA RC4/SDI/SDA
1 24 1 24
MCLR/Vpp/THV RC5/SDO MCLR/Vpp/THV RC5/SDO
25 25
RC6/TX/CK RC6/TX/CK
26 26
RC7/RX/DT RC7/RX/DT
VDD
VSS

VEE

VDD
VSS

VEE
RW

19
RS

D0
D1
D2
D3
D4
D5
D6
D7

RW
19

RS

D0
D1
D2
D3
D4
D5
D6
D7
RD0/PSP0 RD0/PSP0
E

E
20 20
RD1/PSP1 RD1/PSP1
21 21
RD2/PSP2 RD2/PSP2
1
2
3

4
5
6

7
8
9
10
11
12
13
14

22

1
2
3

4
5
6

7
8
9
10
11
12
13
14
RD3/PSP3 22
27 RD3/PSP3
RD4/PSP4 27
28 RD4/PSP4
RD5/PSP5 28
29 RD5/PSP5
RD6/PSP6 29
30 RD6/PSP6
RD7/PSP7 30
RD7/PSP7
PIC16F877A PIC16F877A

Fig 4 Selection of options


Fig 6 Displaying ticket price
After then our system enables the smart card user to select the
If the seat is available our displays the seat is available and
place for locomotion
then the process continues

RXD
1

RXD

3
TXD

RTS
A 1 2 3 R1
TXD
A 1 2 3
RTS R1
CTS 10k
B 4 5 6 R2
CTS
B 4 5 6
10k

R2
10k

U1
C 7 8 9 C 7 8 9
10k

R3 U1
13
OSC1/CLKIN RB0/INT
33
13 33
R3
14 34
OSC2/CLKOUT RB1
RB2
35
D 0 # 10k 14
OSC1/CLKIN
OSC2/CLKOUT
RB0/INT
RB1
34
35
D 0 # 10k
2 36 R4 RB2
RA0/AN0 RB3/PGM 2 36
3
RA1/AN1 RB4
37
3
RA0/AN0 RB3/PGM
37
R4
4 38 RA1/AN1 RB4
RA2/AN2/VREF-/CVREF RB5 10k 4 38
5 39 RA2/AN2/VREF-/CVREF RB5 10k
RA3/AN3/VREF+ RB6/PGC 5 39
6 40 RA3/AN3/VREF+ RB6/PGC
RA4/T0CKI/C1OUT RB7/PGD 6 40
7 RA4/T0CKI/C1OUT RB7/PGD
RA5/AN4/SS/C2OUT LCD1 7
RC0/T1OSO/T1CKI
15 RA5/AN4/SS/C2OUT
15 LCD1
8 16 LM016L RC0/T1OSO/T1CKI LM016L
RE0/AN5/RD RC1/T1OSI/CCP2 8 16
9 17 RE0/AN5/RD RC1/T1OSI/CCP2
RE1/AN6/WR RC2/CCP1 9 17
10 18 RE1/AN6/WR RC2/CCP1
RE2/AN7/CS RC3/SCK/SCL 10 18
23 RE2/AN7/CS RC3/SCK/SCL
RC4/SDI/SDA 23
1 24 RC4/SDI/SDA
MCLR/Vpp/THV RC5/SDO 1 24
25 MCLR/Vpp/THV RC5/SDO
RC6/TX/CK 25
26 RC6/TX/CK
RC7/RX/DT 26
RC7/RX/DT
VDD
VSS

VEE

VDD
VSS

VEE
RW

19
RS

RW
D0
D1
D2
D3
D4
D5
D6
D7

19
RS

D0
D1
D2
D3
D4
D5
D6
D7

RD0/PSP0 RD0/PSP0
E

20 20
RD1/PSP1 RD1/PSP1
21 21
RD2/PSP2 RD2/PSP2
1
2
3

4
5
6

7
8
9
10
11
12
13
14

1
2
3

4
5
6

7
8
9
10
11
12
13
14

22 22
RD3/PSP3 RD3/PSP3
27 27
RD4/PSP4 RD4/PSP4
28 28
RD5/PSP5 RD5/PSP5
29 29
RD6/PSP6 RD6/PSP6
30 30
RD7/PSP7 RD7/PSP7
PIC16F877A PIC16F877A

Fig 5 Selection of place Fig 7 Seat availability

_________________________________________________________________________________________
Volume: 03 Special Issue: 03 | May-2014 | NCRIET-2014, Available @ http://www.ijret.org 137
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308

Finally the ticket is generated, and the remaining balance in REFERENCES


our smart card is also displayed
[1] Akintunde Ibitayoakinwande, Ioannis Kymissisand
John Sarik, ‘A Laboratory Based Course in Display
Technology’, IEEE Trans. Educ., vol. 54, no. 2,
May.2011.
RXD
[2] ApostolosFournaris, George Kostopoulos, George

3
TXD
A 1 2 3 Selimis, and Odysseas Koufopavlou , ‘Software and
RTS R1
CTS 10k
Hardware Issues in Smart Card Technology’, IEEE
B 4 5 6 R2
Commun.,Vol.11.no.3,2009.
10k
[3] Amit Kumar Gupta and PriyankaAhlawat Mann ,
U1
C 7 8 9 ‘Railway Train Ticket Generation A Business
R3
13
14
OSC1/CLKIN RB0/INT
33
34
Application for Indian Railways’, An international
OSC2/CLKOUT RB1
RB2
35
D 0 # 10k
Journal of Computer Applications, vol.22, no.7,
2 36 R4
RA0/AN0 RB3/PGM
3 37
4
RA1/AN1
RA2/AN2/VREF-/CVREF RB5
RB4
38
10k
May.2011.
5 39
6
RA3/AN3/VREF+
RA4/T0CKI/C1OUT RB7/PGD
RB6/PGC
40 [4] K.Mayes and K.Markantonakis , Smart Cards, Tokens,
7

8
RA5/AN4/SS/C2OUT
RC0/T1OSO/T1CKI
15
16
LCD1
LM016L
Security & Application, Springer, Jan 2008.
RE0/AN5/RD RC1/T1OSI/CCP2
9 17
RE1/AN6/WR RC2/CCP1
10 18
RE2/AN7/CS RC3/SCK/SCL
23
RC4/SDI/SDA
1 24
MCLR/Vpp/THV RC5/SDO
25
RC6/TX/CK
26
RC7/RX/DT
VDD
VSS

VEE

RW

19
RS

D0
D1
D2
D3
D4
D5
D6
D7

RD0/PSP0
E

20
RD1/PSP1
21
RD2/PSP2
1
2
3

4
5
6

7
8
9
10
11
12
13
14

22
RD3/PSP3
27
RD4/PSP4
28
RD5/PSP5
29
RD6/PSP6
30
RD7/PSP7
PIC16F877A

Fig 8 Balance checking

5. CONCLUSIONS
The goal of our project is attained the aim, using this system
the passenger can easily get the train ticket without wasting
their time to wait in a long queue. This system is mainly used
to get general tickets and the card can be recharge by monthly
basis. Newly, Smart card technology are being used in a
number of ways around the world on the other hand, security
has become significant in information technology, especially
in those application involving data sharing and transactions.
These features make it a real time project with a good
commercial and social value.

FUTURE DEVELOPMENT
 The cost of the project can be effectively reduced by
mass production.
 By utilizing VLSI technology the size of the device can
be more compact.
 In future we can implement ticket reservation and
cancelling in this system.
 In future we can implement the recharge system by
directly transferring the amount from our bank balance.
SMS alert System Can also implement in future.

_________________________________________________________________________________________
Volume: 03 Special Issue: 03 | May-2014 | NCRIET-2014, Available @ http://www.ijret.org 138

You might also like