Вы находитесь на странице: 1из 65

Department of Computer Engineering

CHAPTER 1
INTRODUCTION

1.1 Background
Electronic toll collection (ETC) is a technology enabling the electronic collection of toll
payments. It has been applied over many highways and expressways for faster toll
collection and reduced traffic congestion. This ETC system is capable of determining if
the car is registered or not, and then informing the authorities of toll payment violations,
debits, and participating accounts [2]. The most significant advantage of this technology
is that it eliminates congestion near toll booths. It is also a method by which we can track
vehicles at tollbooths. Other than this obvious advantage, implementation of the ETC
could also benefit the toll operators. The benefits or advantages for the users include:
1) Minimized queues at toll plazas by increasing toll booth service turn-around rates.
2) Faster and more efficient service.
3) The ability to make payments anytime anywhere on the card itself or by loading a
registered credit card.
4) The well timed notification to users via the push notification that informs them about
their current account status.

1.2 Objective
An ETC system extensively utilizes radio frequency identification (RFID) technology.
RFID is a generic term used to identify technologies utilizing radio waves to identify
people or objects [3]. RFID technology was first introduced in 1948 when Harry
Stockman wrote a paper exploring RFID technology entitled, “Communication by Means
of Reflected Power” [4]. RFID technology has evolved since then, and has been
implemented in various fields, such as in, library system warehouse management, theft
prevention attendance system, and so on. Generally, RFID is used for, tracing, tracking,
and identifying objects. The whole RFID system consists of a transponder (tag),
reader/writer, antenna, and computer host. The transponders/tags are a microchip
amalgamated with an antenna system in a compact Toolkit. The system contains a

SIES graduate school of Technology, Nerul, Navi Mumbai Page 1


Department of Computer Engineering

microchip which contains memory and logic circuits to receive and send data back to the
reader [5]. These tags are classified as either active or passive tags. The batteries in the
Active tags provides a longer read range, on the other hand the passive tags are powered
by the signal of the reader and hence have shorter read range [6].
The reader contains two components a decoder along with the RF module and an antenna
to send and receive data from the tag. It can be mounted or built as a mobile portable
device. The desktop host acts as the interface for IT platform for transferring information
from RFID system to the end-user. This host then transforms the information received
from the RFID tag into usable resource for the end-user as shown in Fig 1.1.

Fig. 1.1 Basic Operation of RFID System

1.3 Scope and Applicability


Toll Lane Capacity
1) Vehicles equipped with GTT require less time than all other vehicles to conduct a toll
transaction. Thus the average service rate of a mixed toll lane is generally higher than a
manual lane, depending on the proportion of tagged vehicles in a mixed-use lane.
2) When exclusive GTT lanes are provided, the total number of vehicles serviced by all
of the toll lanes is higher than it is when all lanes are mixed.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 2


Department of Computer Engineering

Vehicle Waiting Times


1) An increase in a toll lane service rate causes a decrease in the average waiting time of
vehicles at the toll plaza.
2) Electronic toll collection saves New Jersey Turnpike travelers 2.1 million hours each
year; reduces fuel wasted at toll stations. Analysis of traffic conditions at 27 toll stations
on the New Jersey Turnpike indicated E-Z Pass electronic toll collection saves cars and
trucks about 1.8 million and 291,000 hours of travel time, respectively, each year.
Reduced congestion was estimated to save 1.2 million gallons of fuel each year, save
money, and reduce emissions.

Reduction of Vehicle Emissions


1) Vehicle emissions are reduced because vehicle speeds through the toll plaza are
increased and accelerations and decelerations reduced. A typical vehicle speed profile at
a toll plaza shows vehicles decelerating as they approach the end of the queue (or the toll
booth) to almost zero speed, and then accelerating to prevailing highway speeds after
exiting the booths. With GTT, vehicles will decelerate to higher speeds, or may not
decelerate at all.
2) The implementation of E-Z Pass at the New Jersey Turnpike in September 2000
reduced fuel consumption by 1.2 million gallons per year (i.e. due to reduced queuing).
Estimates of Volatile Organic Compounds (VOCs) emissions have been reduced by 0.35
tons per weekday with 80 percent of the reduction resulting from improved light-duty
vehicle performance. Estimates of Nitrogen Oxides (NOx) emissions have been reduced
by 0.056 tons per weekday with 58 percent of the reduction resulting from improved
heavy-duty vehicle performance.

Reduction of Toll User Costs


1) GTT can potentially reduce the cost of processing toll transactions. When E-Z Pass
was implemented at the New Jersey Turnpike in September 2000, delays at toll plazas
were greatly reduced. This resulted in user costs of $19.0 million per year for passenger
cars and $6.1 million per year for trucks, making a total annual saving of $25.1 million.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 3


Department of Computer Engineering

Simplified Infrastructure and Accounting System


1) GTT requires far less roadside infrastructure than manual Tollbooths.
2) By automating toll collection and vehicle counting, GTT simplifies the accounting
system as well as the allocation of revenue between peak and non-peak hours.

1.4 Structure of this Report


This report has been written mainly for the users of this project. It can be thought of as a
manual for using the project effectively. The report gives a complete background of the
project in terms of the basic concept of authentication,Authorization, drawbacks of
current technology, validation, why they are required. It then proceeds to explain in detail
about the project: the technology used, the hardware-software requirements, working of
the project, screen designs and a detailed appendix.
The report is very easy to read and understand. The language used has been kept as
simple and as free of technical terms as possible. Proper organization of content under
headings, sub headings and sub-sub headings has been done. A reader can easily find
what he is looking for by referring to the Contents page. Each page has informative
headers and footers. Also, every page has the title included on its left hand side bar for
easy access.
For further knowledge, the reader can refer to the Appendix section at the back of the
report. References used have been explicitly mentioned in the References section.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 4


Department of Computer Engineering

CHAPTER 2
LITERATURE SURVEY AND TECHNOLOGY

2.1 Literature Survey


In the literature review of the existing RFID based toll collection system we find the
method of collection is not entirely gateless. The ETC system in use across National
highways of Ahmadabad, Chennai, and Gurgaon-Jaipur-Beawar has barriers to inspect
each vehicle while the tag is being scanned. The ETC system currently in used in India
do not provide and external module that acknowledges the toll transaction to the vehicle
owner. The system simply scans the vehicle tag and proceeds provided the vehicle is not
under any sort of defaulter category.
The ETC system used in Canada is known as the Canada 407 Express toll route (ETR). It
is one of the most sophisticated toll roads in the world [7].In Canada, the ETC system has
deployed close barrier at each end of the stretch. The system also is well equipped with
optical cameras which record the license plate of the vehicle. The camera specific to this
type is called Optical Character Recognition (OCR).
The OCRs are useful in capturing images and recognizing the license plates of the vehicle
without transponders (tags).Laser beams are placed at the top the solid infrastructure
which detect the vehicle type. In all the projects developed so far, it is not cost effective
and the expense of the built infrastructure is recovered from the motorists by increasing
the toll bill.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 5


Department of Computer Engineering

Fig 2.1 Canada 407 Express Toll route

The electronic toll collection (ETC) system operating by radio frequency identification
(RFID) equipment supplied by Mitsubishi Heavy Industries, Ltd. (MHI) began
commercial operation on an expressway in India’s Gujarat state[12]. The country's first
interoperable RIFD-based electronic toll system was today rolled out on the Ahmadabad-
Mumbai National Highway and the system would allow vehicles fitted with electronic
tags to sail through six toll plazas [13]. The ETC system is managed by 3 road
developers’ namely-Larsen and Toubro (L&T), IRB Infrastructures and National
Highway Authority of India (NHAI).The Toll collection project is equipped with RF
Scanners that detect the passive tags operating at frequency of 850MHz-950 MHz at a
distance up to 90 feet with a response time of 10 milliseconds. Although the system is
cost efficient (with tags available at Rs 150), but it’s not a gateless tax system hence the
motorist have to wait for the receipt. Also no external module can acknowledge the
motorist about the successful transaction and pending balance via cellular mode(push
notification).

SIES graduate school of Technology, Nerul, Navi Mumbai Page 6


Department of Computer Engineering

Fig 2.2 Working of Toll Collection at Gujarat Expressway

The ETC system in use in Poland has been proposed by the Motor Transport Institute and
the University of Technology, Warsaw. The system has been named as Automatic Toll
collection System (NATCS) and consists of National automatic Toll Collection Centre.
The NATCS uses a combination of GSM with satellite based Global Positioning System
(GPS).The GPS system tracks the distance covered by the vehicle and calculates the fees
and rates which then transmits this information to NATCS centre. The NATCS is highly
equipped with sensors and camera that capture and recognize license plates. Though the
system is well equipped the cost of equipping the car with a transponder as well as a GPS
seeks a upward spiral. Hence this expense is recovered from motorists.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 7


