Top Banner
Aloha Softwares Private Limited FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID” CHAPTER 1 INTRODUCTION SCF – 78, Top Floor, Phase -2, Mohali – 160055 Phone : 0172 - 4609311
115

4-Full Project of Gagan

Nov 15, 2014

Download

Documents

ladi jandiala

friends this will be very useful to the MCA students for their 6 months training project
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

CHAPTER 1

INTRODUCTION

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 2: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

1.1 Radio Frequency Identification (RFID) technology:

RFID is an automatic indentification method, relying on storing and remotely retrieving

data using devices called RFID tags or transponders. An RFID tag is a small object that can

be attached to or incorporated into a product, animal, or person. RFID tags contain silicon

chips and antennas to enable them to receive and respond to radio-frequency queries from

an RFID transceiver. Passive tags require no internal power source, whereas active tags

require a power source.

History of RFID tags

In 1945 Léon Theremin invented an espionage tool for the Soviet government which

retransmitted incident radio waves with audio information. Even though this device was a

passive covert listening device, not an identification tag, it has been attributed as the first

known device and a predecessor to RFID technology. The technology used in RFID has

been around since the early 1920s according to one source (although the same source states

that RFID systems have been around just since the late 1960s).

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 3: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

The RFID system

An RFID system may consist of several components: tags, tag readers, edge servers,

middleware, and application software.

The purpose of an RFID system is to enable data to be transmitted by a mobile device,

called a tag, which is read by an RFID reader and processed according to the needs of a

particular application. The data transmitted by the tag may provide identification or

location information, or specifics about the product tagged, such as price, color, date of

purchase, etc. RFID quickly gained attention because of its ability to track moving objects.

As the technology is refined, more pervasive and possibly invasive uses for RFID tags are

in the works.

In a typical RFID system, individual objects are equipped with a small, inexpensive tag.

The tag contains a transponder with a digital memory chip that is given a unique electronic

product code. The interrogator, an antenna packaged with a transceiver and decoder, emits

a signal activating the RFID tag so it can read and write data to it. When an RFID tag

passes through the electromagnetic zone, it detects the reader's activation signal. The reader

decodes the data encoded in the tag's integrated circuit (silicon chip) and the data is passed

to the host computer. The application software on the host processes the data.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 4: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

1.1.1 Why RFID?

• No line of sight.

• Tamper proof

• Contact less reading

• More durable than bar codes

1.1.2 Why Not?

• Costly and Data Intensive

• Depends on location Setup and Process

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 5: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

1.2 VISUAL BASICS

Visual Basic is a language invented by Microsoft, but based on a much earlier language

called BASIC invented by Dartmouth College professors John G. Kemeny and Thomas E.

Kurtz in 1964. Every version of BASIC as been a revolutionary event in the history of

programming from the very beginning. In fact, the version of BASIC created by Microsoft

founders Bill Gates and Paul Allen in February 1975 has an excellent claim to being the

first personal computer language since the first version was a machine language interpreter

written for the what many consider to be the first PC, the MITS Altair 8800.

The first version of Visual Basic, released in May of 1991, was revolutionary because it

gave people the ability to create Windows programs easily and quickly for the first time.

Before Visual Basic, Windows programs were normally written using the complicated

syntax of C++.

It was a tricky job for even the most experienced programmers. Visual Basic opened

Windows programming for everyone and was a key part of the amazing Windows

phenomenon. People learning programming today have a hard time understanding that

IBM and OS/2 had the money, the customers, and manufactured the computers. Microsoft

was a tiny upstart by comparison. The programming universe was literally turned upside

down when Windows and Visual Basic became the most successful platform in the world.

But Microsoft has never been a company that let history happen to them. They have always

made history instead. In February 2002, Microsoft made a 300 billion dollar bet on a leap

into a totally new technology base for their entire company. They called it .NET. Bill

Gates, who generally says what he means, called .NET a "bet the company" move.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 6: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Visual Basic has always been a flagship language for Microsoft and this didn't change.

Visual Basic .NET 1.0 remained a featured language for Microsoft development in the new

.NET world although the new languages, J# and C# were announced at the same time.

Programmers have learned to rely on the "version 2.0" rule over the years. The rule states

that you should generally depend on version 2.0 of any really new product because it will

take that long to work the bugs out and decide whether version 1.0 is actually going to

succeed. This has certainly been the case with the .NET Framework because version 2.0,

released in November 2005, completely replaces version 1.0. Visual Basic 2005 is a

"version 2.0" product.

Visual Basic's clear structure and readable language syntax has made it the most successful

programming environment ever, period. Until 2002, Visual Basic 6 was the flagship

language and millions of programmers created world class systems using it. But "really

cool" C++ programmers still threw rocks at it because (they claimed) it wasn't "true" object

oriented programming (OOP)

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 7: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

CHAPTER 2

CONCEPT OF PROJECT

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 8: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

CONCEPT OF THE PROJECT

2.1 Scenario:

2.1.1 The present situation: Since the advent of automobiles right from the steam engines

to the very futuristic cars of today, newer technologies merged into it to develop better and

advanced systems. As a result automobiles have become costly. With the increase in the

number of theft of cars, over time various security systems developed. These security

systems were inbuilt in the cars and each car has an individual security system centering on

the car itself. The problem with such systems is that if a vehicle is stolen and the number

plates are changed it becomes quite difficult for the police to trace them. The only other

visual differences that can be noted are the engine numbers and the chassis numbers. But

that’s not a practical solution. In our project we aim to develop a tamper proof unique

identification system for each automobile that can help in vehicle identification and at

times also disabling the automobile.

In the present scenario, if a car is stolen then the owner of the car registers a

complaint at the nearest police station. Then the police will be on the lookout for a car with

the same number plates. but this system will have a lot of loopholes as the number plates

can be changed any time.

2.1.2 Project Proposal: The project proposes to have a Radio Frequency based

technology that will be able to provide an individual numbering system to all the vehicles

being manufactured. Also, all cars should have an electronic switching system that can be

activated or deactivated by the use of RF transmitter and receiver.

The process flow diagram is shown in the next page.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 9: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Rf Id Reader fixed on the

poles

Max 232

DE9connector

PC wit VB front-end and MS Access backend

At89c51

Micro-controller

Relay control mechanism for

snapping photograph/

video

RF Transmitter module to

disable the car

Rf tag fixed in the car

RF receiver module fitted in the car- receives

the disabling signal

AT89c51Micro-

Controller

Relay control for disabling

car

BLOCK DIAGRAM

Page 10: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Fig 2.2 Block Diagram for Process Flow

2.1.3 Setup: The RF tags will be fixed inside the car. The reader antennas will be

mounted on the poles of highways and other large parking spaces. All the antennas will be

connected to a central reader that will be able to detect the unique number of the vehicle.

The RFID in turn will be connected to the serial port of a computer.

The computer will have a Java front-end and an Oracle database that will

contain the information of all the cars that have been stolen.

A microcontroller circuit will also be connected to another serial port of the

computer. This circuit has a radio frequency transmitter that will be able to send

information to a receiver circuit fitted on the car. The receiver circuit also has a relay

switching mechanism that will be able to de-activate or activate a car based on the signal

received.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 11: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

2.1.4 Working: When a theft is detected by the owner of a car, he immediately Logs on to

a Java enabled server and in that he gives the details of Registration Number of the stolen

car. The system then checks the database and finds out the Radio frequency number of that

car.

When a thief steals the car, he may change the registration number. But the

RF number cannot be changed as it would be located deep inside the engine compartment.

When he drives the car near to any of the poles that have the RF antennas, the antenna

identify the RF number of the car and immediately sends the information to the central

computer. If the car has a stolen report, the computer sends information to the

microcontroller circuit to disable the vehicle. Information is sent through the RF transmitter

to block the car. The receiver in the car then transfers this information to the

microcontroller circuit. The microcontroller thee disables the car by disconnecting the

power source the engine.

Also, a camera mounted on the pole can be activated to sweep the entire area

and take photographs of the region.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 12: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

CHAPTER 3

SYSTEM HARDWARE DESCRIPTION

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 13: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

3.1 DC MOTOR

Operation

Most electric motors work by electromagnetism, but motors based on other

electromechanical phenomena, such as electrostatic forces and the piezoelectric effect, also

exist. The fundamental principle upon which electromagnetic motors are based is that there

