You are on page 1of 55

MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

CHAPTER 1

INTRODUCTION

1
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

1.1 Description
Automatic Toll Collection (ATC) is a technology that allows for electronic
payment of tolls. An ATC system is able to determine if a car is registered in a toll
payment program, alerts enforcers of toll payment violations, and debits the
participating account. With ATC, these transactions can be performed while vehicles
travel at near highway cruising speed. ATC is fast becoming a globally accepted
method of toll collection, ATC systems are an improvement over conventional toll
collection techniques. Some of the benefits for drivers include:
Fewer and shorter queues at toll plazas by increasing toll booth service rates;
Faster and more efficient service—the customer does not need to stop or have toll fees
on hand;
The ability to pay by keeping a balance on the customer’s account or charging a
registered credit card;
Mailed toll statements—the customer no longer has to request a receipt.
Some of the benefits for toll operators include:
• Lowered toll collection costs;
• Better audit control by centralized user accounts;
• Expanded capacity without being required to build more infrastructures.
• For everyone, some of the benefits of ETC include:
• Fuel savings;
• Reduced mobile emissions by reducing or eliminating deceleration, waiting
times, and acceleration;
• Possible reduced drain on public monies, if the system is more self-sustaining
or if the system was built/run via a public-private partnership arrangement.

1.2 Operation:
Present project is designed using PIC microcontroller to avoid long queues at
toll plazas and also saves the time consumed during manual payment of the toll tax.
This project utilizes RFID module to read the smart card. And optocoupler is used to
sence the presence of vehicle . As the optocoupler senses the presence of vehicle
“ENTER YOUR CARD” will be displayed on LCD . Then driver will have to punch
card on RFID module . Then RFID module will scan the card . Here different cards

2
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

are used for heavy and light vehicle depending upon the size of vehicle . As the card
will be punched on RFID module it will show the present balance, amount deducted
and current balance on LCD. Then stepper motor will open the gate. In this
ULN2004 IC is also used to drive the stepper motor to open the gate. And after this
payment the gate will get opened for few seconds and then get closed automatically.
The corresponding details regarding the whole operation will get displayed on the
LCD. Whenever someone punches the card in a wrong manner “INVALID USER”
will be displayed on the LCD.

1.3 Block Diagram

Figure 1.1: Block Diagram of Intelligent Toll Tax System


1.4 Working:

3
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

In this circuit we use 12V transformer. One voltage regulator


7805 is providing 5V DC supply. Since to run the project we need a
total of 12V DC supply, so externally a battery ranging from 6V to 9 V
is connected. A full wave bridge rectifier has been used to convert AC
voltage to DC voltage.
One opto-couplers are connected at pin 15 of microcontroller. When
there is no obstacle means zero volt output is send to pin 15 of
microcontroller. But when an obstacle is detected then 5V is generated
at output and is send to pin 15 of microcontroller. So when the card is
punched on the RFID module electromagnetic field is generated
between card and module and a corresponding electrical is generated at
the output. It means that the gate will get opened but before that credit
will get reduced from the card and will get displayed on the LCD.
The gate will get opened for a few seconds and then will
close automatically. The opening and closing of gate will also get
displayed on the LCD. If anyone tries to open the gate in a wrong
manner ( ie. By using invalid card ) then “INVALID USER” will be
displayed on the LCD screen ensuring security and safety. Here we
have used two different smart card for “ HEAVY ” and “ LIGHT ”
vehicle. As the optocoupler will sense the presence of vehicle then
“ENTER YOUR CARD” will be displayed on LCD screen. Then smart
card will have to be scanned on RFID module whitch will display the
present balance in the card, amount deducted from the card, and
balance after deduction on the LCD screen and then stepper motor will
pull up the barrier for some time and then stepper motor will pull down
the barrier automatically. And “ THANK YOU ” will be displayed on
LCD screen when vehicle has moved from toll tax plaza.

1.5 Circuit Diagram:

4
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

Figure 1.2: Circuit Diagram of Intelligent Toll Tax System

5
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

CHAPTER 2

LITERATURE: A REVIEW

2.1 EMBEDDED SYSTEMS


An embedded system is a combination of hardware and software design to
meet a specific need with performance in a given time frame. It is a specialized
computer system that is a part of larger system on machine. Typically an embedded
system is housed on a single microcontroller board with programs stored in ROM.

6
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

Virtually all appliances which have a digital interface—watches, microwaves, cars—


utilize embedded systems include an operating system, but many are so specialized
that the entire logic can be implemented as a single program. An embedded controller
is a controller (or computer) that is embedded into some device for some purpose
other than to provide general purpose computing.
It is a special –purpose system in which the computer is completely
encapsulated by the device it controls. Unlike a general-purpose computer, such as a
personal computer, an embedded system performs pre-defined tasks, usually with
very specific requirements. Since the system is dedicated to a specific task, design
engineers can optimize it, reducing the size and cost of product. Embedded systems
are often mass produced, so the cost savings may be multiplied by millions of items.
Hand held computers or PDAs are generally considered embedded devices because of
the nature of their hardware design, even though they are more expandable in
software terms. This line of definition continues to blur as devices expand. Embedded
systems are a combination of hardware as well as software.
The software written for embedded systems is often called firmware, and is
stored in ROM or FLASH memory chips rather than a disk drive. It often runs with
limited hardware resources: small or no keyboard, screen, and little RAM memory.
Embedded systems are designed to do some specific task, rather than be a general
purpose computer for multitasks. Some also have real-time performance constraints
that must be met, for reasons such as safety and usability: others may have low or no
performance requirements, allowing the system hardware to be simplified to reduce
costs.

7
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

Digital Circuits
Decoder, latches
etc.

Passive Analog Circuits


components OPAMP, ADC,
Resistance, DAC
Capacitance, Hardware etc.
Transistors etc.

Printed Electro-
Circuit mechanical
Boards Motors,
(PCB’s) Valves etc.

Machine
Language

Java/J2EE SOFTWARE Assembly


Language

Embedded C,
C++

Figure2.1: Hardware & Software of Embedded System

