58
INDEX ABSTRACT Chapter 1. INTRODUCTION 3 1.1 Problem Definition 4 1.2 Problem Analysis 4 Chapter 2. LITERATURE SURVEY 6 2.1 RF Theory 7 2.1.1 History 7 2.1.1 RF Bands 8 2.1.2 Advantages of radio communication 10 2.1.3 RF Technology 11 2.1.4 Application of Radio Frequency 13 2.2 RF Module 15 2.3 Serial communication 25 Chapter 3. SOLUTION DESIGN 31 3.1 Block Diagram 32 3.2 Functional Description 33 3.3 Hardware Solution 35 3.3.1 List of components used 35 3.3.2 Hardware configuration 36 Chapter 4. IMPLEMENTATION 41 4.1 Circuit Diagram/Schematic 42 4.2 Schematic Level Working . 43

Report

Embed Size (px)

Citation preview

Page 1: Report

INDEX

ABSTRACT

Chapter 1. INTRODUCTION 3

1.1 Problem Definition 4

1.2 Problem Analysis 4

Chapter 2. LITERATURE SURVEY 6

2.1 RF Theory 7

2.1.1 History 7

2.1.1 RF Bands 8

2.1.2 Advantages of radio communication 10

2.1.3 RF Technology 11

2.1.4 Application of Radio Frequency 13

2.2 RF Module 15

2.3 Serial communication 25

Chapter 3. SOLUTION DESIGN 31

3.1 Block Diagram 32

3.2 Functional Description 33

3.3 Hardware Solution 35

3.3.1 List of components used 35

3.3.2 Hardware configuration 36

Chapter 4. IMPLEMENTATION 41

4.1 Circuit Diagram/Schematic 42

4.2 Schematic Level Working . 43

Page 2: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 2 -

4.3 Software Solution 46

3.4.1 Flowcharts 46

3.4.2 Softwares used 49

4.4 PCB Design 50

Chapter 5. ADVANTAGES AND APPLICATIONS 53

Chapter 6. FUTURE SCOPE 56

APPENDIX 58

1. PCB Layouts

2. Bill Of Material

3. Datasheets

Chapter 7. BIBLIOGRAPHY

Page 3: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 3 -

CHAPTER # 1

INTRODUCTION

Page 4: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 4 -

1.1 Problem Definition : The aim of this project is to design security system for the private societies,

Companies and restricted area by identifying the vehicle entry in the campus. For

permitting entry of vehicle, vehicle code and driver code will be entered from vehicle

cabin. The controller will process the data sent by vehicle cabin and will give the

necessary signal to barricade.

1.2 Problem Analysis : In private society, companies, the entries of vehicles as well as men are not

allowed. So instead of employing large man power an automatic secured parking

system is employed. This saves lot of money and chances of errors are also less. Some

methods to meet these requirements are used of RF-ID and Bar Code Reader. But they

have their limitations. In RF-ID we cannot make changes; it’s a fixed pattern. Once the

RF-ID tag is programmed, it cannot be programmed again. And in Bar Code Reader,

the Bar patterns can be easily duplicated. So, we have designed a system, which is

reprogrammable. So even if the code is leaked out it can be changed.

The basic theme of the project is to monitor and control the entry of vehicles

in private and restricted zones. Such a system in our case is P89S51RD2 based

microcontroller board. The system will check the code for entry and keep the record of

vehicle number, date & time of entry. A 4x4 matrix keyboard is interfaced with

microcontroller P89S51RD2 in the vehicle cabin for the driver to enter the required

code for transmission of that vehicle number. The code can be alphanumeric. The code

entered by the driver is given to the microcontroller and it matches with a specified

code, if the code is matched, the microcontroller will send it’s vehicle number to the

receiver in the security cabin. After receiving the vehicle number, the microcontroller

will open the gate of parking and sending the empty slot number available in the

Page 5: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 5 -

parking to the microcontroller in the vehicle cabin. The microcontroller in the vehicle

cabin displays this slot number to the driver on the LCD display which is fixed in the

vehicle cabin. The entry of the user will get recorded with the help of RTC. In the

similar way, at the time of leaving the driver must enter the code to open the gate of

parking . The exit time also get recorded and stored in the memory. The entry and exit

record of all vehicle can be obtained any time from the memory. The record can be

display on the LCD fixed in the receiver cabin or on a computer.

Page 6: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 6 -

CHAPTER # 2

LITERATURE SURVEY

Page 7: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 7 -

2.1 RF THEORY

2.1.1 History : Somewhere around 1889 a German physicist Herinrich Hertz actually

succeeded in generating the first airborne RF wave in his laboratory for all his daring

&brilliance the RF engineers of the world have honored him by using his name as the

unit of measure for frequency. Before progressing into today's radio technology it is

interesting to put it in perspective & look at in the way in which radio developed. The

story of its development is fascinating.

Maxwell's worked into electromagnetic theory. Much of his work was

theoretical & not practical .Latter a German scientist Herinrich. Hertz proved

existence of these waves & its properties. As Hertz has discovered these waves they

soon became to known as "Hrtzian Waves ". Once existence of electromagnetic waves

was confirmed, it did not take long before people started to think of using them for

communicating.

Marconi managed to receive a signal over two km away from transmitter .The

navy saw the possibilities of using wireless equipment for communication at sea &

they showed considerable interest. Marconi started to investigate its use for providing

a long distance communication link .The main goal was to be able to send a message

across Atlantic ,which was not easy .Finally on 12'th December 1901 the first

transmission was received when the letter 'S' was detected in receiver.

The term radio frequency (RF) refers to the electromagnetic field that is

generated when an alternating current is input to an antenna .This field ,also called an

RF field or radio wave can be used for wireless broadcasting & communication over

a significant portion of the electromagnetic radiation spectrum from 9 KHz to 1000's

GHz .This portion is referred to as the RF spectrum .As the frequency is increased

Page 8: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 8 -

beyond the RF spectrum , electromagnetic energy takes form of infrared (IR), visible

light .Ultraviolet (UV), X-rays & gamma rays.

Radio technology is becoming increasingly important in today's highly

sophisticated electronics industry. There are traditional uses including broadcasting &

point to point communication, as well as new technology associated with cellular

phones & new wireless data .In limited area communication we can expand our

network from a single building to a complex consisting of multiple building .Now the

actual information may be of still lower frequencies of the order of few KHz & term

wireless implies RF.

Many types of wireless devices make use of RF fields, television, cordless &

cellular telephones , satellite communication system & many measuring & instrument

system used in manufacturing .Some wireless devices, such as remote control boxes &

cordless mice operate at IR or visible light frequencies .The RF spectrum is divided

into several ranges or bands .Each of these bands ,other than the lowest frequency

segment, represents an increase of frequency corresponding to an order of

magnitude(power of ten).

2.1.2 Radio frequency bands :

Designation Abbrivation Frequencies Free-space

wavelengths

Very Low Frequency VLF 9 kHz - 30 kHz 33 km – 10 km