is a mechanical force on any wire when it is conducting electricity while contained within a

magnetic field. The force is described by the Lorentz force law and is perpendicular to both

the wire and the magnetic field. Most magnetic motors are rotary, but linear types also

exist. In a rotary motor, the rotating part (usually on the inside) is called the rotor, and the

stationary part is called the stator. The rotor rotates because the wires and magnetic field

are arranged so that a torque is developed about the rotor's axis. The motor contains

electromagnets that are wound on a frame. Though this frame is often called the armature,

that term is often erroneously applied. Correctly, the armature is that part of the motor

across which the input voltage is supplied. Depending upon the design of the machine,

either the rotor or the stator can serve as the armature.

DC motors

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 14: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Fig 3.1 Electric motors of various sizes.

The modern DC motor was invented by accident in 1873, when Zénobe Gramme connected

a spinning dynamo to a second similar unit, driving it as a motor.

The classic DC motor has a rotating legature in the form of an electromagnet. A rotary

switch called a commutator reverses the direction of the electric current twice every cycle,

to flow through the armature so that the poles of the electromagnet push and pull against

the permanent magnets on the outside of the motor. As the poles of the armature

electromagnet pass the poles of the permanent magnets, the commutator reverses the

polarity of the armature electromagnet. During that instant of switching polarity, inertia

keeps the classical motor going in the proper direction. (See the diagrams below.)

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 15: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

A simple DC electric motor. When the coil is powered, a magnetic field is generated

around the armature. The left side of the armature is pushed away from the left magnet and

drawn toward the right, causing rotation.

The armature continues to rotate.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 16: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

When the armature becomes horizontally aligned, the commutator reverses the direction of

current through the coil, reversing the magnetic field. The process then repeats.

Speed control

Generally speaking the rotational speed of a DC motor is proportional to the voltage

applied to it, and the torque is proportional to the current. Speed control can be achieved by

variable battery tappings, variable supply voltage, resistors or electronic controls. The

direction of a wound field DC motor can be changed by reversing either the field or

armature connections but not both, this is commonly done with a special set of contactors

(direction contactors).

Effective voltage can be varied by inserting a series resistor or by an electronically-

controlled switching device made of thyristors, transistors, or, historically, mercury arc

rectifiers. In a circuit known as a chopper, the average voltage applied to the motor is

varied by switching the supply voltage very rapidly. As the "on" to "off" ratio is varied to

alter the average applied voltage, the speed of the motor varies. The rapid switching wastes

less energy than series resistors. Output filters smooth the average voltage applied to the

motor and reduce motor noise.

3.2 RADIO FREQUENCY IDENTIFICATION (RFID)

Types of RFID tagsSCF – 78, Top Floor, Phase -2, Mohali – 160055

Phone : 0172 - 4609311

Page 17: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

RFID tags can be either passive, semi-passive (also known as semi-active), or active.

Passive

Passive RFID tags have no internal power supply. The minute electrical current induced in

the antenna by the incoming radio frequency signal provides just enough power for the

CMOS integrated circuit (IC) in the tag to power up and transmit a response. Most passive

tags signal by backscattering the carrier signal from the reader. This means that the aerial

(antenna) has to be designed to both collect power from the incoming signal and also to

transmit the outbound backscatter signal. The response of a passive RFID tag is not just an

ID number (GUID); the tag chip can contain nonvolatile EEPROM for storing data. Lack

of an onboard power supply means that the device can be quite small: commercially

available products exist that can be embedded under the skin. As of 2006, the smallest such

devices measured 0.15 mm × 0.15 mm, and are thinner than a sheet of paper (7.5

micrometers).The addition of the antenna creates a tag that varies from the size of postage

stamp to the size of a post card. Passive tags have practical read distances ranging from

about 2 mm (ISO 14443) up to a few meters (EPC and ISO 18000-6) depending on the

chosen radio frequency and antenna design/size. Due to their simplicity in design they are

also suitable for manufacture with a printing process for the antennas. Passive RFID tags

do not require batteries, and can be much smaller and have an unlimited life span. Non-

silicon tags made from polymer semiconductors are currently being developed by several

companies globally. Simple laboratory printed polymer tags operating at 13.56 MHz were

demonstrated in 2005 by both PolyIC (Germany) and Philips (The Netherlands). If

successfully commercialized, polymer tags will be roll printable, like a magazine, and

much less expensive than silicon-based tags.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 18: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Semi-passive

Semi-passive RFID tags are very similar to passive tags except for the addition of a small

battery. This battery allows the tag IC to be constantly powered, which removes the need

for the aerial to be designed to collect power from the incoming signal. Aerials can

therefore be optimized for the backscattering signal. Semi-passive RFID tags are thus faster

in response.

Active

Unlike passive and semi-passive RFID tags, active RFID tags have their own internal

power source which is used to power any ICs that generate the outgoing signal. Active

RFID tags are typically beacon tags but are also available as response tags. Beacon tags are

often called beacon or broadcast because they transmit their tag data and ID at a

predetermined fixed interval. Whereas, “response” tags only respond when an active RFID

reader requests the tags to transmit. They may have longer range and larger memories than

passive tags, as well as the ability to store additional information sent by the transceiver. To

economize power consumption, many beacon tags operate at fixed intervals. At present, the

smallest active tags are about the size of a coin. Many active tags have practical ranges of

tens of meters, and a battery life of up to 5 years.

Reader

A device used to communicate with RFID tags. The reader has one or more antennas,

which emit radio waves and receive signals back from the tag. The reader is also

sometimes called an interrogator because it "interrogates" the tag.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 19: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Read: The process of retrieving data stored on an RFID tag by sending radio waves to the

tag and converting the waves the tag sends back into data.

Reader (also called an interrogator): The reader communicates with the RFID tag

via radio waves and passes the information in digital form to a computer system.

waves

Reader field: The area of coverage. Tags outside the reader field do not receive radio

and can't be read

.

Reader talks first: A means by which a passive UHF reader communicates with tags in

its read field. The reader sends energy to the tags but the tags sit idle until the reader

requests them to respond. The reader is able to find tags with specific serial numbers by

asking all tags with a serial number that starts with either 1 or 0 to respond. If more than

one responds, the reader might ask for all tags with a serial number that starts with 01 to

respond, and then 010. This is called "walking" a binary tree, or "tree walking."

Read range: The distance from which a reader can communicate with a tag. Active tags

have a longer read range than passive tags because they use a battery to transmit signals to

the reader. With passive tags, the read range is influenced by frequency, reader output

power, antenna design, and method of powering up the tag. Low frequency tags use

inductive coupling (see above), which requires the tag to be within a few feet of the reader.

Read rate: Often used to describe the number of tags that can be read within a given

period. The read rate can also mean the maximum rate at which data can be read from a tag

expressed in bits or bytes per second.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 20: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

3.3 RELAYS

A relay is a simple electromechanical switch made up of an electromagnet and a set of

contacts. Relays are found hidden in all sorts of devices. In fact, some of the first

computers ever built used relays to implement Boolean gates.

Relay Construction

Relays are amazingly simple devices. There are four parts in every relay:

Electromagnet

Armature that can be attracted by the electromagnet

Spring

Set of electrical contacts

A relay consists of two separate and completely independent circuits. The first is at the

bottom and drives the electromagnet. In this circuit, a switch is controlling power to the

electromagnet. When the switch is on, the electromagnet is on, and it attracts the armature

(blue). The armature is acting as a switch in the second circuit. When the electromagnet is

energized, the armature completes the second circuit and the light is on. When the

electromagnet is not energized, the spring pulls the armature away and the circuit is not

complete. In that case, the light is dark.

With relays, you generally have control over several variables:

The voltage and current that is needed to activate the armature

The maximum voltage and current that can run through the armature and the

armature contacts

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 21: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

The number of armatures (generally one or two)

The number of contacts for the armature (generally one or two -- the relay shown

here has two, one of which is unused)

Whether the contact (if only one contact is provided) is normally open (NO) or

normally closed (NC)

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

1 2 3

4 5

BLOCK VIEW OF 5 VOLTS, RELAY

+5To power supply

Form MC, Normal High, press low

To MOTORNormally open

Fig 3.2: Relay’s internal diagram

Page 22: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

3.4 MICROCONTROLLER

The AT89C51 is a low power, high- performance CMOS 8-bit microcomputer with