2.2 MICROCONTROLLER

8
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

Microprocessors are intended to be general purpose digital computers .Micro


controllers are intended to be special purpose digital controllers .It has a fixed
program stored in ROM and doesn’t change over the life time of system. Eight bit
CPU with registers A and B sixteen bit program counter and data pointer. Eight bit
program status word. Eight bit stack pointer. Internal ROM of 4K.Internal RAM of
126 bytes:

-Four register banks, each containing eight registers

-Sixteen bytes, which may be addressed at bit level

-Eighty bytes of general-purpose data memory

Thirty two input/output pins arranged as four 6-bit ports: P0-P3.Two 16-bit
timer/counters: T0 and T1.Full duplex serial data receiver/Transmitter: SBUF.
Control register: TCON, TMOD, SCON, PCON, IP, and One-Two external and three
internal interrupt sources. Oscillator and clock circuits Microcontroller is a single chip
computer.

2.3 History of the Microcontroller


1st microprocessor Developed by Intel Corporation in the year 1971, First 6-bit
microcontroller called as 6051 in 1961.It was called as a “System on a chip”
Most microcontrollers at this time had two variants. One had an
erasable EPROM program memory, which was significantly more expensive than
the PROM variant which was only programmable once.

In 1993, the introduction of EEPROM memory allowed microcontrollers (beginning


with the Microchip PIC16x64) to be electrically erased quickly without an expensive
package as required for EPROM, allowing both rapid prototyping, and In System
Programming. The same year, Atmel introduced the first microcontroller using Flash
memory.

9
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

Fig.2.2 PIC Microcontroller

2.4 MICROCONTROLLER CAN BE CLASSIFIED

4 – Bit microcontroller
8 – Bit microcontroller
16 – Bit microcontroller
32 – Bit microcontroller
64 – Bit microcontroller

2.4.1 4 – BIT MICROCONTROLLERS:

• Most popular microcontroller made in terms of production numbers


• Economical
• Application: appliances and toys

2.4.2 8 – BIT MICROCONTROLLERS:

• Represent a transition zone between dedicated, high-volume, 4-bit micro-


controllers and the high performance 16 bit microcontrollers

• 6 – bit word size adequate for many computing tasks and control or
monitoring applications.

10
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

• Application: simple appliance control, high-speed machine control, data


collection
2.4.3 16 – BIT MICROCONTROLLERS:
• Provide faster response and more sophisticated calculations
• Applications: control of servomechanism like robot arms

2.4.4 32 – BIT MICROCONTROLLERS:


• Design emphasis is more on high speed computation features and not on chip
features like RAM, ROM, Timers, etc.

• Applications: robotics, highly intelligent instrumentation, avionics, image


processing, telecommunications, automobiles, etc.
Example: Intel 60960, ARM

2.4.5 64 – BIT MICROCONTROLLERS:


Applications: advanced robotics, industries, automation.

11
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

2.5 PIN DIAGRAM OF PIC16F677A

Fig 2.3 PIC16F677A

2.6 PIN DESCRIPTION:-

12
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

Table 2.1 Pin description of PIC16F877A


Pin Name Pin Number Pin Type Buffer Type Description
PDIP
MCLR/VPP/RE3 1 I ST Master Clear (input) or programming
MCLR voltage (input).
Master Clear (Reset) input.
This pin is an active-low
Reset to the device.

VPP Programming voltage input.

RE3 Digital input


OSC1/CLKI/RA7 13 Oscillator crystal or external clock
input.
OSC1 I ST Oscillator crystal input or external
clock source input.
ST buffer when configured in RC
mode; CMOS otherwise.

External clock source input. Always


CLKI I CMOS associated with pin
function OSC1. (See related
OSC1/CLKI, OSC2/CLKO pins.)

RA7 I/O TTL General purpose I/O pin.


OSC2/CLKO/RA6 14 Oscillator crystal or clock output.
OSC2 O Oscillator crystal output. Connects to
crystal oscillator in Crystal Oscillator
mode.
CLKO O In RC mode, OSC2 pin outputs
CLKO which has ¼ the frequency of
OSC1 and denotes the instruction

13
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

cycle rate.

RA6 I/O TTL General purpose I/O pin.


RA0/AN0/CVREF 2
RA0 I/O TTL Digital I/O.
AN0 I ANALOG Analog input 0.
CVREF O Analog Comparator Reference
output.
RA1/AN1 3
RA1 I/O TTL
AN1 I ANALOG Digital I/O.
Analog input 1.

RA2/AN2/VREF 4
RA2 I/O TTL Digital I/O.
AN2 I ANALOG Analog input 2.
VREF- A/D Reference Voltage (Low) input.

RA3/AN3/VREF+ 5
RA3 I/O TTL Digital I/O.
AN3 I ANALOG Analog input 3.
VREF+ I A/D Reference Voltage (High) input.

RA4/T0CKI 6
RA4 I TTL Digital I/O.
T0CKI ST Timer0 external clock input

RA5/AN4/SS/HLVDIN 7 I/O
RA5 I TTL Digital I/O.
AN4 I ANALOG Analog input 4.
SS I TTL SPI™ Slave Select input.
HLVDIN ANALOG High/Low-Voltage Detect input.
I/O

14
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

RA6 14 See the OSC2/CLKO/RA6 pin.


I/O
RA7 13 See the OSC2/CLKO/RA7 pin.

PORTB is a bidirectional I/O port.


PORTB can be software programmed
for internal weak pull-ups on all
Inputs.
Digital I/O.
RB0/INT0/FLT0/AN10 33
RB0 I/O TTL External interrupt 0.
INT0 I ST Enhanced PWM Fault input (ECCP1
FLT0 I ST module).

AN10 I ANALOG Analog input 10.

RB1/INT1/AN6 34
RB1 I/O TTL Digital I/O.
INT1 I ST External interrupt 1.
AN6 I ANALOG Analog input 6.

RB2/INT2/CANTX 35
RB2 I/O TTL Digital I/O.
INT2 I ST External interrupt 2.
CANTX O TTL CAN bus TX