Low Frequency LF 30 kHz - 300 kHz 10 km – 1 km

Medium Frequency MF 300 kHz - 3 MHz 1 km – 100 m

High Frequency HF 3 MHz - 30 100 m – 10 m

Page 9: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 9 -

The frequency of a wave is determined by its oscillations or cycles per second.

One cycle is one hertz (Hz); 1,000 cycles is one kilohertz (KHz); 1 million cycles is 1

megahertz (MHz); and 1 billion cycles is 1 gigahertz (GHz). A station on the AM dial

at 98, for example, broadcasts using a signal that oscillates 98,000 times per second,

or has a frequency of 98 KHz. A station a little further up the dial at 710 broadcasts

using a signal that oscillates 710,000 times per second, or has a frequency of 710

KHz. With a slice of the RF pie licensed to each broadcaster, the RF range can be

neatly divided and utilized by multiple parties.

The FCC shares responsibility for RF assignment with the national

telecommunication and Information Administration (NTIA), which is responsible for

regulating federal uses of the RF spectrum. At present, according to the FCC,

frequencies from 9 KHz – 275 GHz have been allocated, with the highest bands

reserved for satellite and radio astronomy. The sample chart below lists of major

categories with approximated RF ranges. In actuality, there are no gap between

categories, as hundreds of other uses are also assigned, from garage door openers and

alarm system to amateur radio and emergency broadcasting.

MHz

Very High Frequency VHF 30MHz - 300

MHz

10 m – 1 m

Ultra High Frequency UHF 300 MHz - 3 GHz 1 m – 100 mm

Super High Frequency SHF 3 GHz - 30

GHz

100 mm – 10

mm

Extremely High Frequency EHF 30 GHz - 300

GHz

10 mm – 1 mm

Page 10: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 10 -

2.1.3 Advantages of radio communication :

Radio communications are used over cable based communication network for

several reasons:

1) LINE OF SITE:-

Line of site when speaking of RF means more than just being able to see the

receiving antenna from the transmitting antenna .In, order to have true line of site no

objects(including trees, houses or the ground ) can be in the Fresnel zone. The Fresnel

zone is the area around the visual line of sight that radio waves spread out into after

they leave the antenna. This area must be clear or else signal strength will weaken

2) COST EFFECTIVENESS:-

The cost of setting up a cable –based network can be huge, due to the amount of

buried or aerial cabling required .The cabling is costly to install & maintain.

These problems are solved by the use of a radio link where the only hardware

required is the building for housing the equipment, the equipment itself the mast &

antenna.

3) QUICK SET-UP:-

The set-up time for a microwave link is a shorter than for a cable based

network. If there is already a tower &building located in the link placement area, the

installation time is in hours or days. If tower & equipment building have to built, the

installation time will be measured in weeks rather than months. This would be the

case if a similar cable based network would be installed.

Page 11: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 11 -

4) REALLOCATION:-

Relocation of radio communication equipment is extremely fast , as the

equipment only has to be moved to another location &set up along with its antenna.

5) INACCESSIBILITY:-

In some places the only practical way to provide communication normally due

to the environment is to use a radio based link, as it may be impossible to install a

cable based network.

2.1.4 RF Technology : What is radio frequency?

A radio wave is electromagnetic wave propagated by an antenna. Radio waves

have different frequencies, and by tuning a radio receiver to a specific frequency you

can pick up a specific signal.

Radio frequency (abbreviated RF) is a term that refers to alternating current

(AC) having characteristics such that, if the current is input to an antenna, an

electromagnetic (EM) field is generated suitable for wireless broadcasting and/or

communications. These frequencies over a significant portion of the electromagnetic

radiation spectrum, extending from 9 KHz; the lowest allocated wireless

communications frequency (it’s within the range of human hearing), to thousands of

gigahertz (GHz).

When an RF current is supplied to an antenna, it gives rise to an

electromagnetic field that propagates through space. This field is sometimes called an

RF field; in less technical jargon it is a “radio wave”. Any RF field has a wavelength

Page 12: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 12 -

that is inversely proportional to the frequency. In the atmosphere or in outer space, if ‘

f ‘ is the frequency in megahertz and ‘ s’ is wavelength in meters, then,

s = 300/f

The frequency of an RF signal is inversely proportional to the wavelength of

the EM field to which it corresponds. At 9 KHz, the free space wavelength is

approximately 33 kilometers (km) or 21 miles (mi).At the highest frequencies, the EM

wavelengths measure approximately one millimeter (1 mm). As the frequency is

increased beyond that of the RF spectrum, EM energy takes the form of infrared (IR),

visible, ultraviolet (UV), X-rays, and gamma rays.

Many types of wireless devices make use of RF fields. Cordless and cellular

telephone, radio and television broadcast stations, satellite communication systems,

and two-way radio services all operate in RF spectrum. Some wireless devices operate

at IR or visible-light frequencies, whose electromagnetic wavelengths are shorter than

those of RF fields. Examples include most television-set remote-control boxes, some

cordless computer keyboards and mice, and a few wireless hi-fi stereo headsets.

The RF spectrum is divided into several ranges, or bands. With the exception of

the lowest frequency segment, each band represents an increase of frequency

corresponding to an order of magnitude (power of 10). The table depicts the eight

bands in a RF spectrum, showing frequency and bandwidth ranges. The SHF and EHF

bands are often referred to as the microwave spectrum.

Page 13: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 13 -

2.1.5 Application of radio frequency :

Garage door opners, alarm system, etc. –Around 40 MHz

Standard cordless phones: Bands from 40 to 50 MHz

Baby monitors: 49 MHz

Radio controlled airplanes: Around 72MHz

Radio controlled cars: Around 75MHz

Wildlife tracing collars: 215 to 220 MHz

MIR space station: 145 MHz and 437 MHz

Cell phones: 824 to 849 MHz

New 500 MHz cordless phones: Obviously above 900 MHz!

Air traffic control: radar: 960 to 1,215 MHz

Global positioning system: 1,227 and 1,575 MHz

Page 14: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 14 -

Some more applications of RF with the respective frequency band are as

mentioned in the following table:

Aeronautical/Maritime 9 KHz – 535 KHz

FM Radio 535 KHz – 1,700 KHz

Shortwave radio 5.9 MHz – 26.9 MHz

Citizen’s Band(CB) 26.96 MHz – 27.41 MHz

TV station 2-6 54 MHz – 88 MHz

FM radio 88 MHz – 108 MHz

TV stations 7-13 174 MHz – 220MHz

Cell phones CDMA 824 MHz – 849 MHz

Cell phones GSM 869 MHz – 894 MHz

Air traffic controller 960 MHz – 1,215 MHz

GPS 1,227 MHz – 1,575 MHz

Cell phones PCS 1,850 MHz – 1,990 MHz

The RF bands most of us are familiar with are VHF(Very High Frequency),

used by radio and television station 2-13, and UHF(Ultra High Frequency), used by