4Kbytes of Flash Programmable and Erasable Read Only Memory (PEROM). The device

is manufactured using Atmel’s high density nonvolatile memory technology and is

compatible with the industry standard MCS-51TM instruction set and pin out. The on-chip

Flash allows the program memory to be reprogrammed in-system or by a conventional

volatile memory programmer. By combining a versatile 8-bit CPU with Flash on a

monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly

flexible and cost effective solution to many embedded control applications.

3.4.1 Features of Microcontroller

The features of the 8051 family are as follows.

Single-supply +5 volt operation using HMOS technology.

4096 bytes program memory on-chip.

128 bytes data memory on-chip.

Four register banks.

128 User-defined software flags.

64 Kilobytes each program and external RAM addressability.

One microsecond instruction cycle with 12 MHz crystal.

32 bidirectional I/O lines organized as four 8-bit ports (16 lines on 8031).

Multiple modes, high-speed programmable serial port.

Two multiple mode, 16-bit Timers/Counters.

Two-level prioritized interrupt structure.

Full depth stack for subroutine return linkage and data storage.

Direct Byte and Bit addressability.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 23: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Binary or Decimal arithmetic.

Signed-overflow detection and parity computation.

Hardware Multiple and Divide in 4 micro second.

Integrated Boolean Processor for control applications.

Upward compatible with existing 8048 software.

4K Bytes of In-System Reprogrammable Flash Memory

3.4.2 Pin Configuration

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Fig 3.4.1 Pin diagram

Page 24: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

3.4.3 Architecture of 8051

The AT89C51 provides the following standard features: 4K Bytes of Flash, 128 Bytes of

RAM, 32 I/O lines, two 160bit timer /counters, five vector two-level interrupt architecture,

a full duplex serial port, on-chip oscillator and clock circuitry. In addition, the AT89C51 is

designed with static logic for operation down to zero frequency and supports two software

selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM,

timer/counters, serial port and interrupt system to continue functioning. The Power down

Modes saves the RAM contents but freezes the oscillator disabling all other chip functions

until the next hardware reset.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 25: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 26: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Fig 3.4.2 Architecture of 8051

Page 27: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

3.4.4 Description

VCC is Supply voltage generally given to IC i.e. at pin 40(5v).

GND is logical Ground given at pin 20.

RST – Reset input. A high on this pin for two machine cycles while the oscillator is

running resets the device.

ALE/PROG

Address Latch Enable output pulse for latching the low byte of 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.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 28: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

EA/VPP

External Access Enable. EA must be strapped to GND in order to enable the device to fetch

code from external program memory location 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.

XTAL1

Input to the inverting oscillator amplifier and input to the internal clock operating circuit.

XTAL2

Output from the inverting oscillator amplifier.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Fig 3.4.3 External clock drive configuration

Page 29: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Oscillator Characteristics

XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier

which can be configured for use as an on-chip oscillator, as shown in Figure 3.41. Either a

quartz crystal or ceramic resonator may be used. To drive the device from an external clock

source, XTAL2 should be left unconnected while XTAL1 is driven as shown in figure 3.42.

There are no requirements on the duty cycle of the external clock signal, since the input to

the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and

maximum voltage high and low time specifications must be observed.

Data Polling: The AT89C51 features Data Polling to indicate the end of a write cycle.

During a write cycle, an attempted read of the last byte written will result in the

complement of the written datam on PO.7. Once the write cycle has been completed, true

data are valid on all outputs, and the next cycle may begin. Data Polling may begin any

time after a write cycle has been initiated.

Ready/Busy: the progress of byte programming can also be monitored by the RDY/BSY

output signal. P3.4 is pulled low after ALE goes high during programming to indicate

BUSY. P3.4 is pulled high again when programming is done to indicate READY.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 30: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

3.4.5 Program Status Word

The Program Status Word (PSW) contains several status bits that reflects the

current state of the CPU. The PSW, shown in below Figure, resides in the SFR space. It

contains the Carry bit, the Auxiliary Carry ( for BCD operations), the two register bank

select bits, the Overflow flag, a Parity bit, and two user-definable status flags. The Carry

bit, other than serving the function of a carry nit in arithmetic operations, also serves as the

“ Accumulator” for a number of Boolean operations. The bits RS0 and RS1 are used to

select one of the four register bank shown in figure 3.51 number of instructions refer to

these RAM locations as R0 through R7. the selection of which of the four is being referred

to is made on the basis of the RS0 and RS1 at execution time. The parity bit reflects the

number of 1’s and P = 0 if the Accumulator contains an even number of 1’s. Thus, the

number of 1s in the Accumulator plus P is always even. Two bits in the PSW are

uncommitted and may be used as general purpose status flags.

Psw7 Psw6 Psw5 Psw4 Psw3 Psw2 Psw1 Psw0

CY AC FO RB1 RB0 OV - P

Table 3.1 PSW (Program Status Word) Register in 89C51 devices

PSW 0 – Parity of accumulator set by hardware to 1 if it contains an odd number of 1s

otherwise it is reset to 0.

PSW 1 - User-definable flag.

PSW 2 – Overflow flag set by arithmetic operations.

PSW 3 – Register bank select bit 0.

PSW 4 – Register bank select bit 1.

PSW 5 – General purpose status flag.

PSW 6 – Auxiliary carry flag receives carry out from bit 3 of addition operands.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 31: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

PSW 7 – Carry flag receives carry out from bit 7 of ALU operands.

3.4.6 Ports Of Microcontroller

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-ups. Port

0 also receives the code bytes during Flash programming and outputs the code bytes during

program verification.

Port 1

Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. 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-ups 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-ups. 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-ups. 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-ups 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-ups. 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

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 32: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

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-ups. 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-ups 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-ups. Port 3 also serves the

functions of various special features of the AT89C51 as listed below :

Port Pin Alternate Functions

P3.0 RXD (Serial input port )

P3.1 TXD (Serial input port )

P3.2 INT0 ( External interrupt 0 )

P3.3 INT1 ( External interrupt 1 )

P3.4 T0 (timer 0 external input )

P3.5 T1 (timer 1 external input )

P3.6 WR (external data memory write strobe )

P3.7 RD (external data memory read strobe )

Table 3.2 Port 3 also receives some control signals for Flash programming and

verification.

Programming Algorithm: Before programming the AT89C51, the address, data and

control signals should be set up according to the Flash programming mode table and

Figures 3 and 4. To program the AT89C51, take the following steps:

1. Input the desired memory location on the address lines.

2. Input the appropriate data byte on the data lines.

3. Activate the correct combination of control signals.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 33: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

4. Raise ES/VPP to 12 V for the high-voltage programming mode.

5. Pulse ALE/PROG once to program a byte in the Flash array or the lock bits. The

byte-write cycle is self-timed and typically takes no more than 1.5 ms. Repeat steps

1 through 5, changing the address and data for the entire array or until the end of the

object file is reached.

Programming the Flash: The AT89C51 is normally shipped with the on-chip flash

memory array in the erased state ( that is, contents = FFH) and ready to be programmed.

The programmed interface accepts either a high-voltage (12-volt) or a low-voltage (VCC)

program enable signal. The low voltage programming mode provides a convenient way to

program the AT89C51 inside the user’s system, while the high-voltage programming mode

is compatible with conventional third party Flash or EPROM programmers.

The AT89C51 is shipped with either the high-voltage or low voltage programming mode

enabled. The respective top-side marking and device signature codes are listed in the

following table.

Vpp = 12 V Vpp = 5 V

Top-Side Mark AT89C51

XXXX

YYWW

AT89C51

XXXX-5

YYWW

Signature (030H) = 1EH

(031H) = 51H

(032H) = FFH

(030H) = 1EH

(031H) = 51H

(032H) = 05H

Table 3.3 Top side marking and device signature

The AT89C51 code memory array is programmed byte-by-byte in either programming

mode. To program any nonblank byte in the on-chip Flash Memory, the entire memory

must be erased using the Chip Erase Mode.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 34: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

3.4.7 Timers/Counters

The 8051 has two 16 bit Timers/Counters registers: Timer 0 and Timer 1. Both

registers can be independently configured to operate as timers or event counters. When

used as a Timer, the register is incremented after every machine cycle. Since a machine

cycle consists of 12 oscillator periods, the count rate is 1/12 of the oscillator frequency.

