Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 87

MULTI LEVEL CAR PARKING SYSTEM

AN INTERNSHIP REPORT
Submitted
In the partial fulfillment of the requirements for
the award of the degree of
Bachelor of Technology in
Electronics and Communication Engineering
By
C.H.A.V.SATYANARAYANA

K.RAMANJENEYULU

Reg. No. 121FA05135

Reg. No. 121FA05151


K.VIPIN KUMAR
Reg. No. 121FA05147

Under the guidance of


Ms. V. KIRANMAYEE

Under the guidance of


Mr. K.ASHOK KUMAR REDDY

Project Co-ordinator

Asst. Professor, Dept. of ECE

DEPARTMENT OF ELECTRONICS AND COMMUNICATION


ENGINEERING
VIGNANS FOUNDATION FOR SCIENCE, TECHNOLOGY AND
RESEARCH UNIVERSITY
VADLAMUDI, GUNTUR 522 213, INDIA. NAAC A Accredited
May-2016

Page 1 of 87

CERTIFICATE

This is to certify that the internship report entitled "MULTI LEVEL


CAR PARKING SYSTEM" that is being submitted by
1. C.H.A.V.SATYANARAYANA
2. K.RAMANJENEYULU

121FA05135
-

3. K.VIPIN KUMAR

121FA05231
-

121FA05306

In partial fulfilment for the award of B.Tech degree in Electronics


and Communication Engineering to Vignans Foundation for
Science Technology and Research University, is a record of
bonafide work carried out by them at PGP ELECTRONICS under
the supervision of Ms. V. KIRANMAYEE and the internal
guidance of Mr. K.ASHOK KUMAR REDDY of ECE Department.

Signature of the faculty guide

Signature of

Head ofDepartment
K.ASHOK KUMAR REDDY

Dr. N.

Usha Rani

Asst. Professor
Professor

Page 2 of 87

Page 3 of 87

Page 4 of 87

Page 5 of 87

Page 6 of 87

DECLARATION

We hereby declare that the internship work entitled MULTI LEVEL CAR
PARKING SYSTEM is being submitted to Vignans Foundation for Science,
Technology and Research, University, in partial fulfillment for the award of
B.Tech degree in Electronics and Communication Engineering. The work was
originally designed and executed by us under the guidance of our supervisor
Ms.V.KIRANMYEE with Mr. K.ASHOK KUMAR REDDY as faculty guide
at Department of

Electronics and Communication Engineering, Vignans

Foundation for Science Technology and Research University and was not a
duplication of work done by someone else. We hold the responsibility of the
originality of the work incorporated into this thesis.

Signature of the candidate


C.H.A.V.SATYANARAYANA
K.RAMANJENEYULU
K.VIPIN KUMAR

Page 7 of 87

ACKNOWLEDGEMENT
After completion of this project it gives us great pleasure to express gratitude and
heart full thanks to all those people whose help went long way in completing this
project. There are several people who deserve more than a written
acknowledgement for practical help.
We would like to thank Ms.V.KIRANMAYEE of PGP ELECTRONICS for
providing the guidance and resources during our internship in PGP
ELECTRONICS and we would like to place on record the help received from our
respected lecturer from School of electronics Mr.K.ASHOK KUMAR REDDY
Assistant professor for his inspiring guidance and help provided during the course
of completing this project.
We would also like to place on record the help received from Dr.N.USHA RANI
Head of Department School of Electronics and Dr.V.MADHUSUDHAN RAO
Director Engineering technology for their valuable support and resources guided
us towards the completion of course and project and we would also like to thank
all our class mates for their valuable suggestions and support in completion of this
work

Name of Internship Students


C.H.A.V.SATYANARAYANA
K.RAMANJENEYULU
K.VIPIN KUMAR

Page 8 of 87

ABSTRACT

This report details the operation, constuction and testing details of our project Automated
Multi level car parking. This system is designed such that the driver of the car will leave
the car in a specified area. There after the car is placed in the parking slot, automatically,
with the help of mtors. A micro controller is used as the central processing unit. Few
sensors are used as the sensing elements. The system was built and tested. The final
circuit has worked to our entire satisfaction.

Page 9 of 87

TABLE OF CONTENTS

ACKNOWLEDGEMENT

Title
Page
CHAPTER 1: INTRODUCTION
1.1. Introduction

1.2. Project background

1.3. Problem statement

1.4. Objectives

1.5. Scope of project and limitation

1.6. Scope of project

1.7. Limitations

1.8. Thesis Distribution

CHAPTER 2: LITERATURE REVIEW


2.1. Performance Metrics

2.2. Walking Distance

2.3. Parking Revenue

2.4 .Traffic Searching for the Parking

CHAPTER 3: HARDWARE DESCRIPTION


3.1.Block Diagram
3.1 POWER SUPPLY MODULE

7
8

Page 10 of 87

3.1.1 Transformer

3.1.2 Full wave rectifier

3.1.3 The Smoothing Capacitor

11

3.1.4 Regulator

12

3.2. Circuit Diagram of a multilevel car parking

15

3.2.1. Slot Status:

16

3.2.2 Operation

16

3.2.3.Circuit Description

18

3.3. Major Components Information


3.3.1 AVR Micro Controller
3.3.2 I/O Port

20
20
20

3.4. Block Diagram for AVR Micro Controller

21

3.5 AVR Micro Controller Internal Architecture

24

3.6. Pin Descriptions

25

3.7 Transistor as a switch

29

3.8. Motor Driver, L293

30

3.9. Light Emitting Diode (LED)

32

3.10. LDR

34

3.11.DAY/NIGHT SENSOR

34

3.11.1COMMON INTERFACING CIRCUIT OF A LDR

34

3.11.2LDR CHARACTERISTICS

35

3.12. TESTING PROCESS

35

3.13N4001 features:

36

Page 11 of 87

CHAPTER 4.SOFTWARE DESCRIPTION


4.1 Proteus

38

4.2 Hardware (Prototype) Development

40

4.3 System Flow Chart

46

4.4 IC Programming

47

4.5. ATMega 8 Ide Tool

47

4.6 Project code :

49

CHAPTER 5 . RESULT AND DISCUSSION


5.1 Guided System Perspective

61

5.1.1

61

Traffic Searching for Parking

5.2 Result of Simulation

63

CHAPTER 6. CONCLUSION AND FUTURE DEVELOPMENT


6.1 Conclusion

65

6.2 Future Development

66

CHAPTER 7. Reference

68

Page 12 of 87

LIST OF TABLES

Table
3.9.2(b)

Title

Page

Truth table of SR Latch

32

3.11.1

Truth table of L293D

33

3.15

Features of IN4001

39

3.15.1

Features ofLM7805

40

Page 13 of 87

LIST OF FIGURES

Figure

Title

Page

3.0

Block diagram of multi level car parking

3.1

Power supply module

3.1.1

Step down transformer

3.1.2

Diode bridge rectifier

3.1.2(a)

Postive half cycle of diode

10

3.1.2(b)

Negative half Cycle of diode

10

3.1.2(c)

Typical bridge rectifier

11

3.13

Resultant output waveform

12

3.14(a)

Voltage regulator(7805)

14

3.14(b)

Internal block diagram of 7805

14

3.3

Circuit diagram of multi level car parking system

15

3.3.2

Block diagram of car parking process

17

3.3.3

LDR

18

3.3.3(a)

LDR working

19

3.3.(b)

Logic zero

19

3.3.(c)

Logic One

20

3.4.2

PDIP pin diagram

22

3.5

AVR Micro block diagram

24

Page 14 of 87

