DOC a.8 Automatic Parking

30
AUTOMATIC PARKING SLOT INDICATOR USING MICROCONTROLLERMini Project report submitted in partial fulfillment of the requirements For the award of the degree of BACHELOR OF TECHNOLOGY IN ELECTRICAL AND ELECTRONICS ENGINEERING By ABHINASH CH (07241A0225) ABHINAY REDDY L (07241A0226) AJAY A V S S (07241A0227) BHARADWAJ S (07241A0230) Department of Electrical and Electronics Engineering GOKARAJU RANGARAJU INSTITUTE OF ENGINEERING & TECHNOLOGY, BACHUPALLY, HYDERABAD-72 2007 – 2011

description

good

Transcript of DOC a.8 Automatic Parking

Page 1: DOC a.8 Automatic Parking

“AUTOMATIC PARKING SLOT INDICATOR USING MICROCONTROLLER”

Mini Project report submitted in partial fulfillment of the requirements For the award of the degree of

BACHELOR OF TECHNOLOGY IN

ELECTRICAL AND ELECTRONICS ENGINEERING By

ABHINASH CH (07241A0225) ABHINAY REDDY L (07241A0226) AJAY A V S S (07241A0227) BHARADWAJ S (07241A0230)

Department of Electrical and Electronics Engineering

GOKARAJU RANGARAJU INSTITUTE OF ENGINEERING & TECHNOLOGY,

BACHUPALLY, HYDERABAD-72 2007 – 2011

Page 2: DOC a.8 Automatic Parking

GOKARAJU RANGARAJU INSTITUTE OF ENGINEERING

AND TECHNOLOGY

Hyderabad, Andhra Pradesh.

DEPARTMENT OF ELECTRICAL & ELECTRONICS ENGINEERING

CERTIFICATE

This is to certify that the mini-project report entitled AUTOMATIC

PARKING SLOT INDICATOR USING MICROCONTROLLER that is being

submitted by ABHINASH CH, ABHINAY REDDY L, AJAY A V S S, BHARADWAJ S, in

partial fulfillment for the award of the Degree of Bachelor of Technology in Electrical

and Electronics Engineering to the Jawaharlal Nehru Technological University is a record

of bonafide work carried out by them under my guidance and supervision. The results embodied

in this project report have not been submitted to any other University or Institute for the award of

any Graduation degree.

Mr.P.M.Sarma Mr. Chakravarthy External Examiner

HOD, EEE Associate Professor

GRIET Dept. of EEE

Hyderabad GRIET

Page 3: DOC a.8 Automatic Parking

ACKNOWLEDGEMENT

This is to place on record my appreciation and deep gratitude to the persons without

whose support this project would never seen the light of day.

I wish to express my propound sense of gratitude to Mr. P. S. Raju, Director, G.R.I.E.T

for his guidance, encouragement, and for all facilities to complete this project.

I also express my sincere thanks to Mr.P.M.Sarma, Head of the Department, G.R.I.E.T

and for extending their help.

I have immense pleasure in expressing my thanks and deep sense of gratitude to my

guide Mr.Chakravarthy, Associate Professor, Department of Electrical and Electronics

Engineering, G.R.I.E.T for his guidance throughout this project.

Finally I express my sincere gratitude to Mr. Anil Kumar, Assistant Professor,

Department of Electrical and Electronics Engineering, G.R.I.E.T and Ms. U. Vijaya Lakshmi,

Assistant Professor, Department of Electrical and Electronics Engineering, G.R.I.E.T and all

the members of faculty and my friends who contributed their valuable advice and helped to

complete the project successfully.

ABHINASH CH (07241A0225)

ABHINAY REDDY L (07241A0226)

AJAY A V S S (07241A0227)

BHARADWAJ S (07241A0230)

Page 4: DOC a.8 Automatic Parking

CONTENTS

1. Introduction

2. Flow diagram

i. Connecting the sensors.

ii. Connecting to Microcontroller through Amplifier circuit

iii. Overall Connection.

3. Description of hardware and its configuration

i. Transmitter-Receiver Sensor

ii. Amplifying circuit

iii. AT89C51

iv. LCD

4. Software Codes

5. Schematic Connections

6. Hardware implementation of the Project

7. Conclusion

References

Appendix A

Appendix B

Appendix C