RB3/CANRX 36
RB3 I/O TTL Digital I/O.
CANRX I TTL CAN bus RX.

RB4/KBI0/AN9 37

15
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

RB4 I/O TTL


KBI0 I TTL Digital I/O.
AN9 I ANALOG Interrupt-on-change pin.
Analog input 9.
RB5/KBI1/PGM 36
RB5 I/O TTL Digital I/O.
KBI1 I TTL Interrupt-on-change pin.
PGM I/O ST Low-Voltage ICSP™ programming
enable pin.
RB6/KBI2/PGC 39
RB6 I/O TTL Digital I/O.
KBI2 I TTL Interrupt-on-change pin.
PGC I/O ST In-Circuit Debugger and ICSP
programming clock pin.
RB7/KBI3/PGD 40
RB7 I/O TTL Digital I/O.
KBI3 I TTL Interrupt-on-change pin.
PGD I/O ST In-Circuit Debugger and ICSP
programming data pin.
PORTC is a bidirectional I/O port.

RC0/T1OSO/T13CKI 15 Digital I/O.


RC0 I/O ST Timer1 oscillator output.
T1OSO O Timer1/Timer3 external clock input.
T13CKI I ST
Digital I/O.
RC1/T1OSI 16 Timer1 oscillator input.
RC1 17 I/O ST
T1OSI I CMOS
Digital I/O.
RC2/CCP1 Capture1 input/Compare1
RC2 16 I/O ST output/PWM1 output.
CCP1 I ST

16
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

Digital I/O.
RC3/SCK/SCL Synchronous serial clock input/output
RC3 I/O ST for SPI™ mode.
SCK I/O ST Synchronous serial clock input/output
SCL 23 I/O ST for I2C™ mode.

RC4/SDI/SDA Digital I/O.


RC4 SPI data in.
SDI I/O ST I2C data I/O.
SDA 24 I ST
I/O ST
RC5/SDO Digital I/O.
RC5 25 SPI data out.
SDO I/O ST
O
RC6/TX/CK Digital I/O.
RC6 26 EUSART asynchronous transmit.
TX I/O ST EUSART synchronous clock (see
O related RX/DT).

CK I/O ST
Digital I/O.
EUSART asynchronous receive.
RC7/RX/DT EUSART synchronous data (see
RC7 ST related TX/CK).
RX ST

DT ST
RE3 See MCLR/VPP/RE3 pin.
VSS 12,31 Ground reference for logic and I/O
pins.
VDD 11,32 Positive supply for logic and I/O pins
PORTD is a bidirectional I/O port or

17
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

a Parallel Slave
Port (PSP) for interfacing to a
microprocessor port. These pins have
TTL input buffers when PSP module
enabled.
RD0/PSP0/C1IN+ 19
RD0 Digital I/O.
PSP0 I/O Parallel Slave Port data.
C1IN+ I/O Comparator 1 input (+).
I ST
RD1/PSP1/C1IN 20 TTL
RD1 ANALOG Digital I/O.
PSP1 I/O Parallel Slave Port data.
C1IN- I/O Comparator 1 input (-)
I ST
RD2/PSP2/C2IN+ 21 TTL
RD2 ANALOG Digital I/O.
PSP2 I/O Parallel Slave Port data.
C2IN+ I/O Comparator 2 input (+).
I ST
RD3/PSP3/C2IN TTL
RD3 22 ANALOG Digital I/O.
PSP3 I/O Parallel Slave Port data.
C2IN- I/O Comparator 2 input (-).
I ST
RD4/PSP4/ECCP1/ 27 TTL
P1A ANALOG Digital I/O.
RD4 I/O Parallel Slave Port data.
PSP4 I/O Capture2 input/Compare 2
ECCP1 I/O output/PWM2 output.
P1A I/O ECCP1 PWM output A.
O
RD5/PSP5/P1B

18
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

RD5 26 Digital I/O.


PSP5 I/O Parallel Slave Port data.
P1B I/O ECCP1 PWM output B.
I/O
RD6/PSP6/P1C
RD6 29 Digital I/O.
PSP6 Parallel Slave Port data.
P1C ECCP1 PWM output C.

RD7/PSP7/P1D
RD7 30 Digital I/O.
PSP7 Parallel Slave Port data.
P1D ECCP1 PWM output D.

PORTE is a bidirectional I/O port.

RE0/RD/AN5 Digital I/O.


RE0 6 Read control for Parallel Slave Port
RD I/O (see also WR
I and CS pins).
AN5 I Analog input 5.

RE1/WR/AN6/C1OUT Digital I/O.


RE1 9 Write control for Parallel Slave Port.
WR Analog input 6.
Comparator 1 output.
AN6 I/O
C1OUT I/O
Digital I/O.
RE2/CS/AN7/C2OUT I/O Chip Select control for Parallel Slave
RE2 10 I/O Port (see related RD and WR).
CS Analog input 7.

19
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

Comparator 2 output.
AN7 I/O
C2OUT I

2.7 DIFFERENCE BETWEEN MICROPROCESSOR AND


MICROCONTROLLER
Table 2.2 Microprocessor vs. Microcontroller
Microprocessor Micro-controller

1. Contain no on chip ram, rom, i/o, timer, 1. Contain on chip ram, rom, i/o, timer, serial
serial port. port.
2. used in general purpose application 2. used in specific purpose application

3. Don’t provide data storage facility. 3. Provides data storage facility.

4. the structure of µp is given below 4. the structure of µp is given below

20
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

CHAPTER 3

COMPONENT LIST
AND
DETAILS

3.1 Component List

• PIC microcontroller
• ULN2004
• U-Shape opto-coupler
• Capacitors
• Resistances
• Transformer

21
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

• Crystal oscillator
• LED
• Diode
• LCD
• IC 7805CV voltage regulator
• Stepper motor
• Power supply
• CCB
• RFID module
• Switches
• Potentiometer
• 2 & 5 pin connector (male)

3.2 COMPONENT DESCRIPTION