3.8.1

Oscillator Connections

30

3.8.2

External clock drive configuration

30

3.10.1

NPN transistor

31

3.10.2(a)

RS latch

31

3.11.1

L293D Block diagram

32
3.11.2
3.12
3.13.1

PIN lay out of L293D

33

Pin Lay out of LED

34

LDR as a dark sensor

37

3.13.2

LDR as a light sensor

37

3.14

Circuit diagram of power supply

38

4.1(a)

Software simulation

41

4.1.(b)

Circuit design of Pcb

42

4.2.

Preparation of layout

43

4.3

System Flow chart

49

4.5

ATMEGA 8 IDE

51

5.1

Result of Simulation

59

Page 15 of 87

CHAPTER- 1
INTRODUCTION TO MUTLI LEVEL CAR PARKING SYSTEM
1.1. Introduction
This chapter will provide the overview of the project title, its background and the
problems statement. In addition, this chapter will also discussed the objectives of the
project implementation, the scope of works to be done and the limitations that have been
encountered upon the completion of this project.

1.2. Project background

The Multi level car parking system Parking System with Microcontroller
Interfacing is a project for the convenience of the people who want to save time
and energy in searching for the parking. It consists of several parts; inputs: sensors
(loop detector, motion detector); outputs: display ( 7-Segment), sound (buzzer);
processor: PIC (programming and execution of the software).The main focus of
this project is to relate the inputs and outputs using an interface that can execute
what have been programmed so the outcome will be as expected. It will provide
information and study as much as possible so that it can be reviewed in the future
for better development. It also will be conclude with recommendations on the
most suitable solution for the existing problems.Upon the completion of this
project, it is expect and hope to bring benefit to others. This system will not only
be a big help to customer but also will be an added advantage to the premises

Page 16 of 87

owner as the customer will prefer an informative and systematic parking area
which will help them to find a free space in shorter period than they usually do.

1.3. Problem statement


The problem of seeking vacant parking space is classified as critical
especially in the city area. The existing methods only show the levels name,
confusing displays and indicators. Many researchers have been developing
methods to solve the issues arise but only to come up with a system that is not cost
effective. However, in terms of implementation, reliability and cost wise, the
proposed project, Informative Parking System with Microcontroller Interfacing
(IPSMI) is the best solution because the system is cheaper but the performance
and application is powerful enough to make IPSMI a reliable system. The
microcontroller which functions as the systems main processor has various
models that have its own unique features. These features give an absolute answer
towards the implementation of complex electronic system.
1.4. Objectives
The objective of the work is to investigate and to design a system that can provide
a solution to the long existing problem. The main objectives can be summarized as
to develop a system that capable to show the solution of parking difficulties. It is
also aimed to develop a system that can save the time and cost by introducing
programmable integrated chip (PIC) technology that can utilize its input and
output to the fullest and to offer the parking owner a sophisticated yet a great
solution to their problem. Finally, with this project it is intended to provide

Page 17 of 87

knowledge on how programmable IC works after being programmed and to


understand the ability of a small device to perform multitask.
1.5. Scope of project and limitation
The work procedures will be clearly stated and the methods used will
describe the implementation phases so that it provides enough information for
future Improvement.
1.6. Scope of project
The scope of the work can be divided into two stages. One is software
development and another is the hardware development. The premeditated
procedures have been carefully executed to ensure the project is a total success.
The types of user interface elements that are the subject of this project are
individual sensors, displays, indicators, switches and buttons. Beyond the
individual elements, this report also emphasize on how the system operate and
work together. One aspect of this is device behavior, which includes descriptions
of different parts within the system and how the devices perform in order to fulfill
its task. Device behavior also includes more complex ideas, such as real time
update.

Page 18 of 87

1.7. Limitations

Throughout the completion of this project, there have been various


hindrances and obstacles encountered that may delay the process flow and also
jeopardize the whole project. Among of the difficulty that must be faced was to
develop a working prototype that is crucial in order to show the working principle
of this system. Lack of knowledge in fabricating a functioning circuit also
becomes my drawback as it will affect the whole process.

1.8. Thesis Distribution

In the first and second chapter, the general content was introduced. It also
provides the information related to the project as the projects reference. The
techniques, methodology involved and result were presented in Chapter 3 and 4.
The last chapter will conclude all the findings and analysis to provide the
outcomes.

CHAPTER- 2
INTRODUCTION TO LITERATURE REVIEW
Chapter 2 has provided the literature reviews on the main research focus
which is on how to tackle and solve the parking difficulties face by people. This
chapter also reviewed the background on the existing smart parking systems,
including the performance metrics, existing solutions and challenges. The related
works also being briefly discussed.
2.1. Performance Metrics
To evaluate the performance of a parking management system, the
following metrics are introduced, which reflect the needs of involved parties, and
our concerns on traffic congestion and environmental protection.
2.2. Walking Distance
Walking distance is defined as the distance from a drivers selected parking space to the
destination. It is an important factor for a driver to determine where to park. Usually, a
driver wants to park as close to the destination as possible if his budget permits.
Therefore, the walking distance indicates the satisfaction of drivers.
2.3.Parking Revenue
Regardless of whether a parking lot is privately owned or municipally owned,
parking revenue represents the benefit to the parking providers. Since multiple parties

are involved in this system, my design does not aim to maximize the parking Revenue
for service providers only, but allows them to obtain profits at reasonable level

2.4 Traffic Searching for the Parking


The traffic generated by drivers searching for parking is not negligible and
reflects the social welfare. Hence, an efficient parking guidance system should
efficiently reduce the traffic searching for parking. Also, reducing the amount of
searching time for parking is desired by drivers The performance of the proposed
smart parking system has been investigated using these performance metrics;

CHAPTER-3
HARDWARE DESCRIPTION
The world of Electronics is changing at rapid pace. More and more advancements are
taking place in this field.
Automatic multistoried car parking system helps to minimize the car parking area. In the
modern world, where parking-space has become a very big problem and in the era of
miniaturization, it is become a very crucial necessity to avoid the wastage of space in
modern, big companies and apartments etc. In places where more than 100 cars need to
be parked, this system proves to be useful in reducing wastage of space. This Automatic
Car Parking System enables the parking of vehicles, floor after floor and thus reducing
the space used. Here any number of cars can be parked according to the requirement. This
makes the system modernized and even a space-saving one.
The system level block diagram for this system is shown in the next page.

3.0.Block Diagram

230
v ac

RPS
Control
circuit
Sens
oArra
y

Driv
er

Mot
o
r
r
r
r
r
r
r
r
r
r

r
r

r
r
r
r
r
r
O
R
Figure 3.0. Block Diagram
O
R
The basic block diagram for automated multi level car park is showno in the above
r
figure. The mains supply is regulated to provide us a constant DC source. The micro
s

controller works on 5V DC and hence it is essential to generate a regulated 5V DC. The


micro controller takes action based on the information from the operator controls. The
Micro controller cant drive the motors directly hence a motor driver circuit is required
in between the micro controller and the motors to drive the motors.

More information about the components can be found in the later sections.
3.1 POWER SUPPLY MODULE

Fig 3.1 Power supply module


The main aim of this power supply is to convert the 230V AC into 5V DC
in order to give supply for the TTL or CMOS devices. In this process we are using
a step down transformer, a bridge rectifier, a smoothing circuit and the RPS.
3.1.1 Transformer

Fig 3.1.1 Step down transformer