Page 5: DOC a.8 Automatic Parking

CHAPTER 1 INTRODUCTION

If we take a look at the present world scenario, there is a crucial necessity for saving the parking

space in big companies, apartments etc.

More and more multi-storey buildings are springing up everyday, thus giving rise to parking

problems. Thus there is a shortage of land which leads to cutting down of trees and deforestation.

This has a harsh and adverse effect on the environment.

This project aims at saving the ground space required for parking. Using this system any number

of cars can be parked according to the requirement, in floors one above the other.

Thus, in a space where only 10 cars could be parked, earlier, we can park 20/30/40…cars,

depending on the number of floors used. This could really solve the space unavailability

problems that we all are facing by allowing floor by floor parking.

Page 6: DOC a.8 Automatic Parking

Facilities such as reserved parking can also be provided for those whose are regular visitors to

that place like the employers of that company office.

A very distant and indirect effect of this project is that, its implementation could lead to a

decrease in the hunt for land through deforestation thereby contributing in maintaining

environmental balance.

The main objective of this system is to optimize the ground space available, for parking. In

places where more than 100 cars need to be parked, this system proves to be very useful.

Automatic Car Parking System enables the parking of vehicles, floor after floor, by displaying

the available slots thus reducing the ground space used. Here any number of cars can be parked

according to the requirement, making the system modernized and a space-saving one.

Page 7: DOC a.8 Automatic Parking

CHAPTER 2 FLOW DIAGRAM

TRANSMITTER – RECEIVER SENSOR The obstacle (vehicle) is sensed by the Transmitter – Receiver circuit. A signal is given whenever an obstacle is introduced in between the IR pair. It sends a signal of micro volts to the amplifier circuit. AMPLIFIER CIRCUIT The amplifier circuit amplifies the signal received by the IR pair. The microcontroller needs 4-5 volts to respond to a signal. This is achieved by the amplifier circuit. It is a simple connection of transistor in Common emitter connection. The circuit amplifies the received signal which is of order µV to 4-5 volts.

Display Unit

(LED and LCD)

Transmitter – Receiver Sensor

Microcontroller Circuit

Amplifier Circuit

Page 8: DOC a.8 Automatic Parking

MICROCONTROLLER CIRCUIT: The microcontroller is embedded with a C program. It is designed in such a way that whenever it receives the signal from amplifier circuit it displays the filled and vacant slots in the LCD and LED panels. DISPLAY UNIT: The display unit used in the project is LED panel and 16 x 2 LCD. It displays the filled and vacant slots in the arena through the microcontroller. It is controlled by AT89C51 microcontroller.

Page 9: DOC a.8 Automatic Parking

CHAPTER 3 DESCRIPTION OF HARDWARE

TRANSMITTER – RECEIVER SENSOR A photoelectric sensor, or photo eye, is a device used to detect the distance, absence, or presence of an object by using a light transmitter, often infrared, and a photoelectric receiver.

Photoelectric IR sensor

Types

A self-contained photoelectric sensor contains the optics, along with the electronics. It requires only a power source. The sensor performs its own modulation, demodulation, amplification, and output switching. Some self-contained sensors provide such options as built-in control timers or counters. Because of technological progress, self-contained photoelectric sensors have become increasingly smaller.

Remote photoelectric sensors used for remote sensing contain only the optical components of a sensor. The circuitry for power input, amplification, and output switching are located elsewhere, typically in a control panel. This allows the sensor, itself, to be very small. Also, the controls for the sensor are more accessible, since they may be bigger.

When space is restricted or the environment too hostile even for remote sensors, fiber optics may be used. Fiber optics are passive mechanical sensing components. They may be used with either remote or self-contained sensors. They have no electrical circuitry and no moving parts, and can safely pipe light into and out of hostile environments.

Sensing Modes

An opposed (through beam) arrangement consists of a receiver located within the line-of-sight of the transmitter. In this mode, an object is detected when the light beam is blocked from getting to the receiver from the transmitter.

Page 10: DOC a.8 Automatic Parking

A retroreflective arrangement places the transmitter and receiver at the same location and uses a reflector to bounce the light beam back from the transmitter to the receiver. An object is sensed when the beam is interrupted and fails to reach the receiver.