When used as a Counter, the register is incremented in response to a high to low transition

of the corresponding external input pin T0 and T1. In addition to the “Timer” or “Counter”

selection, Timer 0 and Timer 1 have four operating modes. The Timer or Counter operation

and the mode of operation can be configured using TMOD register in the special function

registers.

Table 3.4 Below shows the bit pattern for Timer/Counter Mode Control Register (TMOD).

GATE C/T M1 M0 GATE C/T M1 M0

Timer 0 Timer 1

GATE Gating control when set. Timer/Counter “x” is enabled only while “INTX” pin is high

and “TRX” control bit is set. When cleared Timer “X” is enabled whenever “TRX”

control bit is set.

C/T Timer or Counter selector cleared for Timer operation (input from internal system clock). Set for Counter operation (input from “Tx” input pin).

M1 M0 Operating Mode

0 0 8-bit Timer/Counter “THx” with “TLx” 8 5 bit prescaler.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 35: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 36: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

TMOD bit Definition

MODE 0

In this mode, the Timer register is configured as a 13-bit register (TL-5 bits, and TH-8

bits), as shown in the above Fig 2.72. The 5-bits in the TL set the divide by 32 prescale to

the TH as an 8-bit counter.

Timer is enabled when TR = 1 and GATE = 0 or INT = 0. Setting GATE = 1 allows the

Timer to be controlled by external input INT, to facilitate pulse width measurements. TR is

control bit in the special function Register TCON as shown in above Fig 2.72.The Timer

interrupt flag TF is set as soon as count as count rolls over from all 1s to all 0s.

Fig 3.4.5 Timer/Counter 1 mode0 : 13 bit

Mode 1: Mode 1 is the same as Mode 0, except that the Timer register is being run with all

16-bits.

Mode 2: In this mode, timer register is configured as an 8-bit counter with auto load

facility. The overflow from TL not only sets timer interrupt flag (TF), but also reloads TL

with the contents of TH. The reloading operation does not affect the content of TH.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 37: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Mode 3: In this mode 3, timer 1 simply holds its count, where as timer 0 register TL0 and

TH0 uses are used as separate 8-bit counters. The TL0 uses the Timer 0 control bits. The

TH0 counts machine cycle and takes over the use of TR1 and TF1 from Timer1.

3.5 SERIAL COMMUNICATION

3.5.1 INTRODUCTION TO COMMUNICATION

In the communication between two systems, the data transfer is normally carried out

with its bits. The communication falls into categories:

1. Parallel communication

2. Serial communication

3.5.2 PARALLEL COMMUNICATION

Its is a mode of data transfer where all the eight bits of a word are transmitted

simultaneously through the cables. This method is widely appointed in the data transfer

between inter-computer devices. The advantage is the speed of data transfer is very high

and possibility for the error is negligible. The disadvantage is since it transmits all the bits

at a time, it need the lines, which are equal to number of bits transmitted. So the cost is

very high. So this method is not used for inter communication between any two systems.

3.5.3 SERIAL COMMUNICATION

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 38: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

If the bits are sent bits by bits serially over a single, then this communication scheme

is termed as serial communication. This requires coordination between sender and receiver.

For example, start the transmission and when to end it, when one particular bit or byte ends

and another begins, when the receiver’s capacity has been exceeded, and so on. A protocol

defines a specific method of coordinating transmission between sender and receiver. This is

widely used for the communication between the systems. This is further categorized into

synchronous and asynchronous data transfer.

3.5.4 SYNCHRONIZATION:

The synchronization between transmitter and the receiver is defined as the state

where both the transmitter clock and the receiver clock are tuned to the same signaling rate.

Synchronization is accommodated by means of signal sent with the data. The main concept

behind the serial protocol is that all the data and control information necessary to transmit

and receive a character of information must move over a single data line, one bit at a time.

There are two types of serial communication.

3.5.5 ASYNCHRONOUS DATA COMMUNICATION

In this method, the required synchronization between source transmission and reception at

the destination is accomplished by means of START and STOP bits. this bits locate both

the beginning and end of the character.T1.1e transmitter and the receiver operate on their

own clock and the clocks are not synchronized. In addition, another bit, known as the party

bit is often added for error detection. This method is known as asynchronous

communication.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 39: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

In the case of asynchronous serial communication, the bits representing one byte, which are

known as data bits, are preceded and followed by start, stop and parity bits. This process is

known as framing.

3.5.5.1 Terminologies

Start bit:

A start bit is always added at the beginning of the frame to alert the receiving device that

data is arriving and to synchronize the mechanism that separates out the individual bits.

Parity bit:

Parity checking is a method of testing whether the transmission is being received correctly.

The sending device adds your parity bit, the value of which (0 or 1) depends on the

contents of the data bits. now the receiving device checks that the parity bit does indeed

bear the correct relationship to the other bits. if it does not, something must have gone

wrong during the transmission. Parity can be computed in any of the following ways:

Even parity: This means that the number of the marked data bits and the value of the parity

bit added up to an even number.

Odd parity: This means that there is no parity bit. a parity bit is always used and it is often

ignored by the receiving device even when it is used.

No parity: This means when a parity bit will be used, but it always be set to zero.

Mark parity: This means when a parity bit is used, but it will always be set to 1.

Stop bit: At the end of each frame, stop bits are sent. There can be one, one and half or two

bits. There is always at least one stop bit. This ensures that there is negative voltage

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 40: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

for at least some period of time before the next frame so that the next positive start bit can

recognize the next frame. more than one stop bit is generally used, when the receiving

device requires extra time before it can handle he next incoming character.

Break:

It is a longer space condition, normally hundred to six hundred milliseconds, it is used as

a special signal known as break. the break is sometimes used as the mainframe’s equivalent

of control-c on a Pc. It interrupts whatever program is currently running and returns the

user to the operating system, or to sum earlier level of a menu hierarchy within a program.

Baud rate:

The baud rate expresses the number of discrete signal in one second. it is named after the

French c pioneer baud dot. in a binary transmission, it is same as a bit per second (bps),the

number of binary digits transmitted in one second.

The following is a list of characteristic specific to asynchronous

Communication: Each character is preceded by a start bit followed by one or more stop

bits. Gaps or spaces between characters may exits.

3.5.6 SYNCHRONOUS DATA COMMUNICATION

In synchronous communication there are no start and stop bits. Thus provides more rapid

transfer of data. The bits of one character immediately follow of the one, which precedes it.

Data is usually sent in high bit rate. These blocks are normally buffered prior to

transmission and received block go to a buffer for storage until they can be use clocks that

are previously synchronize with one another. The followed is the lists of characteristic

specific to synchronous communication. There are no gaps between characters being

transmitted.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 41: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Timing is supplied by the devices at end of connection. Special synchronous

character precedes the data being transmitted. Synchronous character is used between

blocks of data for the timing purposes.

3.5.7 SYNCHRONOUS VS ASYNCHRONOUS SERIAL

COMMUNICATIONS:

When efficiency is of paramount importance and when data can be supplied carefully time

control, continuous bit stream, synchronous transmission is mostly superior to

asynchronous START/STOP transmission. After all, adding a START and STOP bit to an

eight bit character reserves in a transmission overhead of 1/Sth: Fully 20% of the bits carry

no data. Even as perfect synchronism was possible, the system would still have failed in

many areas because it requires data in a unbroken string.

In other words, it was transmitted characterized data with the technology that had no way

to differentiate one character with another. Even in perfect universe, purely synchronous

system are impractical for application in which character do not arrive according to the

schedule. Without the START/STOP synchronous serial format, all interaction between

human and computer over serial lines would be impossible. seeing cost wise, synchronous

communication is least preferred. Synchronous communication is practical for systems that

must transfer large amounts of data at high speeds.

Data transfer modes:

Logical data in microcomputer is represented as bits (binary digits) .Bits is

customarily explained through tables that illustrate bit’s contribution to some overall

logical scheme.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 42: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Although bit is intellectual construction. It is nevertheless, physically a voltage whose

magnitude gives the bit this value (i.e. 0 or 1).

When bits must be moved about within the computer itself, they are transmitted

along the wires. If the data to be transmitted is in 8-bits format type, then eight separate,

discreet wires must simultaneously transmission carry the eight representative electrical

voltages between the two points. This simultaneous transmission of the eight bit voltage

that constitutes a byte is referred to as “parallel transfer”. Parallel transfer, then is done