other television stations, mobile phones and two-way radios. Microwave ovens even

use RF waves to cook food , but these waves are in a super high frequency band or

SFH. Following the electromagnetic spectrum into even higher frequencies, one finds

infrared waves, and finally invisible light.

Radio Frequency, the mode of communication for wireless technologies of all

Kinds, including cordless phones, radar, ham radio, GPS, and radio and television

broadcasts. From baby monitors to cell phones, Bluetooth to remote control toys, RF

waves are all around us.

Page 15: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 15 -

2.2 RF MODULE Why we are using RF module :

We can use the bar code system and RFID tag for the same purpose but both are

having some disadvantages over RF modules which are not suitable for our system

because we are designing a system, which is reprogrammable and RF module allows

the reprogramming. That’s why we are using RF module instead of bar code system

and RFID tag.

Bar code system is having many disadvantages some of those are as shown

below:-

The bar code is fixed at the time of printing & it cannot be changed.

For the bar code to be read by the scanner there should be a clear optical

line of sight and in many practical application, it is difficult to achieve this.

It is very easy to deface the bar code.

With just a laser printer, it is very easy to duplicate bar code causing

security violations.

To overcome these problems, RF technology can be effectively used for

materials management & asset tracking. In the last few years Radio frequency

technology has gained a lot of importance & many innovative applications are being

developed using this technology. RF module is going to revolutionize the business all

over the world in coming years.

Initially objective our project was to transmit data between two

microcontrollers, which were 100m apart by using ISM band at frequency of 2.4 GHz.

For that we went through various sites like Atmel, Maxstream, Zigbee, Chipcon etc.

But main hurdle was support, availability also set up cost is to high. Some modules

Page 16: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 16 -

are available which transmit data up to 500m but with higher cost. For our purpose, it

doesn’t require so long range of 500 metre. 100 metre range is sufficient to our

application. So we decided to go for lower range RF modules of low cost and high

accuracy.

Hence we decided to design low cost RF module, which forms a plate form for

Wireless communication system. This module work on 2.4 GHz frequency & can be

easily absorbed in any project. Free scale semiconductor (MOTOROLA), Reynolds

Electronics, Dallas, Semiconductor(MAXIM), ATMEL, MAXSTREAM, MICREL

etc. are the manufacturers working in this field. We studied some of RF modules

available in companies. After comparing RF IC’s we decided to use small sized XBee-

PRO RF module of MAXSTREAM because of it’s availability, cost and support.

XBee RF module

XBee RF Modules were engineered to meet IEEE 802.15.4 standards and support

the unique needs of low-cost, low-power wireless sensor networks. The modules require

minimal power and provide reliable delivery of data between devices. The modules

operate within the ISM 2.4 GHz frequency band and are pin-for-pin compatible with

each other.

XBee OEM RF Module

Page 17: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 17 -

RF Module operation :

The XBee OEM RF Modules interface to a host device through a logic-level

asynchronous serial port. Through its serial port, the module can communicate with

any logic and voltage compatible UART; or through a level translator to any serial

device (For example: RS-232/485/422 or USB interface board).

UART Data Flow

Devices that have a UART interface can connect directly to the pins of the RF module

as shown in the figure below.

Serial Data Data enters the module UART through the DI pin (pin 3) as an asynchronous

serial signal. The signal should idle high when no data is being transmitted. Each data

byte consists of a start bit (low), 8 data bits (least significant bit first) and a stop bit

(high). The following figure illustrates the serial bit pattern of data passing through the

module.

Page 18: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 18 -