A transformer is a device that changes (transforms) and alternating
potential difference (voltage) from one value to another value be it smaller or
greater using the principal of electromagnetic induction. A transformer consists of
a soft iron coil with two coils wound around it which are not connected to one
another. These coils can be can be wound either on separate limbs of the iron core
or be arranged on top of each other. The coil to which the alternating voltage is
supplied is called the primary coil or primary winding. When an alternating
potential difference is supplied the resulting alternating current in the primary coil
produces a changing magnetic field around it. This changing field induces an
alternating current in the secondary coil. The size of the induced voltage resulting
from the induced current in the secondary coil depends on the number of turns in
the secondary coil. The relationship between the voltage and the number of turns
in each coil is given by
3.1.2 Full wave rectifier
This type of single phase rectifier uses four individual rectifying diodes
connected in a closed loop bridge configuration to produce the desired output.
The main advantage of this bridge circuit is that it does not require a special centre
tapped transformer, thereby reducing its size and cost.
The Diode Bridge Rectifier

Fig 3.1.2 Diode bridge rectifier


The four diodes labelled D1 to D4 are arranged in series pairs with only
two diodes conducting current during each half cycle. During the positive half
cycle of the supply, diodes D1 and D2 conduct in series while diodes D3 and D4 are
reverse biased and the current flows through the load as shown below.
The Positive Half-cycle
During the negative half cycle of the supply, diodes D3 and D4 conduct in
series, but diodes D1 and D2 switch OFF as they are now reverse biased. The
current flowing through the load is the same direction as before.

Fig 3.1.2.(a) Positive half-cycle of diode bridge rectifier


The Negative Half-cycle
As the current flowing through the load is unidirectional, so the voltage
developed across the load is also unidirectional the same as for the previous two
diode full-wave rectifier, therefore the average DC voltage across the load is
0.637Vmax.

Fig 3.1.2.(b)Negative half-cycle of diode bridge rectifier

Fig 3.1.2.(c). Typical bridge rectifier


However in reality, during each half cycle the current flows through two
diodes instead of just one so the amplitude of the output voltage is two voltage
drops (2 x 0.7 =1.4V) less than the input Vmax amplitude. The ripple frequency is
now twice the supply frequency (e.g. 100Hz for a 50Hz supply). Although we can
use four individual power diodes to make a full wave bridge rectifier, pre-made
bridge rectifier components are available off the shelf in a range of different
voltage and current sizes that can be soldered directly into a PCB circuit board or
be connected by spade connectors.
3.1.3 The Smoothing Capacitor
The full-wave bridge rectifier however, gives us a greater mean DC value
(0.637Vmax) withless superimposed ripple while the output waveform is twice that
of the frequency of the input supply frequency. We can therefore increase its
average DC output level even higher by connecting a suitable smoothing capacitor
across the output of the bridge circuit as shown below.
Full-wave Rectifier with Smoothing Capacitor
The smoothing capacitor converts the full-wave rippled output of the
rectifier into a smooth DC output voltage. Generally for DC power supply circuits
the smoothing capacitor is an Aluminium Electrolyte type that has a capacitance
value of 100uF or more with repeated DC voltage pulses from the rectifier
charging up the capacitor to peak voltage.

Resultant Output Waveform


Fig 3.13Illustration of diode bridge rectifier with smoothing capacitor
However, there are two important parameters to consider when choosing a
suitable smoothing capacitor and these are its Working Voltage, which must be
higher than the no-load output value of the rectifier and its Capacitance Value,
which determines the amount of ripple that will appear superimposed on top of the
DC voltage. Too low a capacitance value and the capacitor has little effect on the
output waveform. But if the smoothing capacitance is sufficiently large enough
(parallel capacitors can be used) and the load current is not too large, the output
voltage will be almost as smooth as pure DC.
3.1.4 Regulator
This is the last block in the regulated DC power supply. The output voltage
or current will change or fluctuate when there is change in the input form ac mains
or due to change in load current at the output of the regulated power supply or due
to the other factors like temperature changes. This problem can be eliminated by
using a regulator. A regulator will maintain the output constant even when changes
at the input or any other changes occur.

Transistor series regulator, Fixed and variable IC regulators or a Zener diode


operated in the zener region can be used depending on their applications. Here we
are using 7805 IC for regulation purpose. It is a member of 78xx series of fixed
linear voltage regulator ICs. The xx in 78xx indicates the fixed output voltage it is
designed to provide. 7805 provides +5V regulated power supply. Capacitors of
suitable values can be connected at input and output pins depending upon the
respective voltage levels. The circuit is made up of linear voltage regulator 7805
along with capacitors and resistors with bridge rectifier made up from diode. From
giving an unchanging voltage supply to building confident that output reaches
uninterrupted to the appliance, the diode along with capacitors handle elevated
efficient signal convey.
ICs regulator is mainly used in the circuit to maintain the exact voltage
which is followed by the power supply. A regulator mainly employed with the
capacitor connected in parallel to the input terminal and the output terminal of the
IC regulator. For the checking of gigantic alterations in the input as well as in the
output filter, capacitors are used. While the bypass capacitors are used to check
the small period spikes on the input and output level. Bypass capacitors are mainly
of small values that are used to bypass the small period pulses straight into the
Earth. A circuit diagram having regulator IC and all the above discussed
components arrangement revealed in the figure below.
The LM7805, like most other regulators, is a three-pin IC.
Pin 1 (Input Pin): The Input pin is the that accepts the incoming DC voltage, which
the voltage regulator will eventually regulate down to 5 volts.
Pin 2 (Ground): Ground pin establishes the ground for the regulator.
Pin 3 (Output Pin): The Output pin is the regulated 5 volts DC.

Fig 3.1.4.(a) Voltage regulator 7805

Fig 3.1.4(b)Internal block diagram of IC7805

The following Hardware and software is used in this system. Deatiled explanation of
these components follow in the later sections.

3.2 Circuit Diagram of a multilevel car parking

Figure 3.3: Circuit Diagram

3.3.1Circuit Description
This is a system designed to opearte independently, without manual interference.
Some of the components in this system require DC5V for their operation, for example the
micro controller. Hence we have designed a 5V regulator.
The major power source for us is mains 230V ac. For the regulator design we need a
lower ac volatge. We have used a transformer to accomplish this task. The transformer
stpped down the 230v ac to an acceptable level. This stpped down ac voltage was
converted to DC with the help of a bridge rectifier. The output of the regulator is DC.
However this DC has some ac contents in it. This ac content is called as ripples. With the
help of a smoothing capacitor these ripples are removed. This gets varied depending on
the load and the mains supply voltage. We have used a regulator IC which provides us
constant DC with constant current. The DC voltage is 5V with a current of 1A.
The other important components are 1)Micro Controller 2) Driver circuit.
3.3.2 Operation
When a user wish to leave their car park in car park area. They bring it to the ramp and
leave the car on the platform. The plat form essentially consist of a fork kind of
arrangement. Then part of the platform is lifted up using a motor. This will be lifted up to
the next available car park level. Once they fid that suitable plce is found, then, they with
the help of another motor the fork is rotated around Then the car park is left at the vacant
place. After placng the car in the desired area the fork is returned back and waits for
another car to be loaded.

Block diagram for the operation

Car

Platfro
m

Lift

Level

Parked

Figure 3.3.2:Diagrammatic representation of car park process