byte-by-byte. Since all eight bits arrives at their destination at the same instant, parallel

data transfer can be accomplished at extremely high speeds. These qualities make it

the preferred method of data transfer whenever possible.

Data transfer, especially high-speed data transfer, demands a tightly controlled

environment. The temperature of the computer must be regulated and the 1 electrical

properties of resistance, capacitance and inductance carefully pre-calculated. As long as the

data is being moved about inside a computer, this environment is stable and predictable.

But a great deal of computer data must be transported to the outside world.

Microcomputer communicate with peripheral such as printer, modems, print buffer, etc.

these processed are collectively known as input/output, or simply I/C.

3.5.8 THE INTERFACE

An interface is the point of contact between dissimilar environment between the

computer’s circuitry and external devices. Since an interface is a sort of a “door” to the

computer’s world, it is sometimes called an I/O port. The primary objective of any

interface is to provide a medium of data transfer. Furthermore, self-protection and usability

are also important goals of any interface. Once such an interface has been established, the

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 43: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

transfer of data to the external environment is possible. When considering parallel transfer

for the interface, two major problems arise. The first is the wire itself. At least nine wires –

eight for the data bits, one for circuit (“ground”) – are needed. Still more wires are required

to control of data across the interface. Another problem lies in the very nature of the

bits/voltage themselves. When a bit/voltage changes state from one to zero or vice versa. It

does so very rapidly –in the order of nanoseconds (one billionth of the second). This

abruptness is itself an essential part 0 the process of data. As a cable

gets longer, its electrical properties (capacitances and inductance) restrict the abruptness

with which a bit can change between one and zero and data corruption or loss becomes

likely. Because of this, the speed inherent in parallel data transfer makes transmission

overlong cables problematic. Therefore, its use is restricted to a few peripheral devices

(such as printers) that are likely to be used in close proximity to the computer, or operate at

very high speeds. The obvious alternate to sending all bits simultaneously on multiple

wires is to send them singly, one after the other. At the receiving end the process is

reversed and the individual bits are reassembled into the original byte. With just one bit to

transmit at time data can be transferred with a simple electrical circuit consisting of only

two wires. This scheme known as serial transfer reduces the bulk and much of the expense

of the parallel technique.

This saving is offset by decrease inefficiency. It takes at least eight times longer to

transmit eight individual bits one after the other than to transmit them simultaneously in

parallel. This speed limit is insignificant for many typical applications.

Serial peripheral device are slow, at least in comparison to the internal speed of

microprocessors. Each involves some time consuming, sometimes mechanical process that

greatly limits its speed. Printers are limited by the speed of their print-heads, modems by

the frequency restrictions of the telephone lines and disc drives by their slow rotational

speed. So the speed coherent in the process of parallel data transfer is largely wasted on

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 44: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

such peripheral devices. The serial method, therefore can afford to sacrifice some speed

while still adequately servicing the peripheral devices.

Serial Port: The 8051 Micro controller, like almost all other computers processes data in

parallel. At the same time, the communication between computers if often done by serial

links. Inevitably, a serial bus would be slower then a parallel bus, but it is cost effective and

very popular for small-embedded systems and personal computers. The rate of transmission

is added the bit rate. The bit rate is frequently termed baud rate. Apart from the fact bit rate

are not always equal, they are used synchronously.

The micro controller subsystem, which converts the parallel data into a serial by

streams or vice versa, is called a serial port. The serial port is alternatively universal

asynchronous receiver transmitter (UART). The serial port of simultaneously. The receive

register is buffered and it is possible to go on reception of a second byte before a previously

received byte has been read. Receive and transmit register are both named SBUF. The

serial port is controlled by a serial port control register (SCON). Moreover the

register SCON acts as a stream register including a Transmit Interrupt flag (TI) and a

Receive Interrupt flag (RI).

A set Transmit Interrupt flag TI indicates that the transmit buffer is empty and can be

readied again. The interrupt flag TI is set by hardware at the end of the 8 th in period a mod

0 at the beginning of the stop bit in the other modes when serial port transmits. The flag TI

must be cleared by the software.

A set Receive Interrupt flag RI alarms that the receive buffer is full and should be read.

The interrupt flag RI is set by hardware at the end of the 8th bit period in mode 0 or through

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 45: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

the stop bit period in the other modes, when the serial port receives. Likewise, the flag RI

must be cleared by software.

As you might expect, mode 0 is one of four possible mode of operation that can be

selected by bits SMO and SMI from register SCON. Unlike that you might by set, the bit

SMO is the most significant bit (MSB) when the mode is coded. A bit REN from the

register SCON enables serial reception for all modes. It can be set by software to enable or

cleared to disable the reception.

3.5.9 RS-232C

RS-232 stands for recommended standard number 232 and C is the latest revision of

the standard. The serial ports on most computers use a subset of the RS-232C standard. The

full RS-232C standard specifies a 25-pin “D” connector of which 22 pins are used. Most of

these pins are not needed for normal PC communication, and indeed, most new PCs are

equipped with male D type connectors having only 9 pins.

DCE and DTE Devices

Two terms you should be familiar with are DTE and DCE. DTE stands for Data

Transfer Equipment, and DCE stands for Data Communication Equipment. These terms are

used to indicates the pin-out for the connectors on a device and the direction of the signals

on the pins. Your computer is a DTE device, while most other devices are usually DCE

devices.

If you have trouble keeping the two straight then replace the term “DTE device” with

“your PC” and the term “DCE device” with “remote device” in the following discussion.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 46: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

The RS-232 standard starts that DTE devices use a 25-pin male connector, and DCE

devices use a 25-pin female connector. You can therefore connect a DTE device to a DCE

using a straight pin-for-pin connection. However, to connect two devices, you must instead

use a null modem cable. Null modem cables cross the transmit and receive lines in the

cables. The listing below shows the connections and signal direction for both 25 and 9-pin

connector.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 47: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Male RS-232

DB25

25 pin connector on a DTE device(PC connection)

Pin Number Direction of signal:

1 Protective Ground

2 Transmitted Data(TD) Outgoing Data (from a DTE to a DCE)

3 Received Data(RD) Incoming Data (from a DCE to a DTE)

4 Request To Send(RTS) Outgoing flow control signal controlled by DTE

5 Clear To Send (CTS) Incoming flow control signal controlled by DCE

6 Data Set Ready(DSR) incoming handshaking signal controlled by DCE

7 Signal Ground Common reference voltage

8 Carrier Detect (CD) Incoming signal from a modem

20 Data Terminal Ready(DTR)outgoing handshaking signal controlled by

DTE

22 Ring Indicator (RI) Incoming signal from a modem

Table 3.5: 25 pin connector definition

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 48: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Male RS-232

DB9

9 Pin Connector on a DTE device(PC connector)

Pin Number Direction of signals

1 Carrier Detect (CD) (from DCE) Incoming Data signal from a DCE

2 Received Data (RD) Incoming Data from a DCE

3 Transmitted Data (TD) Outgoing Data to a DCE

4 Data Terminal Ready (DTR) Outgoing handshaking signal

5 Signal Ground Common reference voltage

6 Data Set Ready (DSR) Incoming handshaking signals

7 Request To Send (RTS) Outgoing flow control signal

8 Clear To Send (CTS) Incoming flow control signal

9 Ring Indicator (RI) (from DCE) Incoming signal from a modem

Table 3.6: 9 Pin connector definitions

The TD (transmit data) wire is the one through which the data from a DTE device is

transmitted to a DCE device. This name can be deceiving, because this wire is used by a

DCE device its data. The RD (receive data) wire is the one on which data is received by a

DTE device, and the DCE device keep this line in a mark condition when idle.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 49: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

RTS stands for Request To Send. This line and CTS line are used when “hardware flow

control” is enabled in both the DTE and DCE devices. The DTE device puts this line in a

mark condition to tell the remote device that it is ready and able to receive data. If the DTE

device is not able to receive data (typically because its receive buffer is almost full),it will

put this line in the space condition as a signal to the DCE to stop sending data. When the

DTE device is ready to receive more data (i.e. after data has been removed from its receive

buffer), it will place this line back in the mark condition. The complement of the RTS wire

is CTS, which stands for Clear To Send. The DCE device puts this line in a mark condition

to tell the DTE device that it is ready to receive the data.

DTR stands for Data Terminal ready. Its intended function is very similar to the RTS line.