Example Data Format is 8‐N‐1 (bits ‐ parity ‐ # of stop bits) The module UART

performs tasks, such as timing and parity checking, that are needed for data

communications. Serial communications depend on the two UARTs to be configured

with compatible settings (baud rate, parity, start bits, stop bits, data bits).

Flow Control

DI (Data In) Buffer

When serial data enters the RF module through the DI pin (pin 3), the data is

stored in the DI Buffer until it can be processed.

Hardware Flow Control (CTS). When the DI buffer is 17 bytes away from being

full; by default, the module de-asserts CTS (high) to signal to the host device to stop

sending data [refer to D7 (DIO7 Configuration) parameter]. CTS is re-asserted after

the DI Buffer has 34 bytes of memory available.

DO (Data Out) Buffer

When RF data is received, the data enters the DO buffer and is sent out the

serial port to a host device. Once the DO Buffer reaches capacity, any additional

incoming RF data is lost. Hardware Flow Control (RTS). If RTS is enabled for flow

Page 19: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 19 -

control (D6 (DIO6 Configuration) Parameter = 1), data will not be sent out the DO

Buffer as long as RTS (pin 16) is de-asserted.

Transparent Operation (By default)

XBee/XBee-PRO RF Modules operate in Transparent Mode. When operating in

this mode, the modules act as a serial line replacement - all UART data received

through the DI pin is queued up for RF transmission. When RF data is received, the

data is sent out the DO pin. When the RO (Packetization Timeout) parameter threshold

is satisfied [refer to RO command description], the module attempts to initialize an RF

transmission. If the module cannot immediately transmit (for instance, if it is already

receiving RF data), the serial data continues to be stored in the DI Buffer. Data is

packetized and sent at any RO timeout or when 100 bytes (maxi-mum packet size) are

received. The module operates as described above unless the Command Mode

Sequence is detected. The Command Mode Sequence consists of three copies of the

command sequence character [CC parameter] surrounded by before and after guard

times [GT parameter

API Operation API (Application Programming Interface) Operation is an alternative to the

default Transparent Operation. The frame-based API extends the level to which a host

application can interact with the networking capabilities of the module. When in API

mode, all data entering and leaving the module is contained in frames that define

operations or events within the module. Transmit Data Frames (received through the

DI pin (pin 3)) include: • RF Transmit Data Frame • Command Frame (equivalent to

AT commands) Receive Data Frames (sent out the DO pin (pin 2)) include: • Showing

a received RF packet • A response to a command • Showing events such as reset,

associate, disassociate, etc. The API provides alternative means of configuring

modules and routing data at the host application layer. A host application can send

Page 20: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 20 -

data frames to the module that contain address and payload information instead of

using command mode to modify addresses. The module will send data frames to the

application containing status packets; as well as source, RSSI and payload information

from received data packets.

Modes of Operation

XBee/XBee-PRO RF Modules operate in five modes.

Figure 2‐05. Modes of Operation

1. Idle Mode

When not receiving or transmitting data, the RF module is in Idle Mode. The

module shifts into the other modes of operation under the following conditions:

• Transmit Mode (Serial data is received in the DI Buffer) • Receive Mode (Valid RF

data is received through the antenna) • Sleep Mode (Sleep Mode condition is met)

• Command Mode (Command Mode Sequence is issued)

Page 21: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 21 -

2. Transmit & Receive Modes

RF Data Packets

Each transmitted data packet contains a <Source Address> and <Destination

Address> field. The <Source Address> matches the address of the transmitting

module as specified by the MY (Source Address) parameter (if MY >= 0xFFFE), the

SH (Serial Number High) or the SL (Serial Number Low) parameters. The

<Destination Address> field is created from the DH and DL parameter values. The

<Source Address> and/or <Destination Address> fields will either contain a short 16-

bit or long 64-bit address. The RF data packet structure follows the 802.15.4

specification.

Direct and Indirect Transmission

There are two methods to transmit data. The first method, Direct Transmission,

transmits data immediately to the <Destination Address>. The second method,

Indirect Transmission, retains a packet for a period of time and transmits the data only

after the destination module (<RF Module Source Address> = <Data Destination

Address>) requests the data. Indirect Transmissions can only occur on a Coordinator.

Thus, if all devices in a network are End Devices, only Direct Trans-missions will

occur. Indirect Transmissions are useful to ensure packet delivery to a sleeping device.

The Coordinator currently is able to retain up to 2 indirect messages.

Direct Transmission

A NonBeaconing Coordinator can be configured to only use Direct

Transmission by setting the SP (Cyclic Sleep Period) parameter to “0”. Also, a

NonBeaconing Coordinator using indirect transmissions will revert to direct

transmission if it knows the destination module is awake. To enable this behavior, the

ST (Time before Sleep) value of the Coordinator must be set to match the ST value of

Page 22: Report

RF BASED INTELLIGENT PARKING SYSTEM

22

the End Device. Once the End Device either transmits data to the Coordinator or polls

the Coordinator for data, the Coordinator will use direct transmission for all

subsequent data transmissions to that module address until ST time (or number of

beacons) occurs with no activity (at which point it will revert to using indirect

transmissions for that module address). “No activity” means no transmission or

reception of messages with a specific address. Global messages will not reset the ST

timer.

Indirect Transmission To configure Indirect Transmissions in a PAN (Personal Area Network), the SP

(Cyclic Sleep Period) parameter value on the Coordinator must be set to match the

longest sleep value of any End Device. The SP parameter represents time in

NonBeacon systems and beacons in Beacon-enabled systems. The sleep period value

on the Coordinator determines how long (time or number of bea-cons) the Coordinator

will retain an indirect message before discarding it.

Acknowledgement

If the transmission is not a broadcast message, the module will expect to receive

an acknowledgement from the destination device. If an acknowledgement is not

received, the packet will be resent up to 3 more times. If the acknowledgement is not

received after all transmissions, an ACK failure is recorded.

3. Sleep Mode

Sleep Modes enable the RF module to enter states of low-power consumption

when not in use. In order to enter Sleep Mode, one of the following conditions must

be met (in addition to the module having a non-zero SM parameter value):

• Sleep RQ (pin 9) is asserted.

Page 23: Report

RF BASED INTELLIGENT PARKING SYSTEM

23

• The module is idle (no data transmission or reception) for the amount of

time defined by the ST (Time before Sleep) parameter. [NOTE: ST is only

active when SM = 4-5.]

The SM command is central to setting Sleep Mode configurations. By

default, Sleep Modes are disabled (SM = 0) and the module remains in Idle/Receive

Mode. When in this state, the module is constantly ready to respond to serial or RF

activity.

 4. Command Mode

To modify or read RF Module parameters, the module must first enter into

Command Mode - a state in which incoming characters are interpreted as commands.

Two Command Mode options are supported: AT Command Mode and API Command

Addressing

When communication occurs between two networked devices, each data

packet contains a <Source Address> and <Destination Address> field. The module

conforms to the 802.15.4 specification and supports both short 16-bit addresses and

long 64-bit addresses. A unique 64-bit IEEE source address is assigned at the factory

and can be read with the SL (Serial Number Low) and SH (Serial Number High)

parameters. Short addressing must be configured manually. An RF modem will use its

unique 64-bit address as its Source Address if its MY value is “0xFFFF” or

“0xFFFE”. To send a packet to a specific module using 64-bit addressing, set the

Page 24: Report

RF BASED INTELLIGENT PARKING SYSTEM

24

Destination Address (DL + DH) to match the Source Address (SL + SH) of the

intended destination RF modem. To send a packet to a specific module using 16-bit

addressing, set the DL (Destination Address Low) parameter to equal the MY (Source

Address) parameter and set the DH (Destination Address High) parameter to “0”.

1) Unicast Mode

Unicast Mode enables acknowledged communications. While in this mode,

receiving modules send an acknowledgement (ACK) of RF packet reception to the

transmitter. If the transmitting module does not receive the ACK, it will re-send the

packet up to three times or until the ACK is received. Unicast Mode is the only mode

that supports retries.

2) Broadcast Mode

Any RF module will accept a packet that contains a broadcast address. When

configured to operate in Broadcast Mode, receiving modules do not send

acknowledgements and transmitting modules do not automatically re-send packets as

is the case in Unicast Mode. To send a broadcast packet to all modules regardless of

16-bit or 64-bit addressing, set destination addresses of all the modules as shown

below. Sample Configuration (All modules in the network):

• DL (Destination Low Address) = 0x0000FFFF

• DH (Destination High Address) = 0x00000000

Page 25: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 25 -

2.3 SERIAL COMMUNICATION

Serial is a device communication protocol that is standard on

almost every PC. Most computers include two RS232-based serial

ports. Serial is also a common communication protocol for

instrumentation in many devices, and numerous GPIB-compatible

devices come with an RS232 port. Furthermore, you can use serial

communication 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 you

can use it over longer distances. For example, the IEEE 488

specifications for parallel communication state that the cabling

between equipment can be no more than 20 m total, with no

more than 2 m between any two devices; serial, however, can

extend as much as 1200 m.

Typically, engineers use serial to transmit ASCII data.

They complete communication using three transmission lines --

ground, transmit, and receive. Because serial is asynchronous,

the port can transmit data on one line while receiving data on

another. Other lines are available for handshaking but are not

Page 26: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 26 -

required. The important serial characteristics are baud rate, data

bits, stop bits, and parity. SDA SCL DEVICE CONNECTIONS Data Transfer

Data transfer may be initiated only when the bus is not busy. During a data

transfer, the data line must remain stable whenever the clock line is high. Any changes in

the data line while the clock line is high will be interpreted as a START or STOP

condition. The state of the data line represents valid data when after a START condition,

the data line is stable for the duration of the HIGH period of the clock signal. The data on

the line must be changed during the LOW period of the clock signal. There is one clock

pulse per bit of data. Each data transfer is initiated with a START condition and

terminated with a STOP condition.

START Condition

The START condition precedes all commands to the devices and is defined as a HIGH to

LOW transition of SDA when SCL is HIGH.

STOP Condition

The STOP condition is defined as a LOW to HIGH transition of SDA when SCL is

HIGH. All operations must end with a STOP condition.

MASTER DEVICE

SLAVE DEVICE 1

SLAVER DEVICE n

Page 27: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 27 -

Acknowledge

After a successful data transfer, each receiving device is required to generate an