Department of Computer Engineering

Fig 2.3 Toll Collection Centre at Poland

2.2 Technology
2.2.1 RFID
Radio-frequency identification (RFID) is an automatic identification method, relying on
storing and remotely retrieving data using devices called RFID tags or transponders. The
technology requires some extent of cooperation of an RFID reader and an RFID tag.
An RFID tag is an object that can be applied to or incorporated into a product, animal, or
person for the purpose of identification and tracking using radio waves. Some tags can be
read from several meters away and beyond the line of sight of the reader.
An RFID tag is an object that can be applied to or incorporated into a product, animal, or
person for the purpose of identification and tracking using radio waves. Some tags can be
read from several meters away and beyond the line of sight of the reader.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 8


Department of Computer Engineering

Fig 2.4 RFID kit

A basic RFID system consists of three components:

1) An antenna or coil

2) A transceiver (with decoder)

3) A transponder (RF tag) electronically programmed with unique information

2.2.1.1 Antenna
The antenna emits radio signals to activate the tag and read and write data to it. Antennas
are the conduits between the tag and the transceiver, which controls the system's data
acquisition and communication. Antennas are available in a variety of shapes and sizes;
they can be built into a door frame to receive tag data from persons or things passing
through the door, or mounted on an interstate tollbooth to monitor traffic passing by on a
freeway. The electromagnetic field produced by an antenna can be constantly present
when multiple tags are expected continually. If constant interrogation is not required, a
sensor device can activate the field. Often the antenna is packaged with the transceiver
and decoder to become a reader (a.k.a. interrogator), which can be configured either as a
handheld or a fixed-mount device. The reader emits radio waves in ranges of anywhere

SIES graduate school of Technology, Nerul, Navi Mumbai Page 9


Department of Computer Engineering

from one inch to 100 feet or more, depending upon its power output and the radio
frequency used. When an RFID tag passes through the electromagnetic zone, it detects
the reader's activation signal. The reader decodes the data encoded in the tag's integrated
circuit (silicon chip) and the data is passed to the host computer for processing.

Fig 2.5 Antenna

2.2.1.2 Tags (Transponders)


An RFID tag is comprised of a microchip containing identifying information and an
antenna that transmits this data wirelessly to a reader. At its most basic, the chip will
contain a serialized identifier, or license plate number, that uniquely identifies that item,
similar to the way many bar codes are used today. A key difference, however is that
RFID tags have a higher data capacity than their bar code counterparts. This increases the
options for the type of information that can be encoded on the tag, including the
manufacturer, batch or lot number, weight, ownership, destination and history (such as
the temperature range to which an item has been exposed). In fact, an unlimited list of
other types of information can be stored on RFID tags, depending on application needs.
An RFID tag can be placed on individual items, cases or pallets for identification
purposes, as well as on fixed assets such as trailers, containers, etc.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 10


Department of Computer Engineering

2.2.1.2.1 Types of tags


Tags come in a variety of types, with a variety of capabilities.

2.2.1.2.2 ‘Read-only’ versus ‘read-write’


There are three options in terms of how data can be encoded on tags:
a) Read-only tags contain data such as a serialized tracking number, which is pre-written
onto them by the tag manufacturer or distributor. These are generally the least expensive
tags because they cannot have any additional information included as they move
throughout the supply chain. Any updates to that information would have to be
maintained in the application software that tracks SKU movement and activity.
b) Write once tags enable a user to write data to the tag one time in production or
distribution processes. Again, this may include a serial number, but perhaps other data
such as a lot or batch number.
c) Full read-write tags allow new data to be written to the tag as needed and even
written over the original data. Examples for the latter capability might include the time
and date of ownership transfer or updating the repair history of a fixed asset. While these
are the most costly of the three tag types and are not practical for tracking inexpensive
items, future standards for electronic product codes (EPC) appear to be headed in this
direction.

2.2.1.2.3 Data capacity


The amount of data storage on a tag can vary, ranging from 16 bits on the low end to as
much as several thousand bits on the high end. Of course, the greater the storage capacity
the higher the price per tag.

2.2.1.2.4 Form factor


The tag and antenna structure can come in a variety of physical form factors and can
either be self-contained or embedded as part of a traditional label structure i.e. the tag is
inside what looks like a regular bar code label—this is termed a 'Smart Label' companies
must choose the appropriate form factors for the tag very carefully and should expect to
use multiple form factors to suit the tagging needs of different physical products and units
SIES graduate school of Technology, Nerul, Navi Mumbai Page 11
Department of Computer Engineering

of measure. For example, a pallet may have an RFID tag fitted only to an area of
protected placement on the pallet itself. On the other hand, cartons on the pallet have
RFID tags inside bar code labels that also provide operators human-readable information
and a back-up should the tag fail or pass through non RFID-capable supply chain links.

2.2.1.2.5 Passive versus active


Passive tags have no battery and broadcast their data only when energized by a reader.
That means they must be actively polled to send information. "Active" tags are capable of
broadcasting their data using their own battery power. In general, this means that the read
ranges are much greater for active tags than they are for passive tags perhaps a read range
of 100 feet or more, versus 15 feet or less for most passive tags. The extra capability and
read ranges of active tags, however, come with a cost; they are several times more
expensive than passive tags. Today, active tags are much more likely to be used for high-
value items or fixed assets such as trailers, where the cost is minimal compared to item
value, and very long read ranges are required. Most traditional supply chain applications,
such as the RFID-based tracking and compliance programs emerging in the consumer
goods retail chain, will use the less expensive passive tags.

2.2.1.2.6 Frequencies
Like all wireless communications, there are a variety of frequencies or spectra through
which RFID tags can communicate with readers. Again, there are trade-offs among cost,
performance and application requirements. For instance, low-frequency tags are cheaper
than ultra high-frequency (UHF) tags, use less power and are better able to penetrate
non-metallic substances. They are ideal for scanning objects with high water content,
such as fruit, at close range. UHF frequencies typically offer better range and can transfer
data faster. But they use more power and are less likely to pass through some materials.
UHF tags are typically best suited for use with or near wood, paper, cardboard or clothing
products. Compared to low-frequency tags, UHF tags might be better for scanning boxes
of goods as they pass through a bay door into a warehouse. While the tag requirements
for compliance mandates may be narrowly defined, it is likely that a variety of tag types

SIES graduate school of Technology, Nerul, Navi Mumbai Page 12


Department of Computer Engineering

will be required to solve specific operational issues. You will want to work with a
company that is very knowledgeable in tag and reader technology to appropriately
identify the right mix of RFID technology for your environment and applications.

2.2.1.2.7 EPC Tags


EPC refers to "electronic product code," an emerging specification for RFID tags, readers
and business applications first developed at the Auto-ID Center at the Massachusetts
Institute of Technology. This organization has provided significant intellectual leadership
toward the use and application of RFID technology. EPC represents a specific approach
to item identification, including an emerging standard for the tags themselves, including
both the data content of the tag and open wireless communication protocols. In a sense,
the EPC movement is combining the data standards embodied in certain bar code
specifications, such as the UPC or UCC-128 bar code standards, with the wireless data
communication standards that have been developed by ANSI and other groups.

2.2.1.3 RF Transceiver:
The RF transceiver is the source of the RF energy used to activate and power the passive
RFID tags. The RF transceiver may be enclosed in the same cabinet as the reader or it
may be a separate piece of equipment. When provided as a separate piece of equipment,
the transceiver is commonly referred to as an RF module. The RF transceiver controls
and modulates the radio frequencies that the antenna transmits and receives. The
transceiver filters and amplifies the backscatter signal from a passive RFID tag.

2.2.1.4 Typical Applications for RFID

1) Automatic Vehicle identification: Automatic Vehicle identification involves


identifying the vehicle using the owner’s RFID tag which would be read wirelessly.
2) Container/ Yard Management: Container management or yard management involves
use of RFID tags embedded on the containers. These containers can then be traced with
proper identification.
3) Document/ Jewelry tracking: Sensitive documents and expensive jewelry can be
tracked using RFID tags.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 13


Department of Computer Engineering

4) Patient Monitoring: Patient’s health status, diagnosis and many other attributes can be
stored in a database which can be read using a RFID based tag.

2.2.1.5 The Advantages of RFID Over Bar Coding