Initially the complete system has to be in FREE MODE (i.e. all 9 slots are empty, all
three floors in non-calling mode, and the status of the lift is empty). Once the power is
plugged on, the system starts and displays the number of empty slots and the position
of the lift
Working of the System:
The working of the system is as follows:
1. When a new car arrives on the Ground Floor, the switch of the Ground Floor
changes to waiting position.
2. If the LIFT is in 1st, 2nd or 3rd floor it will come back to Ground Floor.
3. Once the LIFT is in Ground Floor the car can move into the LIFT. Simultaneously
the Ground Floor switch changes back to normal from waiting state.
4. The code has an algorithm to automatically detect empty slot in all the 3 floors
and allocate a parking slot to the new car.
5. Once the allocation process is done, the LIFT moves to the level in which the slot
is allocated and wait their till the car moves out of the LIFT.

.
6. As the car moves out, the LIFT drops to Ground Floor. The car occupies the
allotted slot and the number of free slots are displayed on the 7-Segment display.
7. To call the LIFT to a certain floor, change the state of that floor to calling mode
(i.e. changing logic level from 0 to 1). The LIFT starts to move from Ground Floor to
the Calling Floor and the system expects the car to move into the Lift.
8. As the car moves in the Lift, it starts to move towards Ground Level.
3.3.3 Slot Status:
The status of a slot is monitored by a photo-resistor (or light-dependent resistor,
LDR, or photocell) which is a light-controlled variable resistor. The resistance of a
photo-resistor decreases with increasing incident light intensity, in other words, it

Figure 3.3.3: LDR Symbol


exhibits photoconductivity. A photo-resistor can be applied in light-sensitive detector
circuits, and light and dark activated switching circuits.

A photo-resistor is made of a high resistance semiconductor. In the dark, a photoresistor can have a resistance as high as several mega-ohms (M), while in the light,
a photo-resistor can have a resistance as low as a few hundred ohms.
As the LDR is exposed to the light the resistance of the LDR decreases which will
allow the voltage to pass through it and the result is a logic zero.

Figure 3.3.3(a): LDR Working


As a result if the slot is occupied by a car the output is a logic 1 and
if the slot is empty the output is a logic zero. These logic levels are read by the
controller on the GPIO pins and appropriate action is performed as per the code.

Figure 3.3(c) .: Logic one

3.4. Major Components Information


In this section we present detailed information on the major components that we have
used in our system
3.4.1 AVR Micro Controller
A quick look on the market reveals there are tons of micros available.
Some of them which we have narrowed down are
1) AVR ATMega microcontroller Series
2) 8051 Series
3) PIC microcontroller Series
4) ARM Series
AVR has got advanced features combined with rich instructions and
architecture. Hence we have used AVR as the controller.There are minimum six
requirements for proper operation of microcontroller.
Those are:
1) power supply section
2) ports
3) Reset circuit
4) Crystal circuit
5) ISP circuit (for program dumping)

For this project we are using AVR microcontroller. we can use transistors instead of
microcontroller and even transistors are cheap also in comparison to microcontroller but
the reason behind using the microcontroller is we are in learning phase. One reason also
stand for using microcontroller is that if we have used transistor, circuit would have been
very complexed. This is because we prefer to use microcontroller.

3.4.2 I/O Port


Microcontrollers usually have special hardware for dealing with outside world. These are
called I\O ports. We normally use I\O ports to interface the microcontrollers to sensors,
actuators etc.
Microcontroller input\output is always logic high or logic low in terms of voltage. If logic
high, it means +5 V and if logic low, it means 0 V. All AVR ports have true Read-ModifyWrite functionality when used as general digital I/O ports.
This means that the direction of one port pin can be changed without unintentionally
changing direction of any other pins. Each output buffer has symmetrical drive
characteristics with both high sink and source capability. The pin driver is strong enough
to drive LED displays directly. All port pins have individually selectable pull-up resistors
with a supply-voltage invariant resistance.

Figure 3.4.2:Pin Diagram

In AVR microcontroller there are three I\O ports named B, C & D. The port B & D has 8
pins or bits and the port C has 7 pins. All the bits of any these said ports, we can use as
both I\O port. In this above said system well use port D as input and port B as output.

3.5. Block Diagram for AVR Micro Controller

Figure 3.5 AVR Micro Block Diagram

The AVR core combines a rich instruction set with 32 general purpose working registers.
All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing
two independent registers to be accessed in one single instruction executed in one clock
cycle. The resulting architecture is more code efficient while achieving throughputs up to
ten times faster than conventional CISC Microcontrollers.

The ATmega8 provides the following features: 8K bytes of In-System Programmable


Flash with Read-While-Write capabilities, 512 bytes of EEPROM, 1K byte of SRAM, 23
general purpose I/O lines, 32 general purpose working registers, three flexible
Timer/Counters with compare modes, internal and external interrupts, a serial
programmable USART, a byte oriented Two wire Serial Interface, a 6-channel ADC (eight
channels in TQFP and QFN/MLF packages) with 10-bit accuracy, a programmable
Watchdog Timer with Internal Oscillator, an SPI serial port, and five software selectable
power saving modes. The Idle mode stops the CPU while allowing the SRAM,
Timer/Counters, SPI port, and interrupt system to continue functioning.

The Power down mode saves the register contents but freezes the Oscillator, disabling all
other chip functions until the next Interrupt or Hardware Reset. In Power-save mode, the
asynchronous timer continues to run, allowing the user to maintain a timer base while the
rest of the device is sleeping.

The ADC Noise Reduction mode stops the CPU and all I/O modules except asynchronous
timer and ADC, to minimize switching noise during ADC conversions. In Standby mode,

the crystal/resonator Oscillator is running while the rest of the device is sleeping. This
allows very fast start-up combined with low-power consumption.

The device is manufactured using Atmels high density non-volatile memory technology.
The Flash Program memory can be reprogrammed In-System through an SPI serial
interface, by a conventional non-volatile memory programmer, or by an On-chip boot
program running on the AVR core. The boot program can use any interface to download
the application program in the Application Flash memory. Software in the Boot Flash
Section will continue to run while the Application Flash Section is updated, providing
true Read-While-Write operation. By combining an 8-bit RISC CPU with In-System SelfProgrammable Flash on a monolithic chip, the atmel ATmega8 is a powerful
microcontroller that provides a highly-flexible and cost-effective solution to many
embedded control applications.
The ATmega8 AVR is supported with a full suite of program and system development
tools, including C compilers, macro assemblers, program debugger/simulators, In-Circuit
Emulators, and evaluation kits.

3.6 AVR Micro Controller Internal Architecture

Figure 3.6AVR Micro Controller Internal Architecture

3.7. Pin Descriptions


VCC
Digital supply voltage.
GND
Ground.
Port B (PB7..PB0) XTAL1/XTAL2/TOSC1/TOSC2
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port B output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port B pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port B pins are tri-stated when a reset
condition becomes active,even if the clock is not running.
Depending on the clock selection fuse settings, PB6 can be used as input to the inverting
Oscillator amplifier and input to the internal clock operating circuit.
Depending on the clock selection fuse settings, PB7 can be used as output from the
inverting Oscillator amplifier.If the Internal Calibrated RC Oscillator is used as chip clock
source, PB7..6 is used as TOSC2..1 input for the Asynchronous Timer/Counter2 if the
AS2 bit in ASSR is set.
Port C (PC5..PC0)
Port C is an 7-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port C output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port C pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port C pins are tri-stated when a reset
condition becomes active, even if the clock is not running.

PC6/RESET