acknowledge. The Acknowledging device pulls down the SDA line.

Device addressing

The MASTER begins a transmission by sending a START condition. The MASTER then

sends the address of the particular slave devices it is requesting. The SLAVE address is 8

bits.

Page 28: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 28 -

RS232 Overview : RS232 is the serial connection commonly used in PCs. It is used for many

purposes, such as connecting computers to sensors and modems, or for instrument

control. RS232 hardware permits communication at distances up to 50 ft. RS232 is

limited to point-to-point connections between PC serial ports and devices. For this

reason, it is common to require additional RS232 serial ports for the computer.

National Instruments offers RS232 serial interfaces on a variety of platforms, including

PCI, USB, PCMCIA, ExpressCard, PXI, and Ethernet. Depending on the platform, NI

Serial interfaces are available in 1, 2, 4, 8, and 16 port versions. In addition, NI RS232

serial interfaces offer increased functionality, such as high speed baud rates up to 1 Mb/s,

minimal CPU usage through DMA transfers, optional 2000 V port-to-port isolation, and

configurable nonstandard baud rates.

DB-9 CONNECTOR :

The DB9 (male) connector is normally used to provide serial input and output

to/from a remote computer. The signal levels are fully RS232 compliant. (connected

computer specifications may be slower). The wiring of the DB9 connector is:

Page 29: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 29 -

DB9 SIGNAL RS232 Name 1 N/C (DCD) 2 Receive Data RxD 3 Transmit Data TxD 4 N/C (DTR) 5 Signal Ground GND 6 N/C (DSR) 7 Request to Send RTS 8 Clear to Send CTS 9 N/C RI MAX232 :

MAX232 convert the RS-232 signals to CMOS-logic output levels. The MAX232

line drivers/receivers are designed for RS-232 and V.28 Communications innsures harsh

environments. The guaranteed 0.8V input low threshold e that receivers shorted to ground

have a logic 1 output. This provides clean output transitions, even with slow rise/fall-time

signals with moderate amounts of noise and ringing.

MAX232

Page 30: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 30 -

MAX3232 :

The MAX3232 have 2 receivers and 2 drivers. The MAX3222 and MAX3232 are

pin, package, and functionally compatible with the industry-standard MAX232.

MAX3232

Page 31: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 31 -

CHAPTER # 3

SOLUTION DESIGN

Page 32: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 32 -

3.1 BLOCK DIAGRAM :

VEHICLE CABIN SECTION :

SECURITY CABIN SECTION :

Micro-

ControllerKEYPAD

RF Transreceiver

LCD Display

Micro-

Controller

SWITCHES INPUTS LCD DISPLAY

RTC DS1307 RF Transreceiver

Page 33: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 33 -

3.2 FUNCTIONAL DESCRIPTION Every vehicle is allocated with specific code number of four byte. There is

record of vehicle number, parking account number for every code number.

We are using two RF modules, one for transmitting the vehicle number and

other one is use for the receiving that vehicle number. The RF modules which is used

to transmit the vehicle number is placed in the vehicle cabin and other RF module is

placed in security cabin for receiving that vehicle number.

When a user want to park his vehicle in the parking zone, user has to enter the

code provided to him. The code which is entered by the user is checked by the

microcontroller in the vehicle cabin if it is correct then the microcontroller send the

vehicle number to the RF module placed in the security cabin. The RF modules in

security cabin will receive that vehicle number. The microcontroller in security cabin

find the available empty slot number and send that slot number to the microcontroller

placed in the vehicle cabin and the LCD display will shows the empty slot number and

microcontroller will open the gate and then the entry of the vehicle will get recorded

with the help of RTC.

The microcontroller in the security cabin also checks whether the vehicle is

parked in correct slot number or not? If it is parked in wrong slot number then the

incorrect slot in which vehicle is parked is founded and the allocated number is

replaced by the incorrect number in memory. The number which is allocated to user is

then stored as vacant slot. Each slot is provided a separate switch for it, if a vehicle is

parked in a slot then the corresponding key will get pressed and its output will go

high. The output of each switch is given to the MUX IC. The status of each slot

Page 34: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 34 -

number is decided by MUX output. The entries in the memory for the vacant slot are

updated as per the MUX output.

At the time of entry of vehicles, the system will store the users vehicle number,

entry time of each vehicle, slot number of the vehicle. The controller keeps the space

reserved in the memory for storing exit time of vehicle.

If any vehicle leaves the slot, then switch in corresponding slot released and

using MUX controller finds the slot number. The controller finds out the memory

record of that slot number and save the exit time in empty space.

At the exit time user has to again enter that four digit code which is provided to

him and microcontroller will check that code if the code is correct then RF module

will send the vehicle number to the security cabin and microcontroller in the security

cabin will receive that number with the help of RF module and microcontroller will

open the gate and store the exit time.

Page 35: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 35 -

3.3 HARDWARE SOLUTION

3.3.1 List of components used : 1) RF data modules:

Two RF modules are required, one for transmission of vehicle number from

vehicle cabin and another for reception of that vehicle number in security cabin.

2) Microcontrollers:

Two microcontrollers are required; one used in security cabin which will

keep the record of all coming and going vehicle, another used in vehicle cabin which

is used for checking the code entered and is interfaced with RF module and keypad.

3) 16*2 char LCD displays:

Two LCD displays are use. One LCD display is provided in the vehicle

cabin, it will display vacant slot number, some messages. Another one is provided in

the security cabin to display received vehicle number and some messages. It is also

used to view record of all vehicles.

4) On/off Switches:

The number of on/off switches depends on number of slots in the parking.

These are used to check the status of each slot in the parking.

5) A matrix keyboards:

A matrix keypad is used in the vehicle cabin to enter a four digit code of the

user.

6) EEPROM Memory:

Two external serial EEPROM memories are used to store the record of all

incoming and outgoing vehicles separately.

7) Serial RTC:

A serial real time clock is used to get date and time at the time of entry and

exit of vehicles.

Page 36: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 36 -

3.3.2 Hardware configuration :

• Microcontroller :

There are four major 8 bit microcontrollers. They are: Motorola’s 6811,

Intel’s 8051, and PIC 16X from Microchip technologies. Each of the above

microcontrollers has unique features. Some important points considered while

selecting a micro controller.

Micro controller should meet computing need of the task efficiently and cost

effectively. That is we must see whether 8-bit, 16-bit or 32 bit micro

controller can best handle computing needs of the task.

Further we should check availability of on-chip RAM and EPROM, number

of I/O pins, timers and interrupts.

We should also see cost per unit and power consumption.

Availability of software development tools such as compiler, assemblers,

Debuggers.

The micro controller should have sufficient memory to complete the need of

program.

The microcontroller should be easily available in the market.

Considering these points we have selected micro controller AT89C51RD2.

The AT89C51RD2 is a low power high performance, flash version of 89C51 8-bit

micro controller.

89C51RD2 Microcontroller The P89C51RD2xx contains a non-volatile 64KB Flash program memory that is