DSR (Data Set Ready) is the companion to DTR in the same way that CTS is to RTS.

Some serial devices use DTR and DSR as signals to simply confirm that a device is

connected and is turned on.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 50: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

3.6 TRANSMITTER AND RECEIVER

These modules operate on 433.92, 418 or 315 MHz., same as the standard TLP & RLP 434

modules but they have made significant changes in the size of the unit. They are SAW

based and offer about 100 meters range in Line-of-Sight operating form 2-12 volts. The

new version has a data rate of 4.8KB/s, over double the speed of the previous version and

still provides 16DBm of output power off under 20mA of current. The module uses ASK as

the form of modulation and has both digital and analogue outputs. The size and simplicity

of these units make them a professional and economical solution for many wireless

applications.

Low Cost and Robust Design make these hybrid modules be suitable for a Easy Link of

Wireless applications. The typical range is 500ft for open area. There are 433.92Mhz,

418Mhz and 315Mhz available.

This ASK transmitter module with an output of up to 8mW depending on power supply

voltage. The TLP transmitter is based on SAW resonator and accepts both linear and digital

inputs, can operate from 2 to 12 Volts-DC, and makes building RF enabled products very

easy.

This receiver has a sensitivity of 3uV. It operates from 4.5 to 5.5 volts-DC and has both

linear and digital outputs. The typical sensitivity is -103dbm and the typical current

consumption is 3.5mA for 5V operation voltage.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 51: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Digital modulation using ASK

There is way in which the bandwidth of the channel carrier may be altered simply by

altering the amplitude of the carrier sine waves. This technique give rise to amplitude-

shift-keying (ASK). ASK describes the technique the carrier wave is multiplied by the

digital signal f(t). Mathematically, the modulated carrier signal s(t) is:

 s(t) = f(t) Sin (2 π fct+ Ǿ) …….(1)

 

Figure:   Amplitude shift keying

 

Figure:   Amplitude shift keying -- frequency domain

It is a special case of amplitude modulation (AM). Amplitude modulation has the

property of translating the spectrum of the modulation f(t) to the carrier frequency. The

bandwidth of the signal remains unchanged.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 52: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

The fact that AM simply shifts the signal spectrum is often used to convert the carrier

frequency to a more suitable value without altering the modulation. This process is known

variously as mixing, up-conversion or down-conversion. Some form of conversion will

ENCODER AND DECODER

Features

Operating voltage: 2.4V~12V

Low power and high noise immunity CMOS technology

Low standby current

Capable of decoding 12 bits of information

Binary address setting

Received codes are checked 3 times

Address/Data number combination- HT12D: 8 address bits and 4 data bits

Built-in oscillator needs only 5% resistor

Valid transmission indicator

Easy interface with an RF or an infrared transmission medium

Minimal external components

Pair with Holtek's 212 series of encoders

18-pin DIP, 20-pin SOP package

The transmitter and receiver are matched to oscillating frequencies of the 212 encoders

and decoders. For 212 series, the oscillating relations between encoders and decoders are

: fosc (HT12D decoder) = 50 fosc (HT12E encoder)

If the HT12E is used as encoder, a typical 3kHz oscillating frequency is recommended.

The decoder device can be HT12D whose decoder oscillating frequency is typically 50

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 53: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

times that of encoders, namely 150kHz. Take the following steps to find the

corresponding resistor values. In the Oscillator Frequency/Supply Voltage graph in the

HT12E datasheet, take 5V application for example and the typical 3kHz oscillating

frequency, a 1.0Mohm resistor is therefore selected. In the Oscillator Frequency/Supply

Voltage graph in the HT12D/HT12F datasheet, take 5V and the 150kHz and the resistor

will be 51Kohm.To use the two-state Address pins of the 212 series: the Address pins

are NMOS Transmission Gates are internal. The Address pins should be connected to

VSS or left open. If the Address pin is connected to VSS, Dout will have data 0

waveform; If the Address pin is left open, Dout will have data 1 waveform

always be present when the channel carrier occupies a frequency range outside the

modulation frequency range.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 54: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

CHAPTER 4

SOFTWARE PROGRAMMING

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 55: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

4.1 FLOW CHART FOR MICROCONTOLLER PROGRAMMING

4.1.1 FLOW CHART FOR DISABLING DETECTED STOLEN CAR

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Start

Initialize address and timer interrupt

Ports 2.5, 2.6, 2.7 are made as output ports andConnected to motors of three cars.

Ports 3.2,3.3,3.4 are made as input ports and Connected to the switches.

Is the first car disabled i.e. P1.1=0 ?

Clear port 2.7 i.e. disable car 1

Enable timer 0 overflow interrupt and stay here Until interrupted.

Is switch closed?

Complement 2.7 i.e make Car active

A

YES

YES

Page 56: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Is 2nd carDisabled i.e p1.2=0?

Clear port 2.6(that is disable The car)

A

Is switch2Closed?

Is 3rd carDisabled i.e. p1.3=0?

Is switch3Closed?

Clear p2.5(that is disableThe car)

Wait until timer 0 overflows and return, or return when interrupted.

Stop

Complement port 2.6 i.e. make car active

Complement port 2.6 i.e. make car active

YES

YES

YES

YES

Page 57: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

4.1.2 FLOW CHART FOR MOVEMENT OF CAR AND OBTAINING

RFID NUMBER

.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Start

Enable system for serial communication & set baud rate.

Accept from hyper terminal of the PC (Q).

Send signal K, L, M and obtain acknowledgement k, l, m for the cars 1, 2, 3 respectively.

Clear RI.Is RI = 1 ?

RI must be high when character

entered

Is 1st RFID no. =0 ? Wait until it is 0.

Call subroutine to obtain RFID no. ( 11 Digits).

Call subroutine to transfer last 5 digits of RFID no.

Stop

NO

NO

Yes

Yes

Page 58: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

4.2 KEIL PROGRAMMING CODES

org 00hljmp mainorg 000bhlcall tmrintsreti

main: clr p2.7 ;mtr connectedclr p2.6 clr p2.5setb p3.2 ; keyswitches setb p3.3setb p3.4mov p1,#0ffh

mov ie,#10000010bsetb tr0

here: sjmp here

tmrints: jnb p1.1,disblev1jnb p3.2,cpveh1

veh2: jnb p1.2,disblev2jnb p3.3,cpveh2

veh3: jnb p1.3,disblev3jnb p3.4,cpveh3ret

cpveh1: jnb p3.2,cpveh1cpl p2.7sjmp veh2

cpveh2: jnb p3.3,cpveh2cpl p2.6sjmp veh3

cpveh3: jnb p3.4,cpveh3cpl p2.5 ret

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 59: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

disblev1: clr p2.7sjmp veh2

disblev2: clr p2.6sjmp veh3

disblev3: clr p2.5 ret

end

org 00hljmp main

org 0030h ;cotrlside transmittermain: mov tmod,#22h

mov scon,#50hmov th1,#-3setb tr1

waitforQ: lcall recevresp ;testinglcall compareQlcall sendq

;----------------------------------------

stay: jnb ri,stayclr rimov a,sbuflcall compare1lcall rfidnolcall transrfidljmp stay

;-------------------------compare1:cjne a,#"0",waitE

retwaitE: lcall makeE

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 60: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

; lcall offEljmp stay

;------------------------makeE: cjne a,#"K",checka

setb p1.1ret

checka: cjne a,#"k",checkBclr p1.1ret

checkB: cjne a,#"L",check1bsetb p1.2ret

check1b: cjne a,#"l",checkCclr p1.2ret

checkC: cjne a,#"M",check1c setb p1.3

retcheck1c: cjne a,#"m",stay

clr p1.3ret

rfidno: mov a,#11mov r2,amov r0,#56h

stayy: jnb ri,stayymov a,sbufclr rijz rettmov @r0,ainc r0djnz r2,stayy

rett: ret

transrfid:mov a,#05mov r2,amov r0,#5ah

stay22:mov a,@r0mov sbuf,a

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 61: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

stay11: jnb ti,stay11clr tiinc r0djnz r2,stay22ret

recevresp:clr astay3: jnb ri,stay3

mov a,sbufclr riret

;----------compareQ:cjne a,#"Q",waitfrQ

retwaitfrQ:ljmp waitforQ

sendq: mov dptr,#dataqlcall sendret