If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the electrical
characteristics of PC6 differ from those of the other pins of Port C. If the RSTDISBL
Fuse is unprogrammed , PC6 is used as a Reset input. A low level on this pin for longer
than the minimum pulse length will generate a Reset, even if the clock is not running.
Shorter pulses are not guaranteed to generate a Reset.
Port D (PD7..PD0)
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port D output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port D pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port D pins are tri-stated when a reset
condition becomes active, even if the clock is not running. Port D also serves the
functions of various special features of the ATmega8..
RESET
Reset input. A low level on this pin for longer than the minimum pulse length will
generate a reset, even if the clock is not running. Shorter pulses are not guaranteed to
generate a reset.
AVCC
AVCC is the supply voltage pin for the A/D Converter, Port C (3..0), and ADC (7..6). It
should be externally connected to VCC, even if the ADC is not used. If the ADC is used,
it should be connected to VCC through a low-pass filter. Note that Port C (5..4) use
digital supply voltage, VCC.
AREF
AREF is the analog reference pin for the A/D Converter.

Configuring the Pin

Each port pin consists of 3 Register bits: DDxn, PORTxn, and PINxn.The DDxn bits are
accessed at the DDRx I/O address, the PORTxn bits at the PORTx I/O address, and the
PINxn bits at the PINx I/O address
The DDxn bit in the DDRx Register selects the direction of this pin. If DDxn is written
logic one, Pxn is configured as an output pin. If DDxn is written logic zero, Pxn is
configured as an input pin.
If PORTxn is written logic one when the pin is configured as an input pin, the pull-up
resistor is activated. To switch the pull-up resistor off, PORTxn has to be written logic
zero or the pin has to be configured as an output pin. The port pins are tri-stated when a
reset condition becomes active, even if no clocks are running.
If PORTxn is written logic one when the pin is configured as an output pin, the port pin is
driven high (one). If PORTxn is written logic zero when the pin is configured as an output
pin, the port pin is driven low (zero).
When switching between tri-state ({DDxn, PORTxn} = 0b00) and output high ({DDxn,
PORTxn} = 0b11), an intermediate state with either pull-up enabled ({DDxn, PORTxn} =
0b01) or output low ({DDxn, PORTxn} = 0b10) must occur. Normally, the pull-up
enabled state is fully acceptable, as a high-impedant environment will not notice the
difference between a strong high driver.
Reading the Pin Value
Independent of the setting of Data Direction bit DDxn, the port pin can be read through
the PINxn Register Bit. Tthe PINxn Register bit and the preceding latch constitute a
synchronizer. This is needed to avoid meta stability if the physical pin changes value near
the edge of the internal clock, but it also introduces a delay.

OSCILLATOR CONNECTIONS:
Figure 3.8.1 :oscillator connections
Note: C1, C2 = 30 pF 10 pF for Crystals
= 40 pF 10 pF for Ceramic Resonators

Figure 3.8.2 :External Clock driver Configuration.

3.9 Transistor as a switch


In this section the we discuss about the operation of transistor as switch.
To operate transistor as a switch, we utilize the cutoff and saturation modes of operation

n
Emitter

p
Base

n
collector

Emitter (E)

Collector(C)

Emitter-base jn.

Base (B)

(EBJ)

Collector-base jn.
(CBJ)

Figure 3.10.1 npn Transistor


Logic gates: The output of comparator 1 & 2 are the two inputs of RS latch. In this
section we will discuss about the working principle of RS latch.

Figure 3.9.2(a).:RS latch diagram


Truth table:
S
0

R
0

Qn+1
Qn

3.9.2(b).:Truth Table for SR Latch

Above truth table shows that whenever set input is at high the output will be at high and
whenever reset input is at high the output will be at low.
3.10. Motor Driver, L293
The L293D is a monolithic integrated high voltage, high current four channel driver
designed to accept standard DTL or TTL logic levels and drive inductive loads (such as
relays solenoides, DC and stepping motors) and switching power transistors.
To simplify use as two bridges is pair of channels is equiped with an enable input. A
separate supply input is provided from the logic, allowing operation at a low voltage and
internal clamp diodes areincluded.
The block diagram for the motor driver is shown in the following figure.

Figure 3.10.1 motor Block Diagram


The truth table for the driver is given in the following table.

Table 3.11.1. Truth Table of L293D

Figure 3.11.2 pin layout.


This device is suitable for use in switching applications at frequencies up to 5 KHz.
The L293D is assembled in a 16 lead plastic package which has 4 centre pins connected
together and used for heat sinking.
3.11 Light Emitting Diode (LED)
A light-emitting diode (LED) is a semiconductor diode that emits incoherent narrow
spectrum light when electrically biased in the forward direction of the pn-junction, as in
the common LED circuit. This effect is a form of electroluminescence.
While sending a message in the form of bits such as 1,the data is sent to the receiver side
correspondingly the LED glows representing the data is being received simultaneously
when we send 8 as a data the LED gets off .

Figure 3.11 pin layout


As in the simple LED circuit, The effect is a form of electroluminescence where
incoherent and narrow-spectrum light is emitted from the p-n junction.
LEDs are widely used as indicator lights on electronic devices and increasingly in higher
power applications such as flashlights and area lighting. An LED is usually a small area
(less than 1 mm2) light source, often with optics added to the chip to shape its radiation
pattern and assist in reflection. The color of the emitted light depends on the composition
and condition of the semi conducting material used, and can be infrared, visible, or
ultraviolet.
Besides lighting, interesting applications include using UV-LEDs for sterilization of
water and disinfection of devices, and as a grow light to enhance photosynthesis in plants.
ADVANTAGES:

LEDs have many advantages over other technologies like lasers. As compared to

laser diodes or IR sources

LEDs are conventional incandescent lamps. For one thing, they don't have a

filament that will burn out, so they last much longer. Additionally, their small plastic bulb
makes them a lot more durable. They also fit more easily into modern electronic circuits.

The main advantage is efficiency. In conventional incandescent bulbs, the light-

production process involves generating a lot of heat (the filament must be warmed).

Unless you're using the lamp as a heater, because a huge portion of the available
electricity isn't going toward producing visible light..
DISADVANTAGES OF LEDS:

LEDs performance largely depends on the ambient temperature of the operating

environment.

LEDs must be supplied with the correct current.

LEDs do not approximate a "point source" of light, so cannot be used in

applications needing a highly collimated beam.

But the disadvantages are quite negligible as the negative properties of LEDs do

not apply and the advantages far exceed the limitations.


3.12. LDR
A photo resistor or light dependent resistor or cadmium sulfide (CdS) cell is a resistor
whose resistance decreases with increasing incident light intensity. It can also be referred
to as a photoconductor.
A photo resistor is made of a high resistance semiconductor. If light falling on the device
is of high enough frequency, photons absorbed by the semiconductor give bound
electrons enough energy to jump into the conduction band. The resulting free electron
(and its hole partner) conduct electricity, thereby lowering resistance.
A photoelectric device can be either intrinsic or extrinsic. An intrinsic semiconductor has
its own charge carriers and is not an efficient semiconductor, e.g. silicon. In intrinsic
devices the only available electrons are in the valence band, and hence the photon must

have enough energy to excite the electron across the entire band gap. Extrinsic devices
have impurities, also called dopants added whose ground state energy is closer to the
conduction band; since the electrons do not have as far to jump, lower energy photons
(i.e., longer wavelengths and lower frequencies) are sufficient to trigger the device. If a
sample of silicon has some of its atoms replaced by phosphorus atoms (impurities), there
will be extra electrons available for conduction. This is an example of an extrinsic
semiconductor.
3.13.DAY/NIGHT SENSOR