1) No "line of sight" requirements: Bar code reads can sometimes be limited or
problematic due to the need to have a direct "line of sight" between a scanner and a bar
code. RFID tags can be read through materials without line of sight.
2) More automated reading: RFID tags can be read automatically when a tagged product
comes past or near a reader, reducing the labor required to scan product and allowing
more proactive, real-time tracking.
3) Improved read rates: RFID tags ultimately offer the promise of higher read rates than
bar codes, especially in high-speed operations such as carton sort.
4) Greater data capacity: RFID tags can be easily encoded with item details such as lot
and batch, weight, etc.
5) "Write" capabilities: Because RFID tags can be rewritten with new data as supply
chain activities are completed, tagged products carry updated information as they move
throughout the supply chain.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 14


Department of Computer Engineering

CHAPTER 3
ANALYSIS AND SYSTEM DESIGN

3.1 System Analysis vis-à-vis User requirements


Every mobile vehicle will be attached with a RF tag which contains a unique ID. The tag
will keep giving out RF signals. When vehicle reaches the entrance of the toll booth the
RFID receiver will detect these signals. The signals are then passed over to the
controlling device (i.e. Desktop/Laptop). The reader will receive the signal then the data
will be sent over to the COM port of the connected device via the USB cable. Now, with
the help of COM port the data is transferred to the mobile device or a laptop. The front-
end software developed will display the details of the vehicle owner’s account on the
screen.
Information such as date, time, total balance and license number will be stored in the
database. A detailed screen will be prepared from the information retrieved from the
database that gives a complete description of the owner’s account. By the end of the
month the system will give the bill and the total amount pending of the user for the
current month will also be printed. The vehicle owners who find themselves at the toll
booths with insufficient balance will be sent through a separate path where they can
recharge their balance to pay their undue amount. Another option given to the users is to
recharge their accounts via an SMS; the SMS will deduct the charge from the SIM card
and recharge the amount in the users account for the toll booth.
The GUI can be used to generate a list of all users who have low balance, so as to remind
them to recharge before they travel again. This system also highlights an important factor
which most system ignores, it is that many time vehicle users may cross toll booth by
mistake or may have urgent business and may have to return. In such conditions, it is
unfair to charge them with toll since they have not used the highway or bridge. Hence in
order to make the system fair we keep a appropriate time interval within which if the user
returns then no balance will be deduced but if he stays for a longer period then balance
will be deducted.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 15


Department of Computer Engineering

3.2 System Planning

3.2.1 Plan of Action

Sr Task Sub Task Activity Duration Start End


No. Date Date
1 Problem Formulation Brain 5-6 hrs. 9-8-13 15-8-13
Definition of the storming
process session
statement amongst
the group
members
2 Problem Discussing Discussion 13 hrs. 16-8-13 30-8-13
Evaluation the existing and
and proposed searching
solutions. on internet.
3 Development Planning the Formulatio 15 hrs. 2-9-13 27-9-13
of system logical n of the
architecture execution of working
the system process
being which will
developed satisfy our
and goals and
analyzing objectives
software and
hardware
requirements
4 Presentation Giving a Creation of 6-7 hrs. 30-9-13 4-10-13
seminar power
about current point
status of presentatio

SIES graduate school of Technology, Nerul, Navi Mumbai Page 16


Department of Computer Engineering

work to n on
internal Microsoft
guide and Power
teachers Point
5 Coding Designing Writing the 60-70 20-12- 28-2-14
front end and code for hrs. 13
back end of implementa
the system tion
6 Testing Perform Identify 20-30 1-3-14 27-3-14
various tests and correct hrs.
to identify the various
the bugs errors
7 Documentation Completely Preparing 14-15 28-3-14 25-4-14
analyzing the the hrs.
work done documents
till date
Table No. 3.1 Plan of Action

SIES graduate school of Technology, Nerul, Navi Mumbai Page 17


Department of Computer Engineering

Fig 3.1 Gantt Chart of Project Development

SIES graduate school of Technology, Nerul, Navi Mumbai Page 18


Department of Computer Engineering

3.3 Steps of Project Development and Methodology

The following will be flow of steps to achieve the working Prototype Model of the above
proposed system.
1) Defining the Task,
2) Understanding the Need & Usability in industry and market(Market Analysis),
3) Prepare a Block Diagram,
4) Deducing a Flowchart for the whole process,
5) Writing the Software Program,
6) Compilation & Burning,
7) Testing and Debugging,
8) Developing Data Flow Diagram,
9) Actual Implementation.
10) Finally Running the system and,
11) Documentation.

Fig 3.2 Flow chart of the proposed system

SIES graduate school of Technology, Nerul, Navi Mumbai Page 19


Department of Computer Engineering

In Fig 3.2, the Flowchart of the working scheme of RFID System is shown. The user first
enters the Toll Booth and then the RFID reader will read the tag attached to the car. It
will look up in the database about the distance to be covered by the car to cross the bridge
and deduct amount from the existing balance. If the users account has insufficient balance
then there is a facility to recharge the account. Hence these cars will be side-lined where
they can recharge their account and continue their journey. On recharging the account or
when the balance is deducted the user is notified via a push notification.

Fig 3.3 Component diagram of the system

3.4 Hardware and Software Details


3.4.1 Components in the RFID Toolkit
The following are the components included in the RFID Toolkit which are necessary for
the proper functioning of the system. They are as follows:

SIES graduate school of Technology, Nerul, Navi Mumbai Page 20


Department of Computer Engineering

3.4.1.1 Power Supply


The Power Supply will fulfill the power requirements of all the components attached in
the Toolkit. It contains a transformer, filter and rectifier. The system uses 9-10V of
Power Supply.

3.4.1.2 MAX 232


This component is required to convert TTL (Time to Live) logic into RS232 logic and
vice-versa. In TTL: logic 1 is +5V and logic 0 is 0V. In RS232: logic 1 is -10V and logic
0 is +10V.This unit provides an interface required for communication between
microcontroller and RS232 based devices using serial communication port (COM). The
MAX232 IC is dedicated for the logic conversion. The unit is also called as Logic
Convertor/Level Convertor. The unit requires +5VDC for normal operation.

3.4.1.3 RF Encoder HT12E


This unit is used for the encoding of 4-bit data before passing it in the communication
channel. Essentially it creates a serial bit stream out of the parallel bits of input data.
After that it transmits data stream to RF transmitter component. The unit requires +5V -
12V DC for it normal functioning. This unit decodes the 4-bit data after retrieving it from
the RF Receiver unit. It produces a parallel data from the serial input bit stream. It
requires +5 to 12VDC for it normal functioning.

3.4.1.4 The RF Transmitter


This unit plays an extremely crucial role. It handles the modulation (ASK, CF-434MHz)
of the data or packet to be transmitted. After the data is modulated then it is transferred or
sent over Air with the help of antennas. The baud rate is normally 1100 bps and the range
would be around 80ft. The unit requires +5V - 12V DC for it normal functioning.

3.4.1.5 The RF Receiver


This unit forms the core part of the system. It demodulates the signal after reception from
air as the medium. This component is created with Amplifying unit, Filtering unit, Peak
Detection, Sampler. The unit requires +5V DC for its normal functioning.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 21


Department of Computer Engineering

3.4.1.6 PC Serial Port Controlling


Serial Communication Port (COM) of PC is also called as RS232 Port. The connector
type is 9 and the pin used is D-Type Male connector. Basically we will use only pin no.2
(Rx), pin no.3 (Tx) and pin no.5 (GND) for all communication of the system. Using
MSComm Control ActiveX - The MSComm control provides serial communications for
our application by allowing the transmission and reception of data through a serial port.
MSComm is used as a serial port software interface. MSComm provides us the software
interface and insulates us from the functioning of the underlying hardware. Using
System.IO.Ports Namespace – this is part of .net framework. This is an intrinsic way of
serial port communication. In this namespace we use Serial Port Class. This class
provides event-driven and synchronous I/O, access to pin and break states to access serial
driver properties.

3.4.1.7 Database Manager


A database management system (DBMS) consists of software that operates databases,
access, and security, providing storage, backup and other facilities. Databases are
designed to offer an organized mechanism for managing, storing and retrieving
information. They do so through the help of tables. We can use any one of the following
software technology for database management. MS Access 2007 allows us to manage our
information in one database file. It is easy to use. It is portable and can be easily copied &
pasted to any other system and can run without installing the software. MS SQL Server
2000 – it is complex at installation part and easy to use. The database developed on it
cannot be easily copied and paste on another system. Also it requires the software to be
installed to use the database files.

Fig 3.4 RFID Reader Module

SIES graduate school of Technology, Nerul, Navi Mumbai Page 22


Department of Computer Engineering

