Professional Documents
Culture Documents
Atc Rfid GSM
Atc Rfid GSM
CHAPTER 1: INTRODUCTION
1.1 INTRODUCTION
In the developing countries we have seen a lot of crime happening at the bridges and
highways. Specially, during evening and midnight many occurrence like- hijacks, murders
etc. are commonly taking place. However, those criminals easily get escaped from the crime
zone and victims lose their valuable assets including cars, jewelries etc. Although the
presence of police, sometimes it gets difficult for them to identify the right vehicle and stop
it for the checking. Most of the cases those vehicles pass the toll booth area by giving toll
amount and no one can identify the criminals. To avoid those problems we have built an
advanced security system which is integrated with the automated RFID based tolling system.
This system will not let the criminals pass the toll booth area even after paying the toll
amount. Thus, the crime rates at highways and bridges can be reduced. The overall system is
user friendly, fast responsive and convenient for the developing countries. By implementing
this system in the highways and bridges, primary steps can be taken to resist a criminal or
any sort of crime. As the data of each vehicle owner should be recorded in the database
previously, so when any information of that vehicle owner is needed by the authority or
police, it can be easily found from the database to ease the investigation process.
In this introductory chapter, we consider some important decisions that must be made at the
start of any embedded project:
What is Embedded Systems?
The choice of processor.
The choice of programming language.
The 8051 device is very different. It is a well-tested design, introduced in its original
form by Intel in 1980 (Figure 1.1). The development costs of this device have now been
fully recovered, and prices of modern 8051 devices now start at less than US $1.00. At this
price, you get a performance of around 1 million instructions per second, and 256 bytes of
on-chip RAM. You also get 32 port pins and a serial interface. The 8051’s profile (price,
performance, available memory, serial interface) match the needs of many embedded
systems very well. As a result, it is now produced in more than 400 different forms by a
diverse range of companies including Philips, Infineon, Atmel and Dallas. Sales of this vast
family are estimated to have the largest share (around 60%) of the microcontroller market as
a whole, and to make up more than 50% of the 8-bit microcontroller market. Versions of the
8051 are currently used in a long list of embedded products, from children’s toys to
automotive systems.
Having decided to use an 8051 processor as the basis of your embedded system, the
next key decision that needs to be made is the choice of programming language. In order to
identify a suitable language for embedded systems, we might begin by making the following
observations.
Computers (such as microcontroller, microprocessor or DSP chips) only accept
instructions in ‘machine code’ (‘objects code’). Machine code is, by definition, in the
language of the computer, rather than that of the programmer. Interpretation of the code by
the programmer is difficult and error prone.
In the developing countries we have seen a lot of crime happening at the bridges and
highways. Specially, during evening and midnight many occurrence like- hijacks ,thefts,
murders etc. are commonly taking place. To avoid those problems we have built an advanced
security system By implementing this system in the highways and bridges, primary steps can
be taken to resist a criminal or any sort of crime. As the data of each vehicle owner should
be recorded in the database previously, so when any information of that vehicle owner is
needed by the authority or police, it can be easily found from the database to ease the
process.
The basic model of the system has been developed by using RFID system and GSM
module Whenever a vehicle will enter the toll collection booth area, the reader will
immediately scan the tag identify the type of that vehicle and deduct the toll amount from
the vehicle owner's prepaid based account. And the message will be sent to vehicle owner
and by seeing that message he has reply to system as ($S) and the gate will be opened.
If any other person driving the vehicle means vehicle will be thefted and the vehicle
passing through the toll booth the message will be received by owner and he reply as ($N)
to the system. the system will alert and horn the alarm and again system sends a message as
UNKNOWN PERSON USING By using this method we can give a 100% security to the
vehicle and the controlling of the system is in owners hand
Microcontroller has
CPU (microprocessor)
RAM
ROM
I/O ports
Timer
ADC and other peripherals
Meeting the computing needs of the task at hand efficiently and cost effectively
Speed
Power consumption
The amount of RAM and ROM on chip
The number of I/O pins and the timer on chip
How easy to upgrade to higher performance or lower power-consumption versions
Power supply
LCD
AT89S52
MICRO BUZZER
MAX232
RFID CONTROLLER
L293D MOTOR
Crystal
oscillator
MAX232 GSM
Overview
In 1981, Intel Corporation introduced an 8-bit microcontroller called the 8051. This
microcontroller had 128 bytes of RAM, 4K bytes of on-chip ROM, two timers, one serial
port, and four ports (each 8-bits wide) all on a single chip. The 8051 is an 8-bit processor,
meaning that the CPU can work on only 8 bits of data at a time. Data larger than 8 bits has to
broken into 8-bit pieces to be processed by the CPU.
The 8051 has a total of four I/O ports, each 8 bits wide. Although the 8051 can have a
maximum of 64K bytes of on chip ROM, many manufacturers have put only 4K bytes on
the chip. There are different flavors of the 8051 in terms of speed and amount of on-chip
ROM, but they are all compatible with the original 8051 as far as the instructions are
concerned. The various members of the 8051 family are 8051 microcontroller, 8052
microcontroller and 8031 microcontroller.
VSS
Reset – RST
Crystal - XTAL [1, 2]
External device interfacing – EA, ALE, PSEN, WR, RD
I/O Port – P0 [7: 0], P1 [7:0], P2 [7:0], P3 [7:0]
P3 is shared with control lines – Serial I/O RxD, TxD,
Port 0:
Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can
sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high
impedance inputs. Port 0 may also be configured to be the multiplexed low order
address/data bus during accesses to external program and data memory. In this mode P0 has
internal pull up’s. Port 0 also receives the code bytes during Flash programming, and outputs
the code bytes during program verification. External pull up’s are required during program
verification.
Port 1:
Port 1 is an 8-bit bi-directional I/O port with internal pull up’s. The Port 1 output
buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled
high by the internal pull up’s and can be used as inputs. As inputs, Port 1 pins that are
externally being pulled low will source current (IIL) because of the internal pull up’s. Port 1
also receives the low-order address bytes during Flash programming and verification.
Port 2:
Port 2 is an 8-bit bi-directional I/O port with internal pull up’s. The Port 2 output
buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled
high by the internal pull up’s and can be used as inputs. As inputs, Port 2 pins that are
externally being pulled low will source current (IIL) because of the internal pull up’s. Port 2
emits the high-order address byte during fetches from external program memory and during
accesses to external data memory that uses 16-bit addresses (MOVX @ DPTR). In this
application, it uses strong internal pull-ups when emitting 1s. During accesses to external
data memory that uses 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2
Special Function Register. Port 2 also receives the high-order address bits and some control
signals during Flash programming and verification.
Port 3:
Port 3 is an 8-bit bi-directional I/O port with internal pull up’s. The Port 3 output
buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled
high by the internal pull up’s and can be used as inputs. As inputs, Port 3 pins that are
externally being pulled low will source current (IIL) because of the pull up’s. Port 3 also
receives some control signals for Flash programming and verification.
ALE/PROG
Address Latch Enable output pulse for latching the low byte of the address during
accesses to external memory. This pin is also the program pulse input (PROG) during Flash
programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator
frequency, and may be used for external timing or clocking purposes. Note, however, that
one ALE pulse is skipped during each access to external Data Memory. If desired, ALE
operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is
active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high.
Setting the ALE-disable bit has no effect if the microcontroller is in external execution
mode.
PSEN
Program Store Enable is the read strobe to external program memory. When the
AT89C51 is executing code from external program memory, PSEN is activated twice each
machine cycle, except that two PSEN activations are skipped during each access to external
data memory.
EA/VPP
External Access Enable EA must be strapped to GND in order to enable the device to
fetch code from external program memory locations starting at 0000H up to FFFFH. Note,
however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should
be strapped to VCC for internal program executions. This pin also receives the 12-volt
programming enable voltage (VPP) during Flash programming, for parts that require 12-volt
VPP.
Description
effective solution to many embedded control applications. The AT89S52 provides the
following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog
timer, two data pointers, three 16-bit timer/counters, a six-vector two-level interrupt
architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. Memory
Organization MCS-51 devices have a separate address space for Program and Data Memory.
Up to 64K bytes each of external Program and Data Memory can be addressed.
Program Memory
If the EA pin is connected to GND, all program fetches are directed to external
memory. On the AT89S52, if EA is connected to VCC, program fetches to addresses 0000H
through 1FFFH are directed to internal memory and fetches to addresses 2000H through
FFFFH are to external memory.
Data Memory
The AT89S52 implements 256 bytes of on-chip RAM. The upper 128 bytes occupy a
parallel address space to the Special Function Registers. This means that the upper 128 bytes
have the same addresses as the SFR space but are physically separate from SFR space.
When an instruction accesses an internal location above address 7FH, the address mode used
in the instruction specifies whether the CPU accesses the upper 128 bytes of RAM or the
SFR space. Instructions which use direct addressing access the SFR space. For example, the
following direct addressing instruction accesses the SFR at location 0A0H (which is P2).
MOV 0A0H, #data. Instructions that use indirect addressing access the upper 128 bytes of
RAM.
Immediate:
The source operand is a constant the immediate data must be preceded by the pound
sign, “#”.It can load information into any registers, including 16-bit DPTR register.
DPTR can also be accessed as two 8-bit registers, the high byte DPH and low byte DPL.
We can use EQU directive to access immediate data.
Register:
Use registers to hold the data to be manipulated. The source and destination registers
must match in size. The movement of data between Rn registers is not allowed.
Direct:
It is most often used the direct addressing mode to access RAM locations 30 – 7FH.
The entire 128 bytes of RAM can be accessed. The register bank locations are accessed by
the register names.
Register indirect:
A register is used as a pointer to the data, only register R0 and R1 are used for this
purpose.R2 – R7 cannot be used to hold the address of an operand located in RAM. When
R0 and R1 hold the addresses of RAM locations, they must be preceded by the “@”.The
advantage is that it makes accessing data dynamic rather than static as in direct
addressing mode, looping is not possible in direct addressing mode.
Indexed:
Indexed addressing mode is widely used in accessing data elements of look-up table
entries located in the program ROM. The instruction used for this purpose is
MOVC A,@A+DPTR
Use instruction MOVC, “C” means code,The contents of A are added to the 16-bit register
DPTR to form the 16-bit address of the needed data.
The 8051 has two timers/counters, they can be used either as, Timers to generate a
time delay or as Event counters to count events happening outside the microcontroller
.Both Timer 0 and Timer 1 are 16 bits wide Since 8051 has an 8-bit architecture, each 16-
bits timer is accessed as two separate registers of low byte and high byte. Accessed as low
byte and high byte the low byte register is called TL0/TL1 and the high byte register is
called TH0/TH1.
Both timers 0 and 1 use the same register, called TMOD (timer mode), to set the various
timer operation modes.
The lower 4 bits are for Timer 0
The upper 4 bits are for Timer 1
In each case,
The lower 2 bits are used to set the timer mode
The upper 2 bits to specify the operation
It is a 16-bit timer; therefore, it allows value of 0000 to FFFFH to be loaded into the
timer’s register TL and TH
After TH and TL are loaded with a 16-bit initial value, the timer must be started. This is
done by SETB TR0 for timer 0 and SETB TR1 for timer 1.
After the timer is started, it starts to count up. It counts up until it reaches its limit of
FFFFH, When it rolls over from FFFFH to 0000, it sets high a flag bit called TF (timer
flag) each timer has its own timer flag: TF0 for timer 0, and TF1 for timer 1 this timer
flag can be monitored When this timer flag is raised, one option would be to stop the
timer with the instructions CLR TR0 or CLR TR1, for timer 0 and timer 1, respectively.
After the timer reaches its limit and rolls over, in order to repeat the process TH and TL
must be reloaded with the original value, and TF must be reloaded to 0.
Load the TMOD value register indicating which timer (timer 0 or timer 1) is to be used
and which timer mode (0 or 1) is selected.
Load registers TL and TH with initial count value
Start the timer
Keep monitoring the timer flag (TF) with the JNB TFx, target instruction to see if it is
raised. Get out of the loop when TF becomes high.
Stop the timer.
Clear the TF flag for the next round.
Go back to Step 2 to load TH and TL again.
Interrupts:
Whenever any device needs its service, the device notifies the microcontroller by
sending it an interrupt signal, upon receiving an interrupt signal, the microcontroller
interrupts whatever it is doing and serves the device. The program which is associated with
the interrupt is called the interrupt service routine
(ISR) or interrupt handler
Polling:
The microcontroller continuously monitors the status of a given device when the
conditions met, it performs the service. After that, it moves on to monitor the next device
until every one is serviced. Polling can monitor the status of several devices and serve each
of them as certain conditions are met. The polling method is not efficient, since it wastes
much of the microcontroller’s time by polling devices that do not need service
Upon activation of an interrupt, the microcontroller goes through the following steps:
It finishes the instruction it is executing and saves the address of the next instruction
(PC) on the stack.
It also saves the current status of all the interrupts internally (i.e.: not on the stack).
It jumps to a fixed location in memory, called the interrupt vector table that holds the
address of the ISR.
The microcontroller gets the address of the ISR from the interrupt vector table and
jumps to it
It starts to execute the interrupt service subroutine until it reaches the last instruction of
the subroutine which is RETI (return from interrupt)
Upon executing the RETI instruction, the microcontroller returns to the place where it
was interrupted
First, it gets the program counter (PC) address from the stack by popping the top two bytes
of the stack into the PC Then it starts to execute from that address.
1. Bit D7 of the IE register (EA) must be set to high to allow the rest of register to take effect.
2. The value of EA
If EA = 1, interrupts are enabled and will be responded to if their corresponding bits in IE
are high.
If EA = 0, no interrupt will be responded to, even if the associated bit in the IE register is
high.
The Timer Flag (Tf) Is Raised When The Timer Rolls Over
In polling TF, we have to wait until the TF is raised. The problem with this method is
that the microcontroller is tied down while waiting for TF to be raised, and can not do
anything else.
Using interrupts solves this problem and, avoids tying down the controller. If the
timer interrupt in the IE register is enabled, whenever the timer rolls over, TF is raised, and
the microcontroller is interrupted in whatever it is doing, and jumps to the interrupt vector
table to service the ISR. In this way, the microcontroller can do other until it is notified that
the timer has rolled over.
Pin 12 (P3.2) and pin 13 (P3.3) of the 8051, designated as INT0 and INT1, are used as
External hardware interrupts
The interrupt vector table locations 0003H and 0013H are set aside for INT0 and INT1
There are two activation levels for the external hardware interrupts
Level trigged
Edge trigged
In the level-triggered mode, INT0 and INT1 pins are normally high
To make INT0 and INT1 edge triggered interrupts, we must program the bits of the TCON
register
The TCON register holds, among other bits, the IT0 and IT1 flag bits that determine
In the 8051 there is only one interrupt set aside for serial communication
This is like getting a telephone call in which we need a ring to be notified. If we need
to make a phone call there are other ways to remind ourselves and there is no need for
ringing However in receiving the phone call, we must respond immediately no matter what
we are doing or we will miss the call.
The TCON register holds four of the interrupt flags; in the 8051 the SCON register has
the RI and TI flags
When the 8051 is powered up, the priorities are assigned according to the following
In reality, the priority scheme is nothing but an internal polling sequence in which the
8051 polls the interrupts in the sequence listed and Responds accordingly.
We can alter the sequence of interrupt priority by assigning a higher priority to any one of the
interrupts by programming a register called IP.
8051 has two pins that are used specifically for transferring and receiving data
serially. These two pins are called TxD and RxD and are part of the port 3 group (P3.0 and
P3.1).These pins are TTL compatible; therefore, they require a line driver to make them
RS232 compatible. To allow data transfer between the PC and an 8051 system without any
error, we must make sure that the baud rate of 8051 system matches the baud rate of the
PC’s COM port.
SBUF Register:
This is an 8-bit register used solely for serial communication. For a byte data to be
transferred via the TxD line, it must be placed in the SBUF register. The moment a byte is
written into SBUF, it is framed with the start and stop bits and transferred serially via the
TxD line. SBUF holds the byte of data when it is received by 8051 RxD line. When the bits
are received serially via RxD, the 8051 defames it by eliminating the stop and start bits,
making a byte out of the data received, and then placing it in SBUF.
SCON Register:
SCON is an 8-bit register used to program the start bit, stop bit, and data bits of data
framing, among other things.
SM0, SM1: They determine the framing of data by specifying the number of bits per
3.1.1 Transformer
Transformer is a device that converts the one form energy to another form of energy
like a transducer.
Basic Principle
A transformer makes use of Faraday's law and the ferromagnetic properties of an iron
core to efficiently raise or lower AC voltages. It of course cannot increase power so that if
the voltage is raised, the current is proportionally lowered and vice versa.
Transformer Working
A transformer consists of two coils (often called 'windings') linked by an iron core, as
shown in figure below. There is no electrical connection between the coils, instead they are
linked by a magnetic field created in the core.
Transformers are used to convert electricity from one voltage to another with minimal
loss of power. They only work with AC (alternating current) because they require a changing
magnetic field to be created in their core. Transformers can increase voltage (step-up) as
well as reduce voltage (step-down).
Alternating current flowing in the primary (input) coil creates a continually changing
magnetic field in the iron core. This field also passes through the secondary (output) coil and
the changing strength of the magnetic field induces an alternating voltage in the secondary
coil. If the secondary coil is connected to a load the induced voltage will make an induced
current flow. The correct term for the induced voltage is 'induced electromotive force' which
is usually abbreviated to induced e.m.f.
Transformers have two great advantages over other methods of changing voltage:
1. They provide total electrical isolation between the input and output, so they can be
safely used to reduce the high voltage of the mains supply.
2. Almost no power is wasted in a transformer. They have a high efficiency (power out /
power in) of 95% or more.
A bridge rectifier makes use of four diodes in a bridge arrangement to achieve full-
wave rectification. This is a widely used configuration, both with individual diodes wired as
shown and with single component bridges where the diode bridge is wired internally.
Operation:
During positive half cycle of secondary, the diodes D2 and D3 are in forward biased
while D1 and D4 are in reverse biased as shown in the fig(a). The current flow direction is
shown in the fig (b) with dotted arrows.
During negative half cycle of secondary voltage, the diodes D1 and D4 are in forward
biased while D2 and D3 are in reverse biased as shown in the fig(c). The current flow
direction is shown in the fig (c) with dotted arrows.
Filter circuits are used to remove unwanted or undesired frequencies from a signal.
78xx:’78’ indicate the positive series and ‘xx’indicates the voltage rating. Suppose 7805
produces the maximum 5V.’05’indicates the regulator output is 5V.
79xx:’79’ indicate the negative series and ‘xx’indicates the voltage rating. Suppose 7905
produces the maximum -5V.’05’indicates the regulator output is -5V.
Pin3: It is used for output pin. Through this pin we get the output.
RESET is an active High input When RESET is set to High, 8051 goes back to the
power on state. The 8051 is reset by holding the RST high for at least two machine cycles
and then returning it low.
Power-On Reset
The 8051 uses the crystal for precisely that: to synchronize it’s operation. Effectively,
the 8051 operates using what are called "machine cycles." A single machine cycle is the
minimum amount of time in which a single 8051 instruction can be executed. 8051 has an
on-chip oscillator. It needs an external crystal thats decides the operating frequency of the
8051.This can be achieved in two ways
THEORY:
In order to connect micro controller to a modem or a pc to modem a serial port is
used. Serial is a very common protocol for device communication that is standard on almost
every PC. Most computers include two RS-232 based serial ports. Serial is also a common
communication protocol that is used by many devices for instrumentation, numerous GPIB-
compatible devices also come with an RS-232 port. Further more, serial communication can
be used for data acquisition in conjunction with a remote sampling device.
The concept of serial communication is simple. The serial port sends and receives
bytes of information one bit at a time. Although this is slower than parallel communication,
which allows the transmission of an entire byte at once, it is simpler and can be used over
longer distances.
Baud rate:
Data bits:
Measurement of the actual data bits in a transmission. When the computer sends a
packet of information, the amount of actual data may not be a full 8 bits. Standard values for
the data packets are 5, 7, and 8 bits. Which setting chosen depends on what information
transferred. For example, standard ASCII has values from 0 to 127 (7 bits). Extended ASCII
uses 0 to 255 (8 bits). If the data being transferred is simple text (standard ASCII), then
sending 7 bits of data per packet is sufficient for communication. A packet refers to a single
byte transfer, including start/stop bits, data bits, and parity. Since the number of actual bits
depends on the protocol selected, the term packet is used to cover all instances.
Stop bits:
Stop bit is used to signal the end of communication for a single packet. Typical values
are 1, 1.5, and 2 bits. Since the data is clocked across the lines and each device has its own
clock, it is possible for the two devices to become slightly out of sync. Therefore, the stop
bits not only indicate the end of transmission but also give the computers some room for
error in the clock speeds. The more bits that are used for stop bits, the greater the lenience in
synchronizing the different clocks, but the slower the data transmission rate.
Parity:
A simple form of error checking that is used in serial communication. There are four
types of parity: even, odd, marked, and spaced. The option of using no parity is also
available. For even and odd parity, the serial port sets the parity bit to a value to ensure that
the transmission has an even or odd number of logic high bits. If the parity is odd, then the
parity bit is 1, resulting in 3 logic-high bits. Marked and spaced parity does not actually
check the data bits, but simply sets the parity bit high for marked parity or low for spaced
parity. This allows the receiving device to know the state of a bit to enable the device to
determine if noise is corrupting the data or if the transmitting and receiving device clocks
are out
About RS-232
Electronic data communications between elements will generally fall into two broad
categories: single-ended and differential. RS232 (single-ended) was introduced in 1962, and
despite rumors for its early demise, has remained widely used through the industry.
The RS232 signals are represented by voltage levels with respect to a system common (power
/ logic ground). The "idle" state (MARK) has the signal level negative with respect to
common, and the "active" state (SPACE) has the signal level positive with respect to
common. RS232 has numerous handshaking lines (primarily used with modems), and also
specifies a communications protocol.
The RS-232 interface presupposes a common ground between the DTE and DCE.
This is a reasonable assumption when a short cable connects the DTE to the DCE, but with
longer lines and connections between devices that may be on different electrical busses with
different grounds, this may not be true.
The output signal level usually swings between +12V and -12V. The "dead area"
between +3v and -3v is designed to absorb line noise. In the various RS-232-like definitions
this dead area may vary. For instance, the definition for V.10 has a dead area from +0.3v to
-0.3v. Many receivers designed for RS-232 are sensitive to differentials of 1v or less.
The term "DB9" refers to a common connector type, one of the D-Subminiature or D-
Sub types of connectors. DB9 has the smallest "footprint" of the D-Subminiature
connectors, and houses 9 pins (for the male connector) or 9 holes (for the female
connector).DB9 connectors were once very common on PCs and servers. DB9 connectors
are designed to work with the EIA/TIA 232 serial interface standard, which determined the
function of all nine pins as a standard, so that multiple companies could design them into
their products.
Working:
Pin Configuration:
The DB9 (originally DE-9) connector is an analog 9-pin plug of the D-Subminiature
connector family (D-Sub or Sub-D).
The DB9 connector is mainly used for serial connections, allowing for the
asynchronous transmission of data as provided for by standard RS-232 (RS-232C).
If you wanted to do a general RS-232 connection, you could take a bunch of long
wires and solder them directly to the electronic circuits of the equipment you are using, but
this tends to make a big mess and often those solder connections tend to break and other
problems can develop. To deal with these issues, and to make it easier to setup or take down
equipment, some standard connectors have been developed that is commonly found on most
equipment using the RS-232 standards.
These connectors come in two forms: A male and a female connector. The female
connector has holes that allow the pins on the male end to be inserted into the connector.
This is a female "DB-9" connector (properly known as DE9F):
The female DB-9 connector is typically used as the "plug" that goes into a typical
PC. If you see one of these on the back of your computer, it is likely not to be used for serial
communication, but rather for things like early VGA or CGA monitors (not SVGA) or for
some special control/joystick equipment.
This is the connector that you are more likely to see for serial communications on a
"generic" PC. Often you will see two of them side by side (for COM1 and COM2). Special
equipment that you might communicate with would have either connector, or even one of
the DB-25 connectors listed below.
The wiring of RS-232 devices involves first identifying the actual pins that are being
used. Here is how a female DB-9 connector is numbered:
A liquid crystal display (LCD) is a thin, flat display device made up of any number
of color or monochrome pixels arrayed in front of a light source or reflector. It is prized by
engineers because it uses very small amounts of electric power, and is therefore suitable for
use in battery-powered electronic devices.
The surfaces of the electrodes that are in contact with the liquid crystal material are
treated so as to align the liquid crystal molecules in particular direction. This treatment
typically consists of thin polymer layer that is unidirectional rubbed using a cloth (the
direction of liquid crystal alignment is defined by the direction of rubbing). Before applying
an electric field, the orientation of the liquid crystal molecules is determined by the alignment
at the surfaces. In a twisted nematic device (still the most common liquid crystal device), the
surface alignment directions at the two electrodes are perpendicular, and so the molecules
arrange themselves in helical structure, or twist. Because the liquid crystal material is
birefringent, light passing through one polarizing filter is rotated by the liquid crystal helix as
it passes through the liquid crystal layer, allowing it to pass through the second polarized
filter
3.5.2 Connections:
On most displays, the pins are numbered on the LCD printed circuit board, but if not
it is quite easy to locate pin1.Since this pin is connected to the ground, it often has a thick
p.c.b track connected to it, and it is generally connected to metal work at same time.
1. Pins 1 &2 are the power supply lines Vss and Vdd. The Vdd pin should be connected
2. Pin 3 is a control pin, Vee, which is used to alter the contrast of the display. Ideally
this pin should be connected to the variable voltage supply. A preset potentiometer
connected between the power supply lines, with its wiper connected to the contrast
pin is suitable in many cases.
3. Pin 4 is a Register Select (RS) line, the first of the three command control inputs.
When the line is low, data bytes transferred to the display are treated as commands,
and data bytes read from the display indicates its status.
4. Pin 5 is the Read/Write (R/W) line. This line is pulled low in order to write
commands or data to the module, or pulled high to read character data or status
information from its register.
5. Pin 6 is the Enable (E) line. This input is used to initiate the actual transfer of
commands or character data between the modules and data lines. When writing to the
display, the data is transferred to the high to low transition of this signal.
6. Pin 7 to 14 are eight data bus lines (D0 to D7).Data can be transferred to and from the
display, either as a single 8-bit byte or two 4-bit “nibbles.”
In the latter case only the upper four data lines (D4 to D7) are used. The 4-bit mode is
beneficial when using a microcontroller, as fewer input/output lines are required.
The MAX 232 IC is a 16 pin structure with four capacitors connected internally as shown
following figure,
As can be seen, the most important pins are from pin7 to pin 14 and pins 15 and 16.
The pins 16 and 15 are the power supply Vic and the ground respectively which are
Used to drive the circuit and complete the circuit diagram respectively.
The pins 10 and 11 are the serially transmitted data from the TTL side which is the
RF receiver side and the corresponding outputs for these pins are pin7 and pin14
The pins 8 and 13 are from the RS-232 side and are carried out by pins 9 and 12
MAX232:
Max 232 is a communications device used mainly for serial commands to and from
a flash ROM. The MAX232 is an integrated circuit that converts signals from an RS-232
serial port to signals suitable for use in TTL compatible digital logic circuits. The MAX232
is a dual driver/receiver and typically converts the RX, TX, CTS and RTS signals. The
drivers provide RS-232 voltage level outputs (approx. ± 7.5 V) from a single + 5 V supply
via on-chip charge pumps and external capacitors. This makes it useful for implementing
RS-232 in devices that otherwise do not need any voltages outside the 0 V to + 5 V range, as
power supply design does not need to be made more complicated just for driving the RS-232
in this case.
Voltage levels
Description
Special Features
Operates With Single 5-V Power Supply & Lin Bi CMOS Process Technology
GSM offers three categories of services. The first category of services is related to
the transportation of data to or from an ISDN terminal. These services are referred to as bearer
services. The second category of services is referred to as Tele-services. This category
includes services such as telephony and SMS. The third category of services is referred to
as supplementary services. This include services such as caller identification, call forwarding,
call waiting, multiparty conversations, and barring of outgoing calls (Scourias, 1994).
The SIM800L module supports quad-band GSM/GPRS network, available for GPRS
and SMS message data remote transmission. The SIM800L communicates with
microcontroller via UART port, supports command including 3GPP TS 27.007, 27.005 and
SIMCOM enhanced AT Commands. It also has built-in level translation, so it can work with
microcontroller of higher voltage than 2.8V default. Besides, the board also supports A-GPS
technique which is called mobile positioning and gets position by mobile network. This
features make it can also be a tracker module.
Features:
Quad-band 850/900/1800/1900MHz
GPRS multi-slot class12 connectivity: max. 85.6kbps(down-load/up-load)
GPRS mobile station class B
Controlled by AT Command (3GPP TS 27.007, 27.005 and SIMCOM enhanced AT )
Supports Real Time Clock
Supply voltage range 3.4V ~ 4.4V
Supports A-GPS
Supports 3.0V to 5.0V logic level
Low power consumption, 1mA in sleep mode
Compact size 23mm x 35mm x 5.6mm
Micro SIM Card
In recent years, radio frequency identification technology has moved from obscurity
into mainstream applications that help speed the handling of manufactured goods and
materials. RFID enables identification from a distance, and unlike earlier bar-code
technology (see the sidebar), it does so without requiring a line of sight.1 RFID tags (see
figure 1) support a larger set of unique IDs than bar codes and can incorporate additional
data such as manufacturer, product type, and even measure environmental factors such as
temperature. Furthermore, RFID
Active RFID and Passive RFID technologies, while often considered and evaluated
together, are fundamentally distinct technologies with substantially different capabilities. In
most cases, neither technology provides a complete solution for supply chain asset
management applications. Rather, the most effective and complete supply chain solutions
leverage the advantages of each technology and combine their use in complementary ways.
This need for both technologies must be considered by RFID standards initiatives to
effectively meet the requirements of the user community.
RFID Reader Module, are also called as interrogators. They convert radio waves
Returned from the RFID tag into a form that can be passed on to Controllers, which can
make use of it. RFID tags and readers have to be tuned to the same frequency in order to
communicate. RFID systems use many different frequencies, but the most common and
widely used & supported by our Reader is 125 KHz.
Functions
Supports reading of 64 Bit Manchester Encoded cards
Pins for External Antenna connection
Serial Interface (TTL)
Wiegand Interface also available
Customer application on request
Technical Data:
Frequency: 125 kHz
Read Range: up to 8 cm
Power supply: 5V DC (± 5 %)
Current consumption max. : 60 mA
Operating temperature: -20 ... +65° C
Storing temperature: -40 ... +75° C
Interface: RS232 (TTL), Wiegand and others (on Demand)
Dimensions (l x w x h): 36 x 18 x 10 mm
Serial Interface Format: 9600Baud, No Parity, 8 Data bits, 1 Stop bit
Many types of RFID exist, but at the highest level, we can divide RFID devices into two
classes:
Passive RFID is of interest because the tags don’t require batteries or maintenance.
The tags also have an indefinite operational life and are small enough to fit into a practical
adhesive label.
A passive tag consists of three parts: an antenna, a semi-conductor chip attached to
the antenna, and some form of encapsulation. The tag reader is responsible for powering and
communicating with a tag.
RFID is 20 times time faster than Barcode and it can scan more number of items
within seconds with more accuracy and without missing any object. Barcode takes more
time to scan each item and it has the chance of missing some items from scanning.
Many libraries have already installed barcode systems where a barcode is placed in
each book and the LMS (Library Management System) uniquely identifies the book by
reading the barcode, using a barcode scanner. This technology has enabled self service and
self return to operate successfully for many years, functions which have since come to be
synonymous with RFID technology.
The main differences between using barcodes or RFID tags are the latter’s ability to
issue multiple items simultaneously and to allow items to be read without having to open
them to find the barcodes. Libraries should consider the volumes of items which will need to
be processed either for self-service and self-return and aim for an RFID/sortation solution
which can cope. Another significant difference between barcode and RFID systems is that
barcodes use standards that can be read by most scanners. While RFID transmission
protocols are well established tags are, at present, not governed by similar standards,
meaning that some tags may only be read by a specific reader
A smart card is an integrated circuit card that forms a part of a circuit or system
when engaged with a smart card interface. Smart cards are becoming increasingly more
popular for security and personal identification applications. Smart cards have one or more
microcontrollers embedded in them which manage to access and storage of sensitive data
that is actually stored in memory devices on the smart card.
The smart chip included on a smart card provides a means for secured electronic
transactions and a means for identification. The integrated chip is embedded in the smart
card and operates to process specific transactions. The smart card uses a serial interface and
receives its power from an external source such as a smart card reader.
Smart Card Readers are also known as Card Programmers (because they can write
to a card), card terminals, card acceptance device (CAD) or an interface device (IFD). When
the smart card and the card reader come into contact, each identifies itself to the other by
sending and receiving information. If the messages exchanged do not match, no further
processing takes place.
The reader provides a path for your application to send and receive commands from
the card. There are many types of readers available, such as serial, PC Card, and standard
keyboard models. Unfortunately, the ISO group was unable to provide a standard for
communicating with the readers so there is no one-size-fits-all approach to smart card
communication.
Each manufacturer provides a different protocol for communication with the reader.
First you have to communicate with the reader.
Second, the reader communicates with the card, acting as the intermediary before
Sending the data to the card.
Third, communication with a smart card is based on the APDU format. The card will
process the data and return it to the reader, which will then return the data to its
originating source.
The following classes are used for communicating with the reader:
ISO command classes for communicating with 7816 protocol
Classes for communicating with the reader
Classes for converting data to a manufacturer-specific format
An application for testing and using the cards for an intended and specific purpose
In our project, the Smart Card Reader communicates with microcontroller through 2
pins namely RX and TX with the help of a Serial Driver. These 2 pins are pin 2, 3 of the 9-
pin connector of Smart Card Reader.
Latch:
A latch is an example of a bi-stable multi vibrator, that is, a device with exactly two
stable states. These states are high-output and low-output. A latch has a feedback path, so
information can be retained by the device. Therefore latches can be memory devices, and
can store one bit of data for as long as the device is powered. As the name suggests, latches
are used to "latch onto" information and hold in place. Latches are very similar to flip-flops,
but are not synchronous devices, and do not operate on clock edges as flip-flops do.
Features
low input load factor (PNP input)
Hysteresis provided (=400V typically)
High break down input voltage (V1>=15V)
Output control input having same phase for 2 circuits
High fan out, 3-state output
3.9 BUZZER
A buzzer is a device which makes a buzzing or beeping noise. There are several
kinds; the most basic is a piezoelectric buzzer, which is just a flat piece of piezoelectric
material with two electrodes. This type of buzzer requires some kind of oscillator (or
something more complicated like a microcontroller) to drive it—if you apply a DC voltage
you will just get a click. They are used in places where you need something that emits an
audible tone, but don’t care about high-fidelity sound reproduction, like microwave ovens,
smoke alarms, and electronic toys. They are cheap and can be very loud without using very
much power. They are also very thin, so they can be used in flat objects like “singing”
greeting cards.
Features
The L293 is an integrated circuit motor driver that can be used for simultaneous, bi-
directional control of two small motors. Small means small. The L293 is limited to 600 mA,
but in reality can only handle much small currents unless you have done some serious heat
sinking to keep the case temperature down. Unsure about whether the L293 will work with
your motor? Hook up the circuit and run your motor while keeping your finger on the chip.
If it gets too hot to touch, you can't use it with your motor. (Note to ME2011 students: The
L293 should be OK for your small motor but is not OK for your gear motor.)
Fig 3.23:
Internal
Diagram of
L293D IC
The L293
comes in a
standard 16-pin, dual-in line integrated circuit package. There is an L293 and an L293D part
number. Pick the "D" version because it has built in fly back diodes to minimize inductive
voltage spikes.
The pin out for the L293 in the 16-pin package is shown below in top view. Pin 1 is
at the top left when the notch in the package faces up. Note that the names for pin functions
may be slightly different than what is shown in the following diagrams. The following
schematic shows how to connect the L293 to your motor and the Stamp. Each motor takes 3
Stamp pins. If you are only using one motor, leave pins 9, 10, 11, 12, 13, 14, and 15 empty.
Assume you have only one motor connected with the enable tied to Stamp Pin 0, and the
two direction controls tied to Stamp Pins 1 and 2.
3.11 DC MOTOR
Introduction
Whenever a robotics hobbyist talk about making a robot, the first thing comes to his
mind is making the robot move on the ground. And there are always two options in front of
the designer whether to use a DC motor or a stepper motor. When it comes to speed, weight,
size, cost... DC motors are always preferred over stepper motors. There are many things
which you can do with your DC motor when interfaced with a microcontroller. For example
you can control the speed of motor, you can control the direction of rotation, you can also do
encoding of the rotation made by DC motor i.e. keeping track of how many turns are made
by your motors etc. So you can see DC motors are no less than a stepper motor.
The name "H-Bridge" is derived from the actual shape of the switching circuit which
controls the motion of the motor. It is also known as "Full Bridge". Basically there are four
switching elements in the H-Bridge as shown in the figure below.
As you can see in the figure above there are four switching elements named as "High side
left", "High side right", "Low side right", "Low side left". When these switches are turned on
in pairs motor changes its direction accordingly. Like, if we switch on High side left and
Low side right then motor rotate in forward direction, as current flows from Power supply
through the motor coil goes to ground via switch low side right. This is shown in the figure
below.
Similarly, when you switch on low side left and high side right, the current flows in
opposite direction and motor rotates in backward direction. This is the basic working of H-
Bridge. We can also make a small truth table according to the switching of H-Bridge
explained above.
Truth Table
High Left High Right Low Left Low Right Description
On Off Off On Motor runs clockwise
Off On On Off Motor runs anti-clockwise
On On Off Off Motor stops or decelerates
Off Off On On Motor stops or decelerates
Table 3.6: Motor Functions
As already said, H-bridge can be made with the help of transistors as well as
MOSFETs; the only thing is the power handling capacity of the circuit. If motors are needed
to run with high current then lot of dissipation is there. So head sinks are needed to cool the
circuit.
Now you might be thinking why i did not discuss the cases like High side left on and
Low side left on or high side right on and low side right on. Clearly seen in the diagram, you
don't want to burn your power supply by shorting them. So that is why those combinations
are not discussed in the truth tabl60RPM 12V DC geared motors for robotics applications.
Very easy to use and available in standard size. Nut and threads on shaft to easily connect
and internal threaded shaft for easily connecting it to wheel.
Features
125gm weight
2kgcm torque
CHAPTER 4: SOFTWARE
Introduction
This technical note describes the use of the Keil uVision Integrated Development
Environment in the development of a ‘C’ based, MicroController application. The Keil 8052
compiler package includes uVision2 which is an Integrated Development Environment
(IDE) along with all the utilities you may need to create embedded application programs for
the MicroController family.
Before writing any C-code, a project associated with our code needs to be created.
This is done by first creating a new folder in the Keil directory in which your project will be
saved. Next the Keil uV2 application can be launched and a new project is created. This is
achieved by completing the following steps.
Create a new project. From the main window, choose the ‘Project’ menu and select ‘New
project’. A new window appears as shown below in Figure 1.
A new window appears as shown in figure 2 below and you are now required to configure
your setup to target the specific MicroController device you wish to use (in this example we
will be using the ADuC834) and the output file format generated after the compilation stage.
This is achieved by completing the following steps.
Next, you need to configure your target output options. This is done by clicking on the
“options for target” item located in the “project” pull-down menu. Alternatively you can
select this option by clicking on the icon from the ‘compile’ toolbar situated at the top of the
screen and shown in figure 3 below.
A new window appears as shown in figure 4. Enable the option to Create Hex File by ticking
the check-box and pressing ‘OK’ as shown circled in figure 4 below.
Now you can begin writing your C program. In the main window, choose the File
pull-down menu and select New. A new window named <text1> will appear on the screen.
Type the C source code that is included in Appendix A of this tech note into the <text1>
window. Once you've typed all the code, again choose the File pull-down menu and select
Save.
Our C code is compiled by selecting ‘Build Target’ from the Project pull-down
menu on the main tool-bar. The compile option can also be initiated by selecting the ‘F7’
special function key or by clicking on the ‘Build Target’ icon in the compile toolbar as
shown in figure 6 below.
If the compilation completes successfully a message indicating that the compile job
has completed with 0 errors will appear in the build dialog screen. Sometimes warnings may
be generated for information purposes to indicate multiple function calls etc. If the resultant
compilation message indicates that there were 1 or more errors, then the output files will not
be created. In this case, the file has been entered incorrectly and clicking directly on any
error message forces uVision to highlight where in the code the error has occurred.
Another powerful feature of the uVision2 IDE is that it allows you to run your code
in a MicroController specific simulation environment. To start a simulation session you
simply click on the on ‘Start/Stop Debug Session’ option available from the ‘Debug’ pull-
down menu. Alternatively you can press <Cntrl+F7> or the ‘Debug’ icon available in the
‘File’ toolbar
.
The following steps will allow you to create a generic simulation environment that you
may want to further customize to your own requirements. From the top Debug toolbar, click
on the icon buttons that are shown in figure 8 below which open a Serial I/O peripheral
window as well as a code Performance Analyzer window.
Note: If the ‘Debug’ toolbar does not appear at the top of the screen, simply select the
‘Debug Toolbar’ option available from the ‘View’ pull-down menu.
Introduction
Simple to use & low cost, yet powerful flash microcontroller programmer for the
Atmel 89 series. It will Program, Read and Verify Code Data, Write Lock Bits, Erase and
Blank Check. All fuse and lock bits are programmable. This programmer has intelligent
onboard firmware and connects to the Parallel port. It can be used with any type of computer
and requires no special hardware. All that is needed is a Parallel communication port which
all computers have. All devices also have a number of lock bits to provide various levels of
software and programming protection. These lock bits are fully programmable using this
programmer. Lock bits are useful to protect the progam to be read back from microcontroller
only allowing erase to reprogram the microcontroller. The programmer connects to a host
computer using a standard Parallel LPT port. All the programming “intelligence” is built into
the programmer so you do not need any special hardware to run it. Programmer comes with
window based software for easy programming of the devices.
Software
Computer side software called ‘Uploader ver3.1 is executed that accepts the Intel
HEX format file generated from compiler to be sent to target microcontroller. It detects the
hardware connected to the Parallel port.
Software settings
# Include <reg52.h>
#include<intrins.h>
#include<string.h>
# include "lcd.h"
# define no_of_cards 4
# define rx_buf_size 12
# define rfid_code_size 15
Sbit mf=p1^1;
Sbit mb=p1^2;
Sbit buzzer=p3^7;
Sbit ab=p1^0;
Unsigned char accesscards[no_of_cards][12]=
{ "050002a09037","440022454a69","4c006f333121","18008e0a1985" };
{
if(ri)
{
rxbuf[rxcount] = sbuf;
rxcount++;
if(rxcount >= rx_buf_size+cr_lf_size)
{
rxcount = 0;
}
ri = 0;
}
}
unsigned char status;
Void main(void)
{
char i = 0;
ab=0;
serialinit();
init_lcd();
cmd_lcd(0x01);
mf=mb=buzzer=1;
display_lcd("rfid&gsm based");
cmd_lcd(0xc0);
display_lcd("toll gate sys");
delay_ms(1000);
ab=1;
while(1)
{
ab=1;
for(i = 0; i < rx_buf_size; i++)
rxbuf[i] = 0x00;
rxcount = 0;
readcard();
uccardid = checkcard();
init_lcd();
display_lcd("rfid&gsm based");
cmd_lcd(0xc0);
display_lcd("toll gate sys");
init_lcd();
if(uccardid==99)
{
display_lcd("invalid card.... ");
cmd_lcd(0xc0);
display_lcd("try again..... ");
delay_ms(1000);
continue;
}
test();
}
}
Char rxuart()
{
If(ri==1)
{
}
Ri=0;
Return sbuf;
}
Void test()
{
Char l=0;
if(uccardid==0)
{
ab=0;
init_lcd();
display_lcd("rno:ts1 name:***");
cmd_lcd(0xc0);
display_lcd("type:car-petrol");
Delay_ms(2000);
cmd_lcd(0x01);
display_lcd("message sending");
delay_ms(1000);
transmit("at+cmgs=");
delay_ms(500);
sbuf='"';
transmit("8466049370");
sbuf='"';
sbuf=oxod;
transmit("for toll collection ");
delay_ms(50);
transmit("rno:ts1 name:***");
delay_ms(50);
transmit("type:car-petrol");
delay_ms(50);
sbuf=0x1a;
cmd_lcd(0x01);
display_lcd("message sent");
delay_ms(2000);
ea=0;
while(rxuart()!='$');
l=rxuart();
if(l=='y')
{
if(car>=50)
{
car=car-50;
cmd_lcd(0x01);
display_lcd("toll amount:50");
cmd_lcd(0xc0);
display_lcd("ur balance:");
integer_lcd(car);
cmd_lcd(0x01);
display_lcd("door open");
mf=1;
mb=0;
delay_ms(200);
mf=1;
mb=1;
delay_ms(2000);
mf=0;
mb=1;
delay_ms(200);
mf=1;
mb=1;
delay_ms(200);
}
else
{ cmd_lcd(0x01);
display_lcd("no balance");
}
}
if(l=='n')
{
buzzer=0;
cmd_lcd(0x01);
display_lcd("be alert");
delay_ms(200);
cmd_lcd(0x01);
display_lcd("message sending");
delay_ms(1000);
transmit("at+cmgs=");
delay_ms(500);
sbuf='"';
transmit("8466049370");
sbuf='"';
sbuf=oxod;
transmit("unknown person using\r\n ");
delay_ms(50);
delay_ms(50);
sbuf=0x1a;
cmd_lcd(0x01);
display_lcd("message sent");
delay_ms(3000);
buzzer=1;
}
ab=1;
}
if(uccardid==1)
{
ab=0;
init_lcd();
display_lcd("rno:ap2 name:***");
cmd_lcd(0xc0);
display_lcd("type:bus-diesel");
Delay_ms(2000);
cmd_lcd(0x01);
display_lcd("message sending");
delay_ms(1000);
transmit("at+cmgs=");
delay_ms(500);
sbuf='"';
transmit("8466049370");
sbuf='"';
sbuf=oxod;
transmit("for toll collection ");
delay_ms(50);
transmit("rno:ap2 name:***");
delay_ms(50);
transmit("type:bus-diesel");
delay_ms(50);
sbuf=0x1a;
cmd_lcd(0x01);
display_lcd("message sent");
delay_ms(2000);
while(rxuart()!='$');
l=rxuart();
if(l=='y')
{
if(bus>=60)
{
bus=bus-60;
cmd_lcd(0x01);
display_lcd("toll amount:60");
cmd_lcd(0xc0);
display_lcd("ur balance:");
integer_lcd(bus);
cmd_lcd(0x01);
display_lcd("door open");
mf=1;
mb=0;
delay_ms(200);
mf=1;
mb=1;
delay_ms(2000);
mf=0;
mb=1;
delay_ms(200);
mf=1;
mb=1;
delay_ms(200);
}
else
{ cmd_lcd(0x01);
display_lcd("no balance");
}
}
if(l=='n')
{
buzzer=0;
cmd_lcd(0x01);
display_lcd("be alert");
delay_ms(200);
cmd_lcd(0x01);
display_lcd("message sending");
delay_ms(1000);
transmit("at+cmgs=");
delay_ms(500);
sbuf='"';
transmit("8466049370");
sbuf='"';
sbuf=oxod;
transmit("type:lorry-cng");
delay_ms(50);
sbuf=0x1a;
cmd_lcd(0x01);
display_lcd("message sent");
delay_ms(2000);
ea=0;
while(rxuart()!='$');
l=rxuart();
if(l=='y')
{
if(lorry>=70)
{
lorry=lorry-70;
cmd_lcd(0x01);
display_lcd("toll amount:70");
cmd_lcd(0xc0);
display_lcd("ur balance:");
integer_lcd(lorry);
cmd_lcd(0x01);
display_lcd("door open");
mf=1;
mb=0;
delay_ms(200);
mf=1;
mb=1;
delay_ms(2000);
mf=0;
mb=1;
delay_ms(200);
mf=1;
mb=1;
delay_ms(200);
}
else
{ cmd_lcd(0x01);
display_lcd("no balance");
}
}
if(l=='n')
{
buzzer=0;
cmd_lcd(0x01);
display_lcd("be alert");
delay_ms(200);
cmd_lcd(0x01);
display_lcd("message sending");
delay_ms(1000);
transmit("at+cmgs=");
delay_ms(500);
sbuf='"';
transmit("8466049370");
sbuf='"';
sbuf=oxod;
cmd_lcd(0x01);
display_lcd("message sent");
delay_ms(3000);
buzzer=1;
}
ab=1;
}
if(uccardid==3)
{
ab=0;
init_lcd();
display_lcd("rno:tn4 name:***");
cmd_lcd(0xc0);
display_lcd("type:goods-diesel");
Delay_ms(2000);
cmd_lcd(0x01);
display_lcd("message sending");
delay_ms(1000);
transmit("at+cmgs=");
delay_ms(500);
sbuf='"';
transmit("8466049370");
sbuf='"';
sbuf=oxod;
transmit("for toll collection ");
delay_ms(50);
transmit("rno:tn4 name:***");
delay_ms(50);
transmit("type:goods-diesel");
delay_ms(50);
sbuf=0x1a;
cmd_lcd(0x01);
display_lcd("message sent");
delay_ms(2000);
ea=0;
while(rxuart()!='$');
l=rxuart();
if(l=='y')
{
if(goods>=80)
{
goods=goods-80;
cmd_lcd(0x01);
display_lcd("toll amount:80");
cmd_lcd(0xc0);
display_lcd("ur balance:");
integer_lcd(goods);
cmd_lcd(0x01);
display_lcd("door open");
mf=1;
mb=0;
delay_ms(200);
mf=1;
mb=1;
delay_ms(2000);
mf=0;
mb=1;
delay_ms(200);
mf=1;
mb=1;
delay_ms(200);
}
else
{ cmd_lcd(0x01);
display_lcd("no balance");
}
}
if(l=='n')
{
buzzer=0;
cmd_lcd(0x01);
display_lcd("be alert");
delay_ms(200);
cmd_lcd(0x01);
display_lcd("message sending");
delay_ms(1000);
transmit("at+cmgs=");
delay_ms(500);
sbuf='"';
transmit("8466049370");
sbuf='"';
sbuf=oxod;
transmit("unknown person using\r\n ");
delay_ms(50);
delay_ms(50);
sbuf=0x1a;
cmd_lcd(0x01);
display_lcd("message sent");
delay_ms(3000);
buzzer=1;
}
ab=1;
}
delay_ms(100);
}
Void serialinit(void)
{
tmod = 0x20;
th1 = 0xfd;
scon = 0x50;
tr1 = 1;
Void displayversion()
{
init_lcd();
display_lcd("rfid&gsm based");
cmd_lcd(0xc0);
display_lcd("toll gate sys");
delay_ms(100);
}
Void readcard(void)
{
unsigned char i,j=0;
do
{
}while(rxcount == 0);
delay_ms(20);
While(*t_data!='\0')
{
Sbuf = *t_data;
While(!ti);
ti=0;
T_data++;
}
5.1 WORKING
The Electronic Toll Lanes Are Set Up With The Special Antennas That
Continuously Send Out Signals. These Signals Are Used To Automatically Identify The
Vehicles That Travel By Them. To Use The Electronic Toll Facility, The Driver Needs To
Set Up An Account And Get An Electronic Transponder Fixed In The Vehicle. These
Transponders Commonly Known As The Tags Are Usually Fitted On The Windshields Of
The Vehicles. The Tag Has All The Information Regarding The Patron’s Account. The
Antenna Continuously Sends Out A Radiofrequency (Microwave) Pulse, Which Returns
Only When It Hits A Transponder. These Pulses Are Returned Back From The Transponder
And Are Received By The Antenna. These Microwaves Reflected From The Tags Contain
Information About The Transponder’s Number, Patron’s Account, Balance, Etc. Other
Information Such As Date, Time, And Vehicle Count Could Be Recorded Depending Upon
The Requirement Of The Data Needed By The Toll Agencies. After Encrypting The
Contents Of This Microwave, The Unit Then Uses Fiber-Optic Cables, Cellular Modems Or
Wireless Transmitters To Send It Off To A Central Location, Where Computers Use The
Unique Identification Number To Identify The Account From Which The Cost Of The Toll
Should Be Deducted. ETC System Uses Diverse Technologies For Its Working.
The Working Of The Electronic Toll Collection System With Its Components. These
Components May Vary Depending Upon The Technology Used. As The Vehicle Enters The
Toll Lane, Sensors (1) Detect The Vehicle. The Two-Antenna Configuration (2) Reads A
Transponder (3) Mounted On The Vehicle's Windshield. As The Vehicle Passes
Through The Exit Light Curtain (4), It Is Electronically Classified By The Treadle (5)
Based On The Number Of Axles, And The ETC Account Is Charged The Proper Amount.
Feedback Is Provided To The Driver On An Electronic Sign (6). If The Vehicle Does Not
Have A Transponder, The System Classifies It As A Violator And Cameras (7) Take Photos
Of The Vehicle And Its License Plate For Processing. The Components Of ETC Are
Discussed In The Next Section.
c. Video Enforcement Systems -- When Used For ETC, The Video Enforcement System
(VES) Captures Images Of The License Plates Of Vehicles That Pass Through An
ETC Tollbooth Without A Valid ETC Tag.
Although The Deployment Of These Technologies Makes The Initial Cost Of Installation
Very High, But There Exits Huge Benefits Accompanied With Such High Investment. These
Benefits Are Discussed In The Next Section.
1. Congestion Reduction -- The Toll Transaction Rate Is Highly Increased Due To The
Use Of ETC Systems. Since The Vehicles Do Not Stop At The Toll Facility, The
Throughput Is Highly Increased. This Has Considerable Effect On The Congestion Of
The Toll Plaza. As The Proportion Of The ETC Users Increases The Congestion In The
Manual As Well As The Automatic Lanes Is Also Reduced. The Average Number Of
Vehicles Waiting In The Queue Reduces And So The Average Waiting Time Is Reduced.
4. Operating Cost Saving -- Over A Period Of Time, The Toll Collecting Cost Is Reduced.
There Is Reduction In The Man-Hour Required As The System Does Not Require Any
Human Interaction For The Toll Transaction.
5. Time Saving -- ETC Users Do Not Stop For Paying Toll, Thus There Is Considerable
Saving In The Travel Time. Besides The Travel Time Reliability Is Increased As The
Travel Time Can Be Estimated Fairly Accurately.
6. Emission Control -- Due To The Elimination Of The Acceleration And Idling, Vehicular
Emissions Are Reduced. Though This Benefit Only Effect The Surrounding Area It Is
Seen That There Is An Increase In The Highway Financing By Building Toll Plazas.
7. Enhanced Cash Handing -- There Is No Cash Transaction For The ETC Lane So Cash
Handling Is Reduced So Difficulties With Cash Handling Is Eliminated. Thus Aid In
Enhanced Audit Control By Centralizing User Accounts.
8. Payment Flexibility -- The Patrons Do Not Have To Worry About Searching For Cash
For The Toll Payment. Since The Patrons Set Up Account For ETC Usage It Gives
Customers The Flexibility Of Paying Their Toll Bill With Cash, Check, Or Even Credit
Cards.
9. Enhanced Data Collection -- Information Such As Vehicle Count Over The Time Of
The Day, Date, Time Etc Can Be Obtained Due To The Deployment Of This Technology.
This Helps In Making Decisions Regarding The Pricing Strategies For The Toll
Providers. It Also Helps Planner To Estimate The Travel Time That Aid In Designing
Decisions.
10. Incident Reduction --It Is Observed That There Is Reduction In The Number Of
Incidents Caused Near The Toll Plazas (Gillen, 1999).
With All These Benefits, It Is Evident That There Exists A Lot Of Opportunity Of Research
In Studying The Impacts Of These Benefits Over The ETC Lanes. This Research Will
Address All The Quantifiable Components Of The Benefits On The Integrated Basis.
1. Every Person Should Hold Or Take That Card And It Is Mandatory For Every Vehicle
3. The Implementation Should Take All Over India And Every Vehicle Must Attached
This Tag By Doing This Two Functions This System Is Useful For A Good Way And
It Is A Simple Way To Pay Toll And Security
Asset Tracking:
Static Or In-Motion Assets Tracking Or Locating, Like A Healthcare Facility,
Wheelchairs Or Iv Pumps In, Laptops In A Corporation And Servers In A Data Center, Was
Not So Easy Task.
People Tracking:
People Tracking System Are Used Just As Asset Tracking System. Hospitals And Jails
Are Most General Tracking Required Places.
Document Tracking:
This Is Most Common Problem. Availability Of Large Amount Of Data And Documents
Brings Lots Of Problem In Document Management System. An Rfid Document-Tracking
System Saves Time And Money By Substantially Reducing:
Government Library:
Many Government Libraries Use Barcode And Electromagnetic Strips To Track
Various Assets. Rfid Technology Uses For Reading These Barcodes Unlike The Self-Barcode
Reader Rfid Powered Barcode Reader Can Read Multiple Items Simultaneously.
Healthcare:
Patient Safety Is A Big Challenge Of Healthcare Vertical. Reducing Medication Errors,
Meeting New Standards, Staff Shortages, And Reducing Costs Are The Plus Points Of Use
Of Rfid Solutions. Rfid Wristbands Containing Patient Records And Medication History
Address Several Of These Concerns.
Material Management:
In Construction And Other Related Industries, Materials Are Often The Largest Project
Expenditure. On Large Job Sites, Simply Finding Materials Can Be Problematic. RFID
Solutions Like Jovix Take The Guess Work Out Of The Equation
5.6 RESULT
In the developing countries we have seen a lot of crime happening at the bridges and
highways. Specially, during evening and midnight many occurrence like- hijacks ,thefts,
murders etc. are commonly taking place. To avoid those problems we have built an advanced
security system By implementing this system in the highways and bridges, primary steps can
be taken to resist a criminal or any sort of crime. As the data of each vehicle owner should
be recorded in the database previously, so when any information of that vehicle owner is
needed by the authority or police, it can be easily found from the database to ease the
process
The basic model of the system has been developed by using RFID system and GSM
module Whenever a vehicle will enter the toll collection booth area, the reader will
immediately scan the tag identify the type of that vehicle and deduct the toll amount from
the vehicle owner's prepaid based account. And the message will be sent to vehicle owner
and by seeing that message he has reply to system as ($S) and the gate will be opened
I if any other person driving the vehicle means vehicle will be thefted and the vehicle
passing through the toll booth the message will be received by owner and he reply as ($N)
to the system. the system will alert and horn the alarm and again system sends a message as
UNKNOWN PERSON USING By using this method we can give a 100% security to the
vehicle and the controlling of the system is in owners hand
Designed a system to give complete solution for traffic and transport related
problems such as Toll gate Traffic signal control, traffic rules violation control, parking
Management and special zone alert using the latest RFID technology. It is proposed as a low
cost optimized solution using RFID and GSM mobile technology. At the toll plaza, there will
be a large LCD screen for displaying details of the transaction.
At the same time, it will show:
1. 1.Total cost of that road
2. The duration of toll plaza.
3. And the remaining balances after each transaction
4. Embedded System can design for easy to Pay Toll Fees Using RFID and Alcohol sensor
Prevent Accidents on the Highways.
5. Implementation of image processing for centralizes data recording: In our present
concept we are only using the RFID system for vehicle detection. So we can extend
the scope of this concept in other way for centralize data recording. For that purpose we
can use the IR courting at the entry gate which is followed by the Camera which will be
continue sly capturing the images of the vehicles entering into the toll plaza. And the
third step the RFID is collecting the vehicle number. Now when the vehicle passes
through the IR courting it tresses the outline of the vehicle, in the next step the camera
will take the image of the vehicle & followed by the RFID to record the data related
to the vehicle. The load cell weighs the vehicle & classifies it into two categories as
light & heavy vehicle respectively. The whole data collected together & sent to the
centralize server which will store it for stipulated time. This application will help in
detecting the vehicles in the crime cases like terrorism & smuggling of goods & it will
also reduce the load on check posts.
6. Automatic control using RFID system for toll collection powered by compound power
generation from speed breakers and solar cells with GSM technology: a compound
electricity generation system using speed breakers and solar cells to power the whole
automated system and it does not consume electricity from the power utility companies
hence there is no transmission & distribution losses.
REFERENCES
Web Site
Journals