3.2.1 FEATURES OF PIC16F877A MICROCONTROLLER

•C-Language friendly architecture


•Linear program memory addressing to 2 Mbyte
• Linear data memory addressing up to 4 Kbytes
• Up to 10 MIPs operation:
– DC - 40 MHz osc/clock input

22
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

– 4 MHz - 10 MHz clock with PLL active


• 16-bit wide instructions, 6-bit wide data path
•Up to three 16-bit timer/counters
•In-Circuit Serial Programming TM (ICSPTM) via two pins
•10-bit Analog-to-Digital Converter module (A/D)
•Wide operating voltage range (2.0V to 5.5V)

3.2.2 Opto-Couplers
Description
The MCT2XXX series opt isolators consist of a gallium arsenide infrared
emitting diode driving a silicon phototransistor in a 6-pin dual in-line package.

Figure 3.1 Optocoupler


There are many situations where signals and data need to be transferred from one
subsystem to another within a piece of electronics equipment, or from one piece of
equipment to another, without making a direct electrical connection. Often this is
because the source and destination are (or may be at times) at very different voltage
levels. Relays provide this kind of isolation, but even small relays tend to be fairly
bulky compared with ICs and many of today’s other miniature circuit components.
Because they’re electro-mechanical, relays are also not as reliable and only capable of
relatively low speed operation. Where small size, higher speed and greater reliability
are important, a much better alternative is to use an optocouplers. These use a beam of
light to transmit the signals or data across an electrical barrier, and achieve excellent
isolation. Optocouplers typically come in a small 6-pin or 8-pin IC package, but are
essentially a combination of two distinct devices: an optical transmitter, typically a

23
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

gallium arsenide LED (light-emitting diode) and an optical receiver such as a


phototransistor or light-triggered diac. The two are separated by a transparent barrier
which blocks any electrical current flow between the two, but does allow the passage
of light. The basic idea along with the usual circuit symbol for an
Optocoupler.Usually the electrical connections to the LED section are brought out to
the pins on one side of the package and those for the phototransistor or diac to the
other side, to physically separate them as much as possible. This usually allows
optocouplers to withstand voltages of anywhere between 500V and 7500V between
input and output. Optocouplers are essentially digital or switching devices, so they’re
best for transferring either on-off control signals or digital data. Analog signals can be
transferred by means of frequency or pulse-width modulation.

3.2.3 TYPES OF CAPACITORS:


Depends upon the basis of dielectric used:
• Air insulated & vacuum capacitors
• Paper insulated capacitors
• Mica capacitors
• Plastic film capacitors
• Ceramic capacitors
• Electrolytic & tantalum capacitors

1. CERAMIC CAPACITOR:
In this project, 0.01 microfarad capacitor is a ceramic capacitor.
The basis of the ceramic material is mainly barium titan ate or a similar material, but
other ceramic substance including hydrous silicate of magnesia or talc are also used.
The electrodes are applied in the form of silver which is either spread or plated on to
the opposite faces of a thin tube, wafer or disc made from the ceramic material.

24
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

Figure 3.2 Tabular and Disc Type Ceramic Capacitor

Connecting wires are then soldered to this deposit and the whole capacitor dipped in
for a suitable coating. The two conducting places separated by an insulating material
(called dielectric) forms a capacitor. The basic purpose of a capacitor is to store the
charge. The capacity of a capacitor to store charge per unit potential difference is
called capacitance which is measured in Farads but the practical units are
micro/nano/pico farads. The capacitor also offers low impedance to AC but very high
impedance to DC. The applications include coupling, bypassing and filtering for AC
signal. Capacitors are of various types that include paper, Mica, Ceramic &
Electrolytic. The capacitors can also be of either variable or fixed type. The capacitors
used in the project are fixed: ceramic or electrolytic type.

2. Electrolytic Capacitor: In this project, 10µf capacitor is an electrolytic capacitor.


In this type of capacitors, the dielectric consists of an extremely thin film of
aluminum oxide formed on one of its aluminum foil plates. Intimate contact with the
other plate is achieved by impregnating the paper between the foils with an electrolyte
in the form of viscous substance, such as ammonium borate. The sandwich is then
rolled into a cylindrical element and housed in either metallic cardboard, plastic or
ceramic protective tube.

25
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

Figure 3.3 Electrolytic and Tantalum capacitor

3.2.4 Transformer:
A Transformer is a static piece of apparatus by means of which electric power
in one circuit is transformer in to electric power of the same frequency in another
circuit. It a raise or lower the voltage in a circuit decrease or increase in current. The
physical basis of a Transformer is natural induction between tow circuits linked by a
common magnetic flux. According to construction there are two type of Transformer
know as:-

a. Core Type Transformer: The coil used is form wound and is of the cylindercal
type. The general form of these coil may be circular or over all rectangular. In small
size core type Transformer a simple rectangular core is used with cylinder cal coil is
used which are so wound as to fit over a cruciform core sections.

b .Shell Type Transformer: In shell type Transformer the coil are form wound but
are multi layer disc type usually wound in the form of pancakes. The different layers
of such multi layer disc are insulated form each other by paper. The completed
winding consists of takes disc with insulation space between the coils.

A 1

D1 D3

AC
3 Load 4
Supply
+ -

D4 D2

B 2

26
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

Figure 3.4 Transformer

3.2.5 Crystal Oscillator:


Crystal oscillators are oscillators where the primary frequency determining
element is a quartz crystal. Because of the inherent characteristics of the quartz crystal
the crystal oscillator may be held to extreme accuracy of frequency stability.
Temperature compensation may be applied to crystal oscillators to improve thermal
stability of the crystal oscillator. Crystal oscillators are usually, fixed frequency
oscillators where stability and accuracy are the primary considerations. For example it
is almost impossible to design a stable and accurate LC oscillator for the upper HF
and higher frequencies without resorting to some sort of crystal control. Hence the
reason for crystal oscillators. The frequency of older FT-243 crystals can be moved
upward by crystal grinding. A practical example of a Crystal Oscillator This is a
typical example of the type of crystal oscillators which may be used for say
converters. Some points of interest on crystal oscillators in relation to figure 1.