Fig 3.4 shows the basic RFID module. Here the vehicle owner enters the specific Radio
frequency region i.e. the RF transmitter range (up to 80ft).The RF Receiver transmits
demodulated signal from the newly activated passive tag on the vehicle. The vehicle is
then recognized in the database system and the appropriate amount is deduced. If the
vehicle owner is categorized as ’defaulter’ then either the owner can recharge his balance
via an external module or pay that specific amount at the exit toll. An Acknowledgement
notification is sent to the user via a push notification service.

3.4.2 Introduction to DOTNET Framework

The .NET Framework (pronounced dot net) is a software framework that runs primarily
on Microsoft Windows. It includes a large library and supports several programming
languages which allow language interoperability (each language can use code written in
other languages). Programs written for the .NET Framework execute in
a software environment (as contrasted to hardware environment), known as the Common
Language Runtime (CLR), an application virtual machine that provides important
services such as security, memory management, and exception handling. The class library
and the CLR together constitute the .NET Framework.

The .NET Framework's Base Class Library provides user interface, data access, database
connectivity, cryptography, web application development, numeric algorithms,
and network communications. Programmers produce software by combining their
own source code with the .NET Framework and other libraries. The .NET Framework is
intended to be used by most new applications created for the Windows platform.
Microsoft also produces a popular integrated development environment largely for .NET
software called Visual Studio.

3.4.2.1 DESIGN FEATURES:

3.4.2.1.1 Interoperability
Because computer systems commonly require interaction between new and older
applications, the .NET Framework provides means to access functionality that is

SIES graduate school of Technology, Nerul, Navi Mumbai Page 23


Department of Computer Engineering

implemented in programs that execute outside the .NET environment. Access


to COM components is provided in the System.Runtime.InteropServices and
System.EnterpriseServices namespaces of the framework; access to other functionality is
provided using the P/Invoke feature.

3.4.2.1.2 Common Language Runtime Engine


The Common Language Runtime (CLR) is the execution engine of the .NET Framework.
All .NET programs execute under the supervision of the CLR, guaranteeing certain
properties and behaviors in the areas of memory management, security, and exception
handling.

3.4.2.1.3 Language Independence


The .NET Framework introduces a Common Type System, or CTS. The
CTS specification defines all possible data types and programming constructs supported
by the CLR and how they may or may not interact with each other conforming to
the Common Language Infrastructure (CLI) specification. Because of this feature, the
.NET Framework supports the exchange of types and object instances between libraries
and applications written using any conforming .NET language.

3.4.2.1.4 Base Class Library


The Base Class Library (BCL), part of the Framework Class Library (FCL), is a library
of functionality available to all languages using the .NET Framework. The BCL
provides classes which encapsulate a number of common functions, including file reading
and writing, graphic rendering, database interaction, XML document manipulation and so
on.

3.4.2.1.5 Simplified Deployment


The .NET Framework includes design features and tools that help manage
the installation of computer software to ensure that it does not interfere with previously
installed software, and that it conforms to security requirements.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 24


Department of Computer Engineering

3.4.2.1.6 Security
The design is meant to address some of the vulnerabilities, such as buffer overflows, that
have been exploited by malicious software. Additionally, .NET provides a common
security model for all applications.

3.4.2.1.7 Portability
While Microsoft has never implemented the full framework on any system except
Microsoft Windows, the framework is engineered to be platform agnostic, and cross-
platform implementations are available for other operating systems (see Silver light and
the Alternative implementations section below). Microsoft submitted the specifications
for the Common Language Infrastructure (which includes the core class
libraries, Common Type System, and the Common Intermediate
Language), the C# language, and the C++/CLI language to both ECMA and the ISO,
making them available as open standards. This makes it possible for third parties to create
compatible implementations of the framework and its languages on other platforms.

3.4.3 Introduction to VB.NET

We have used VB.NET language in our project. VB.NET is easy to understand. VB.NET
is a type safe language; code can only access memory locations it is allowed to access.

VB.NET contains many important language features:

1) Inheritance (object-oriented language)


2) Type-safe
3) Structured exception handling (Try…Catch)
4) Method overloading/overriding
5) Parameterized constructors
6) Delegates and events
7) Attributes
8) Multithreading

SIES graduate school of Technology, Nerul, Navi Mumbai Page 25


Department of Computer Engineering

VB.NET contains full support for inheritance. Inheritance allows developers to extend an
existing code base to add new functionality.
VB.NET is a type safe language: code can only access memory locations it is allowed to
access. Benefits of type-safe code include:

1) Ability to isolate assemblies


2) Increased security
3) Unwanted side effects eliminated
VB.NET can require explicit type casting so that types are not automatically converted to
other types.
Structured exception handling is an integral part of VB.NET.

VB.NET fully supports method overloading. Overloading allows different signatures to


be applied to methods with the same name.

VB.NET object constructors can have multiple parameters passed in allowing for greater
flexibility when creating objects.

VB.NET has a robust architecture in place for handling events. As a result,


understanding how events work is crucial to developing successful VB.NET applications.
A Delegate type provides a type-safe pointer to a function and can be used to hook an
event to an event handler.

Attributes are descriptive tags that can be added into VB.NET code to provide additional
information (metadata) about what the code does.

VB.NET developers can now create true multi-threaded applications. Threading allows
different processes to run separately without tying up the user interface or program.

3.4.3.1 VB.NET Namespaces

A Namespace in .Net Framework is a set of classes. All VB applications are developed


using classes from the .NET System namespace. The namespace with all the built-in VB
functionality is the system namespace. All other namespaces are based on this System
namespace. A Namespace consists of a set of classes that are related to each other. This

SIES graduate school of Technology, Nerul, Navi Mumbai Page 26


Department of Computer Engineering

will considerably reduce your search for a class or functionality. A class in .Net
Framework cannot belong to multiple Namespaces. One class should belong to only one
Namespace. All the classes in .Net Framework are connected to System Namespace.
Apart from the default Namespaces, .Net Framework allows to create your own
Namespaces that will hold certain classes. Namespaces are defined by binding the
Class…End Class definition in a Namespace…End Namespace definition. By default,
classes created in Visual Basic.NET (VB.NET) are automatically assigned to a root
Namespace. If you are developing web application using Visual Studio.NET, then it
automatically names this root Namespace based on the project name. Namespaces are
used both as an "internal" organization system for a program, and as an "external"
organization system - a way of presenting program elements that are exposed to other
programs.

3.4.3.2 Namespaces used in our project:

System: Includes essential classes and base classes for commonly used data types,
events, exceptions and so on.

System.Data: Includes classes which let us handle data from data sources.

System.Diagnostics: Includes classes that allow to debug our application and to step
through our code.

3.3 Cost and benefits Analysis


We aim to build a multifactor authentication system which could possibly replace the
single factor based schemes commonly used in websites these days. This technique of
authentication will benefit both, the users and the system which is being secured. For the
users, it provides an easy to remember way to authenticate them, hence providing better
security. For the system, it provides a better way to protect itself against malicious users.
Following is an analysis of the benefits of using this system:

SIES graduate school of Technology, Nerul, Navi Mumbai Page 27


Department of Computer Engineering

1) Technological and System Feasibility: The project will be developed using php,
html, css and JavaScript. Windows is the default operating system for almost all
computers nowadays. The web browsers like Google Chrome and Mozilla Firefox are
also free. Thus no additional cost for acquiring required software will be incurred.

2) Operational Feasibility: With cyber-attacks on the rise, text based passwords are not
secure enough. A graphical password authentication system is very relevant in
today’s scenario as it can overcome the shortcomings of text based passwords. The
only cost involved in this scheme would be that the customer should have a working
internet plan and a smart phone.

3) Economic Feasibility: Organizations only stand to gain by employing this scheme.


They will get returns for their investment in terms of customer satisfaction and more
security.

4) Schedule Feasibility: This project can be developed in six to eight months. Thus the
project timetable is reasonable.

5) Legal Feasibility: This project doesn’t conflict with any legal requirements.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 28


Department of Computer Engineering

3.4 Detailed Life Cycle of the Project - ERD, DFD, class diagram

Fig.3.5 Data Flow Diagram

SIES graduate school of Technology, Nerul, Navi Mumbai Page 29


Department of Computer Engineering

In the Fig 3.5,we explain the data flow of the proposed system in which at Level 0
vehicle with RFID tag installed enters the toll plaza. The Reader recognizes the tag and
deducts appropriate amount and then notifies the user via a SMS. While at the Level 1 of
the DFD we elaborate on the process beginning with the reading of the tag at the
entrance. This information is sent to the admin who verifies the vehicle details and
deducts the appropriate balance. After a successful transaction a SMS is sent to the user
acknowledging it.

Fig 3.6 Class Diagram of the proposed system