both parallel programmable and serial In-System and In-Application Programmable.

In-System Programming (ISP) allows the user to download new code while the

Page 37: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 37 -

microcontroller sits in the application. In-Application Programming (IAP) means that

the microcontroller fetches new program code and reprograms itself while in the

system. For In-Application Programming, the user program erases and reprograms

the Flash memory by use of standard routines contained in ROM. The instruction set

is 100% compatible with the 80C51 instruction set.

Specification of 89C51RD2 Four 8-bit I/O ports.

RAM expandable externally to 64 kbytes

On-chip Flash Program Memory with In-System Programming

(ISP) and In-Application Programming (IAP) capability.

Boot ROM contains low level Flash programming routines for

downloading via the UART.

Can be programmed by the end-user application (IAP).

Seven interrupt sources

Full-duplex enhanced UART

– Framing error detection

– Automatic address recognition

• RF modules : XBee RF module

XBee RF Modules were engineered to meet IEEE 802.15.4 standards and

support the unique needs of low-cost, low-power wireless sensor networks. The

modules require minimal power and provide reliable delivery of data between devices.

The modules operate within the ISM 2.4 GHz frequency band and are pin-for-pin

compatible with each other.

Page 38: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 38 -

XBee-PRO RF module

Specification of XBee-PRO RF module

Indoor/Urban: up to 30 metre

Outdoor line-of-sight: up to 100 metre

Transmit Power: 1 mW

Receiver Sensitivity: -92 dBm

RF Data Rate: 250,000 bps

• Display : LCD Display

It has easy interface with a 4-bit or 8-bit MPU and built-in Dot Matrix LCD

Controller with font 5x7, Character generator ROM which provide 160 characters

with font 5x7 dots and 32 characters with font 5x10 dots. Both display data and

character generators RAMs can be read from the MPU. It has built in oscillator circuit

(No external clock required). Wide range of instruction functions like Clear Display,

Cursor Home, Display ON/OFF, Cursor ON/OFF, Curser Shift and Display Shift are

there. Basically there are two types of displays viz. LED and LCD.

Page 39: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 39 -

Fig3: LCD display (16x2)

A general purpose alphanumeric LCD, with two lines of 16 characters.

We have preferred liquid crystal display (LCD) it has less operating voltage and

it is easily mountable. The LCD module is to be powered by a 5V power supply. The

power supply to the backlight is given through the current limiting resistor.

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.

• Real Time Clock : Serial RTC DS1307

The DS1307 serial Real Time clock, which incorporates a 2-wire serial

interface, it can be controlled using an 8051-compatible microcontroller. Any two of

the I/O ports can control the DS1307 operation. Address & data are transferred

serially via 2-wire bi-directional bus. The DS1307 Serial Real Time Clock is a low

power, full BCD clock/calendar plus 56 bytes of nonvolatile SRAM. The

clock/calendar provides seconds, minutes, hours, day, date, month, and year

information. The end of the month date is automatically adjusted for months with less

than 31 days, including corrections for leap

Page 40: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 40 -

Specification of RTC DS1307 Real time clock counts seconds, minutes, hours, date of the month, month,

day of the week, and year with leap year compensation valid up to 2100

56 byte nonvolatile RAM for data storage

2-wire serial interface

Programmable squarewave output signal

Automatic power-fail detect and switch circuitry

Consumes less than 500 nA in battery backup mode with oscillator running

• EEPROM Memory : AT24C512

The AT24C512 provides 524,288 bits of serial electrically erasable and

programmable read only memory (EEPROM) organized as 65,536 words of 8 bits

each. The device’s cascadable feature allows up to 4 devices to share a common 2-

wire bus. The device is optimized for use in many industrial and commercial

applications where low-power and low-voltage operation are essential.

Specification of AT24C512

Low-voltage and Standard-voltage Operation.(5.0V,2.7V,1.8V)

2-wire Serial Interface.

Bidirectional Data Transfer Protocol.

1 MHz (5V), 400 kHz (2.7V) and 100 kHz (1.8V) Compatibility.

Write Protect Pin for Hardware and Software Data Protection.

128-byte Page Write Mode. (Partial Page Writes Allowed)

High Reliability.(Write Cycles– Data Retention: 40 Years)

Page 41: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 41 -

CHAPTER # 4

IMPLEMENTATION

Page 42: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 42 -

4.1 CIRCUIT DIAGRAM

C2

MAX3232

ROWS

DB-9

87

16

3

109

1

25

4156

RinTout

VCC

C1-

TinRout

C1+

+VC2-

C2+GNDV-

33 pF

10K

C1GND

+3.5V

4X4 KEYPAD

GND

C5

1819

1235678

21222324

25262728

1011

40

39383736

35343332

920

XTAL2XTAL1

P1.0P1.1P1.2P1.4P1.5P1.6P1.7

P2.0P2.1P2.2P2.3

P2.4P2.5P2.6P2.7

RXDTXD

VCC

P0.0P0.1P0.2P0.3

P0.4P0.5P0.6P0.7

RST.

-5V 2 310 1

Din DoutGND VCC

XBee RFMODULE

VCC

COLUMNS

10 uF

LCD DISPLAY

87

4

14

21

3

56

910111213

D1D0

RS

D7

VCCGND

VSS

RWEN

D2D3D4D5D6

RESETC3

23

RXDTXD

--

12 MHz. 910

16

3

78

1

25

4156

RoutTin

VCC

C1-

ToutRin

C1+

+VC2-

C2+GNDV-

33 pF

C4C1

C2

C4

GND

DB-9

-CIRCUIT IN VEHICLE CABIN-

GND

ANT

+5V

AT89C51 C3

23 RXD

TXD

MAX232

GND

32KHz

.

910

16

3

78

1

25

4156

RoutTin

VCC

C1-

ToutRin

C1+

+VC2-

C2+GNDV-

+3.5V

33 pF

87

4 3 125 6

910

D1D0 R

S

VS

S

GN

DVC

C

RW EN

D2D3

C1 GNDC8

10K

12 MHz

-CIRCUIT IN SECURITY CABIN-

+5V

.

.

24C512

54

1

8

23

67

10111213141516 9

.

SCL

2 310 1

Din DoutGND VCC

GND

10 uF

.

C6

C9

BATTERY

.

VCC

SDA

-5V

AT89C51RD2 C7

C5

5

1

2

6

3

8

SD

A

X1

X2

SC

L

VBAT

VCC

56

8

4 SDASCL

VCC

-

1819

123

5678

21

2223

24

25

26

2728

1011

40

393837

20

35343332

9

4

171615141312

XTAL2XTAL1

P1.0P1.1P1.2

P1.4P1.5P1.6P1.7

P2.0

P2.1P2.2

P2.3

P2.4

P2.5

P2.6P2.7

P3.0/RXDP3.1/TXD

VCC

P0.0P0.1P0.2

.

P0.4P0.5P0.6P0.7

RST

P1.3

P3.7P3.6P3.5P3.4P3.3P3.2