A proximity-sensing (diffused) arrangement is one in which the transmitted radiation must reflect off the object in order to reach the receiver. In this mode, an object is detected when the receiver sees the transmitted source rather than when it fails to see it.

Some photoeyes have two different operational types, light operate and dark operate. Light operate photoeyes become operational when the receiver "receives" the transmitter signal. Dark operate photoeyes become operational when the receiver "does not receive" the transmitter signal.

The detecting range of a photoelectric sensor is its "field of view", or the maximum distance the sensor can retrieve information from, minus the minimum distance. A minimum detectable object is the smallest object the sensor can detect. More accurate sensors can often have minimum detectable objects of minuscule size.

AMPLIFYING CIRCUIT

Amplifier Circuit

The amplifier consists of a npn transistor connected in Common emitter mode. It is used as an interface between the sensors set and the microcontroller circuit. It amplifies the signal received from the sensor set and gives the amplified output to the microcontroller.

Page 11: DOC a.8 Automatic Parking

MICROCONTROLLER - AT89C51

Microcontroller AT89C51

The 8051 microcontroller generic part number actually includes a whole family of microcontrollers that have numbers ranging from 8031 to 8751.

The block diagram of the 8051 shows all of the features unique to microcontrollers:

1. Internal ROM and RAM 2. I/O ports with programmable pins 3. Timers and counters 4. Serial data communication

The block diagram also shows the usual CPU components program counter, ALU, working registers, and the clock circuits.

The 8051 architecture consists of these specific features:

1. 8 bit CPU with registers A and B 2. 16 bit PC &data pointer (DPTR) 3. 8 bit program status word (PSW) 4. 8 bit stack pointer(SP) 5. Internal ROM or EPROM (8751)of 0(8031)to 4k(8051) 6. Internal RAM of 128 bytes. 7. 4 register banks , each containing 8 registers 8. 80 bits of general purpose data memory 9. 32 input/output pins arranged as four 8 bit ports:P0-P3 10. Two 16 bit timer/counters:T0-T1 11. Two external and three internal interrupt sources 12. Oscillator and clock circuits

Page 12: DOC a.8 Automatic Parking

A pin out of the 8051 packaged in a 40 pin DIP is shown below.

Internal block diagram of IC 8051

Pin Diagram of 8051

Page 13: DOC a.8 Automatic Parking

16 x 2 LCD

An HD44780 Character LCD is a de facto industry standard liquid crystal display (LCD) display

device designed for interfacing with embedded systems. These screens come in a variety of

configurations including 8x1, which is one row of eight characters, 16x2, and 20x4. The most

commonly manufactured configuration is 40x4 characters, which requires two individually

addressable HD44780 controllers with expansion chips as the HD44780 can only address up to

80 characters.

16 x 2 LCD Panel

These LCD screens are limited to text only and are often used in copiers, fax machines, laser

printers, industrial test equipment, networking equipment such as routers and storage devices.

Character LCDs can come with or without backlights, which may be LED, fluorescent,

orelectroluminescent.

Character LCDs use a standard 14-pin interface and those with backlights have 16 pins. The

pinouts are as follows:

1. Ground

2. VCC (+3.3 to +5V)

3. Contrast adjustment (VO)

4. Register Select (RS). RS=0: Command, RS=1: Data

5. Read/Write (R/W). R/W=0: Write, R/W=1: Read

6. Clock (Enable). Falling edge triggered

7. Bit 0 (Not used in 4-bit operation)

8. Bit 1 (Not used in 4-bit operation)

9. Bit 2 (Not used in 4-bit operation)

Page 14: DOC a.8 Automatic Parking

10. Bit 3 (Not used in 4-bit operation)

11. Bit 4

12. Bit 5

13. Bit 6

14. Bit 7

15. Backlight Anode (+)

16. Backlight Cathode (-)

There may also be a single backlight pin, with the other connection via Ground or VCC pin. The

two backlight pins may precede the pin 1.

The nominal backlight voltage is around 4.2V at 25˚C using a VDD 5V capable model.

Character LCDs can operate in 4-bit or 8-bit mode. In 4 bit mode, pins 7 through 10 are unused

and the entire byte is sent to the screen using pins 11 through 14 by sending 4-bits (nibble) at a

time.

Page 15: DOC a.8 Automatic Parking

CHAPTER 4 SOFTWARE CODE(S)