A day/night sensor is used as one of the input for ATmega8 controller. We used light
dependent resistor (LDR) as a day/night sensor whose resistance varies with the intensity
of light incident upon it. LDR also known as photo-resistor or photo-conductor is made
up of a semiconductor material which has a high resistance and less free electrons
available for conduction and hence offers a higher resistance and the semiconductor
material used in constructing it is cadmium sulphide (CdS).
In our project, the use of LDR is to determine whether its a day time or night time as in
darkness its resistance will be very high and as light falls on it resistance become smaller
and smaller. The LDR is a part of a voltage divider circuit in order to give an output
voltage

which changes with illumination. There are two ways of constructing the

voltage divider, with the LDR at the top as shown in the figure, or with the LDR at the
bottom as shown in the other figure.
3.13.1COMMON INTERFACING CIRCUIT OF A LDR

5V

V
R

LD
R

P
i
n

P
i
n
R

LDR

4
0

Figure 3.13.1 LDR as dark sensor

Figure 3.13.2 LDR as light sensor

We investigated the behavior of these two circuits and found first figure sensible because
we wanted low output of LDR circuit as the input to the microcontroller and fixed the
resistor in a voltage divider circuit.
3.13.2LDR CHARACTERISTICS
The resistance value of the LDR is calculated by using a multi-meter as an ohm-meter
(Digital Multi Meter) is as follows:
1.
2.
3.

300 (Bright light)


5.35k (ambient light)
5M (dark)

3.14. TESTING PROCESS


In this section we will check our all components so far used. We will also discuss about it
working conditions, problems faced across its testing.
Testing of Power Supply
To Design 5V, 500mA Power supply.

3.14.Circuit Diagram of Power Supply

3.15 N4001 features:


In our design we require voltage of 5V and current of 500mA, so from the following
datasheet we can see that 4001 is giving us 50V as reverse voltage and rest are giving
higher voltage which is not required, and also giving us sufficent current(1 amp) required
by us.

Table 3.15.:Features of 1N4001

Low forward voltage drop


High surge(sudden increment) current capability

REGULATOR:

Voltage regulator is an electrical regulator designed to automatically maintain a constant


voltage level.Now from the given datasheet we can see that we are obtaining 5V and
current of 500mA fron this regulator.
This (LM 7805) is most common voltage regulator that is still used in embedded designs.
The features are listed below:-

Table.3.15.1Features of LM7805
LM78XX Series:
3-Terminal 1A positive voltage regulators
Features:
1.
2.
3.
4.
5.
6.

Output current up to 1A
Output voltages of 5,6,8,9,10,12,15,18,24
Thermal overload protection
Short circuit protection
Output transistor safe operating area protection
Output voltage tolerance =

7. Operating temperature = -40


8. Input voltage range = 7V 20V

control. As another example, a transport vehicle may safely negotiate a highway


navigation task, changing lanes and speed as required, replanning routes and so on, yet a

Chapter 4
SOFTWARE EXPLANATION
4.1 Proteus
Software development is the tools use to drive the PIC controller. High
level language such as C is chosen to be implemented in the project. For the
software development, a series of program will be created suit with the
requirement by the site. This project will require constructing the exact prototype
to show that this system can be executed in the real world. Before fabricating the
system, the circuit need to be design and tested. The simulation software, Proteus,
is use to simulate the hardware as in Figure 4.1

Figure 4.1(a): Software simulation using Proteus


By using this software, it can help to analyze and test whether the circuit works or not.
As illustrate in Figure 4.1 , all the components can be linked even without using the wire

connection thus ease the jobs of connecting all the components in the circuit. This
software also helps the designer to design electronic circuit and simulate it before being
produce. This will help reducing the cost of fabrication and time for designing and
testing. Once the program and the hardware are functioning, then the exact hardware can
be constructing.
After the program and circuit has been tested, the Proteus is net-linked
with another software, Ares, to design the circuit that is needed for the next
development stage; hardware development. In software Ares, the circuit that have
been constructed in Proteus can be loaded and Ares will automatically design a
circuit as shown in Figure 4.1 (b).

Figure 4.1(b): Circuit design for Printed Circuit Board (PCB)

4.2 Hardware (Prototype) Development


The steps of developing a prototype start with designing the circuit
using PCB. The finished circuit design was shown in Figure 4.1.2 . This

section will elaborate the phases and steps involved in producing the
hardware.
PHASE 1: Circuit printing
The finished circuit can be printed on a special PCB sheet or
plastic. The toner (carbon-based) will be printed on the sheet as in Figure
Figure 4.2.(a): Circuit design printed on plastic sheet

After the circuit printed on the plastic sheet, the next step is to transfer the
design onto PCB. The process of transferring the circuit design onto the
PCB will need to use excessive heat, so a domestic iron will be use. The
processes are as follows:
Step 1: Place the printed sheet onto the PCB (make sure the side is
correct).
Step 2: Clip and secure the edges to avoid the sheet moving during later
steps. Then place the board under a thin fabric.
Step 3: The iron need to be heated up to high temperature.
Step 4: When the iron is ready, carefully and firmly press the iron onto the
area thoroughly. This will allow the toner to adhere on the copper.

Step 5: Leave the board for cooling down and after a few minutes take the
sheet off and the design will remain.

PHASE 2: Etching
After finish transferring the design onto the PCB, the next phase is
etching. Etching is a process of removing the unwanted part on the PCB.
In this case, the part that is wanted was the circuit diagram that already
being transferred on the board. Etching process will use a chemical
substant which need to be mixed in hot water. When the mixed substant is
ready, the PCB needs to be dipped into the mixture as shown in Figure 4.2.

(b) Make sure the board drown in the mixture.


Figure 4.2.(c): PCB with circuit design dipped into etching substant
After that, the container needs to be shaking to dissolve the copper
layer on the PCB. After awhile, only the design will remain on the board as
shown in Figure 4.2.(c). After the etching process, the remaining carbon
layer needs to be clean using sand paper.

Figure 4.2.(C): The unwanted copper has been removed


PHASE 3: Drilling
The PCB need to be drilled to allow the components pin going
through the hole and be soldered. This process which illustrates by
Figure
4.2.(d) also needs to be done cautiously to avoid damaging the circuit. The
size of the holes also needs to be taken into calculation. Use .0260 for IC
holes and .310 for resistors and capacitors. After the drilling and cleaning,
the PCB will look as in Figure 4.2.(f).

Figure 4.2.(e): Drilling the holes for components


Figure 4.2.(f): PCB with drilled holES

PHASE 4: Soldering
What left to do is soldering all the components onto the PCB. The
steps are illustrates in Figure 4.2.6, Figure 4.2.7and Figure 4.2.8. Figure
4.2.9 shows the circuit designed using Ares to compare with the finish
product shown in Figure 4.2.6.

Figure 4.2.(g) : Soldering process

Figure 4.2.(h): Finish soldering

Figure 4.2.(e): Result after soldering process

Figure 4.2.(f): Circuit design for Printed Circuit Board (PCB)

4.3 System Flow Chart


STA
RT

; vehicle starts entering the parking


area

CUSTO
MER

o
Passing
ope
nin
g
loop
det
counter=0
ect
or
Yes

Passing
closing
loop detector
Counter = Counter
Yes
+1
||
Counter = Counter 1
LCD and
indicators
guiding
customer to the
respective
levels
Customer search
for vacant
parking.
Green = Vacant
Red =
Occupied

customer taking the ticket as the


sign of start point

; the system detects the vehicle is at


opening loop
N

the counter is ready to start


counting

; the system detects the vehicle is at


opening loop
; the counter is counting UP/DOWN
;

Yes

system

guiding

level
; after reach the respective level,
the customer will spot vacant
parking by looking at Green
light
;
thesensordetectsifv

ST
OP

the

customer to the nearest vacant