RESET

+5V

.

VCC

XBee RFMODULE

23

RXDTXD

--

+5V

S/W INPUTS

.

DB-9

C4

C2

.

DB-9

DS1307

...

C3

.

MAX3232MAX232

33 pF

.

23 RXD

TXD87

16

3

109

1

25

4156

RinTout

VCC

C1-

TinRout

C1+

+VC2-

C2+GNDV-

.5 6

8

4SDA SCL

VCC

-ANT

.

.

24C512

LCD DISPLAY

GND

GND

GND

Page 43: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 43 -

4.2 SCHEMATIC LEVEL WORKING Circuit in the vehicle cabin :

In the vehicle cabin, the microcontroller is interfaced with the RF module,

LCD display and a keypad. The microcontroller has four 8 pin port named as p0, p1, p2,

p3 etc.

A 4x4 keypad is a matrix keypad which has four rows and four columns. It is

connected to p0 and p2 of the microcontroller. Four rows are connected separately to pins

p0.0, p0.1, p0.2 and p0.3 and columns are connected to p2.0, p2.1, p2.2 and p2.3 pins of

microcontroller. The microcontroller scans every key pressed and generates a separate

code for each key. There are 16 different codes for all combination of pressed rows and

columns.

A 16x2 LCD display is connected to the port p1 of the microcontroller. LCD has 8

data pins and three control signal pins. The pin no.4 (RS), 5 (R/W) and 6 (EN) are

connected to p1.0, p1.1 and p1.2 pins of microcontroller respectively. Only four data

lines are used for sending the 8 bit data by dividing the 8 bit data into group of 4 bits.

Four data pins 7(D0), 8(D1), 9(D2) and 10(D3) are connected to port pins p1.4, p1.5,

p1.6 and p1.7 respectively.

The microcontroller is also interfaced with the RF module. The operation of RF

module is totally based on the concept of serial communication. The RF module has two

pins for data transfer, DI (pin no.3) and DOUT(pin no.2). The RF module receive the

data serially on the pin DI (pin no.3) and send the data through pin DOUT(pin no.2). The

port pin p3.1 (TxD) of the microcontroller is connected to DI pin of RF module and port

pin p3.0 (RxD) of the microcontroller is connected to DOUT pin of RF module The

microcontroller send the data serially through the TxD pin and receive data on the RxD

pin (p3.0). The RF module is operated by separate 3,5V power supply. Vcc is applied to

pin no.1 and ground is connected to the pin no.10 of the RF module.

Page 44: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 44 -

The MAX232 converts the TTL level of microcontroller to the RS232 level and

vice versa. The pin no.9 (Rout) and pin no.10 (Tin) of MAX232 are connected to pins

p3.1 (TxD) and p3.0 (RxD) of the microcontroller respectively. The pin no.7 (Tout)

and pin no.8 (Rin) of MAX232 are connected to pin no.3 (TxD) and pin no.2(RxD) of

the DB9 connector respectively.

The MAX3232 converts the RS232 level to the TTL level of RF module and vice

versa. The pin no.7 (Tout) and pin no.8 (Rin) of MAX3232 are connected to pin no.3

(TxD) and pin no.2 (RxD) of the DB9 connector respectively. The pin no.9 (Rout) and

pin no.10 (Tin) of MAX3232 are connected to pin no.2 (Dout) and pin no.3 (DI) of the

RF module respectively.

Circuit in the security cabin : In the security cabin the microcontroller is interfaced with serial RTC (DS1307),

two serial external EEPROM memories, the RF module, LCD display and sixteen

on/off switches.

There are 16 switches connected to port pins of the microcontroller. Every slot has

separate switch placed in it and connected to one port pin. By checking the voltage levels

of these port pins microcontroller will find whether the slot is empty or not? When a

vehicle is parked in the slot, the switch in that slot connects Vcc (+5V) to the

corresponding port pin and in the absence of vehicle the port is connected to ground. 16

switches are connected to port pins p1.0-p1.7, p3.2-p3.7, p2.6 and p2.7 sequentially.

A 16x2 LCD display is connected to the port p0 of the microcontroller. LCD has 8

data pins and three control signal pins. The pin no.4 (RS), 5 (R/W) and 6 (EN) are

connected to p0.0, p0.1 and p0.2 pins of microcontroller respectively. Only four data

lines are used to send 8 bit data by dividing the 8 bit data into group of 4 bits. Four data

pins 7(D0), 8(D1), 9(D2) and 10(D3) are connected to port pins p0.4, p0.5, p0.6 and p0.7

respectively.

Page 45: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 45 -

RF module is interface with the microcontroller using two port pins p3.0 and

p3.1. The port pin p3.1 (TxD) of microcontroller is connected to DI pin (no.3) of RF

module and port pin p3.0 (RxD) of microcontroller is connected to DOUT pin (no.2) of

RF module. The microcontroller sends the data serially through the TxD pin and receive

data on the RxD pin (p3.0).

For conversion of TTL level of microcontroller to the RS232 level and vice versa

MAX232 is used. The pin no.9 (Rout) and pin no.10 (Tin) of MAX232 are connected to

pins p3.1 (TxD) and p3.0 (RxD) of the microcontroller respectively. The pin no.7 (Tout)

and pin no.8 (Rin) of MAX232 are connected to pin no.3 (TxD) and pin no.2 (RxD) of

the DB9 connector respectively.

For conversion of RS232 level to the TTL level of RF module and vice versa

MAX3232 is used. The pin no.7 (Tout) and pin no.8 (Rin) of MAX3232 are connected

to pin no.3 (TxD) and pin no.2 (RxD) of the DB9 connector respectively. The pin no.9

(Rout) and pin no.10 (Tin) of MAX3232 are connected to pin no.2 (Dout) and pin no.3

(DI) of the RF module respectively.

Two external EEPROM memories are used to store the record of incoming and

outgoing vehicles. AT24C512 is a serial EEPROM data memory which controlled by two

lines SDA (serial data line) and SCL (serial clock line). The port pins p2.4 and p2.5 of the

microcontroller are used as SDA and SCL respectively. Pin no.5 and pin no.6 of

AT24C512 are connected to the port pins p2.4 and p2.5 of the microcontroller.

A serial RTC DS1307 is interfaced with microcontroller for date and time

information. RTS DS1307 requires two wire interface as same as EEPROM memory.

Same lines SDA (p2.4) and SCL (p2.5) of the microcontroller are used for serial

communication. Pin no.5 (SDA) and pin no.6 (SCL) of RTC are connected to p2.4 and

p2.5 of the microcontroller. A 32KHz crystal oscillator is used between pin no.1(X1) and

pin no.2(x2). The battery supply is given to the RTC through pin VBAT (pin no.3).

Page 46: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 46 -

4.3 SOFTWARE SOLUTION 4.3.1 Flowcharts :

NO YES

NO

YES NO YES

SLAVE ROUTINE

STOP

DISPLAY “WELCOME TO AUTO PARKING”