Figure 3.5 Schematic of a Crystal Oscillator

The transistor could be a general purpose type with a Ft of at least 150 MHz for HF
use. A typical example would be a 2N2222A. The turn’s ratio on the tuned circuit
depicts an anticipated nominal load of 50 ohms. This allows theoretical 2K5 ohms on
the collector. If it is followed by a buffer amplifier (highly recommended) I would
simply maintain the typical 7:1 turn’s ratio. I have included a formula for determining
L and C in the tuned circuits of crystal oscillators in case you have forgotten earlier
tutorials.

3.2.7 LED:
27
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

LED falls within the family of P-N junction devices. The light emitting diode
(LED) is a diode that will give off visible light when it is energized. In any forward
biased P-N junction there is, within the structure and primarily close to the junction, a
recombination of holes and electrons. This recombination requires that the energy
possessed by the unbound free electron be transferred to another state. The process of
giving off light by applying an electrical source of energy is called
electroluminescence. As shown in fig., with its graphic symbol, the conducting
surface connected to the P-material is much smaller, to permit the emergence of the
maximum number of photons of light energy. Note in the figure that the
recombination of the injected carriers due to the forward-biased junction results in
emitted light at the site of recombination. There may, of course, be some absorption
of the packages of photon energy in the structure itself, but a very large percentage are
able to leave, as shown in the figure.

Figure 3.6 LED


3.2.8 Diode:
It is a P-type region and N-type region formed in the same crystal structure,
and hence a P-N junction is produced. Some of the conduction electrons near the
junction diffuse in to P-type semiconductor from the N-type semiconductor across the
junction combing with the holes. The loss of electrons makes the N-type
semiconductor positively charged and hence the neutralization of the holes on the
other hand makes P-type semiconductor negatively charged. This region where
positive and negative charges develop is called depletion region.

Figure 3.7 Diode

28
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

If a P-region is made positive with respect to the N-region by an external circuit then
junction is forward biased and junction has a very low resistance to the flow of
current. Holes in the positive P-type material are attracted across the junction to the
negative side and the free electrons in the N-type material are like wise attracted to
the opposite side. If a positive voltage is applied to N-zone with respect to the P-zone
terminal, the P-N junction is reverse biased.

Figure 3.8 Volt-Ampere Characteristics of a P-N Diode

3.2.9 LCD
A liquid crystal display (LCD) is a thin, flat display device made up of number
of colors and monochrome pixels arrayed in front of a light source or reflector. It is
often utilized in battery powered electronic devices because it uses small amount of
electric power.

TYPES OF LCD:
LCD can break into two groups
a. Graphics LCD:
• Easy to use
• Work in most microcontrollers
• Idle for moving display
• Inexpensively priced

b. Character LCD
• Standard type
• Use HD 44780 controller
29
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

• Work in almost any microcontroller


• Great pricing value

LCD Pins:
• 8 Data Pins D0-D7: Bidirectional data/command pins. Alphanumeric
characters are send in ASCII format.
• RS: Register Select: RS=0 implies command register is selected.
RS=1 implies data register is selected
• R/W: Read Or Write: 0-> Write, 1-> Read

3.2.10 IC-7805
78XX Series are three terminal +ve fixed voltage regulators these are available with
seven output options i.e. (5v, 6v, 7v, 12,15v & 24v) and 79xx series are terminal fixed
voltage negative regulators.
Characteristics
• Vo- The regulated out put voltage is fixed at a value which is specified by
manufactures and it is indicated by the IC number.
• Vin- The unregulated input must be at least 2v more than regulated out put
voltage.
• Io max- The out put current on the load may vary from zero to maximum out
put current and to protect it from thermal breakdown heat sinks are used.
• Thermal Shut Down-There is internal temperature sensors which turn OFF
the IC when it becomes too hot. The IC again starts working when it is cooling
up to given specified level.

30
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

Figure 3.9 IC-7805

3.2.11 Power Supply

A 1 7805

D1 D3
1000 µF + +
AC
3 4
Supply - -

D4 D2

B 2

Figure 3.10 Power Supply


BRIDGE RECTIFIERS
Bridge rectifier circuit consists of four diodes arranged in the form of a bridge as
shown in figure.
OPERATION:
During the positive half cycle of the input supply, the upper end A of the
transformer secondary becomes positive with respect to its lower point B. This makes
Point1 of bridge positive with respect to point2. The diode D1 & D2 become forward
biased & D3 & D4 become reverse biased. As a result a current starts flowing from
point1, through D1 the load & D2 to the negative end. During negative half cycle,
the point2 becomes positive with respect to point1. Diodes D1 & D2 now become
reverse biased. Thus a current flow from point 2 to point1.

3.2.12 RFID module:-


RFID is only one of numerous technologies grouped under the term
Automatic Identification (Auto ID), such as bar code, magnetic inks, optical character
recognition, voice recognition, touch mem-ory, smart cards, biometrics etc. Auto ID
technologies are a new way of controlling information and material flow, especially
suitable for large production networks.

31
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

The RFID technology is a means of gathering data about a certain item without the

need of touch-ing or seeing the data carrier, through the use of inductive coupling or

electromagnetic waves. The data carrier is a microchip attached to an antenna

(together called transponder or tag), the latter enabling the chip to transmit

information to a reader (or transceiver) within a given range, which can forward the

information to a host computer. The middleware (software for reading and writing

tags) and the tag can be enhanced by data encryption for security-critical application

at an extra cost, and anti-collision algorithms may be implemented for the tags if

several of them are to be read simultaneously.

One important feature enabling RFID for tracking objects is its capability to provide
unique identification. One possible approach to item identification is the EPC
(Electronic Product Code) , pro-viding a standardized number in the EPC global
Network, with an Object Name Service (ONS) pro-viding the adequate Internet
addresses to access or update instance-specific data. However, currently, ONS cannot
be used in a global environment, and since it is a proprietary service, its use is
relatively expensive, especially for participants with limited resources such as SMEs.
As an alter-native, researchers from the Helsinki University have proposed the
notation ID@URI, where ID stands for an identity code, and URI stands for a
corresponding Internet address. This allows several partners to use the system and still
guarantee unique identification.