We broadly categorize the whole GTT system in different classes in Fig 3.6 .The classes
include Tolltax(),Register(),Login(),credit(),details()and notify().Each class have their
own set of functions and attributes.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 30


Department of Computer Engineering

Fig. 3.7 Sequence Diagram

In the Fig 3.7 the sequence diagram of the whole process from the beginning i.e. the
reading of the tag to the acknowledgement is explained where Vehicle, RFID reader and
Tolltax Software are the classes.

Fig.3.8 Use Case for Registration

SIES graduate school of Technology, Nerul, Navi Mumbai Page 31


Department of Computer Engineering

The Fig 3.8 describes a basic registration method in the Use Case representational format.
The admin as an actor logins and has the rights to add a new vehicle based on the
categorization or delete the record. The admin also has privileges to add credit to an
account.

Fig.3.9 Use Case for Toll Collection


In the Fig 3.9 the vehicle acts as an actor .The RFID reader and RFID transmitter read
and decode the tags. The toll tax software enables the admin to deduct the charges and
confirm it to the user.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 32


Department of Computer Engineering

3.5 GUI Design and Application

3.7.1 Home Screen

Fig 3.10 Home Screen of GUI application

In Fig 3.10, the home window of the GUI is shown. The GUI contains a basic animation
of the working model alongside four tabs. The first tab is the ‘New Registration’ tab
wherein new vehicle registration are made and updated in the database. The second tab is
the ‘Generate Receipt’ wherein a receipt is generated of the transaction. The third one is
the details tab which displays the details of any particular vehicle. Lastly the ‘Recharge’
tab which is used to recharge the balance of that vehicle owner.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 33


Department of Computer Engineering

3.7.2 Login Screen

Fig 3.11 Login Screen of GUI Application

In Fig 3.11 the Login window of the GUI is shown. The login screen contains two input
boxes to input username and password respectively, this is used authenticate the user.
After successful login the user will be able to view and operate the account (for e.g. View
Receipt, Recharge, etc).

SIES graduate school of Technology, Nerul, Navi Mumbai Page 34


Department of Computer Engineering

3.7.3 Receipt Screen

Fig 3.12 Receipt Screen of GUI Application

Fig 3.12 shows the Receipt window. The screen shows a Select COM Port input box
which is used to select the COM port that is going to be used to connect the
desktop/laptop with the RFID Toolkit. After selecting the port and clicking on Proceed
button, the connected RFID reader will be configured and the RFID tag will be read and
the information will automatically be fed in the Receipt portion of the screen. And the
Tag ID will be visible in the second input box i.e. Please Show your Tag box.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 35


Department of Computer Engineering

3.7.4 Recharge Screen

Fig 3.13 Recharge Screen of GUI Application

In Fig 4.5 the Recharge window is shown. The screen shows a COM port input box
which is used to select the COM port that is going to be used to connect the
desktop/laptop with the RFID Toolkit. After selecting the COM port the tag can be read.
And the account can be recharged with the amount paid by the owner of the tag.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 36


Department of Computer Engineering

CHAPTER 4
IMPLEMENTATION

As microcontrollers form the core of these days digital circuit design in industry, this
system uses it for the digital processing and centralized operations. The system makes use
of embedded technology which is the future of today’s modern electronics. The
followings are the various Programming Languages & Technologies that are going to be
used in the proposed system.
For PC System:
1) VB.net 2010 Based Application Software,
2) Serial Communication Protocol,
3) SQL Based Database.

4.1 Hardware
Minimum Hardware Requirements:
1) Processor: Intel(R) Core(TM) i3-2100 CPU @ 3.10 GHz
2) Installed Memory (RAM): 4.00 GB
3) System Type: 32/64 bit Operating System
4) Peripherals:
a) Mouse: HID compliant mouse
b) Keyboard: Standard PS/2 keyboard
c) Tags: RFID tag used to uniquely identify users
d) Readers: RFID reader which collects and stores data on the server-side system.

4.2 Software
Minimum Software Requirements:
1) Platform: Windows XP/7/8 Ultimate Service Pack 1(Copyright @ 2009 Microsoft
Corporation. All rights reserved.)
2) Device: Any cellular phone with an active SMS service. (DND service deactivated).

SIES graduate school of Technology, Nerul, Navi Mumbai Page 37


Department of Computer Engineering

CHAPTER 5
TESTING
5.1 Methodology for testing

Software testing is an investigation conducted to provide stakeholders with information


about the quality of the product or service under test.
Software testing can be stated as the process of validating and verifying that a
Computer program/application/product:
1) meets the requirements that guided its design and development,
2) works as expected,
3) can be implemented with the same characteristics,
4) Satisfy the needs of stakeholders.

Static testing:
There are many approaches to software testing. Reviews, walkthroughs, or inspections
are referred to as static testing. Static testing is often implicit, as proofreading. Static
testing involves verification. In this project we have performed static testing by reviewing
the previous papers on multifactor authentication for better understanding of the
methodology that we are implementing. It also helped us understand the existing
multifactor authentication techniques.

Dynamic testing:
Actually executing programmed code with a given set of test cases is referred to as
dynamic testing. Dynamic testing takes place when the program itself is run. Dynamic
testing involves validation. In our project dynamic testing was performed to check
various scenarios:
1) Wrong username and password
2) To check the working of unlink function
3) Wrong selection of image category
4) To check working of login attempts limiting function.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 38


Department of Computer Engineering

White-Box testing:
White-box testing (also known as clear box testing, glass box testing, transparent box
testing and structural testing) tests internal structures or workings of a program, as
opposed to the functionality exposed to the end-user. Techniques that we used were:
API testing (application programming interface) – testing of the application using public
and private APIs
Code coverage – creating tests to satisfy some criteria of code coverage (e.g., the test
designer can create tests to cause all statements in the program to be executed at least
once)
Fault injection methods – intentionally introducing faults to gauge the efficacy of testing
strategies

Black- box testing:


Black-box testing treats the software as a "black box", examining functionality without
any knowledge of internal implementation. The testers are only aware of what the
software is supposed to do, not how it does it. Our Black-box testing methods included:
1) State transition tables
2) Use case testing and
3) specification-based testing. (Specification-based testing aims to test the
functionality of software according to the applicable requirements).

5.2 Report and Code Sheet

5.2.1 Home.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Toll_Collection
{
public partial class Home : Form

SIES graduate school of Technology, Nerul, Navi Mumbai Page 39


Department of Computer Engineering

{
public Home()
{
InitializeComponent();
}

private void newRegistrationToolStripMenuItem_Click(object sender, EventArgs e)


{
Registration rg = new Registration();
rg.Show();
}

private void generateReceiptToolStripMenuItem_Click(object sender, EventArgs e)


{
Receipt rc = new Receipt();
rc.Show();
}

private void registrationToolStripMenuItem_Click(object sender, EventArgs e)


{
RegDetails rd = new RegDetails();
rd.Show();
}

private void receiptToolStripMenuItem_Click(object sender, EventArgs e)


{
ReceiptDetails rcd = new ReceiptDetails();
rcd.Show();
}

private void rechargeToolStripMenuItem_Click(object sender, EventArgs e)


{
Recharge rch = new Recharge();
rch.Show();
}

private void Home_Load(object sender, EventArgs e)


{

}
}
}

5.2.2 Login.cs
using System;
using System.Collections.Generic;

SIES graduate school of Technology, Nerul, Navi Mumbai Page 40


Department of Computer Engineering

using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Toll_Collection
{
public partial class Login : Form
{
public Login()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)


{
if (textBox1.Text == "admin" && textBox2.Text == "admin")
{
Home hm = new Home();
hm.Show();
this.Hide();
}
else if (textBox1.Text == "" && textBox2.Text == "")
{
MessageBox.Show("Fields Cannot be Blank");
}
else
{
MessageBox.Show("Check your Credentials");
}
}

private void button2_Click(object sender, EventArgs e)


{
textBox1.Text = "";
textBox2.Text = "";
}

private void groupBox1_Enter(object sender, EventArgs e)


{

}
}
}

SIES graduate school of Technology, Nerul, Navi Mumbai Page 41


Department of Computer Engineering

5.2.3 Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace Toll_Collection
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Login());
}
}
}

5.2.4 Reciept.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;
using MySql.Data.MySqlClient;
using System.IO;
using System.Net;

