Main Project Report ON Mobile Ticketing System For Automatic Fare Collection Model For Public Transport
Main Project Report ON Mobile Ticketing System For Automatic Fare Collection Model For Public Transport
ON
MOBILE TICKETING SYSTEM FOR AUTOMATIC FARE
COLLECTION MODEL FOR PUBLIC TRANSPORT
Submitted in partial fulfillment for the degree of B.Tech in Applied Electronics and
Instrumentation under Kannur University, Kerala
By
ATHULKRISHNAN B K
CHEMPERI, KANNUR
2015-2016
I hereby declare that the report of project entitled “ MOBILE TICKETING
Date:
ACKNOWLEDGMENT
To begin with, I am submitting this project at the divine feet of God Almighty “the
satisfaction and euphoria that accompany the successful completion any task would be
incomplete without mentioning the people who made it possible”. I take this opportunity to
thank all those who have inspired and motivated me to make the project a success.
I am graceful to the principal Dr. Benny Joseph, BE, M.Tech, PhD who is the
leading light of my institution. I would like thank Mrs. Reema Mathew, HOD, Dept. of
Electronics and Instrumentation, for her constant and appropriate guidance throughout the
project as always.
I take this unique opportunity to express profound thanks and deep sense of
gratitude to my project coordinators Mr. Keerthi Chacko , Asst.Professor, Dept.
Electronics & Instrumentation, and Mrs Divya K., Asst.Professor, Dept. Electronics &
Instrumentation, and my internal guide Mr. Avinashe K K , Asst.Professor, Dept.
Electronics & Instrumentation, my external guide Mr. Jayaprakash HOD for their kind
advice and knowledgeable suggestions, which helped me to take my project to great height
of success.
Now I take my time to thank all the teachers of the college and my entire batch
mates for their support and encouragement and enduring support which was inevitable for
the success of my ventures.
Last, but not the least I am thankful to each other in this project group for being co-
operative, patient and hardworking for the successful completion of the mini project.
ABSTRACT
In public transportation system at present we use paper tickets which are printed by a
small machine with a key pad. This process needs man power and we don’t know the details
of the passengers using the public transport. In our proposed system automatic ticketing uses
a digital ticket (smart card). It has details about the passenger and it is swiped while entering
the public transport and the destination is selected via GPS. The amount is reduced from the
passengers account according to the distance. All these details are stored in EEPROM. Then
using GPS the position is known and a buzzer is triggered when destination is reached.
CONTENTS
LIST OF TABLE
CHAPTER 1
INTRODUCTION
In Location fixing the GPS is used to find the locations and will saves the location
details like latitude and longitude values to the EEPROM. When the add user option is selected,
the admin can add new user along with his recharge details and saves those in to EEPROM. .
The unit will automatically reduce the fare from his account and will update the data into the
EEPROM.
CHAPTER 2
BLOCK DIAGRAM
Here we are going to see mobile ticketing system for automatic fare collection.
When a person enters the vehicle, the RFID tag is swiped .The GPS stores the
coordinate of the location and treats it as the source.
When the person is about to leave, the card is swiped again and the GPS stores the
coordinate which is treated as the destination.
The server calculates the fare and deducts it from the balance.
The deducted amount is send as a message to the user using GSM module.
CHAPTER 3
HARDWARE DESCRIPTION
3.1 PIC18F24J50
This low power and high performance 8-bit MCU with integrated full-speed USB 2.0 and
peripheral flexibility comes in a small package for cost sensitive applications in the PIC18 J-
series. New features include Deep sleep mode for low power applications, Peripheral Pin Select
for design flexibility for mapping peripherals to I/O pins and a CTMU module for easy capacitive
touch user interfaces. The PIC18F46J50 family is ideal for applications requiring cost-effective,
low-power USB solutions with a robust peripheral set in a small package.
3.1.1 FEATURES
15nA Deep Sleep mode.
60nA Sleep mode (RAM retention)
830nA Real Time Clock & Calendar operation in Sleep modes
780nA Watch Dog Timer operation in Sleep mode
Integrated full speed USB 2.0
Deep Sleep mode ideal for battery applications
Peripheral Pin Select for mapping digital peripherals to various I/O for design flexibility
Hardware RTCC provides clock, calendar & alarm functions
Charge Time Measurement Unit (CTMU) supports capacitive touch screens
2 Enhanced Capture / Compare / PWM modules
2 MSSP serial ports for SPI or I2C™ communication
2 Enhanced USART module
Capture/Compare/PWM 2 ECCP /
Peripherals
Comparators 2
Linearity ≤ 1 LSB
Programmable Low Voltage Detection (PLVD)
Supports interrupt on-Low Voltage Detection
3.1.4 SPECIAL MICROCONTROLLER FEATURES
100,000 erase/write cycle Enhanced FLASH program memory typical
1,000,000 erase/write cycle Data EEPROM memory
FLASH/Data EEPROM Retention: > 40 years
Self-reprogrammable under software control
Power-on Reset (POR), Power-up Timer (PWRT) and Oscillator Start-up Timer (OST)
Watchdog Timer (WDT) with its own On-Chip RC Oscillator for reliable operation
Programmable code protection
Power saving SLEEP mode
Selectable oscillator options including:
4X Phase Lock Loop (of primary oscillator)
Secondary Oscillator (32 kHz) clock input
Single supply 5V In-Circuit Serial Programming (ICSP™) via two pins
In-Circuit Debug (ICD) via two pins.
3.1.5 I/O PORTS
Depending on the device selected, there are either five ports or three ports available.
Some pins of the I/O ports are multiplexed with an alternate function from the peripheral features
on the device. In general, when a peripheral is enabled, that pin may not be used as a general
purpose I/O pin.
Each port has three registers for its operation. These registers are:
TRIS register (data direction register)
PORT register (reads the levels on the pins of the device)
LAT register (output latch)
3.1.6 INTERRUPTS
The PIC18FXX2 devices have multiple interrupt sources and an interrupt priority feature
that allows each interrupt source to be assigned a high priority level or a low priority level.
The high priority interrupt vector is at 000008h and the low priority interrupt vector is at
000018h. High priority interrupt events will override any low priority interrupts that may be in
progress.
There are ten registers which are used to control interrupt operation. These registers are:
RCON
INTCON
INTCON2
INTCON3
PIR1, PIR2
PIE1, PIE2
IPR1, IPR2
It is recommended that the Microchip header files supplied with MPLAB® IDE be used
for the symbolic bit names in these registers. This allows the assembler/compiler to
automatically take care of the placement of these bits within the specified register. Each interrupt
source, except INT0, has three bits to control its operation.
GSM/GPRS Modem-RS232 is built with Dual Band GSM/GPRS engine- SIM900A, works
on frequencies 900/ 1800 MHz The Modem is coming with RS232 interface, which allows you
connect PC as well as microcontroller with RS232 Chip (MAX232). The baud rate is configurable
from 9600-115200 through AT command. The GSM/GPRS Modem is having internal TCP/IP stack
to enable you to connect with internet via GPRS.
It is suitable for SMS, Voice as well as DATA transfer application in M2M interface. The
onboard Regulated Power supply allows you to connect wide range unregulated power supply.
Using this modem, you can make audio calls, SMS, Read SMS, attend the incoming calls and
internet etc. through simple AT commands.
3.2.1 FEATURES
Uses the extremely popular SIM900 GSM module
Provides the industry standard serial RS232 interface for easy connection to
computers and other devices.
Provides serial TTL interface for easy and direct interface to microcontrollers
Optionally available USB interface for easy interface to laptops, computers, etc.
Onboard MIC and Speaker circuits and 3.5mm audio connectors for direct
connection to mice and speakers
All pins of the SIM900 module can be tapped into for expansion using onboard
expansion holes. GPIO pins, Serial communication pins, 2 PWM pins, I2C pins and
ADC pins are broken out to standard 0.1‖ spaced holes for easy expansion.
Comes with an onboard wire antenna for better reception. Board provides an
option for adding an external antenna through an SMA connector.
The SIM900 allows an adjustable serial baudrate from 1200 to 115200 bps
Modem a low power consumption of 0.25 A during normal operations and around
1 A during transmission.
To read the text being sent by the modem, you will need a serial monitoring software.
Windows has a built in serial monitoring software called HyperTerminal. Run it at
Start > Programs -> Accessories -> Communications-> HyperTerminal
Select the serial port to which the modem is connected under the ―Connect Using
―option (usually COM1)
Select Baudrate of 9600 and Flow control as none. The board works on a serial
communication that can work within a wide range of speeds from 1200 bps to
1152000 bps,
You will have to send character ‗A‘ (uppercase A) initially before you send any other
command to the modem
Enter ―AT‖ in the HyperTerminal, the board will echo ―OK‖ if everything is properly
setup
The onboard Net LED(yellow) is used to display the network status a) LED Off –
SIM900 not running b) 64ms On 0.8 Sec Off - SIM900 unable to find network c)
64ms On 3 Sec Off - SIM900 found network d) 64ms On/ 300ms Off GPRS
communication
3.2.3 WORKING
Unlike mobile phones, a GSM modem doesn‘t have a keypad and display to interact
with. It just accepts certain commands through a serial interface and acknowledges for those.
These commands are called as AT commands. There is a list of AT commands to instruct the
modem to perform its functions. Every command starts with "AT". That‘s why they are called as
AT commands. AT stands for attention.
In our simple project, the program waits for the mobile number to be entered through the
keyboard. When a ten digit mobile number is provided, the program instructs the modem to
send the text message using a sequence of AT commands.
TX (Pin3) - This is the UART transmitter of the module. It outputs the GPS information
for application.
Timing application.
RFID Reader Module This is a low frequency (125 KHz) RFID reader with serial output
with a range of 8-12cm. It is a compact units with built in antenna and can be directly connected
to the PC using RS232 protocol.
3.4.2 WORKING
Many types of RFID exist, but at the highest level, we can divide RFID devices into two
classes: active and passive. Active tags require a power source they‘re either connected to a
powered infrastructure or use energy stored in an integrated battery. In the latter case, a tag‘s
lifetime is limited by the stored energy, balanced against the number of read operations the
device must undergo. One example of an active tag is the transponder attached to an aircraft that
identifies its national origin. Another example is a LoJack device attached to a car, which
incorporates cellular technology and a GPS to locate the car if stolen. However, batteries make
the cost, size, and life-time of active tags impractical for the retail trade. Passive RFID is of
interest because the tags don‘t require batteries or maintenance. The tags also have an indefinite
operational life and are small enough to fit into a practical adhesive label. A passive tag consists
of three parts: an antenna, a semiconductor chip attached to the antenna, and some form of
encapsulation. The tag reader is responsible for powering and communicating with a tag. The tag
antenna captures energy and transfers the tag‘s ID (the tag‘s chip coordinates this process). The
encapsulation maintains the tag‘s integrity and protects the antenna and chip from environmental
conditions or reagents. The encapsulation could be a small glass vial or a laminar plastic
substrate with adhesive on one side to enable easy attachment to goods. Two fundamentally
different RFID design approaches exist for transferring power from the reader to the tag:
magnetic induction and electromagnetic (EM) wave capture. These two designs take advantage
of the EM properties associated with an RF antenna—the near field and the far field. Both can
transfer enough power to a remote tag to sustain its operation—typically between 10 W and 1
mW, depending on the tag type. (For comparison, the nominal power an Intel X Scale processor
consumes is approximately 500 mW, and an Intel Pentium 4 consumes up to 50 W.) Through
various modulation techniques, near- and far-field-based signals can also transmit and receive
data.
To control access to buildings or other objects such as hotel rooms or lockers by persons
or items, ID systems have to ensure absolute security. The RFID technology is utilized as access
control embedded in ID cards. These cards not only prevent unauthorized access to buildings or
other objects but are further used for time attendance monitoring. In addition to identification, an
RFID card may be used to store value. Whether as a transportation pass or loyalty/prepaid utility
card, RFID provides convenience and security. In the automotive sector, RFID-based security
keys prevent unauthorized access to vehicles.
Within consumer and commercial systems there are often components that need to be
guaranteed authentic for the proper operation of the system or the safety of the user. RFID
provides a convenient and secure method of identifying a removable or replaceable component.
RFID tags can be made in a variety of shapes and sizes specifically designed for the component
they are attached to. With no electrical connections required, a solution can be found for just
about any component whether it has electronic content or not. To further enhance system
operation data may be encrypted and stored on the RFID tag for use by the system or to record
historical information during operation
3.4.6 FEATURES
The CD4066BC is a quad bilateral switch intended for the transmission or multiplexing
of analog or digital signals. It is pin-for-pin compatible with CD4016BC, but has a much lower
―ON‖ resistance, and ―ON‖ resistance is relatively constant over the input-signal range.
3.6.1 FEATURES
3.7 MAX232
3.7.2 APPLICATIONS
Interface Translation.
Multidrop RS-232 Networks
Portable Diagnostics Equipment
3.7.3 BENEFITS AND FEATURES SAVES BOARD SPACE
A small amount of power may be drawn from the +10V (V+) and -10V (V-) outputs to
power external circuitry (see the Typical Operating Characteristics section), except on the
MAX225 and MAX245–MAX247, where these pins are not available. V+ and V- are not
regulated, so the output voltage drops with increasing load current. Do not load V+ and V- to a
point that violates the minimum ±5V EIA/TIA-232E driver output voltage when sourcing current
from V+ and V- to external circuitry. When using the shutdown feature in the MAX222,
MAX225, MAX230, MAX235, MAX236, MAX240, MAX241, and MAX245–MAX249, avoid
using V+ and Vto power external circuitry. When these parts are shut down, V- falls to 0V, and
V+ falls to +5V. For applications where a +10V external supply is applied to the V+ pin (instead
of using the internal charge pump to generate +10V), the C1 capacitor must not be installed and
the SHDN pin must be connected to VCC. This is because V+ is internally connected to VCC in
shutdown.
The typical driver output voltage swing is ±8V when loaded with a nominal 5kΩ RS-232
receiver and VCC = +5V. Output swing is guaranteed to meet the EIA/TIA- 232E and V.28
specification, which calls for ±5V minimum driver output levels under worst-case conditions.
These include a minimum 3kΩ load, VCC = +4.5V, and maximum operating temperature.
Unloaded driver output voltage ranges from (V+ -1.3V) to (V- +0.5V). Input thresholds are both
TTL and CMOS compatible. The inputs of unused drivers can be left unconnected since 400kΩ
input pull-up resistors to VCC are built in (except for the MAX220). The pull up resistors forces
the outputs of unused drivers low because all drivers invert. The internal input pull up resistors
typically source 12µA, except in shutdown mode where the pull ups are disabled. Driver outputs
turn off and enter a high-impedance state—where leakage current is typically microamperes
(maximum 25µA)—when in shutdown mode, in three-state mode, or when device power is
removed. Outputs can be driven to ±15V. The power supply current typically drops to 8µA in
shutdown mode. The MAX220 does not have pull up resistors to force the outputs of the unused
drivers low. Connect unused inputs to GND or VCC. The MAX239 has a receiver three-state
control line, and the MAX223, MAX225, MAX235, MAX236, MAX240, and MAX241 have
both a receiver three-state control line and a low-power shutdown control. Table 2 shows the
effects of the shutdown control and receiver three state control on the receiver outputs.
EIA/TIA-232E and V.28 specifications define a voltage level greater than 3V as a logic
0, so all receivers invert. Input thresholds are set at 0.8V and 2.4V, so receivers respond to TTL
level inputs as well as EIA/TIA-232E and V.28 levels.
The receiver inputs withstand an input overvoltage up to ±25V and provide input
terminating resistors with nominal 5kΩ values. The receivers implement Type 1 interpretation of
the fault conditions of V.28 and EIA/TIA-232E. The receiver input hysteresis is typically 0.5V
with a guaranteed minimum of 0.2V. This produces clear output transitions with slow-moving
input signals, even with moderate amounts of noise and ringing. The receiver propagation delay
is typically 600ns and is independent of input swing direction.
3.8.1 SPECIFICATIONS
Battery Type: 18650
CHAPTER 4
SOFTWARE DESCRIPTION
4.4 MPLAB
MPLAB IDE is a software program that runs on your PC to provide a development
environment for your embedded system design. MPLAB X IDE provides an extensive array of
features for developing and debugging applications on any device from the PIC microcontroller
product family.
However, as with any feature-rich program, it can be a challenge to learn to use all of its
capabilities or even to find out what all of those capabilities are. The goal of this section of the
Developer Help site is to help you to discover and learn how to use the many available features
that are sure to simplify and enhance your development activities.
MPLAB@X IDE is a software program that is used to develop applications for
Microchip microcontrollers and digital signal controllers. (Experienced embedded-systems
designers may want to skip to the next chapter.)This development tool is called an Integrated
Development Environment, or IDE, because it provides a single integrated ―environment‖ to
develop code for embedded microcontrollers.
This chapter describes the development of an embedded system and briefly explains
How MPLAB X IDE from Microchip is used in the process.
Topics discussed here include the following:
An Overview of Embedded Systems
The Development Cycle
Project Manager
Language Tools
Target Debugging
Device Programming
Components of MPLAB X IDE
MPLAB X IDE Online Help
Other MPLAB X IDE Documentation
Web Site
MPLAB X IDE Updates
CHAPTER 5
WORKING
Here we are going to see mobile ticketing system for automatic fare collection.When a
person enters the vehicle, the RFID tag is swiped .The GPS stores the coordinate of the location and
treats it as the source. When the person is about to leave, the card is swiped again and the GPS
stores the coordinate which is treated as the destination .The server calculates the fare and deducts it
from the balance. The deducted amount is send as a message to the user using GSM module.
When the person reaches the destination the rfid swiped again and the fare is calculated.
CHAPTER 6
CIRCUIT DIAGRAM
CHAPTER 7
ADVANTAGES
• Improved consumer convenience
• Increased revenue by increasing accessibility of tickets
• Reduce human effort and time
• Avoid price discrimination
CHAPTER 8
RESULT ANALYSIS
We constructed a Mobile ticketing system for automatic fare collection for public
transport and we have obtained the desired output. .We were able to inform the user about the fare
by sending message to his phone using GSM module.th system was able to correctly pinpoint the
source and destination of the user by the coordinates provided by the GPS module.
CHAPTER 9
CONCLUSION
The mobile ticketing system is an effective application of Mobile Communication and
Information Technology in surface transportation operations.
Large volume of commuter traffic being handled by using mobile ticketing system
The commuters or the transport workers need not worry about tending exact changes
BIBLIOGRAPHY
• Advanced Cellular Network Planning and Optimization Edited by Ajay R Mishra C _2007
John Wiley & Sons, Ltd
• Magnus, Kristian, Espen, NTNU, Decoding GSM, June 2010.
• Web Proforum Tutorials, Smart Cards In Wireless Services.
• Smart card Tutorials
• Shiro Kondo & Tatsuyuki Shikura, Fuji Electric Review, Vol.50 No.3, Wireless Link
Design For Contactless Card.
• ―Enhancing the Experience of Public Transport Users with Urban Screens and Mobile
Applications‖ M. Foth and R. Schroeter Proc. 14th Int‘l Academic Mind Trek Conf.:
Envisioning Future Media Environments (Mind Trek 10), ACM, 2010, pp. 33–40.
• ―Leveraging Electronic Ticketing to Provide Personalized Navigation in a Public Transport
Network‖ Ana Aguiar, Member, IEEE, Francisco Maria Cruz Nunes, Manuel Joao
Fernandes Paula Alexandra Silva, and Dirk Elias
APPENDIX