2. TYPES OF TAGS AND READERS

Table 3.1 Types of tags and readers


RFID tags and readers can be grouped under a number of categories. Their classification is
pre-sented in Table 1. Classification of RFID tags
Passive
- also called ‘pure passive’, ‘reflective’ or
‘beam powered’
- obtains operating power from the reader
- the reader sends electromagnetic waves that
induce current in the tag’s antenna, the tag
reflects the RF signal transmitted and adds

32
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

information by modulating the reflected


signal

Semi-passive
- uses a battery to maintain memory in the tag
or power the elec-tronics that enable the tag to
modulate the reflected signal
- communicates in the same method, as the
other passive tags

Active
- powered by an internal battery, used to run
the microchip’s cir-cuitry and to broadcast a
signal to the reader
- generally ensures a longer read range than
passive tags
- more expensive than passive tags (especial
because usually are read/write)
- the batteries must be replaced periodically

By the tag’s memory type


Read-only
- the memory is factory programmed, can not
be modified after its manufacture
- its data is static
- a very limited quantity of data can be stored,
usually 96 bits of in-formation
- can be easily integrated with data collection
systems
- typically are cheaper than read-write tags

Read-write
- can be as well read as written into
- its data can be dynamically altered
- can store a larger amount of data, typically
ranging from 32 kBytes to 128 kbBytes
- being more expensive than read-only chips,
is impractical for tracking inexpensive items

By the method of wireless signal used for communication between the tag and reader
Induction - Close proximity electromagnetic, or
inductive coupling—near field
- Generally use. LF and HF frequency bands
Propagation - Propagating electromagnetic waves—far
field
- Operate in the UHF and microwaves
frequency bands

33
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

CHAPTER 4

PCB LAYOUT
AND
34
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

PREPRATION

4.1 P.C.B. Layout

35
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

Fig 4.1 PCB layout

The entire circuit can be easily assembled on a general purpose PCB board
respectively. Layout of desired diagram and preparation is first and most important
operation in any printed circuit board manufacturing process. First of all layout of
component side is to be made in accordance with available components dimensions.

The following points are to be observed while forming the layout of PCB.
• Between two components, sufficient space should be maintained.
• High voltage/max dissipated components should be mounted at sufficient
distance from semiconductors and electrolytic capacitors.
• The most important points are that the component layout is making proper
compromise with copper side circuit layout.
• Printed circuit boards (PCBs) are used to avoid most of all the disadvantages
of conventional breadboard. These also avoid the use of thin wires for
connecting the components; they are small in size and efficient in
performance.

4.2 Preparing Circuit Layout:


First of all the actual size circuit layout is to be drawn on the copper side of
the copper clad board. Then enamel paint is applied on the tracks of connection with
the help of a shade brush. We have to apply the paints surrounding the point at which
the connection is to be made. It avoids the disconnection between the leg of the
component and circuit track. After completion of painting work, it is allowed to dry.

4.2.1 Etching:
The removal of excess of copper on the plate apart from the printed circuit is
known as etching. From this process the copper clad board with printed circuit is
placed in the solution of FeCl with 3-4 drops of HCl in it and is kept so for about 10
to 15 minutes and is taken out when all the excess copper is removed from the PCB.
After etching, the PCB is kept in clean water for about half an hour in order to get
PCB away from acidic field, which may cause poor performance of the circuit. After
the PCB has been thoroughly washed, paint is removed by soft piece of cloth dipped

36
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

in thinner or turbine. Then PCB is checked as per the layout, now the PCB is ready
for use.

4.2.2 Drilling:
After completion of painting work, holes of 1/23 inch (1 mm) diameter are drilled at
desired points where we have to fix the components

4.2.3 Soldering:
Soldering is the process of joining two metallic conductors the joint where two metal
conductors are to be joined or fused is heated with a device called soldering iron and
then as allow of tin and lead called solder is applied which melts and converse the
joint. The solder cools and solidifies quickly to ensure is good and durable connection
between the jointed metal converting the joint solder also present oxidation.

4.3 Soldering & Desoldering Techniques:


There are basically two soldering techniques:
• Manual soldering with iron.
• Mass soldering.
• The iron consist of an insulated handle connected via a metal shank to the bit
the function of bit is to Stare host & convey it to the component
• To store and deliver molten solder 7 flux.
• To remove surplus solder from joints.
• Soldering bit are made of copper because it has good heat capacity & thermal
conductivity.
• It may erode after long term use to avoid it coating of nickel or tin is used.

4.3.1 Soldering with iron:


The surface to be soldered must be cleaned & fluxed. The soldering iron
switched on & bellowed to attain soldering temperature. The solder in form of wire is
allied hear the component to be soldered &b heated with iron. The surface to be
soldered is filled, iron is removed & the joint is cold without disturbing. Solder joint
are supposed to Provide permanent low resistance path Make a robust mechanical link

37
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

between PCB & leads of components. Allow heat flow between component, joining
elements & PCB.Retain adequate strength with temperature variation.

The following precaution should be taken while soldering.


• Use always an iron plated copper core tip for soldering iron.
• Slightly fore the tip with a cut file when it is cold.
• Use a wet sponge to wipe out dirt from the tip before soldering instead of
asking the iron.
• Tighten the tip screw if necessary before iron is connected to power supply.
• Clean component lead & copper pad before soldering.
• Use proper tool for component handling instead of direct handling.
• Apply solder between component leads, PCB pattern & tip of soldering iron.
• Iron should be kept in contact with the joint s for 2-3 second s only instead of
keeping for very long or very small time.
• Use optimum quantity of solder.
• Use multistoried wire instead of single strands solvent like isopropyl alcohol.
• Every time soldering is over, put a little clean solder on the tip.

38
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

CHAPTER 5

COST ANALYSIS PROBLEMS


AND
TOUBLESHOOTING