//Program for Automatic Parking Slot Indicator //using AT89C5 #include<reg51.h> sbit slot1=P1^0; sbit slot2=P1^1; sbit slot3=P1^2; sbit slot4=P1^3; sbit led1=P3^0; sbit led2=P3^1; sbit led3=P3^2; sbit led4=P3^3; sbit rs=P0^0; sbit rw=P0^1; sbit en=P0^2; void delay(int itime) { int i,j; for(i=0;i<=itime;i++) for(j=0;j<=1275;j++); } void lcdcmd(unsigned char value) { rs=0; rw=0; en=1; P2=value; delay(1); en=0; } void lcddata(unsigned char *value) { int i;

Page 16: DOC a.8 Automatic Parking

for(i=0;value[i]!='\0';i++) { rs=1; rw=0; en=1; P2=value[i]; delay(1); en=0; } } void lcdnum(unsigned char slot) { rs=1; rw=0; en=1; P2=slot; delay(1); en=0; } void main() { int x; unsigned char a[4]={'1','2','3','4'}; unsigned char b[4]={'1','2','3','4'}; unsigned int c[4]; P3=0x00; P1=0x00; lcdcmd(0x08); delay(1); lcdcmd(0x38); delay(1); lcdcmd(0x0e); delay(1); lcdcmd(0x01); delay(1); lcdcmd(0x06); delay(1);

Page 17: DOC a.8 Automatic Parking

lcdcmd(0x39); delay(1); lcddata("Welcome to"); lcdcmd(0x39); lcdcmd(0x80); lcddata("Automatic Parking Indicator"); delay(500); lcdcmd(0x01); lcddata("Initialising."); delay(50); lcddata("."); delay(50); lcddata("."); delay(50); while(1) { if(slot1==0) { led1=1; delay(1); c[0]=1; delay(10); } else { led1=0; delay(1); c[0]=0; delay(10); } if(slot2==0) { led2=1; delay(1); c[1]=1; delay(10); } else { led2=0; delay(1); c[1]=0; delay(10);

Page 18: DOC a.8 Automatic Parking

} if(slot3==0) { led3=1; delay(1); c[2]=1; delay(10); } else { led3=0; delay(1); c[2]=0; delay(10); } if(slot4==0) { led4=1; delay(1); c[3]=1; delay(10); } else { led4=0; delay(1); c[3]=0; delay(10); } lcdcmd(0x01); lcdcmd(0x0e); lcddata("Filled:"); delay(50); lcdcmd(0x01); lcdcmd(0x39); for(x=0;x<=4;x++) { if(c[x]==1) { lcdnum(a[x]); lcddata(","); delay(50); }

Page 19: DOC a.8 Automatic Parking

} delay(50); lcdcmd(0x01); lcdcmd(0x0e); lcddata("Available:"); delay(50); lcdcmd(0x01); lcdcmd(0x39); for(x=0;x<=4;x++) { if(c[x]==0) { lcdnum(b[x]); lcddata(","); delay(20); } } y: if(P1==0x00) { P3=0xFF; lcdcmd(0x01); lcddata("Parking Full"); delay(50); lcdcmd(0x01); goto y; } } //while(1) ends here } //main() ends here

Page 20: DOC a.8 Automatic Parking

SCHEMATIC CONNECTIONS

Schematic Layout of the circuit connected in Proteus

The connections are made in Proteus software. The C file id first compiled in Keil Software and a hex file is created from Keil. The Hex file is embedded in the microcontroller in the simulation work and also virtually.

In the proteus circuit the sensors and an array of LED s.

Once the circuit is tested through simulation, a PCB layout is done using EAGLE software. EAGLE stands for Easily Applicable Graphical Layout Editor. A schematic connectin EAGLE and is checked for errors. Then it is

CHAPTER 5 SCHEMATIC CONNECTIONS

Schematic Layout of the circuit connected in Proteus

The connections are made in Proteus software. The C file id first compiled in Keil Software and a hex file is created from Keil. The Hex file is embedded in the microcontroller in the simulation

are replaced by the switches. The display is shown in the LCD

Once the circuit is tested through simulation, a PCB layout is done using EAGLE software. EAGLE stands for Easily Applicable Graphical Layout Editor. A schematic connectin EAGLE and is checked for errors. Then it is preceded to Board Layout.

The connections are made in Proteus software. The C file id first compiled in Keil Software and a hex file is created from Keil. The Hex file is embedded in the microcontroller in the simulation

are replaced by the switches. The display is shown in the LCD

Once the circuit is tested through simulation, a PCB layout is done using EAGLE software. EAGLE stands for Easily Applicable Graphical Layout Editor. A schematic connection is made

Page 21: DOC a.8 Automatic Parking

Schematic Layout of Amplifier circuit in EAGLE

Board Layout of Amplifier Circuit

Page 22: DOC a.8 Automatic Parking

Schematic Layout of LED Panel in EAGLE

Page 23: DOC a.8 Automatic Parking

CHAPTER 6 HARDWARE IMPLEMENTATION

Vehicles placed between sensors

Sensors connected to Amplifying circuit

Page 24: DOC a.8 Automatic Parking

Microcontroller interfaced to LCD and LEDs

Page 25: DOC a.8 Automatic Parking

Overview if the entire kit

Page 26: DOC a.8 Automatic Parking

CHAPTER 7 CONCLUSION AND SCOPE OF FUTURE

By the end of this project

ü Connections and testing in Proteus is studied.

ü Coding and compiling of a C program in Keil u Vision software is studied.

ü Hardware implementation by connecting Schematic and making Board layout EAGLE is

done successfully.

ü The hardware kit is tested successfully by embedding the C program – Hex file in the

AT89C51 Microcontroller.

ü The operation of microcontroller is analysed in simulation and practically.

Automatic Car Parking System enables the parking of vehicles, floor after floor, by displaying

the available slots thus reducing the ground space used. Here any number of cars can be parked

according to the requirement, making the system modernized and a space-saving one.

Page 27: DOC a.8 Automatic Parking

REFERENCES

• Microcontrollers by Masjidi

• www.wikipedia.com/8051

• www.wikipedia.com/photo_electric_sensors

• www.google.com/eagle_software

• www.isis.com/proteus

• Microprocessors and Microcontrollers by A K Ray

Page 28: DOC a.8 Automatic Parking

APPENDIX A SOFTWARE USED – PROTEUS

It is used for the real time simulation of the Circuits involving complex ICs, Microcontrollers,

Electromechanical devices etc.

System components

ISIS Schematic Capture - a tool for entering designs.

PROSPICE Mixed mode SPICE simulation - industry standard SPICE3F5 simulator

combined with a digital simulator.

ARES PCB Layout - PCB design system with automatic component placer, rip-up and retry

auto-router and interactive design rule checking.

VSM - Virtual System Modeling lets co simulate embedded software for popular micro-

controllers alongside hardware design.

System Benefits Integrated package with common user interface and fully context sensitive

help.

Work Space in Proteus

Page 29: DOC a.8 Automatic Parking

APPENDIX B SOFTWARE USED – KEILuVISION

Keil was founded in 1986 to market add-on products for the development tools provided by

many of the silicon vendors. Keil implemented the first C compiler designed from the ground-up

specifically for the 8051 microcontroller.

Keil provides a broad range of development tools like ANSI C compiler, assemblers,

debuggers and simulators, linkers, IDE, library managers, real-time operating systems and

evaluation for 8051, 251, ARM, and XC16x/C16x/ST10 families.

Compiling a C program in EAGLE

Page 30: DOC a.8 Automatic Parking

SOFTWARE USED

EAGLE is an EDA program by CadSoft

acronym formed from Easy Applicable

company in September 2009, Premier

The software consists of several components:

an extensible component database.

OS X available.

It exists for non-commercial use,

mm and two signal layers is limited

The schematic editor can be used

be used.

Schematic and Board Layout in EAGLE

APPENDIX C SOFTWARE USED – EAGLE

CadSoft for creating printed circuit boards . The

pplicable Graphical Layout Editor. CadSoft Eagle

Premier Farnell sells, a supplier of electronic components.

components: Layout Editor, Schematic Editor, Auto

database. It is for the platforms Microsoft Windows , Linux

use, a free version on a schematic sheet, half Eurocard

limited to 100.

used by a special component library for programming

Schematic and Board Layout in EAGLE

The name is an

and the

components. [1]

Auto router and

Linux and Mac

Eurocard mm × 80

programming a MicroSPS