namespace Toll_Collection
{
public partial class Receipt : Form
{
String data;
int bal;
int newbal;
String card;

SIES graduate school of Technology, Nerul, Navi Mumbai Page 42


Department of Computer Engineering

MySqlDataReader rdr;

public Receipt()
{
InitializeComponent();
}
MySqlConnection con = new MySqlConnection("Server=localhost;User
Id=root;Password=;Database=tolltax");

MySqlCommand cmd;

private void Receipt_Load(object sender, EventArgs e)


{
string[] ports = System.IO.Ports.SerialPort.GetPortNames();
for (int i = 0; i < ports.Length; i++)
{
comboBox1.Items.Add(ports[i]);
}
}

public delegate void myDelegate();

private void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs


e)
{
textBox1.Invoke(new myDelegate(updateTextBox));
}
public void updateTextBox()
{

data = data + serialPort1.ReadExisting();


if (data.Length == 12)
{
textBox1.Text = "";
textBox1.Text = textBox1.Text + data.Substring(1) + "\n";
serialPort1.DtrEnable = false;
DateTimeOffset timeOut = DateTimeOffset.Now.AddMilliseconds(1500);
do
{
Application.DoEvents();
} while (DateTimeOffset.Now > timeOut);
data = serialPort1.ReadExisting();
serialPort1.DiscardInBuffer();
data = "";

SIES graduate school of Technology, Nerul, Navi Mumbai Page 43


Department of Computer Engineering

serialPort1.DtrEnable = true;

}
}

private void button1_Click(object sender, EventArgs e)


{
try
{
serialPort1.PortName = comboBox1.SelectedItem.ToString();
serialPort1.BaudRate = 9600;
serialPort1.Parity = Parity.None;
serialPort1.DataBits = 8;
serialPort1.StopBits = StopBits.One;
serialPort1.Handshake = Handshake.None;
serialPort1.ReadTimeout = 3000;
serialPort1.ReceivedBytesThreshold = 1;
serialPort1.DtrEnable = true;
serialPort1.Open();
this.serialPort1.DataReceived += new
System.IO.Ports.SerialDataReceivedEventHandler(this.serialPort1_DataReceived);
String connection = comboBox1.SelectedItem.ToString();
}
catch (Exception ex)
{
MessageBox.Show("Failed because: " + ex.Message);

}
}

private void button2_Click(object sender, EventArgs e)


{
clear();
}

private void savereceipt()


{
con.Open();

cmd = new MySqlCommand("insert into receipt values('" + textBox5.Text + "', '"


+ textBox6.Text + "' , '" + textBox1.Text + "' , '" + textBox2.Text + "' , '" + textBox3.Text
+ "' , '" + textBox4.Text + "' , '" + textBox7.Text + "' )", con);

if (cmd.ExecuteNonQuery() != 0)
{

SIES graduate school of Technology, Nerul, Navi Mumbai Page 44


Department of Computer Engineering

}
else
{
MessageBox.Show("Error");
}
con.Close();
}

private void lightbalret()


{

if (bal < 25)


{
MessageBox.Show("Insufficient balance Please Recharge");
clear();
}
else
{
textBox7.Text = "25";
newbal = bal - 25;
textBox8.Text = newbal.ToString();

con.Open();
MySqlCommand cmd = new MySqlCommand("update registration set Credits
= '" + textBox8.Text + "' where U_ID = '" + textBox1.Text + "'", con);
cmd.ExecuteNonQuery();
con.Close();

}
}

private void lightbal()


{
if (bal < 50)
{
MessageBox.Show("Insufficient balance Please Recharge");
clear();
}
else
{
textBox7.Text = "50";
newbal = bal - 50;
textBox8.Text = newbal.ToString();

con.Open();

SIES graduate school of Technology, Nerul, Navi Mumbai Page 45


Department of Computer Engineering

MySqlCommand cmd = new MySqlCommand("update registration set Credits


= '" + textBox8.Text + "' where U_ID = '" + textBox1.Text + "'", con);
cmd.ExecuteNonQuery();
con.Close();

}
}

private void heavybalret()


{
if (bal < 50)
{
MessageBox.Show("Insuffiecient balance Please Recharge");
clear();
}
else
{
textBox7.Text = "50";
newbal = bal - 50;
textBox8.Text = newbal.ToString();

con.Open();
MySqlCommand cmd = new MySqlCommand("update registration set Credits
= '" + textBox8.Text + "' where U_ID = '" + textBox1.Text + "'", con);
cmd.ExecuteNonQuery();
con.Close();

}
}

private void heavybal()


{

if (bal < 100)


{
MessageBox.Show("Insuffiecient balance Please Recharge");
clear();
}
else
{
textBox7.Text = "100";
newbal = bal - 100;
textBox8.Text = newbal.ToString();

con.Open();

SIES graduate school of Technology, Nerul, Navi Mumbai Page 46


Department of Computer Engineering

MySqlCommand cmd = new MySqlCommand("update registration set Credits


= '" + textBox8.Text + "' where U_ID = '" + textBox1.Text + "'", con);
cmd.ExecuteNonQuery();
con.Close();

}
}

private void clear()


{
textBox1.Text = "";
textBox2.Text = "";
textBox3.Text = "";
textBox4.Text = "";
textBox5.Text = "";
textBox6.Text = "";
textBox7.Text = "";
textBox8.Text = "";

private void sendsms()


{
string mobile;

con.Open();
cmd = new MySqlCommand("Select * from registration where U_ID = '" +
textBox1.Text + "'", con);
rdr = cmd.ExecuteReader();
if (rdr.HasRows)
{
rdr.Read();
card = rdr["U_ID"].ToString();
if (textBox1.Text == card)
{
mobile = rdr["Mobile"].ToString();

string sms = "Name: " + textBox2.Text + System.Environment.NewLine +


"UID: " + textBox1.Text + System.Environment.NewLine + "Balance deducted: " +
textBox7.Text + System.Environment.NewLine + "Date: " + textBox5.Text +
System.Environment.NewLine + "Time: " + textBox6.Text;
string strUrl =
"http://api.mVaayoo.com/mvaayooapi/MessageCompose?user=nutsmumbai@gmail.com:
nuts2010&senderID=TEST
SMS&receipientno="+mobile+"&msgtxt="+sms+"&state=4";

SIES graduate school of Technology, Nerul, Navi Mumbai Page 47


Department of Computer Engineering

WebRequest request = HttpWebRequest.Create(strUrl);


HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream s = (Stream)response.GetResponseStream();
StreamReader readStream = new StreamReader( s );
string dataString = readStream.ReadToEnd();
response.Close();
s.Close();
readStream.Close();
con.Close();
}
}

private void textBox1_TextChanged(object sender, EventArgs e)


{
string date = "";

try
{
con.Open();
MySqlDataAdapter da = new MySqlDataAdapter("select * from receipt where
U_ID='" + textBox1.Text + "'", con);
DataSet ds = new DataSet();
da.Fill(ds);
con.Close();
if (ds.Tables[0].Rows.Count > 0)
{
textBox2.Text = ds.Tables[0].Rows[0]["Name"].ToString();
textBox3.Text = ds.Tables[0].Rows[0]["Vehicle_Type"].ToString();
textBox4.Text = ds.Tables[0].Rows[0]["Vehicle_No"].ToString();

if (ds.Tables[0].Rows.Count % 2 == 1)
{
// compare time
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
date = ds.Tables[0].Rows[i]["Time"].ToString();
}
string prevdate = date;
string nowdate = DateTime.Now.ToShortTimeString();
DateTime prev = DateTime.Parse(prevdate);
DateTime now = DateTime.Parse(nowdate);
TimeSpan diff = now.Subtract(prev);
int value = diff.Minutes;
// MessageBox.Show(value.ToString());

SIES graduate school of Technology, Nerul, Navi Mumbai Page 48


Department of Computer Engineering

if (value < 2)
{
con.Open();
MySqlDataAdapter da2 = new MySqlDataAdapter("select * from
registration where U_ID='" + textBox1.Text + "'", con);
DataSet ds2 = new DataSet();
da2.Fill(ds2);
con.Close();
bal = Convert.ToInt16(ds2.Tables[0].Rows[0]["Credits"]);
if (textBox3.Text == "heavy")
{
heavybalret();
if (textBox7.Text == "" && textBox8.Text == "")
{
//do nothing
}
else
{

textBox5.Text = DateTime.Now.ToShortDateString();
textBox6.Text = DateTime.Now.ToShortTimeString();
savereceipt();
sendsms();
// clear();
MessageBox.Show("return midway");
}
}
else if (textBox3.Text == "light")
{
lightbalret();
if (textBox7.Text == "" && textBox8.Text == "")
{

}
else
{
textBox5.Text = DateTime.Now.ToShortDateString();
textBox6.Text = DateTime.Now.ToShortTimeString();
savereceipt();
sendsms();

MessageBox.Show("return midway");
}
}
}
else

SIES graduate school of Technology, Nerul, Navi Mumbai Page 49


Department of Computer Engineering

{
con.Open();
MySqlDataAdapter da3 = new MySqlDataAdapter("select * from
registration where U_ID='" + textBox1.Text + "'", con);
DataSet ds3 = new DataSet();
da3.Fill(ds3);
con.Close();
bal = Convert.ToInt16(ds3.Tables[0].Rows[0]["Credits"]);
if (textBox3.Text == "heavy")
{

heavybal();
if (textBox7.Text == "" && textBox8.Text == "")
{
//do nothing
}
else
{
textBox5.Text = DateTime.Now.ToShortDateString();
textBox6.Text = DateTime.Now.ToShortTimeString();
savereceipt();
sendsms();
// clear();
MessageBox.Show("full stretch");
}
}
else if (textBox3.Text == "light")
{
lightbal();
if (textBox7.Text == "" && textBox8.Text == "")
{
//do nothing
}
else
{
textBox5.Text = DateTime.Now.ToShortDateString();
textBox6.Text = DateTime.Now.ToShortTimeString();
savereceipt();
sendsms();
// clear();
MessageBox.Show("full stretch");
}
}
}
}
else

SIES graduate school of Technology, Nerul, Navi Mumbai Page 50


Department of Computer Engineering

{
// insert data, send sms
con.Open();
MySqlDataAdapter da4 = new MySqlDataAdapter("select * from
registration where U_ID='" + textBox1.Text + "'", con);
DataSet ds4 = new DataSet();
da4.Fill(ds4);
con.Close();
if (ds4.Tables[0].Rows.Count > 0)
{
textBox2.Text = ds4.Tables[0].Rows[0]["Name"].ToString();
textBox3.Text = ds4.Tables[0].Rows[0]["Vehicle_Type"].ToString();
textBox4.Text = ds4.Tables[0].Rows[0]["Vehicle_No"].ToString();
textBox7.Text = "0";
textBox8.Text = ds4.Tables[0].Rows[0]["Credits"].ToString();
textBox5.Text = DateTime.Now.ToShortDateString();
textBox6.Text = DateTime.Now.ToShortTimeString();
savereceipt();
sendsms();
// clear();

}
}

}
else
{
// insert data, send sms
con.Open();
MySqlDataAdapter da1 = new MySqlDataAdapter("select * from
registration where U_ID='" + textBox1.Text + "'", con);
DataSet ds1 = new DataSet();
da1.Fill(ds1);
con.Close();
if (ds1.Tables[0].Rows.Count > 0)
{
textBox2.Text = ds1.Tables[0].Rows[0]["Name"].ToString();
textBox3.Text = ds1.Tables[0].Rows[0]["Vehicle_Type"].ToString();
textBox4.Text = ds1.Tables[0].Rows[0]["Vehicle_No"].ToString();
textBox7.Text = "0";
textBox8.Text = ds1.Tables[0].Rows[0]["Credits"].ToString();
textBox5.Text = DateTime.Now.ToShortDateString();
textBox6.Text = DateTime.Now.ToShortTimeString();
savereceipt();
sendsms();
// clear();

SIES graduate school of Technology, Nerul, Navi Mumbai Page 51


Department of Computer Engineering

}
}

}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}

5.2.5 ReceiptDetail.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MySql.Data.MySqlClient;

namespace Toll_Collection
{
public partial class ReceiptDetails : Form
{
public ReceiptDetails()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)


{

}
MySqlConnection con = new MySqlConnection("Server=localhost;User
Id=root;Password=;Database=tolltax");

private void ReceiptDetails_Load(object sender, EventArgs e)


{

SIES graduate school of Technology, Nerul, Navi Mumbai Page 52


Department of Computer Engineering

// OleDbConnection con = new


OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=" +
Application.StartupPath + "/tolltax.mdb");
con.Open();
MySqlDataAdapter da = new MySqlDataAdapter("Select * from receipt", con);
DataTable dt = new DataTable();
da.Fill(dt);

dataGridView1.DataSource = dt;

con.Close();

private void button1_Click_1(object sender, EventArgs e)


{
int totalsum=0;
con.Open();
MySqlDataAdapter da = new MySqlDataAdapter("Select * from receipt", con);
DataSet ds = new DataSet();
da.Fill(ds);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
totalsum += Convert.ToInt32( ds.Tables[0].Rows[i]["Balance_Deducted"]);
}
label1.Text = totalsum.ToString();
}

private void dataGridView1_CellContentClick(object sender,


DataGridViewCellEventArgs e)
{

}
}
}

5.2.6 Recharge.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.IO.Ports;

SIES graduate school of Technology, Nerul, Navi Mumbai Page 53


Department of Computer Engineering

using System.Windows.Forms;
using System.Data.OleDb;
using MySql.Data.MySqlClient;

namespace Toll_Collection
{
public partial class Recharge : Form
{
string data;
// OleDbConnection con;
MySqlCommand cmd;
MySqlDataReader rdr;
MySqlConnection con = new MySqlConnection("Server=localhost;User
Id=root;Password=;Database=tolltax");

public Recharge()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)


{
int newcredits = Convert.ToInt32(textBox2.Text) +
Convert.ToInt32(textBox3.Text);
cmd.Connection = con;
con.Open();
cmd.CommandText = "update registration set Credits = '" + newcredits.ToString()
+ "' where U_ID = '" + textBox1.Text + "'";
cmd.ExecuteNonQuery();
MessageBox.Show("Recharge Successful");
con.Close();
}
public delegate void myDelegate();

private void button2_Click(object sender, EventArgs e)


{
try
{
serialPort1.PortName = comboBox1.SelectedItem.ToString();
serialPort1.BaudRate = 9600;
serialPort1.Parity = Parity.None;
serialPort1.DataBits = 8;
serialPort1.StopBits = StopBits.One;
serialPort1.Handshake = Handshake.None;
serialPort1.ReadTimeout = 3000;

SIES graduate school of Technology, Nerul, Navi Mumbai Page 54


Department of Computer Engineering

serialPort1.ReceivedBytesThreshold = 1;
serialPort1.DtrEnable = true;
serialPort1.Open();
this.serialPort1.DataReceived += new
System.IO.Ports.SerialDataReceivedEventHandler(this.serialPort1_DataReceived);
String connection = comboBox1.SelectedItem.ToString();
}
catch (Exception ex)
{
MessageBox.Show("Failed because: " + ex.Message);

}
}

private void Recharge_Load(object sender, EventArgs e)


{
string[] ports = System.IO.Ports.SerialPort.GetPortNames();
for (int i = 0; i < ports.Length; i++)
{
comboBox1.Items.Add(ports[i]);
}
}

private void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs


e)
{
textBox1.Invoke(new myDelegate(updateTextBox));

public void updateTextBox()


{

data = data + serialPort1.ReadExisting();


if (data.Length == 12)
{
textBox1.Text = "";
textBox1.Text = textBox1.Text + data.Substring(1) + "\n";
serialPort1.DtrEnable = false;
DateTimeOffset timeOut = DateTimeOffset.Now.AddMilliseconds(1500);
do
{
Application.DoEvents();
} while (DateTimeOffset.Now > timeOut);
data = serialPort1.ReadExisting();
serialPort1.DiscardInBuffer();

SIES graduate school of Technology, Nerul, Navi Mumbai Page 55


Department of Computer Engineering

data = "";
serialPort1.DtrEnable = true;

}
}

private void textBox1_TextChanged(object sender, EventArgs e)


{
string card;

con.Open();
cmd = new MySqlCommand("Select * from registration where U_ID = '" +
textBox1.Text + "'", con);
rdr = cmd.ExecuteReader();
if (rdr.HasRows)
{
rdr.Read();
card = rdr["U_ID"].ToString();
if (textBox1.Text == card)
{
textBox2.Text = rdr["Credits"].ToString();

}
}
con.Close();

}
}
}

5.2.7 RegDetails.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MySql.Data.MySqlClient;

namespace Toll_Collection
{
public partial class RegDetails : Form
{

SIES graduate school of Technology, Nerul, Navi Mumbai Page 56


Department of Computer Engineering

public RegDetails()
{
InitializeComponent();
}
MySqlConnection con = new MySqlConnection("Server=localhost;User
Id=root;Password=;Database=tolltax");

private void RegDetails_Load(object sender, EventArgs e)


{
con.Open();
MySqlDataAdapter da = new MySqlDataAdapter("Select * from registration",
con);
DataTable dt = new DataTable();
da.Fill(dt);

dataGridView1.DataSource = dt;

con.Close();
}

private void dataGridView1_CellContentClick(object sender,


DataGridViewCellEventArgs e)
{

}
}
}

5.2.8 Registration.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;
using MySql.Data.MySqlClient;

namespace Toll_Collection
{
public partial class Registration : Form
{

SIES graduate school of Technology, Nerul, Navi Mumbai Page 57


Department of Computer Engineering

String data;

public Registration()
{
InitializeComponent();
}

MySqlConnection con = new MySqlConnection("Server=localhost;User


Id=root;Password=;Database=tolltax");
MySqlCommand cmd;

private void Registration_Load(object sender, EventArgs e)


{
string[] ports = System.IO.Ports.SerialPort.GetPortNames();
for (int i = 0; i < ports.Length; i++)
{
comboBox1.Items.Add(ports[i]);
}
}
public delegate void myDelegate();

private void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs


e)
{
textBox1.Invoke(new myDelegate(updateTextBox));
}
public void updateTextBox()
{

data = data + serialPort1.ReadExisting();


if (data.Length == 12)
{
textBox1.Text = "";
textBox1.Text = textBox1.Text + data.Substring(1) + "\n";
serialPort1.DtrEnable = false;
DateTimeOffset timeOut = DateTimeOffset.Now.AddMilliseconds(1500);
do
{
Application.DoEvents();
} while (DateTimeOffset.Now > timeOut);
data = serialPort1.ReadExisting();
serialPort1.DiscardInBuffer();
data = "";
serialPort1.DtrEnable = true;

SIES graduate school of Technology, Nerul, Navi Mumbai Page 58


Department of Computer Engineering

private void button1_Click(object sender, EventArgs e)


{
try
{
serialPort1.PortName = comboBox1.SelectedItem.ToString();
serialPort1.BaudRate = 9600;
serialPort1.Parity = Parity.None;
serialPort1.DataBits = 8;
serialPort1.StopBits = StopBits.One;
serialPort1.Handshake = Handshake.None;
serialPort1.ReadTimeout = 3000;
serialPort1.ReceivedBytesThreshold = 1;
serialPort1.DtrEnable = true;
serialPort1.Open();
this.serialPort1.DataReceived += new
System.IO.Ports.SerialDataReceivedEventHandler(this.serialPort1_DataReceived);
String connection = comboBox1.SelectedItem.ToString();

}
catch (Exception ex)
{
MessageBox.Show("Failed because: " + ex.Message);

}
}

private void button2_Click(object sender, EventArgs e)


{
con.Open();

cmd = new MySqlCommand("insert into registration values('" + textBox2.Text +


"', '" + textBox1.Text + "' , '" + textBox6.Text + "' , '" + comboBox2.SelectedItem + "' , '"
+ textBox3.Text + "' , '" + textBox4.Text + "' , '" + textBox5.Text + "' )", con);
if (cmd.ExecuteNonQuery() != 0)
{
MessageBox.Show ("Records inserted");

}
else
{
MessageBox.Show ("Error");
}
con.Close();

SIES graduate school of Technology, Nerul, Navi Mumbai Page 59


Department of Computer Engineering

}
}

5.3 Output Generated

Fig 5.1 Acknowledgement SMS

The Fig. 5.1 shows the output of the system as an SMS to the user which gives the
transaction details of the current transaction. This SMS shows a toll collection of a light
vehicle deducted with 50rs. The first SMS received just records the timestamp of when
the vehicle enters the Toll Plaza. The second SMS is generated when the vehicle exits the

SIES graduate school of Technology, Nerul, Navi Mumbai Page 60


Department of Computer Engineering

Toll Plaza, and the toll amount is deducted from the balance according to the type of
vehicle. (In this case light vehicle)

Fig 5.2 Acknowledgement SMS

The Fig. 5.2 shows the output of the system as an SMS to the user which gives the
transaction details of the current transaction. This SMS shows a toll collection of a heavy
vehicle deducted with 100rs. The first SMS received just records the timestamp of when
the vehicle enters the Toll Plaza. The second SMS is generated when the vehicle exits the
Toll Plaza, and the toll amount is deducted from the balance according to the type of
vehicle. (In this case heavy vehicle)

SIES graduate school of Technology, Nerul, Navi Mumbai Page 61


Department of Computer Engineering

5.4 User/Operational Manual

1) If the user is not registered then he must register himself by providing his details.
Here he will set his id and password.
2) When the user registers for the first time he gets a RFID tag which is attached on the
car, the tag must not be tampered with or will be banned.
3) While registering the user must choose the kind of vehicle he will be using a Light or
Heavy Vehicle.
4) If the user is already registered then he can directly pass the toll booth and the toll
amount will be automatically deducted from the users account.
5) In case the user has insufficient balance he will be informed so via an SMS and can
recharge his account accordingly.
6) If the transaction has been successful the transaction receipt will be sent to the user
via an SMS.
7) While travelling if the user comes back before a limited time period then only half the
amount will be deducted from the account.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 62


Department of Computer Engineering

CHAPTER 6
RESULTS AND DISCUSSION

Our project uses the power of the RFID Technology to make an easy and quick toll
collection, completely eliminating the need to stop at toll booths as in traditional toll
collection approaches. The project not only reduces time of the users but also gives them
a proper feedback of their account from time to time informing them of the current
balance and warning them when they are on low balance to prompt them to recharge their
account before they use the toll booth again.

The RFID Technology is under constant progress since it’s a solution to a variety of
problems. Powerful RFID readers are now available with a reading range of 100fts and
which can transfer data at much faster rate. This can be combined with a high resolution
camera to capture images of car owner and license plate, and provide much more
advanced services to the users.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 63


Department of Computer Engineering

CHAPTER 7
CONCLUSION AND FUTURE WORK

7.1 Conclusion
By the implementation of the proposed system not only would we ease the vehicle user’s
accessibility of Toll Ways, but also minimize the time wastage at Toll Booths. As the
vehicles will not have not stop or pause at Toll Booths for payment. This in turn leads to
several other benefits for the motorist such as fuel savings and reduced mobile emissions.
This technology can be extended to provide many other facilities such as traffic
monitoring for surveillance purposes, traffic handling by informing user about which
roads have more congestion and it can also be used to track blacklisted cars. The other
benefits for the toll operators include:
1) The overall toll collection cost will be reduced as the toll collection is now automated
and there is no need of manual collection.
2) Reduces wastage of resources such as paper which is used for printing tickets and toll
passes.
3) Expanded capacity without building more infrastructures.

7.2 Future Work


There is always scope for improvement in any system as research & development is an
endless process.
The following advancements can be done:
1) The RFID readers could be more sophisticatedly used along the road so that they can
determine the traffic at any road and guide the users to use a separate path for
efficient traffic handling.
2) The car number can be tracked to locate black listed cars and be informed to the
police immediately.
3) Defaulters can be given a warning message to recharge their account when their
account has low balance.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 64


Department of Computer Engineering

REFERENCES:

[1] Don, “Electronic Toll Collection: An Introduction and Brief Look at Potential
Vulnerabilities,” in Sans Institute InfoSec Reading Room, 1.4b ed. 2004.
[2] S.Lauren, B. Mariko (2007, June 20).Electronic Toll Collection [Online]. Available:
http://www.atm.com
[3] C.M. Roberts, “Radio Frequency Identification (RFID),” Computers & Security,
Elsevier, 2006.
[4] L. Jerry, C. Barbara “Shrouds of Time: The History of RFID”, AIM Publication,
ver. 1.0, 2001.
[5] M. Ayoub Khan, S. Manoj and R. B. Prahbu “A Survey of RFID Tags”,
International Journal of Recents Trends in Engineering, vol 1, no 4, May 2009
[6] The Basics of RFID, Veri-Logic, LLC, 2003.
[7] MykePredko, Programming and Customizing the 8051 Microcontroller, Edition
1999, Tata McGraw-Hill, Page: 157-167.
[8] Muhammad Ali Mazidi, Janice GillispieMazidi, 8051 Microcontroller and
Embedded Systems, Prentice-Hall, Page: 183-193, 236, and 243.
[9] Dogan Ibrahim, Microcontroller Projects in C for the 8051, Newnes, Page: 29-161.
[10] Kenneth J. Ayala, the 8051 Microcontroller ARCHITECTURE, PROGRAMMING
and APPLICATIONS, WEST PUBLISHING COMPANY, Page: 131-197.
[11] James R. Groff, Paul N. Weinberg, SQL: The Complete Reference, First Edition,
Osborne/McGraw-Hill, ISBN 0-07-211845-8.
[12] “India's first electronic toll collection system launched on Ahmedabad-Mumbai
Highway” April 12, 2013, The Economic Times.
[13] “Radio frequency identification sticker could replace Smart Tag”, September 9
2013, CBT Team.

SIES graduate school of Technology, Nerul, Navi Mumbai Page 65

Вам также может понравиться