39
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

5.1 Cost Analysis


Table 5.1: Cost Analysis
S.NO. COMPONENT PRICE/ UNIT QTY.
1. PIC16F877A 250 1
2. Special Purpose Board 100 1
3. ULN2004 90 1
4. Diode .50 4
5. Voltage Regulator 15 1
6. 10K SIP 10 1
7. Resistances 2 6
8. Capacitor 5 5
9. Transformer with chord 200 1
10. Opto-coupler 35 1
11. Led's 2 1
12. Key 2 3
13. Crystal Oscillator 15 1
14. Potentiometer 15 1
15. Solder wire 50 150 gm
16. RFID module 1250 1
17. Stepper Motor 110 1
18. LCD 120 1

TOTAL COST = Rs 1867/-

5.2 Problems Faced

40
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

• During soldering, many of the connection become short circuited so we


desolder the connection and do soldering again.
• There was a slight problem in reading the values of ceramic capacitors and
reading the pin number of ICs. The problem was solved by consulting books
pertaining to study of components.
• A leg of the crystal oscillator was broken during mounting. So it has to be
replaced.
• LED’s get damaged when we switched ON the supply so we replace it by the
new one.

5.3 Trouble Shooting


• Care should be taken while soldering. There shouldn’t be shorting off joints.
• Proper power supply should be maintained.
• Project should be handled with care since IC are delicate

41
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

CHAPTER 6

FUTURE SCOPE
LIMITATION AND CONCLUSION

42
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

6.1 Future Scope:


• There is a scope of improvement in “Intelligent Toll Tax System” both at
Hardware and Software level.
• The software’s user interface can be enhanced by the use of windows based
programming languages like Visual C++ etc.
• Complex controls can be implemented through the software.
• Optocouplers can be replaced by more efficient devices
• It can be made fully automatic

6.2 Conclusion
6.2.1 General
With the theoretical inclination of our syllabus it become very essential to take
the utmost advantage of any opportunity of gaining practical experience that come
along .The construction of this project was one of these oppurtunities.It gave us the
requisite practical knowledge to supplement the already taught theoretical concept
thus making us more complement as an electronic engineer The project title
“AUTOMATIC TOLL TAX SYSTEM” as presented in this project report has been
designed for the electronic collection of toll at various places. Among so many types,
we have deliberately chosen the Optocoupler based one because if needed, with
relatively minor modifications, we can convert this into other type. This is one of the
easy and time saving methods for toll collection. This method also saves a lot of
manual power. This is also a cheap method for toll collection.

6.2.2 Project Status


The project is now fully working & there is no problem in the circuit.

6.2.3 Areas of application:

43
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

For commercial and domestic purpose.

Target User
Large scale version can be implemented in both small &medium scale.

6.2.4 Advantages
• Less power consuming
• Reduce the miss happening
• Work automatically
• Easy to operate
• Simple construction
• Work easily where environmental conditions are not suitable for man
• Higher efficiency

6.2.5 Limitations
• Need regular check up
• Once problem occur hard to remove
• Resolving problem is time consuming
• Once microcontroller fails than whole system fails
• If any obstacle comes in between the opto coupler, it will read as smart card.

44
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

Reference
• A Single Phase Microcontroller Based Energy Meter, PAV Loss, MM
Lamengo, JLF, Vieira, IEEE Instrumentation and measurement technology
conference, USA, May 18-21 1998.
• Circuit Land Web Page, http://www.uoguelph.ca/~antoon/circ/circuits.htm
• Smart meter, customer choice and profitable time-of-use rate option Energy,
Volume 24, Issue 10, October 1999, Pages 895-903 Rob Hart way, Smaller
Price and C. K. Woo

Other Web Sites:-


• www.emtech.in
• www.howstuffworks.com
• www.ieee.com
• www.terronmicrosystem.com
• www.hplindia.com
• www.klgsystel.com.
• www.atmel.com
• www.philipsemiconductors.com
• www.alldatasheets.com

45
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

Chapter-8
APPENDIX
SOURCE CODE

46
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

#include<pic.h>

#define LCD PORTB


#define RS RD6
#define EN RD7
#define KEY1 RC2
#define KEY2 RC3
#define OPTO RC0
#define MOTOR11 RD0
#define MOTOR12 RD1
#define MOTOR21 RD2
#define MOTOR22 RD3

//-----------------------------------------------

void delay(unsigned long int);


void motor();
void rev();
void lcd_cmd_send(unsigned char);
void lcd_char_send(unsigned char);
void lcd_display(unsigned char *,unsigned char,unsigned char);
void lcd_num_dis(unsigned int,unsigned char);
void rfid();

//-------------------------------------------------

unsigned int amount1=000,amount2=000,amount3=000,amount4=000;

/*
=============================================================
======================
RFID CARD LAST DIGIT
=============================================================
======================*/

/*
=============================================================
======================
TYPEDEF DECLARATION
=============================================================
======================*/

typedef unsigned char BYTE;

47
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

typedef unsigned int UINT;


BYTE Wait4Card=0,CardFlag=0,Status=0,DisStatus,Clear,irx=0;
BYTE bufferin[50]={0};
UINT Cardno=0,Num;
bit ReceiverFlag=0;

/*
=============================================================
======================
INTERRUPT FUNCATION
=============================================================
======================*/

static void interrupt isr(void) // Here be interrupt function - the is unimportant.


{

bufferin[irx]=RCREG;
if(irx==11)
{
irx=0;
ReceiverFlag=1;
}
irx++;
RCIF=0;
}

//----------------------------------