o
Vehicle
ent
eri
ng
parking
slo
RED light turns
t?
to GREEN

the

ehicle is entering
the parking slot
; the light will turn
from RED to
GREENtoindicates
occupancy

Figure 4.3.1: Flow chart of the overall system

4.4 IC Programming
One of the key factors in this project is the programming. To test whether
the programming is working or not, the programming needs to be encoded into the
integrated chip (IC) and test it virtually using Proteus. Although it is virtually
tested, the program needs to be loaded into the chip on every modification. Having
this feature, the program can be loaded without having the real chip for testing
purposes thus saving valuable time.
After verifying that the programming is working, finally the coding can be
loaded into the real IC. From PICC Compiler software, the data will be burnt into
the chip by first connecting the device burner to the communication port (com
port). This can be done by clicking the Program Chip tab and choose ICD. The
software will automatically detect the device. After the software detects it, then
load the file that is needed by browsing the file location and load the .PJT file.
After that click the program button and the coding will be burnt into the IC.
4.5. ATMega 8 Ide Tool

First of all we write our software in the 8051 ide assembler. Here we use 8051
assembler because we wrote our software in the assembly code. We assemble
these code in assembler and assembler after assemble the software convert into
hex code Now this hex code is transfer into the blank ic with the help of the serial
programmer. In the serial programmer we insert the blank ic on the ZIP socket
( blank ic socket) and select the particular ic in the assembler.

8051 Ide layout

Atmel 8051

Programmer software

Figure.4.5.1

Figure.: 4.5.2

4.6 Project code :


#define ROT 20
int check()
{
int count =0;

int x;
uint8_t y=0x00;
for (x=0;x<8;x++)
{
y=(1<<x);
if((PINA&y)==0)
{ count++;
}
}
If ((PINB&0x01)==0)
{ count++;
}
return count;
}
int freestagenum() {
int num;
num=0;
if( (PINA & 0x01)==0 || (PINA & 0x02)==0 || (PINA & 0x04)==0 ) {
num=1; return num;
}
if( (PINA & 0x08)==0 || (PINA & 0x10)==0 || (PINA & 0x20)==0 ) {
num=2; return num;
}
if( (PINA & 0x40)==0 || (PINA & 0x80)==0 || (PINB & 0x01)==0 )
{

num=3; return num;


}
return 0;
}
void segdisplay(int a)
{
switch(a)
{
case 0: PORTC=0b01111110;
break;
case 1: PORTC=0b00110000;
break;
case 2: PORTC=0b01101101;
break;
case 3: PORTC=0b01111001;
break;
case 4: PORTC=0b00110011;
break;
case 5: PORTC=0b01011011;
break;
case 6: PORTC=0b01011111;
break;
case 7: PORTC=0b01110000;
break;
case 8: PORTC=0b01111111;

break;
case 9: PORTC=0b01111011;
break;
default :
break;
}
}
void posrot(int n)
{
n=n*ROT;
while(n)
{
PORTD=0b00000001;
PORTD=0b00000010;
PORTD=0b00000100;
PORTD=0b00001000;
PORTD=0b00000001;
PORTD=0b00000000;
n=n-1;
}
}
void negrot(int n)
{
n=n*ROT;
while(n)

{
PORTD=0b0000100;
PORTD=0b00000010;
PORTD=0b00000001;
PORTD=0b00001000;
PORTD=0b00000010;
PORTD=0b00000000;
n=n-1;
}
}
void way03()
{
posrot(3);}
void way02()
{ posrot(2);}
void way01()
{ posrot(1);}
void way30()
{ negrot(3);}
void way20()
{ negrot(2);}
void way10()
{ negrot(1);}
void way12()
{ posrot(1);}

void way13()
{ posrot(2);}
void way31()
{ negrot(2);}
void way21()
{ negrot(1);}
void way23()
{ posrot(1);}
void way32()
{ negrot(1);}
void cust(){
int b;
b=freestagenum();
switch(b)
{
case 0:
break;
case 1:
way01();
way10();
break;
case 2:
way02();
way20();
break;

case 3:
way03();
way30();
break;
default:
break; } }
void travel3()
{
PORTD &= 0xEF;
way03();
PORTD |= 0x80;
while( (PINB & 0x20) != 0x20 )
if((PINB & 0x20) == 0x20)
{
PORTD &= 0x7F;
way30(); }
while((PINB & 0x20)== 0x20) }
void travel2()
{
PORTD &= 0xEF;
way02();
PORTD |= 0x40;
while((PINB & 0x20)!= 0x20)
if((PINB & 0x20)== 0x20)
{

PORTD &= 0xBF;


way20(); }
while((PINB & 0x20)== 0x20) }
void travel1()
{
PORTD &= 0xEF;
way01();
PORTD |= 0x20;
while((PINB & 0x20)!= 0x20)
if((PINB & 0x20)== 0x20)
{
PORTD &= 0xDF;
way10(); }
while((PINB & 0x20)== 0x20)}
void travel0()
{
PORTD |= 0x10;
while((PINB & 0x20)!= 0x20)
if((PINB & 0x20)== 0x20)
{
PORTD &= 0xEF; cust(); } }
int main() {
int a;
DDRA=0x00; DDRB=0x00; DDRC=0xFF; DDRD=0xFF;
while(1) {

a=check();
segdisplay(a);
if( ((PINB & 0x02)==0) && ((PINB & 0x04)==0) && ((PINB & 0x08)==0) &&
((PINB & 0x10
)==0) )
{
PORTD |= 0x10;
}
if( ((PINB & 0x02)==0x02) && ((PINB & 0x04)==0) && ((PINB & 0x08)==0) &&
((PINB &
0x10)==0))
{
travel0();
}
if( ((PINB & 0x02)==0) && ((PINB & 0x04)==0x04) && ((PINB & 0x08)==0) &&
((PINB &
0x10)==0))
{
travel1();
}
if( ((PINB & 0x02)==0) && ((PINB & 0x04)==0) && ((PINB & 0x08)==0x08) &&
((PINB &
0x10)==0))
{
travel2();

}
if( ((PINB & 0x02)==0) && ((PINB & 0x04)==0) && ((PINB & 0x08)==0) &&
((PINB & 0x10
)==0x10))
{
travel3();
}
if( ((PINB & 0x02)==0x02) && ((PINB & 0x04)==0x04) && ((PINB & 0x08)==0)
&& ((PINB &
0x10)==0))
{
travel1();
_delay_ms(1000);
travel0();
}
if( ((PINB & 0x02)==0x02) && ((PINB & 0x04)==0) && ((PINB & 0x08)==0x08)
&& ((PINB &
0x10)==0))
{
travel2();
_delay_ms(1000);
travel0(); }
if( ((PINB & 0x02)==0x02) && ((PINB & 0x04)==0) && ((PINB & 0x08)==0) &&
((PINB &
0x10)==0x10))

{
travel3();
_delay_ms(1000);
travel0(); }
if( ((PINB & 0x02)==0) && ((PINB & 0x04)==0) && ((PINB & 0x08)==0x08) &&
((PINB &
0x10)==0x10))
{
travel2();
travel3(); }
if( ((PINB & 0x02)==0) && ((PINB & 0x04)==0x04) && ((PINB & 0x08)==0) &&
((PINB &
0x10)==0x10))
{
travel1();
travel3(); }
if( ((PINB & 0x02)==0) && ((PINB & 0x04)==0x04) && ((PINB & 0x08)==0x08)
&& ((PINB &
0x10)==0))
{
travel1();
travel2(); }
if( ((PINB & 0x02)==0) && ((PINB & 0x04)==0x04) && ((PINB & 0x08)==0x08)
&& ((PINB &
0x10)==0x10))

{
travel3();
travel2();
travel1(); }
if( ((PINB & 0x02)==0x02) && ((PINB & 0x04)==0) && ((PINB & 0x08)==0x08)
&& ((PINB &
0x10)==0x10))
{
travel3();
travel2();
cust(); }
if( ((PINB & 0x02)==0x02) && ((PINB & 0x04)==0x04) && ((PINB & 0x08)==0)
&& ((PINB &
0x10)==0x10))
{
travel3();
travel1();
cust(); }
if( ((PINB & 0x02)==0x02) && ((PINB & 0x04)==0x04) && ((PINB &
0x08)==0x08) && ((PINB
& 0x10)==0))
{
travel2();
travel1();
cust(); }

if( ((PINB & 0x02)==0x02) && ((PINB & 0x04)==0x04) && ((PINB &
0x08)==0x08) && ((PINB
& 0x10)==0x10))
{
travel3();
travel2();
travel1();
cust(); }
}}}