send: clr amovc a,@a+dptrjz RET1lcall transinc dptrsjmp send

RET1: ret

trans: mov sbuf,aH_2: jnb ti,H_2

clr tiret

dataq: db "q",0 end

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 62: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

4.2 VISUAL BASIC FLOWCHART

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Stolen/Activation Reports

List Of Cars Activate Add/Delete/Edit Cars

A B CActivate Recovered Car

S

EXIT

Starting Main Form

Page 63: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Stolen/Activation Reports

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

A

Select type of report. Stolen or Active.

Enter Car number

Enter three passwords & verify with stored password (in database).

Is all three password matches.

Update record.

S

YES

NO

Page 64: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

List of Cars

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

B

Get the data of passing cars from RF reader.

Display Car’s ID number on Main Form

S

Page 65: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Add/Delete/Edit Cars

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

CD

Select activity from various buttons.

If ADD is clicked

If Edit is clicked

If Delete is clicked

Add new Record to database.

Enable Editing of Record

Remove selected record from database.

S

YesYes Yes

NO

NO

Page 66: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

4.3 VB CODES

4.3.1 FORM ENTRYPrivate Sub cmdAdd_Click()On Error GoTo Error1If cmdAdd.Caption = "Add" Then Call enabledText txtCarID = "" txtCarNo = "" txtCompany = "" txtModel = "" txtOwner = "" txtPass1 = "" txtPass2 = "" txtPass3 = "" chkStolen.Value = 0 chkActivate.Value = 1 cmdAdd.Caption = "Save"Else If checkFields = 1 Then 'MsgBox txtCarID Rec.AddNew Rec.Fields("RfId") = txtCarID Rec.Fields("CarNo") = txtCarNo Rec.Fields("Company") = txtCompany Rec.Fields("CarModel") = txtModel Rec.Fields("OwnerName") = txtOwner Rec.Fields("Password1") = txtPass1 Rec.Fields("Password2") = txtPass2 Rec.Fields("Password3") = txtPass3 Rec.Fields("Stolen") = False Rec.Fields("Activate") = True Rec.Update cmdAdd.Caption = "Add" Call disabledText Else MsgBox "Please fill all the fields" txtCarID.SetFocus End IfEnd IfExit Sub

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 67: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Error1: MsgBox "Error occured due to Duplicate Entry", vbExclamation, "Restriction" Rec.CancelUpdate cmdAdd.Caption = "Add" Rec.MoveFirst showRecord Call disabledText Err.Clear End Sub

Private Sub cmdCancel_Click() cmdAdd.Caption = "Add" cmdEdit.Caption = "Edit" Rec.MoveFirst Call showRecord Call disabledTextEnd Sub

Private Sub cmdDelete_Click() Dim Ans As Integer Ans = MsgBox("Are you sure to delelte the record", vbYesNo) If Ans = vbYes Then Rec.Delete Rec.MoveFirst Call showRecord End IfEnd Sub

Private Sub cmdEdit_Click() If cmdEdit.Caption = "Edit" Then Call enabledText txtCarID.Enabled = False cmdEdit.Caption = "Save" Else If checkFields = 1 Then Rec.Fields("CarNo") = txtCarNo Rec.Fields("Company") = txtCompany Rec.Fields("CarModel") = txtModel Rec.Fields("OwnerName") = txtOwner Rec.Fields("Password1") = txtPass1 Rec.Fields("Password2") = txtPass2

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 68: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Rec.Fields("Password3") = txtPass3 Rec.Fields("Stolen") = False Rec.Fields("Activate") = True Rec.Update cmdEdit.Caption = "Edit" Call disabledText Else MsgBox "Please fill all the fields" txtCarID.SetFocus End If End IfEnd Sub

Private Sub cmdExit_Click()Rec.CloseUnload MeEnd Sub

Private Sub cmdFirst_Click()Rec.MoveFirstshowRecordEnd Sub

Private Sub cmdLast_Click()Rec.MoveLastshowRecordEnd Sub

Private Sub cmdNext_Click()Rec.MoveNextIf Rec.EOF = True Then Rec.MoveLastshowRecordEnd Sub

Private Sub cmdPrev_Click()Rec.MovePreviousIf Rec.BOF = True Then Rec.MoveFirstshowRecordEnd Sub

Private Sub Form_Load()

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 69: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Rec.Open "Select * from CarDetails", Con, adOpenDynamic, adLockOptimisticshowRecordCall disabledTextEnd Sub

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 70: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

4.3.2 FORM LOGIN

Dim Logu As New ADODB.RecordsetDim user As StringDim pass As StringPublic LoginSucceeded As Boolean

Private Sub cmdCancel_Click() Logu.Close LoginSucceeded = False EndEnd Sub

Private Sub cmdOK_Click() user = txtUserName.Text pass = txtPassword.Text Dim c As Integer c = 1 Logu.MoveFirst While Not Logu.EOF If user = Logu.Fields(0) And pass = Logu.Fields(1) Then c = 0 Unload Me Exit Sub End If Logu.MoveNext Wend If c = 1 Then MsgBox "Invalid Password, try again!", , "Login" txtPassword.SetFocus SendKeys "{Home}+{End}" End IfEnd Sub

Private Sub Form_Load()Logu.Open "select *from LOGIN", Con, adOpenDynamic, adLockOptimisticEnd Sub

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 71: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

4.3.3 MAIN ENTRY

Dim RecCar As New ADODB.RecordsetDim txtBuf As String

Private Sub cmdAddnewCar_Click()frmEntry.Show 1End Sub

Private Sub cmdExit_Click()Con.CloseEndEnd Sub

Private Sub cmdListOfCars_Click()RecCar.Open "Select * from CarDetails", Con, adOpenDynamic, adLockOptimisticCall fillListEnd Sub

Private Sub cmdStolenCarReport_Click()frmStolenCarRpt.Show 1End Sub

Private Sub Command1_Click()If Active = "K" Then MSComm1.Output = "K"ElseIf Active = "L" Then MSComm1.Output = "L"ElseIf Active = "M" Then MSComm1.Output = "M"End IfActive = ""End Sub

Private Sub Form_Load()'**********Connect to database ***************Con.Open "provider=Microsoft.Jet.OLEDB.4.0 ;Data Source=D:\Security of Card\SecurityOfCard.mdb;"

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 72: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

RecCar.Open "Select * from CarDetails", Con, adOpenDynamic, adLockOptimisticfrmLogin.Show 1Active = ""Call fillList On Error Resume Next With MSComm1 If .PortOpen = True Then .PortOpen = False Else .PortOpen = True If Err.Number <> 0 Then MsgBox "Comm" & .CommPort & " is not available." & vbCrLf & _ Err.Description Err.Clear End If End If End With MSComm1.Output = "Q"End Sub

Public Function fillList()Dim i As IntegerFg.Row = 0Fg.Col = 0Fg.Text = "Sl No"Fg.Row = 0Fg.Col = 1Fg.Text = "Rf ID"Fg.Row = 0Fg.Col = 2Fg.Text = "Owner Name"

i = 1RecCar.MoveFirstWhile RecCar.EOF = False Fg.Row = i Fg.Col = 0 Fg.Text = CStr(i) Fg.Row = i Fg.Col = 1 Fg.Text = RecCar.Fields("RfId")

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 73: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Fg.Row = i Fg.Col = 2 Fg.Text = RecCar.Fields("OwnerName") RecCar.MoveNext i = i + 1WendRecCar.Close

End Function

Private Sub MSComm1_OnComm()txtBuf = MSComm1.InputSelect Case txtBuf Case "q" MsgBox "Connect is Ok" Case Else Call isStolen(txtBuf)End SelectEnd Sub

Public Function isStolen(ID As String)RecCar.Open "Select * from CarDetails where RfId = " & "'" & ID & "'", Con, adOpenDynamic, adLockOptimisticRecCar.MoveFirstIf RecCar.Fields("Stolen") = True Then If ID = "7A42C" Then MSComm1.Output = "k" 'MsgBox "Car has inactivated" End If If ID = "7AEFF" Then MSComm1.Output = "l" 'MsgBox "Car has inactivated" End If If ID = "A1DE5" Then MSComm1.Output = "m" 'MsgBox "Car has inactivated" End If lstCarPassed.AddItem (RecCar.Fields("Rfid")) RecCar.Fields("Activate") = False RecCar.UpdateElse 'If ID = "3C7E7" Then MSComm1.Output = "A"

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 74: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