void main(void)
{
TRISC=0X8F;
TRISB=0x00;
TRISD=0x00;

lcd_cmd_send(0x38);
lcd_cmd_send(0x01);
lcd_cmd_send(0x0C);
lcd_cmd_send(0x80);

//-----------------------

TXSTA=0x24; //TRASMITER
RCSTA=0x90; //RECIVER
SPBRG= 25; // BAUD RATE 9600

GIE=1;
PEIE=1;

48
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

RCIE=1;
RCIF=0;

lcd_cmd_send(0x01);
lcd_display("WELCOME",1,0);

//---------------------------------

while(1)
{

if(OPTO==0)
{
lcd_display("INSERT YOUR CARD",2,0);
}
rfid();

if(KEY1==0)
{
while(KEY1==0);
delay(1000);
amount1=amount1+100;
lcd_display("H BALANCE= ",2,0);
lcd_num_dis(amount1,0xCC);
delay(65000);
lcd_display("INSERT YOUR CARD",2,0);
}

else if(KEY2==0)
{
while(KEY2==0);
delay(1000);
amount2=amount2+100;
lcd_display("L BALANCE= ",2,0);
lcd_num_dis(amount2,0xCC);
delay(65000);
lcd_display("INSERT YOUR CARD",2,0);
delay(5000);
}

if(CardFlag==1)
{
delay(5000);
lcd_display("HEAVY VEHICLE ",2,0);
delay(65000);

49
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

lcd_display(" BALANCE= ",2,0);


lcd_num_dis(amount1,0xCC);
delay(90000);

if(amount1<=9)
{

lcd_display("LOW BALANCE ",2,0);


delay(65000);
lcd_display("PLEASE RECHARGE ",2,0);
delay(65000);
lcd_display("INSERT YOUR CARD",2,0);
delay(65000);
break;
}

delay(5000);
lcd_display("RS. 20 DEDUCTED ",2,0);
delay(65000);
amount1=amount1-20;
delay(65000);
lcd_display(" BALANCE= ",2,0);
lcd_num_dis(amount1,0xCC);

motor();
delay(65000);
rev();
lcd_display(" THANK YOU ! ",2,0);
CardFlag=0;
delay(5000);

if(CardFlag==2)
{
delay(5000);
lcd_display("LIGHT VEHICLE ",2,0);
delay(65000);
lcd_display(" BALANCE= ",2,0);
lcd_num_dis(amount2,0xCC);
delay(90000);
if(amount2<=9)
{

lcd_display("LOW BALANCE ",2,0);


delay(65000);
lcd_display("PLEASE RECHARGE ",2,0);

50
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

delay(65000);
delay(65000);
lcd_display("INSERT YOUR CARD",2,0);

delay(65000);
break;
}

delay(5000);
lcd_display("RS. 10 DEDUCTED ",2,0);
delay(65000);
amount2=amount2-10;
delay(65000);
lcd_display(" BALANCE= ",2,0);
lcd_num_dis(amount2,0xCC);
motor();
delay(65000);
rev();
lcd_display(" THANK YOU ! ",2,0);
CardFlag=0;
delay(5000);

//---------------------------------
void delay(unsigned long int mdelay)
{
while(mdelay--);
}
void lcd_cmd_send(unsigned char mcmd)
{
LCD=mcmd;
RS=0;
EN=1;
delay(25);
EN=0;
delay(100);

}
void lcd_char_send(unsigned char mchar)
{
LCD=mchar;

51
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

RS=1;
EN=1;
delay(25);
EN=0;
delay(100);

}
void lcd_display(unsigned char *slcd,unsigned char lcd_line,unsigned char lcd_posi)
{ unsigned char ilcd=0;
if(lcd_line==1)
{
lcd_cmd_send(0x80+lcd_posi);
}
if(lcd_line==2)
{
lcd_cmd_send(0xC0+lcd_posi);
}

while(slcd[ilcd]!='\0')
{
lcd_char_send(slcd[ilcd]);
ilcd++;

}
}

void lcd_num_dis(unsigned int lnum, unsigned char lposi)


{
unsigned int lunit,lten,lhun,ltho;
lunit=lnum%10;
lnum/=10;
lten=lnum%10;
lnum/=10;
lhun=lnum%10;
lnum/=10;
ltho=lnum%10;
lcd_cmd_send(lposi);
lcd_char_send(ltho+0x30);
lcd_char_send(lhun+0x30);
lcd_char_send(lten+0x30);

lcd_char_send(lunit+0x30);

void rfid()
{
if(ReceiverFlag==1)
{
irx=0;

52
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

ReceiverFlag=0;

if(bufferin[8]=='8' && bufferin[9]=='3' && bufferin[10]=='0')


{
delay(3000);
CardFlag=1;

for(int i=0;i<12;i++)
{
bufferin[i]=0;
}
irx=0;

}
else if(bufferin[8]=='3' && bufferin[9]=='8' &&
bufferin[10]=='0')
{

delay(3000);
CardFlag=2;
for(int i=0;i<12;i++)
{
bufferin[i]=0;
}
irx=0;
}

else
{
delay(5000);

lcd_display("UNKNOWN USER ",1,0);


CardFlag=0;
delay(65000);

for(int i=0;i<12;i++)
{
bufferin[i]=0;
}
irx=0;

lcd_display("INSERT YOUR CARD",1,0);


}

}
}

53
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

void motor()
{

MOTOR11=1;
MOTOR12=0;
MOTOR21=0;
MOTOR22=0;
delay(30000);

MOTOR11=0;
MOTOR12=1;
MOTOR21=0;
MOTOR22=0;
delay(30000);

MOTOR11=0;
MOTOR12=0;
MOTOR21=1;
MOTOR22=0;
delay(30000);

MOTOR11=0;
MOTOR12=0;
MOTOR21=0;
MOTOR22=1;
delay(30000);

}
void rev()
{

MOTOR11=0;
MOTOR12=0;
MOTOR21=0;
MOTOR22=1;
delay(30000);

MOTOR11=0;
MOTOR12=0;
MOTOR21=1;
MOTOR22=0;
delay(30000);

54
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)
MAJOR PROJECT REPORT AUTOMATIC TOLL TAX

MOTOR11=0;
MOTOR12=1;
MOTOR21=0;
MOTOR22=0;
delay(30000);

MOTOR11=1;
MOTOR12=0;
MOTOR21=0;
MOTOR22=0;
delay(30000);

//---------------------------------

55
Neeraj.vlsi@gmail.com (NEERAJ SHARMA)

You might also like