CHAPTER--5
RESULT AND DISCUSSION
This chapter provides the result and discussion to provide a thoroughly
information about the execution result of the proposed project. The outcome of

this project will also be discussed to evaluate the relevant of the implementation of
this project.
5.1 Guided System Perspective
The following experimental results define the efficacy and feasibility of
the proposed Informative Parking System with Microcontroller Interfacing
(IPSMI) in a time-worth and cost-effective way. The results evaluate the
effectiveness of guided policy in terms of following perspective:
5.1.1

Traffic Searching for Parking


Figure 5.1.1 (a) shows the comparison of average driving distance between

two methods of finding a vacant parking space. One is through blind searching
and another one is through guided-system. The average driving distance under
blind search method which illustrate by Line 1 has the worst outcome, especially
during the peak hours. It is because without knowing the exact location of a vacant
parking, the users tend to wandering around the parking area and thus resulting to
wasting time and gas in the attempt. The situation might get worst if there are a lot
of vehicle using the same method. On the other hand, the guided system method
which represented by Line 2 has the best result compared to blind search because
by using this method, the user have the higher rate of probability to find a vacant
space.

L
L

i
n
e
2

i
n
e
1

Figure 5.1.1(a): Traffic searching for parking comparison under different


parking guidance strategies
During peak hours, most of the parking lots are fully occupied.
Consequently, users have to rely on the visual aids where they can find what they
were looking for and it results in the reduction of average driving distance.
Figure 5.1(b) is the signal representation of the inputs sensor at the parking
space in accordance with their output signal. Respectively, Wave 1 and Wave 2 are
the enable input and clock input for the system. Enable and Clock data gives the
instruction to execute the system. After the system is ready, it waits for the input
signal from the sensors which represented by Wave 3. Before the input signal
being generated (in this case, before the sensor detect the presence of a vehicle),
the signal in Wave 4 will show reading. It means, the status of the parking is
vacant. However, when the sensor detects a vehicle, Wave 4 automatically will go
to low which mean the space has been occupied.
Wave 1

Wave 2

Wave 3

WaveSignals
4
Figure 5.1.(c):
for input and output value with respect to the clock input

5.2 Result of Simulation


To test whether the system works or not, the circuit is simulated using
Proteus. Figure 6.2 (a) and Figure 6.2 (b) shows the circuit system in initial

condition. It means, at this moment, there is no vehicle entering the parking space
yet. As you can see, all the parking lot from PA PD are vacant with green light
indication. There is also a green light indicator at every level entrance that shows
that particular level still has vacant parking. The counter will show the amount of
vacant space left at the level entrance. As referring to Figure 4.2 (a) and Figure 4.2
(b), this parking premise has four levels with four parking spaces at every level, so
the counter will show four (4) to indicate there are four vacant parking on that
level. By this, people will know exactly how much vacant parking still available at
the respectiive level.
At the initial state, the LCD will display welcoming note. These LCDs will
be mounted at every ramp to guide people until they find their parking space. The
LCD will show the real-time event and always updating the status of the level.

Figure 5.2.1: The system in initial condition (no vehicle)

Figure 5.2.2: Graphic simulation - initial

Figure 5.2.3: Condition after several vehicles entering the parking lot

CHAPTER 6

CONCLUSION AND FUTURE DEVELOPMENT

This chapter will conclude all the findings and analysis to evaluate the
overall outcome of this project implementation. It will also describe about the
future planning towards improving the system.
6.1 Conclusion

I would like to conclude this project as a very great and enriching experience.
During the project labs I familiarized myself with P.C.B designing, application of I.C.
(its pin diagram), mounting of components using soldering process and interfacing
of the hardware circuit with the computer. The circuit can be used at all places
starting from domestic to the industrial sectors. The simplicity in the usage of this
circuit helps it to be used by a large number of people as people with less
knowledge of hardware can also use it without facing any problem. TheI also
learned about the engineering. Responsibility and about their hard work. This
project was not only good for personality development but also great in terms of
imparting practical knowledge.Thus I conclude our project with a very nice and
wonderful experience With a push towards solving the problem facing by people,
a new prototype of Informative Parking System with Microcontroller Interfacing
(IPSMI) has been developed to optimize parking management. The proposed
project is the solution system for the parking difficulties faced by people for such
a long time. The implementation of a system which integrates with the
programmable integrated chip (PIC) technology will consume lesser cost for
producing the product because the input and output ports are able to handle more
devices. At the same time, the system can also reduce the time of searching for
vacant parking. When the main objective being accomplished it is believed that
the user as well as the management will gain the benefits. Upon the completion of

the project, the knowledge on how the PIC works after being programmed can be
understood

6.2 Future Development


This automated car parking system can be installed with safety installations such as,
whenever there is human movement in the system, the rotation of the platforms should be
immediately stopped. The platforms can also be equipped with safety sensors guiding the
movement of vehicles in the platforms. It can be fully automated by integrating it with a
panel board, such that whenever a particular number is called on the panel board, the
respective platform should appear at the ground level. This calling can also be made
more secured by providing each platform a specific password, so that only whenever a
particular password is typed the platform is retrieved. It can also be programmed, so that
the platforms travel the minimum distance in the retrieval of the vehicle. A turn table can
be incorporated with the system in front of the ramp of platform so that cars can be easily
turned and parked into the platform. This is very useful in the areas where cars cannot
turn easily to get into the platform.

For future enhancements, this project can be integrated with the Field Programmable
Logic Array (FPGA) which is able to rectify the problems and troubleshoot it without
having to come to the site. It means, the administrator can monitor the status of the
parking area by using only software. Besides that, the IPSMI can also be using the
Fuzzy Logic algorithm so it will be an intelligent system that can automatically reserve a

space as soon as the user takes the parking ticket. This intelligent system will be able to
detect the ticket and guide the user to their special reserved parking space.

7. Reference
1.www.google.com
2.www.wikipedia.com
Datasheet we referred:
1.Fairchild semiconductor/1N4001-1N4007 general purpose rectifiers
2.Fairchild semiconductor/LM78XX 3-terminal 1A positive voltage regulator
3.Atmel/ATmega8

Books we referred:
1.Analog Electronics, L.K Maheshwari, M.M.S Anand, Prentice-Hall of india pvt.
Ltd., Third edition,
2. Digital Design, M.Morris Mano, Prentice-Hall of india pvt. Ltd., Third edition,
3. Electronic devices and circuits- S.Salivahanan, N.Suresh Kumar, A.Vallavaraj, 2nd
edition, 2008.

You might also like