'If ID = "A1DB4" Then MSComm1.Output = "B" 'If ID = "A1DD2" Then MSComm1.Output = "C" lstCarPassed.AddItem (RecCar.Fields("Rfid"))End IfRecCar.CloseEnd Function

4.3.4 STOLEN CAR REPORT

Dim RecVerify As New ADODB.Recordset

Private Sub cmdOK_Click()If chkPass1.Value = 1 And chkPass2.Value = 1 And chkPass3.Value = 1 Then RecVerify.Open "Select * from CarDetails", Con, adOpenDynamic, adLockOptimistic While RecVerify.EOF = False If RecVerify.Fields("Rfid") = Trim(txtRfid) Then If optStolen.Value = True Then RecVerify.Fields("Stolen") = True RecVerify.Fields("Activate") = False Else RecVerify.Fields("Activate") = True RecVerify.Fields("Stolen") = False If txtRfid = "7A42C" Then Active = "K" If txtRfid = "7AEFF" Then Active = "L" If txtRfid = "A1DE5" Then Active = "M" End If RecVerify.Update RecVerify.Close MsgBox "Record has been enter" Unload Me Exit Sub End If RecVerify.MoveNext Wend RecVerify.CloseElse MsgBox "Password is not matching"End If

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 75: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

End Sub

Private Sub cmdShow1_Click() RecVerify.Open "Select * from CarDetails", Con, adOpenDynamic, adLockOptimistic While RecVerify.EOF = False If RecVerify.Fields("Rfid") = Trim(txtRfid) Then txtA1 = RecVerify.Fields("Password1") RecVerify.Close Exit Sub End If RecVerify.MoveNext Wend RecVerify.Close MsgBox "Rfid no is not matching"End Sub

Private Sub cmdShow2_Click()RecVerify.Open "Select * from CarDetails", Con, adOpenDynamic, adLockOptimistic While RecVerify.EOF = False If RecVerify.Fields("Rfid") = Trim(txtRfid) Then txtA2 = RecVerify.Fields("Password2") RecVerify.Close Exit Sub End If RecVerify.MoveNext Wend RecVerify.Close MsgBox "Rfid no is not matching"End Sub

Private Sub cmdShow3_Click() RecVerify.Open "Select * from CarDetails", Con, adOpenDynamic, adLockOptimistic While RecVerify.EOF = False If RecVerify.Fields("Rfid") = Trim(txtRfid) Then txtA3 = RecVerify.Fields("Password3") RecVerify.Close Exit Sub End If RecVerify.MoveNext Wend

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 76: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

RecVerify.Close MsgBox "Rfid no is not matching"End Sub

Private Sub Command1_Click() Me.Hide frmMain.ShowEnd Sub

Private Sub Form_Load()optStolen.Value = TrueEnd Sub

4.3.5 WELCOME FORM

Private Sub Label1_Click()

End Sub

Private Sub Form_Load()pb1.Visible = Falsepb2.Visible = Falsepb3.Visible = Falselbl1.Visible = Falselbl2.Visible = Falselbl3.Visible = False

Timer2.Enabled = FalseTimer3.Enabled = FalseTimer1.Enabled = Falselbl4.Visible = Truepb1.Value = 0

End Sub

Private Sub lbl4_Click()lbl4.Visible = FalseTimer1.Enabled = Truelbl1.Visible = True

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 77: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

pb1.Visible = TrueEnd Sub

Private Sub lblenter2_Click()Unload MefrmMain.Show

End Sub

Private Sub Timer1_Timer()

If pb1.Value = 100 Then pb2.Value = 0 pb2.Visible = True lbl2.Visible = True Timer2.Enabled = True Exit SubElse: pb1.Value = pb1.Value + 5

End If

End Sub

Private Sub Timer2_Timer()Timer1.Enabled = FalseIf pb2.Value = 100 Then pb3.Value = 0 pb3.Visible = True lbl3.Visible = True Timer3.Enabled = True Exit SubElse: pb2.Value = pb2.Value + 5

End IfEnd Sub

Private Sub Timer3_Timer()Timer2.Enabled = FalseIf pb3.Value = 100 Thenlblenter2.Visible = True

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 78: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

lblenter2.Enabled = True Exit SubElse: pb3.Value = pb3.Value + 5

End IfEnd Sub

CHAPTER 5

TESTING, IMPLEMENTATION AND CONCLUSIONS

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 79: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

5.1 TESTING BY IMPLEMENTING ON A MODEL AND RESULTS

The model is developed taking into account that the pathways and roads constitute parts of the city map. Maps are made only to mark directions for the pathways en route. Since the project deals with cars that are stolen it is important have done a thorough city map study as this would be very useful in order to have the knowledge of placing the reader antennas at places that would allow the maximum range for detecting the tag of the car. Once the locations are chosen accordingly it is important to formulate a database that would store the cars that pass by. This is handled by our database unit which would be a PC interface whose main function would be to obtain the unique ID of every car passing and also immobilize a car when detected stolen. The microcontroller allows the disabling. In real time the spark plug in petrol engine cars are disconnected and in diesel the fuel is stopped from being injected into the fuel injection pump. This aspect cannot be handled while developing a model due to the limitations of scaling down real time objects into greater than ten manifolds smaller.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 80: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

Once location of reader antennas and their range have been determined, the setup with the hardware connections is placed a board that represents a highway. It is difficult to represent several vehicles. Thus a single car is tested with different tags and LEDs are attached to be able to differentiate one car from the other.

RESULT: The testing is considered successful when a stolen car is disabled while traversing through a path that has an RFID antenna and its entry has been made in the stolen car form. Also, other cars that pass by the unique ID is obtained and listed. Thus even if the car escapes from one antenna path since it was not reported stolen then, its track can be followed to finally find the next antenna that would allow the immobilization.

5.2 CONCLUSION DRAWN FROM RESULT The result would offer an insightful option of using the technology in the field of vehicle security systems. The RFID technology would be used in yet another application to prove its multiple uses. Such systems can be first implemented on a smaller scale to find their efficiency. The future enhancement can be made by increasing the ranges of antennas so that no matter in what narrow path the car is hidden or how fast it moves it can be detected. For operations of heavy motor vehicles one can add new features of maximum capacity of load the vehicle can carry and a system an be developed that measures this and also disables the moving Vehicle for having committed an offense. Most other police related offenses can also be implemented by the same technology. The scope of advancements is large in-depth and thus promising to carry out for

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 81: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

enterprises such as car companies that would like to offer their customers maximum security with minimum loss.

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 82: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

CHAPTER 6

BIBLIOGRAPHY

1.Vinod Chachra and Daniel McPherson. Personal privacy and use of RFID technology , October 2003. http://www.vtls.com/documents/privacy.pdf.[1]

2. Kenneth Fishkin and Sumit Roy. Enhancing RFID privacy through antenna energy analysis. In MIT RFID Privacy Workshop, 2003. http://www.rfidprivacy.org/papers/fishkin.pdf. [1],[3],[4]

3.Steven Holzner, Visual Basic 6 Core language, Little Black Book, edition published in 1999 [1]

4.Forum on Visual Basics 6, http://www.daniweb.com/techtalkforums/forum4.html?

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 83: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

gclid=CPvT5YHE_YQCFQdHSQodviAGJQ referenced by www.about.com[1]

5. Donald G. Fink and H. Wayne Beaty, Standard Handbook for Electrical Engineers, Eleventh Edition, McGraw-Hill, New York, 1978.[2]

6. http://electronics.howstuffworks.com/relay.htm [3]

7.Kenneth J. Ayala, The 8051 Microcontroller Architecture, Programming & Applications, Second Edition,1997[3],[4]

8.Muhammad Ali Mazidi, Janice Gillispie Mazidi,The 8051 Microcontroller and Embedded Systems,Pearson Education,Inc., 2000,Thirteenth Indian Reprint,2005 [3],[4]

9.www.datasheetarchieves.com

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311

Page 84: 4-Full Project of Gagan

Aloha Softwares Private Limited

“ FUTURISTIC BASED CAR TRACKING AND DISABLING SYSTEM USING RFID”

CHAPTER 7

DATASHEETS

SCF – 78, Top Floor, Phase -2, Mohali – 160055Phone : 0172 - 4609311