DISPLAY MESSAGE ENTER YOUR PASSWORD

RECEIVE THE PASSWORD

DISPLAY MESSAGE “ACCESS DENIED”

IS THE SLOT No. RECEIVED?

DISPLAY THAT SLOT NO.

SEND ‘^’ CHARACTOR

START

CHECK PASSWORD CORRECT?

‘#SS’ CHARACTER RECEIVED?

SEND VEHICLE NUMBER

Page 47: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 47 -

NO

MASTER ROUTINE

RECEIVE THE VEHICLE NUMBER

SEND EMPTY SLOT NUMBER

FIND SLOT NUMBER IN WHICH VEHICLE IS

PARKED?

DISPLAY THAT SLOT NO.

SEND ‘#SS’ CHARACTER

SAVE DATE, IN TIME, VEHICLE NO. IN THE MEMORY

START

‘^’ CHARACTER RECEIVED?

NO

YES

IS THE VEHICLE PARKED?

YES

A

Page 48: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 48 -

DISPLAY THAT SLOT NO

FIND THE SLOT NO. FROM WHICH VEHICLE IS OUT

SAVE THE EXIT DATE, TIME, VEHICLE No. & SLOT

No. IN THE MEMORY

A

START

EXIT ROUTINE

IS THE VEHICLE No. RECEIVED? NO

YES

Page 49: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 49 -

DISPLAY ROUTINE

4.3.2 Softwares used :

The software selection is the backbone of entire project. Software development includes

programs written for the interfacing of microcontroller with RF module, 4X4 matrix

keypad, LCD display, RTC etc. The codes written for the microcontroller are best

explained with the help of the above flowcharts. The complete program and the

interfacing codes have been written in C language using the software Keil V2.20a. The

software Orcad 9.2 have been used for schematic of project circuit.

SEND THE NEXT 26 BYTES TO DISPLAY

WAIT FOR 2 SEC

A

START

SET POINTER TO 0A2H OR 0A4H

ADDRESS

IS POINTER AT END OF MEMORY?

NO

YES

Page 50: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 50 -

4.3 PCB DESIGN The field of PCBs combines a wide range of disciplines, such as mechanics,

chemists, electronic design, production and process management etc. Making a PCB

involves essentially the following two steps :

1) Design and layout of PCB.

2) Fabrication of PCB.

Layout Planning :-

The layout of PCB should encompass the relation between and the

interaction of components and assemblies throughout the system. Depending up to

accuracy required the art work may be produced at 1:1 or 2:1 or 4:1 ratio. If it is 1:1

layout the actual size of the component should be known, 1:1 layout is supposed to be

the best.

In our design we have preferred 1:1 ratio for preparing artwork.

Types of PCB Boards:-

There are most popular two types of PCB Boards.

1) Single Side boards.

2) Double Side boards.

Single sided boards should be used wherever a particular circuit can be

accommodated. The number of jumper wires on the boards should be minimum.

The double sided PCBs can be made with or without plated through holes. The

production of boards with plated through holes is fairly expensive.

In our project we have used single sided PCB.

Page 51: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 51 -

PCB Size :-

In order to have efficient testing and repairs of PCBs small size boards shall be

given performance. In large PCBs the isolation of that part of the circuit which is not

functioning is very difficult because there are usually no means to interrupts or

influence the signal flow. It is always recommended to provide at least 5% extra area

for modification so that complete design of PCB can be avoided.

The size of PCB used in security cabin is 15cm X 12cm. And the PCB used in the

vehicle cabin are of size 10cm X 12cm.

Layout approaches:-

The rules for preparing layout for PCB are as follows.

i) Each and every PCB layout should be made from viewing from the component

side i.e. top side.

ii) Unless the circuit diagram is completely clear the designing of layout should not

be started.

iii) As far as possible the layout should be delivered in the direction of the signal

flow.

iv) The larger component should be planned to be placed first and the space in

between should be filled with smaller components.

v) The components which requires input/output should come near the connectors.

Film Master Preparation:-

The film master is film negative finally used for direct exposure of photoresists

coated PCB. The film master is a high precision tool for etching. The photographic

Page 52: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 52 -

work required in PCB technology is entirely of line type. Line photography means

that only fully black or fully transparent portion have to be reproduced.

Etching :-

With the help of etching the final copper pattern is formed by selective removal

of all the unwanted copper, which is not provided by the etch resist.

Rinsing :-

After the etching is over the rinsing is necessary to remove the etchant

contamination from the surface. For rinsing HCL or Oxalic acid is used.

Drilling :-

Drilling of component mounting holes into PCBs is by far the most important

mechanical machining operation. Holes are made by drilling wherever a superior hole

finish is required.

Soldering

Soldering is done for the metallurgical joining two or more parts. There are two

types soldering : Hard and Soft soldering. Alloys used for hard solders require

temperature above 400 oC while soft solders bond at temperatures below 400 oC.

Almost Soft solders are tin alloys. It has higher bonding strength.

Page 53: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 53 -

CHAPTER # 5

APPLICATIONS

&

ADVANTAGES

Page 54: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 54 -

5.1 APPLICATIONS IN PRIVATE COMPANY OR HOUSING SOCIATY:-

In private company or housing society we can also use this system.

FOR MILITARY PURPOSE:-

In military areas the security is of great concern. The military vehicle will

having RF transmitter which will be transmitting it's identity to the receiver

module present in security cabin .the security cabin will access the data send &

will grant the entry of the vehicle.

FOR NUCLEAR POWER PLANT:-

Nuclear power plant or reactor is highly restricted areas. Hence this

technology can be used there. So that entry of vehicle & people can be recorded

there.

FOR PARLIAMENT PARKING:-

In parliament parking each minister vehicle will having RF

transmitter & receiver module, which will be transmitting it's identity to the

other similar module present in security cabin .the security cabin will access the

data send & will grant the entry of the vehicle.

Page 55: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 55 -

5.2 ADVANTAGES

The system has lots of advantages, some of them is

Convenient & time saving.

Manpower required is less.

It provides security & reliability.

The chances of errors are less compared to manual system.

Records of many users can be stored.

The power consumption is less.

No separate power supply is required as the entire vehicle have battery.

5.3 CONSTRAINTS

The range is limited.

Initial cost is high.

As number of users increases complexity increases.

Page 56: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 56 -

CHAPTER # 6

FUTURE SCOPE

Page 57: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 57 -

6.1 FUTURE SCOPE

The system can be enhanced more to face the challenges in the future. For this

system must be improved technically.

Instead of using 4X4 matrix keyboard, one can use 8X8 keyboard.

Because of which the code word will be more which will be difficult to

hack.

Code bits can be increased to send more data for verification.

Data collision can be avoided using software.

The range of RF module can be increased by using better module.

By increasing range better performance can achieved.

For commercial purpose some modification can be carried out.

Page 58: Report

RF BASED INTELLIGENT PARKING SYSTEM

- 58 -

CHAPTER # 7

APPENDIX