238840918 final-report-hk-2

59
Get Homework/Assignment Done Homeworkping.com Homework Help https://www.homeworkping.com/ Research Paper help https://www.homeworkping.com/ Online Tutoring https://www.homeworkping.com/ click here for freelancing tutoring sites A MAJOR PROJECT REPORT ON AUTOMATED CAR PARKING SYSTEM Submitted in partial fulfillment of the requirement for the award of degree of Bachelors of Technology (2010-2014) of 59 Submitted by: Nilina Lizbeth Babu Roll No. :7410210 Simranpreet Kaur Roll No:7410246 B. Tech. E.C.E. 4 th Year Submitted to: MR. VIKAS UTTRAJA, HOD, ECE Deptt. UNDER THE GUIDANCE OF: Ankur Saini

Transcript of 238840918 final-report-hk-2

Page 1: 238840918 final-report-hk-2

Get Homework/Assignment Done Homeworkping.comHomework Help https://www.homeworkping.com/

Research Paper helphttps://www.homeworkping.com/

Online Tutoringhttps://www.homeworkping.com/

click here for freelancing tutoring sites

A MAJOR PROJECT REPORTON

AUTOMATED CAR PARKING SYSTEM

Submitted in partial fulfillment of the requirement for the award of degree of

Bachelors of Technology (2010-2014)

Page 1 of 47

Submitted by:Nilina Lizbeth BabuRoll No. :7410210Simranpreet KaurRoll No:7410246B. Tech. E.C.E. 4thYear

Submitted to:MR. VIKAS UTTRAJA, HOD, ECE Deptt.

UNDER THE GUIDANCE OF:Ankur Saini

Page 2: 238840918 final-report-hk-2

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERINGFACULTY OF ENGINEERING,

NNSS’ SAMALKHA GROUP OF INSTITUTIONS01,HATHWALA ROAD, SAMALKHA, DELHI CHANDIGARH ROAD NCR-

132115(HR.)

ACKNOWLEDGEMENT

It is our pleasure to be indebted to various people, who directly or indirectly contributed in the development of this work and who influenced thinking, behavior, and acts during the course of study. We express our sincere gratitude to Dr. Rajesh Goel, worthy Director SGI for providing us an opportunity to work on “AUTOMATED CAR PARKING SYSTEM”. We would like to thank Mr. VikasUttraja, Head of Department, Electronics and Communication Engineering, SGI. We are thankful to Mr. Ankur Saini for his support, cooperation, and motivation provided to us during the development of project for constant inspiration, presence and blessings. We would like to thank the almighty and our parents for their moral support and our friends with whom we shared our day-to-day experience and received lots of suggestions that improved our quality of work.

Nilina Lizbeth BabuSimranpreet Kaur

Page 2 of 47

Page 3: 238840918 final-report-hk-2

DECLARATION

We, Nilina Lizbeth Babu and Simranpreet Kaur , student of B. Tech 4thyear, studying at Samalkha Group of Institutions, Samalkha, hereby declare that the project report on “AUTOMATED CAR PARKING SYSTEM” submitted to Electronics and Communication Department, SGI, Samalkha in partial fulfillment of Degree of Bachelors of Technology is the original work conducted by us. The information and data given in the report is authentic to the best of our knowledge. This project report is not being submitted to any other University for award of any other Degree, Diploma and Fellowship by us.

Nilina Lizbeth BabuSimranpreet Kaur

Page 3 of 47

Page 4: 238840918 final-report-hk-2

CERTIFICATE

It is certified that Ms. Nilina Lizbeth Babu and Ms. Simranpreet Kaur, students of Bachelor of Technology, Electronics and Communication Engineering, under class Roll No.7410210 and 7410246 for the session (2010-2014), has completed the Major Project Titled “AUTOMATED CAR PARKING SYSTEM” under our supervision. They have attended the Department of Electronics and Communication Engineering, Samalkha Group of Institutions,Hathwala Road, Samalkha, Panipat, Haryana for required number of days.

We wish them all success in his/her all endeavors.

Ms. Monika Ankur Saini Asst Prof ECE Deptt (Project Guide)(Project Incharge)

Page 4 of 47

Page 5: 238840918 final-report-hk-2

Mr. Vikas Kumar (Headof the Department)

AUTOMATED CAR PARKING

Page 5 of 47

Page 6: 238840918 final-report-hk-2

CONTENTS

Page 6 of 47

Page 7: 238840918 final-report-hk-2

1.Abstract 2. Introduction 3. Circuit Diagram 4. block diagram 5.working of the system

Top view of the system

6.Architecture of 8051 microcontroller 7.Components used:

Description of components usedo Power supplyo IR sensorso Keypad matrixo LEDo LCDo Capacitoro Transistoro Gate control sectiono Relayo Voltage regulator(7805)o DC motoro Barriero Crystal oscillatoro Microcontroller interfacing

8. Programming of the project9. Benefits10. Applications11. Future scope12. References

ABSTRACT

Page 7 of 47

Page 8: 238840918 final-report-hk-2

In this project, we show the automated car parking system. We have shown four slots as a prototype in the parking area. A barrier is present at the entry. We have placed 1 IR sensor in each slot to detect the presence or absence of car. A LED is present in each slot to provide light whenever the car is there. LED train is provided in the path which remains ON whenever there is a car in the parking area. If there is no car present the LED train is OFF.A barrier is provided at the entry. One IR sensor is placed ahead the barrier and another is placed behind it. The barrier is opened and closed automatically when the IR sensors detect the presence of the car. LCD display is provided at the main gate which displays “Welcome…!!”. Whenever a car enters, the data entry operator enters the car number with the help of keypad and the data gets stored in computer. As the car enters the parking area the “No. of Visitors=” display on LCD is incremented by 1. The main LCD also shows the “Available Slots=” replacing “Welcome…..!!”. Four LEDs are placed at the entrance for corresponding slot to show either it is full or empty. Glowing LED shows that the particular slot is full.As the car leaves, the number of visitors is decremented automatically and the available slots is incremented.

INTRODUCTION

Page 8 of 47

Page 9: 238840918 final-report-hk-2

An automated (car) parking system (APS) is a mechanical system designed to minimize

the area and/or volume required for parking cars.The APS utilizes a mechanical system to

transport cars to and from parking spaces (rather than the driver) in order to eliminate much

of the space wasted in a parking garage. An APS is more similar to an automated storage and

retrieval system for cars. The space saving provided by the APS, is derived primarily from a

significant reduction in space not directly related to the parking of the car:

Parking space width and depth (and distances between parking spaces) are dramatically

reduced since no allowance need be made for driving the car into the parking space or for the

opening of car doors (for drivers and passengers)

Ceiling height is minimized since there is no pedestrian traffic (drivers and passengers) in

the parking area, and

No walkways, stairways or elevators are needed to accommodate pedestrians in the parking

area. APS are generically known by a variety of names, including:

Automatic parking system Automated parking facility (APF) Automated vehicle storage & retrieval system (AVSRS) Car parking system Mechanical parking Robotic parking garage

CIRCUIT DIAGRAM

Page 9 of 47

Page 10: 238840918 final-report-hk-2

BLOCK DIAGRAM

Page 10 of 47

Page 11: 238840918 final-report-hk-2

The transmitter section comprises of two light emitting diodes which transmit high power light beams. These light beams are incident on the receivers, which produce an output of zero volt if the beam received is uninterrupted and +5V if the beam is interrupted by a car. These receivers are the Light Detecting Resistors which are arranged in such a manner so as to detect the light even after the obstacle between the sensor and receiver passes through. The working of the sensors is based on the voltages across collector, emitter, and base respectively.Whenever a car enters the parking area, it interrupts the light beams in a definite sequence. This sequence is given to the up-count sequence detector, which generates a high output only if the correct sequence has been detected. Similarly, when the car leaves the parking area, it generates a fixed sequence, which is given to the down- count sequence detector. The down count sequence detector generates a high output only if the correct sequence is produced by the exiting car. The outputs of the up count and down count blocks are given to the display section. Depending on the sequence detector that generates an actuating signal, the count is either incremented or decremented on the main LCD.

WORKING OF THE SYSTEM

Page 11 of 47

Page 12: 238840918 final-report-hk-2

In this project, we show the automated car parking system. We have shown two slots as a prototype in the parking area.

We have placed 1 IR sensor in each slot to detect the presence or absence of car. One LED is present in each slot to provide light whenever the car is there. LED train is provided in the path which remains ON whenever there is a car in the parking area, If there is no car present, the LED train remains OFF.

A barrier is provided at the entry. One IR sensor is placed ahead the barrier and another is placed behind it. The barrier is opened and closed automatically when the IR sensors detect the presence of the car. The car parking is secured with the password known only to the data entry operator. Everyday the operator initializes the system by entering password using keypad matrix. LCD display is provided at the main gate which displays “ENTER PASSWORD”(which is to be entered by the operator) .

If the password is correct LCD displays “WELCOME”and then, name of parking ”XYZ PARKING” replacing “WELCOME”. If password is incorrect then, LCD displays “INCORRECT” replacing “ENTER PASSWORD” and gives two more chances to enter the correct password, if failed to do so, the system shuts down (hangs) and needed to be restarted manully .

As the car enters the parking area the “AVAILABLE : ” display on LCD is decreamented by 1 and finally displays “FULL” when all the slots are occupied. As the car leaves, the “AVAILABLE : ”is incremented automatically and displays “EMPTY” when all the parking slots are vacant.

TOP VIEW:

Page 12 of 47

Page 13: 238840918 final-report-hk-2

Page 13 of 47

Page 14: 238840918 final-report-hk-2

ARCHITECTURE OF 8051 MICROCONTROLLER

The Intel 8051 is an 8-bit microcontroller which means that most available operations are limited to 8 bits. There are 3 basic "sizes" of the 8051: Short, Standard, and Extended. The Short and Standard chips are often available in DIP (dual in-line package) form, but the Extended 8051 models often have a different form factor, and are not "drop-in compatible". All these things are called 8051 because they can all be programmed using 8051 assembly language, and they all share certain features (although the different models all have their own special features).

Some of the features that have made the 8051 popular are: 64 KB on chip program memory. 128 bytes on chip data memory(RAM). 4 reg banks. 128 user defined software flags. 8-bit data bus 16-bit address bus 32 general purpose registers each of 8 bits 16 bit timers (usually 2, but may have more, or less). 3 internal and 2 external interrupts. Bit as well as byte addressable RAM area of 16 bytes. Four 8-bit ports, (short models have two 8-bit ports). 16-bit program counter and data pointer. 1 Microsecond instruction cycle with 12 MHz Crystal.

8051 models may also have a number of special, model-specific features, such as ADC, OpAmps, etc...

Typical applications:-

8051 chips are used in a wide variety of control systems, telecom applications, robotics as well as in the automotive industry. By some estimations, 8051 family chips make up over 50% of the embedded chip market.

Page 14 of 47

Page 15: 238840918 final-report-hk-2

Basic Pins :-

PIN 9: PIN 9 is the reset pin which is used reset the microcontroller’s internal registers and ports upon starting up. (Pin should be held high for 2 machine cycles.)

PINS 18 & 19: The 8051 has a built-in oscillator amplifier hence we need to only connect a crystal at these pins to provide clock pulses to the circuit.

PIN 40 and 20: Pins 40 and 20 are VCC and ground respectively. The 8051 chip needs +5V 500mA to function properly, although there are lower powered versions like the Atmel 2051 which is a scaled down version of the 8051 which runs on +3V.

PINS 29, 30 & 31: As described in the features of the 8051, this chip contains a built-in flash memory. In order to program this we need to supply a voltage of +12V at pin 31. If external memory is connected then PIN 31, also called EA/VPP, should be connected to ground to indicate the presence of external memory. PIN 30 is called ALE (address latch enable), which is used when multiple memory chips are connected to the controller and only one of them needs to be selected. PIN 29 is called PSEN. This is "program store enable". In order to use the external memory it is required to provide the low voltage (0) on both PSEN and EA pins.Ports:-

There are 4 8-bit ports: P0, P1, P2 and P3.

Page 15 of 47

Page 16: 238840918 final-report-hk-2

PORT P1 (Pins 1 to 8): The port P1 is a general purpose input/output port which can be used for a variety of interfacing tasks. The other ports P0, P2 and P3 have dual roles or additional functions associated with them based upon the context of their usage.

PORT P3 (Pins 10 to 17): PORT P3 acts as a normal IO port, but Port P3 has additional functions such as, serial transmit and receive pins, 2 external interrupt pins, 2 external counter inputs, read and write pins for memory access.

PORT P2 (pins 21 to 28): PORT P2 can also be used as a general purpose 8 bit port when no external memory is present, but if external memory access is required then PORT P2 will act as an address bus in conjunction with PORT P0 to access external memory. PORT P2 acts as A8-A15, as can be seen from fig

PORT P0 (pins 32 to 39): PORT P0 can be used as a general purpose 8 bit port when no external memory is present, but if external memory access is required then PORT P0 acts as a multiplexed address and data bus that can be used to access external memory in conjunction with PORT P2. P0 acts as AD0-AD7, as can be seen from fig

Oscillator Circuits:-

The 8051 requires the existence of an external oscillator circuit. The oscillator circuit usually runs around 12MHz, although the 8051 (depending on which specific model) is capable of running at a maximum of 40MHz. Each machine cycle in the 8051 is 12 clock cycles, giving an effective cycle rate at 1MHz (for a 12MHz clock) to 3.33MHz (for the maximum 40MHz clock). The oscillator circuit that generates the clock pulses so that all internal operations are synchronized.

Timers:-

The 8051 comes equipped with two timers, both of which may be controlled, set, read, and configured individually. The 8051 timers have three general functions:1) Keeping time and/or calculating the amount of time between events,2) Counting the events themselves, or3) Generating baud rates for the serial port.Four bits (two for each timer) are used to specify a mode of operation. The modes of operation are:

TxM1 TxM0 Timer Mode Description of Mode0 0 0 13-bit Timer.0 1 1 16-bit Timer1 0 2 8-bit auto-reload1 1 3 Split timer mode

Timer 0 in mode 0 (13-bit timer):-

Page 16 of 47

Page 17: 238840918 final-report-hk-2

This is one of the rarities being kept only for the purpose of compatibility with the previuos versions of microcontrollers. This mode configures timer 0 as a 13-bit timer which consists of all 8 bits of TH0 and the lower 5 bits of TL0. As a result, the Timer 0 uses only 13 of 16 bits. How does it operate? Each coming pulse causes the lower register bits to change their states. After receiving 32 pulses, this register is loaded and automatically cleared, while the higher byte (TH0) is incremented by 1. This process is repeated until registers count up 8192 pulses. After that, both registers are cleared and counting starts from 0.

Timer 0 in mode 1 (16-bit timer):-

Mode 1 configures timer 0 as a 16-bit timer comprising all the bits of both registers TH0 and TL0. That's why this is one of the most commonly used modes. Timer operates in the same way as in mode 0, with difference that the registers count up to 65 536 as allowable by the 16 bits.

Timer 0 in mode 2 (Auto-Reload Timer):-

Mode 2 configures timer 0 as an 8-bit timer. Actually, timer 0 uses only one 8-bit register for counting and never counts from 0, but from an arbitrary value (0-255) stored in another (TH0) register.The following example shows the advantages of this mode. Suppose it is necessary to constantly count up 55 pulses generated by the clock.If mode 1 or mode 0 is used, It is necessary to write the number 200 to the timer registers and constantly check whether an overflow has occured, i.e. whether they reached the value 255. When it happens, it is necessary to rewrite the number 200 and repeat the whole procedure. The same procedure is automatically performed by the microcontroller if set in mode 2. In fact, only the TL0 register operates as a timer, while another (TH0) register stores the value from which the counting starts. When the TL0 register is loaded, instead of being cleared, the contents of TH0 will be reloaded to it. Referring to the previous example, in order to register each 55th pulse, the best solution is to write the number 200 to the TH0 register and configure the timer to operate in mode 2.

Timer 0 in Mode 3 (Split Timer):-

Mode 3 configures timer 0 so that registers TL0 and TH0 operate as separate 8-bit timers. In other words, the 16-bit timer consisting of two registers TH0 and TL0 is split into two independent 8-bit timers. This mode is provided for applications requiring an additional 8-bit timer or counter. The TL0 timer turns into timer 0, while the TH0 timer turns into timer 1. In addition, all the control bits of 16-bit Timer 1 (consisting of the TH1 and TL1 register), now control the 8-bit Timer 1. Even though the 16-bit Timer 1 can still be configured to operate in any of modes (mode 1, 2 or 3), it is no longer possible to disable it as there is no control bit to do it. Thus, its operation is restricted when timer 0 is in mode 3.

COMPONENTS USED:-

Page 17 of 47

Page 18: 238840918 final-report-hk-2

Description of components used:-

Page 18 of 47

S.no Components

1 Microcontroller(AT89S52)

2 LEDs

3 LCD

4 IR Sensors

5 4x4 Keypad Matrix

6 Barrier

7 Relays

8 DC motor

9 Resistances(100Ω,220Ω,10kΩ,4.7kΩ)

10 npn transistors(bc 187/547)

11 Capacitors(10µF,33pF)

12 Resistance array

13 Crystal Oscillator

14 Voltage Regulator(7805)

Page 19: 238840918 final-report-hk-2

Power Supply:-In this project, we use 5 volt regulated power supply. For this purpose, we use a single step down transformer with full wave rectifier circuit. In the rectifier circuit, we use two diodes as a full wave rectifier. One 1000mfd capacitor is used as a filter capacitor to convert pulsating dc into smooth dc. Output of the rectifier is not regulated, so for regulated power supply we use IC 7805 as a regulator

Sensors:-

In this section, we use transmitters(LED’s) which generates high power light beams . The signals of which are received by the receivers of the sensor section.The receiver section consists of identical light detecting resistors. When the signal from the transmitters are received ; a low dc level (logic low) is obtained at the output. But once the signal is cut ,the output obtained is at logic high.The +5V dc level occasionally drops to zero, even when the signal strength is quite low, due to very high sensitivity of the receiver. This may lead to the false triggering of the circuit, which must be eliminated. For this we provide an electrolytic capacitor that is connected between the output of receiver and ground.The output of the receiver is obtained due to the fact that when light falls on this circuit the resistance value is reduced, which results in the passage of current through the base turning the transistor ON. Thus the collector voltage is low and the output obtained is low. But once the signal is cut the collector voltage level increases, resulting a high output.

Interfacing Switch to Microcontroller & Switch Debouncing :-

In 8051 PORT 1, PORT 2 & PORT 3 have internal 10k Pull-up resistors whereas this Pull-up resistor is absent in PORT 0. Hence PORT 1, 2 & 3 can be directly used to interface a switch

Page 19 of 47

Page 20: 238840918 final-report-hk-2

whereas we have to use an external 10k pull-up resistor for PORT 0 to be used for switch interfacing or for any other input. Figure 1 shows switch interfacing for PORT 1, 2 &. 3

Figure 2 shows switch interfacing to PORT 0.

For any pin to be used as an INPUT PIN a HIGH (1) should be written to the pin if you don’t do this the pin will always be read as LOW.In the above figure when the switch is not pressed the 10k resistor provides the current needed for LOGIC 1 closure of switch provides LOGIC 0 to the controller PIN.Practically when a switch is closed the contacts open & close rapidly for about 30ms. This is called as SWITCH BOUNCING. Figure 3 shows its waveform.

As we can see the switch release is clean without any bouncing. When a switch is pressed the contacts open & close for about 20ms. Without SWITCH DEBOUNCING the controller will think that the switch was pressed many times.

Page 20 of 47

Page 21: 238840918 final-report-hk-2

Keypad Matrix:-

Keypads are a part of HMI or Human Machine Interface and play really important role in a small embedded system where human interaction or human input is needed. Martix keypads are well known for their simple architecture and ease of interfacing with any microcontroller.Constuction of a keypad is really simple. As per the outline shown in the figure below we have four rows and four columns. In between each overlapping row and column line there is a key.

Keypad Connections with 8051 Microcontroller

LED(Light Emitting Diode):-

Page 21 of 47

Page 22: 238840918 final-report-hk-2

Circuit Symbol

LEDs emit light when an electric current passes through them.Connecting and soldering

LEDs must be connected the correct way round, the diagram may be labelled a or + for anode and k or - for cathode (yes, it really is k, not c, for cathode!). The cathode is the short lead and there may be a slight flat on the body of round LEDs. If you can see inside the LED the cathode is the larger electrode (but this is not an official identification method).LEDs can be damaged by heat when soldering, but the risk is small unless you are very slow. No special precautions are needed for soldering most LEDs.

Interfacing LED to Microcontroller

The Fig. below shows how to interface the LED to microcontroller. The Anode is connected through a resistor to Vcc & the Cathode is connected to the Microcontroller pin. So when the Port Pin is HIGH the LED is OFF & when the Port Pin is LOW the LED is turned ON.

LCD(Liquid Crystal display):-

Page 22 of 47

Page 23: 238840918 final-report-hk-2

Circuit diagram of LCD section is shown bellow. LCD is interfaced with 8051 microcontroller.

The LCD panel's Enable and Register Select is connected to the Control Port. The Control Port is an open collector / open drain output. While most Parallel Ports have internal pull-up resistors, there are a few which don't. Therefore by incorporating the two 10K external pull up resistors, the circuit is more portable for a wider range of computers, some of which may have no internal pull up resistors.We make no effort to place the Data bus into reverse direction. Therefore we hard wire the R/W line of the LCD panel, into write mode. This will cause no bus conflicts on the data lines. As a result we cannot read back the LCD's internal Busy Flag which tells us if the LCD has accepted and finished processing the last instruction. This problem is overcome by inserting known delays into our program.The 10k Potentiometer controls the contrast of the LCD panel.

The diagram to the right, shows the pin numbers for these devices. When viewed from the front, the left pin is pin 14 and the right pin is pin 1.

Capacitor:-

Page 23 of 47

Page 24: 238840918 final-report-hk-2

Capacitors store electric charge. They are used with resistors in timing circuits because it takes time for a capacitor to fill with charge. They are used to smooth varying DC supplies by acting as a reservoir of charge. They are also used in filter circuits because capacitors easily pass AC (changing) signals but they block DC (constant) signals.There are many types of capacitor but they can be split into two groups, polarised and unpolarised. Each group has its own circuit symbol.

Polarised capacitors (large values, 1µF +)

Examples:

Circuit symbol:

Unpolarised capacitors (small values, up to 1µF)

Examples:

Circuit symbol:

Small value capacitors are unpolarised and may be connected either way round. They are not damaged by heat when soldering, except for one unusual type (polystyrene). They have high voltage ratings of at least 50V, usually 250V or so. It can be difficult to find the values of these small capacitors because there are many types of them and several different labelling systems!

Transistor:-

Page 24 of 47

Page 25: 238840918 final-report-hk-2

Transistors amplify current, for example they can be used to amplify the small output current from a logic IC so that it can operate a lamp, relay or other high current device. In many circuits a resistor is used to convert the changing current to a changing voltage, so the transistor is being used to amplify voltage.A transistor may be used as a switch (either fully on with maximum current, or fully off with no current) and as an amplifier(always partly on).The amount of current amplification is called the current gain, symbol hFE.

Gate control section:-

The gate control section consists of the motor driver IC [L293D] the OR gate and the two D flip-flops which provide appropriate logic used for controlling the operation of the gate / barrier. Assume that the lower position of the barrier is the default position. Now whenever the input to the motor driver IC is 10, it causes the motor to rotate, thereby causing the barrier to move such that it opens the entrance. Similarly, when the input to motor driver is 01, the motor rotates in the opposite direction to lower the barrier, thereby closing the gate. When the input to the motor driver is 00, the motor does not rotate.When the car has completely entered the parking area, the input to the L293D is 01, causing the motor to rotate such that the gate begins to close. Thus, the movement of the gate is controlled on the arrival or departure of a car.

Relay:-

A simple electromagnetic relay consists of a coil of wire surrounding a soft iron core, an iron yoke which provides a low reluctance path for magnetic flux, a movable iron armature, and one or more sets of contacts. The armature is hinged to the yoke and mechanically linked to one or more sets of moving contacts. It is held in place by a spring so that when the relay is

Page 25 of 47

Page 26: 238840918 final-report-hk-2

de-energized there is an air gap in the magnetic circuit. In this condition, one of the two sets of contacts in the relay pictured is closed, and the other set is open. Other relays may have more or fewer sets of contacts depending on their function. The relay in the picture also has a wire connecting the armature to the yoke. This ensures continuity of the circuit between the moving contacts on the armature, and the circuit track on the printed circuit board (PCB) via the yoke, which is soldered to the PCB.When an electric current is passed through the coil it generates a magnetic field that attracts the armature, and the consequent movement of the movable contact(s) either makes or breaks (depending upon construction) a connection with a fixed contact. If the set of contacts was closed when the relay was de-energized, then the movement opens the contacts and breaks the connection, and vice versa if the contacts were open. When the current to the coil is switched off, the armature is returned by a force, approximately half as strong as the magnetic force, to its relaxed position. Usually this force is provided by a spring, but gravity is also used commonly in industrial motor starters. Most relays are manufactured to operate quickly. In a low-voltage application this reduces noise; in a high voltage or current application it reduces arcing.When the coil is energized with direct current, a diode is often placed across the coil to dissipate the energy from the collapsing magnetic field at deactivation, which would otherwise generate a voltage spike dangerous to semiconductor circuit components. Some automotive relays include a diode inside the relay case. Alternatively, a contact protection network consisting of a capacitor and resistor in series (snubber circuit) may absorb the surge. If the coil is designed to be energized with alternating current (AC), a small copper "shading ring" can be crimped to the end of the solenoid, creating a small out-of-phase current which increases the minimum pull on the armature during the AC cycle.A solid-state relay uses a thyristor or other solid-state switching device, activated by the control signal, to switch the controlled load, instead of a solenoid. An optocoupler (a light-emitting diode (LED) coupled with a photo transistor) can be used to isolate control and controlled circuits.

Voltage Regulator(7805):-

Page 26 of 47

Page 27: 238840918 final-report-hk-2

In electronics, a linear regulator is a voltage regulator based on an active device (such as a bipolar junction transistor, field effect transistoror vacuum tube) operating in its "linear region" (in contrast, a switching regulator is based on a transistor forced to act as an on/off switch) or passive devices like zener diodes operated in their breakdown region. The regulating device is made to act like a variable resistor, continuously adjusting a voltage divider network to maintain a constant output voltage. It is very inefficient compared to a switched-mode power supply, since it sheds the difference voltage by dissipating heat.

Overview:

The transistor (or other device) is used as one half of a potential divider to control the output voltage, and a feedback circuit compares the output voltage to a reference voltage in order to adjust the input to the transistor, thus keeping the output voltage reasonably constant. This is inefficient: since the transistor is acting like a resistor, it will waste electrical energy by converting it to heat. In fact, the power loss due to heating in the transistor is the current times the voltage dropped across the transistor. The same function can be performed more efficiently by a switched-mode power supply (SMPS), but it is more complex and the switching currents in it tend to produce electromagnetic interference. A SMPS can easily provide more than 30A of current at voltages as low as 3V, while for the same voltage and current, a linear regulator would be very bulky and heavy.

DC motor:-

Page 27 of 47

Page 28: 238840918 final-report-hk-2

Brushes:-The brushed DC electric motor generates torque directly from DC power supplied to the motor by using internal commutation, stationary permanent or electromagnets, and rotating electrical magnets.Like all electric motors or generators, torque is produced by the principle of Lorentz force, which states that any current-carrying conductor placed within an external magnetic field experiences a torque or force known as Lorentz force. Advantages:

Low initial cost, High reliability, and Simple control of motor speed.

Disadvantages: High maintenance Low life-span for high intensity uses. Maintenance involves regularly replacing the brushes and springs which carry the

electric current, as well as cleaning or replacing the commutator. These components are necessary for transferring electrical power from outside the motor to the spinning wire windings of the rotor inside the motor.

Brushess: - Brushless DC motors use a rotating permanent magnet or soft magnetic core in the rotor, and stationary electrical magnets on the motor housing. A motor controller converts DC to AC. This design is simpler than that of brushed motors because it eliminates the complication of transferring power from outside the motor to the spinning rotor.

Advantages: Long life span Little or no maintenance

Page 28 of 47

Page 29: 238840918 final-report-hk-2

High efficiency Disadvantages:

High initial cost, More complicated motor speed controllers

Some such brushless motors are sometimes referred to as "synchronous motors" although they have no external power supply to be synchronized with, as would be the case with normal AC synchronous motors. Barrier:-

Barriers may be changed to accommodate right or left hand operation. They can be stopped at any angle between 0 and 90 degrees. Can be operated using a remote control or at the press of a button provided in the control station. Quick release disengaging mechanism enables changeover to manual operation in case of power failure .The DC motor represents a simple drive with high reliability. This drive system permits fast opening and closing times without bouncing of the boom in end positions.

Crystal Oscillator :-

A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters and receivers. The most common type of piezoelectric resonator used is the quartz crystal, so oscillator circuits designed around them became known as "crystal oscillators."Quartz crystals are manufactured for frequencies from a few tens of kilohertz to tens of megahertz. More than two billion (2×109) crystals are manufactured annually. Most are used

Page 29 of 47

Page 30: 238840918 final-report-hk-2

for consumer devices such as wristwatches, clocks, radios, computers, and cellphones. Quartz crystals are also found inside test and measurement equipment, such as counters, signal generators, andoscilloscopes.

Microcontroller interface : -

In this project, we use the 8051 controller to interface all the inputs and outputs. In the input device, we use 6 sensors and one keypad matrix. In output, we use one LCD as a display and one motor to move up-ward and down ward. The brain inside the controller is to control all these inputs and outputs and perform perfectly. 8051 is basically an INTEL IC but now in these days it is available with many companies. We use ATMEL 89S51 series with advance feature than 8051. ATMEL 89S51 is a 40 pin controller with 128 bytes of ram and 4 k byte of ROM inside.

Pin configuration:-

Pin no. 40 of the controller is connected to the positive 5 volt power supply. We provide a 5 volt regulated power supply on this pin. Pin no 9 is the reset pin and this pin is connected to a capacitor and resistor network to provide an auto-reset option, when controller is wake-up. For manually reset, we connect one push to on switch in parallel with the capacitor to provide manual reset option.

Pin no. 20 is connected to the ground pin.

Page 30 of 47

Page 31: 238840918 final-report-hk-2

Pin no. 18 and 19 are connected to the external crystal to provide a constant oscillation to the circuit. Two capacitors are grounded from the crystal pins to provide stabilization.

All the IR sensors are connected to port P1.Parking sensors are connected to the P1.0, P1.1, P1.2, P1.3, P1.4, and P1.5.

Port P0 of the controller is connected to the LCD directly. Here we use port P0 with the data pins of the ASCII code. LCD displays only the ASCII code. In the programming, we convert the digital code in to ASCII code. So to provide a data in the LCD, we send these codes by the 8 data lines. These data lines from the controller is from the P0.0 to P0.7

P2.1, P2.2, P2.3 is connected to the control pins of the LCD. On this control pin, we select the command register, data register and the enable pin. We use the command and the data register pins to send the data and command separately.

Two relays are connected to port 2 on P2.4, P2.5.

LEDs are connected to port 3 on p3.0,p3.1, p3.2, p3.3, p3.4, p3.5, p3.6,p3.7.

LED train is connected to P1.6.

The connections for rows and columns for keypad matrix are connected to port3 of 2nd microcontroller at p3.0, p3.1, p3.2, p3.3, p3.4, p3.5, p3.6, p3.7 respectively.

PROGRAMMING FOR PROJECT IN C

Page 31 of 47

Page 32: 238840918 final-report-hk-2

For 1 st microcontroller:-

#include "REG52.h"sbit RS=P2^1;sbit RW=P2^2;sbit E=P2^3;sbit REL1=P2^4;sbit REL2=P2^5;

sbit IR1=P1^0;sbit IR2=P1^1;sbit IR3=P1^2;sbit IR4=P1^3;sbit IR5=P1^4;sbit IR6=P1^5;sbit LEDTRAIN=P1^6;

sbit LED1=P3^0;sbit LED2=P3^1;sbit LED3=P3^2;sbit LED4=P3^3;sbit LED5=P3^4;sbit LED6=P3^5;sbit LED7=P3^6;sbit LED8=P3^7;

int unit,ten,hundred;void cmd(unsigned char);void data1(unsigned char);void disp_lcd1(unsigned char []);void disp_lcd2(unsigned char []);void divide(int);

void main()

int i,visitcount=0, flag=0;LED1=0x00;LED2=0x00;LED3=0x00;LED4=0x00;LED5=0x00;LED6=0x00;LED7=0x00;LED8=0x00;REL1=1;

Page 32 of 47

Page 33: 238840918 final-report-hk-2

REL2=1;RS=RW=E=0;cmd(0x38);for(i=0;i<1500;i++);cmd(0x06);for(i=0;i<1500;i++);cmd(0x01);for(i=0;i<1500;i++);cmd(0x0C);for(i=0;i<1500;i++);cmd(0x80);for(i=0;i<1500;i++);disp_lcd1("Welcome...!!");disp_lcd2("Visitors: ");while(1)

if(IR1==1)

for(i=0;i<400;i++);if(IR1==1)

while(IR1==1)

LED1=0xFF;LED5=0xFF;

else

LED1=0x00; LED5=0x00;

if(IR2==1)

for(i=0;i<400;i++);if(IR2==1)

while(IR2==1)

LED2=0xFF;LED6=0xFF;

else

Page 33 of 47

Page 34: 238840918 final-report-hk-2

LED2=0x00;LED6=0x00;

if(IR3==1)

for(i=0;i<400;i++);if(IR3==1)

while(IR3==1) LED3=0xFF;

LED7=0xFF;

else

LED3=0x00;LED7=0x00;

if(IR4==1)

for(i=0;i<400;i++)if(IR4==1)

while(IR4==1)

LED4=0xFF;LED8=0xFF;

else

LED4=0x00;LED8=0x00;

if(IR5==0)

for(i=0;i<1000;i++);if(IR5==0)

REL1=0;REL2=1;if(IR6==0)

Page 34 of 47

Page 35: 238840918 final-report-hk-2

for(i=0;i<1000;i++);if(IR6==0)

while(IR5==0);while(IR6==0);if(visitcount!=255)visitcount=visitcount+1;REL1=1;REL2=0;for(i=0;i<10000;i++);REL1=1;REL2=1;flag=1;

if(IR6==0)

for(i=0;i<1000;i++);if(IR6==0)

REL1=0;REL2=1;if(IR5==0)

for(i=0;i<1000;i++);if(IR5==0) while(IR6==0);

while(IR5==0);if(visitcount!=0)visitcount=visitcount-1;REL1=1;REL2=0;for(i=0;i<10000;i++);REL1=1;REL2=1;flag=1;

if(flag==1)

divide(visitcount);flag=0;

Page 35 of 47

Page 36: 238840918 final-report-hk-2

cmd(0xCA);for(i=0;i<1500;i++);

if(visitcount>0)

LEDTRAIN=0xFF;else

LEDTRAIN=0x00;

void cmd(unsigned char cm)

int j;P0=cm;RW=0;RS=0; E=1;for(j=0;j<50;j++);E=0;

void data1(unsigned char dt)

int k;P0=dt;RW=0;RS=1;E=1;for(k=0;k<50;k++);E=0;

void disp_lcd1(unsigned char dp1[])

int i,j;cmd(0x80);for(i=0;i<1500;i++);for(j=0;j<16;j++)

data1(' ');for(i=0;i<150;i++);

cmd(0x80);for(i=0;i<1500;i++);

for(j=0;dp1[j]!='\0';j++)

Page 36 of 47

Page 37: 238840918 final-report-hk-2

data1(dp1[j]);for(i=0;i<1500;i++);

void disp_lcd2(unsigned char dp2[])

int i,j,k;cmd(0xC0);for(i=0;i<1500;i++);for(j=0;j<16;j++)

data1(' ');for(k=0;k<150;k++);

cmd(0xC0);for(i=0;i<1500;i++);for(j=0;dp2[j]!='\0';j++)

data1(dp2[j]);for(i=0;i<1500;i++);

void divide(int a)

int temp,k;temp=a/10;unit=a%10;ten=temp%10;temp=temp/10;hundred=temp%10;data1(hundred+48);for(k=0;k<1500;k++);data1(ten+48);for(k=0;k<1500;k++);data1(unit+48);for(k=0;k<1500;k++);

For 2 nd microcontroller:-

#include "REG52.h"sbit RS=P2^1;sbit RW=P2^2;sbit E=P2^3;

Page 37 of 47

Page 38: 238840918 final-report-hk-2

sbit R1=P3^0;sbit R2=P3^1;sbit R3=P3^2;sbit R4=P3^3;sbit C1=P3^4;sbit C2=P3^5;sbit C3=P3^6;sbit C4=P3^7;

unsigned char swi1(void);void cmd(unsigned char);void data1(unsigned char);

void main()

unsigned char sw;int i;RS=RW=E=0;cmd(0x38);for(i=0;i<1500;i++);cmd(0x06);for(i=0;i<1500;i++);cmd(0x01);for(i=0;i<1500;i++);cmd(0x0C);for(i=0;i<1500;i++);

while(1)

sw=swi1();switch (sw)

case 1: data1('1');

for(i=0;i<1000;i++); break;

case 2: data1('2');for(i=0;i<1000;i++);

break;case 3: data1('3');

for(i=0;i<1000;i++); break;

case 4: data1('4');for(i=0;i<1000;i++);

break;case 5: data1('5');

for(i=0;i<1000;i++);

Page 38 of 47

Page 39: 238840918 final-report-hk-2

break;case 6: data1('6');

for(i=0;i<1000;i++); break;

case 7: data1('7');for(i=0;i<1000;i++);

break;case 8: data1('8');

for(i=0;i<1000;i++); break;

case 9: data1('9');for(i=0;i<1000;i++);

break;case 10: data1('A');

for(i=0;i<1000;i++); break;

case 11: data1('B');for(i=0;i<1000;i++);

break;case 12: data1('C');

for(i=0;i<1000;i++); break;

case 13: data1('D');for(i=0;i<1000;i++);

break;case 14: data1('E');

for(i=0;i<1000;i++); break;

case 15: data1('F');for(i=0;i<1000;i++);

break;case 16: data1('0');

for(i=0;i<1000;i++); break;

unsigned char swi1(void)

int i;R1=R2=R3=R4=1;C1=C2=C3=C4=0;

if((R1==0)||(R2==0)||(R3==0)||(R4==0))

Page 39 of 47

Page 40: 238840918 final-report-hk-2

C2=C3=C4=1;C1=0;if(R1==0)

for(i=0;i<400;i++);

if(R1==0) while(R1==0);

return(0x01);

if(R2==0)

for(i=0;i<400;i++);if(R2==0)

while(R2==0);return(0x02);

if(R3==0)

for(i=0;i<400;i++);if(R3==0)

while(R3==0);return(0x03);

if(R4==0)

for(i=0;i<400;i++);if(R4==0)

while(R4==0);return(0x04);

C1=1;C2=0;if(R1==0) for(i=0;i<400;i++);

if(R1==0)

while(R1==0);return(0x05);

Page 40 of 47

Page 41: 238840918 final-report-hk-2

if(R2==0)

for(i=0;i<400;i++); if(R2==0)

while(R2==0);return(0x06);

if(R3==0)

for(i=0;i<400;i++);if(R3==0)

while(R3==0);return(0x07);

if(R4==0)

for(i=0;i<400;i++);if(R4==0)

while(R4==0);return(0x08);

C2=1;C3=0;if(R1==0)

for(i=0;i<400;i++);if(R1==0)

while(R1==0);return(0x09);

if(R2==0)

for(i=0;i<400;i++);if(R2==0)

while(R2==0);

Page 41 of 47

Page 42: 238840918 final-report-hk-2

return(0x0A);

if(R3==0)

for(i=0;i<400;i++);if(R3==0)

while(R3==0);return(0x0B);

if(R4==0)

for(i=0;i<400;i++);if(R4==0)

while(R4==0);return(0x0C);

C3=1;C4=0;if(R1==0)

for(i=0;i<400;i++);if(R1==0)

while(R1==0);return(0x0D);

if(R2==0)

for(i=0;i<400;i++);if(R2==0)

while(R2==0);return(0x0E);

if(R3==0)

for(i=0;i<400;i++);if(R3==0)

Page 42 of 47

Page 43: 238840918 final-report-hk-2

while(R3==0);return(0x0F);

if(R4==0)

for(i=0;i<400;i++);if(R4==0)

while(R4==0);return(0x10);

void cmd(unsigned char cm)

int j;P0=cm;RW=0;RS=0; E=1;for(j=0;j<50;j++);E=0;

void data1(unsigned char dt)

int k;P0=dt;RW=0;RS=1;E=1;for(k=0;k<50;k++);E=0;

Page 43 of 47

Page 44: 238840918 final-report-hk-2

Benefits of Automated Car Parking System :- The advantages are numerous: space efficient, sympathetic to existing infrastructure, environmentally sound and cost effective in construction and operation.

Less Space : Little or no structural changes needed to be made to existing buildingsThey’ll fit where a conventional parking structure simply would notIt frees up space for more residential and industrial parks Environmentally sensitive : The systems can be integrated with existing infrastructuresAutomated parking significantly reduces noise, fumes, and other pollutants.Vehicles are not driven through the system, resulting in fewer emissions

Cost-Effective : Systems are delivered as pre-fabricated components and assembled on siteExacavation costs are kept to a minimum; space, lighting and power requirements are reducedNoise insulation is no longer a necessityNo need for energy-intensive ventilation as vehicles are not being driven into facilityReliable technology is manufactured to high tolerances and has few moving parts reducing maintenance costs Greater security for driver and vehicles:Drivers collect their cars from secure waiting areas and personal risk is reducedParking is simple-no difficult parking or frustrating searches for a space or a parked vehicle

APPLICATION

Page 44 of 47

Page 45: 238840918 final-report-hk-2

By virtue of their relatively smaller volume and mechanized parking systems, APS are often

used in locations where a multi-story parking garage would be too large, too costly or

impractical.

Examples of such applications include:

under or inside existing or new structures

between existing structures and in irregularly shaped areas.

APS can also be applied in situations similar to multi-storey parking garages such as

freestanding above ground, under buildings above grade and under buildings below grade.

FUTURE SCOPE

Automated parking systems are designed to be efficient. By not requiring space for cars to

drive in and out, and no space needed for pedestrians, these systems can park the same or

more cars than a traditional car garage twice as large. It's believed that these systems will

solve the growing demand for parking worldwide.The automated systems works very simply;

Page 45 of 47

Page 46: 238840918 final-report-hk-2

a driver drives into the car park bay and then exits and leaves their car. The computerized

system then activates lifts to take the car to the nearest open spot. When the driver wishes to

recall the vehicle, they just request it from a computer terminal outside of the car park and

within 3 minutes the car is returned and the driver can drive off.These parking systems are

typically smaller than conventional parking garages. Using nearly half of the space, they can

park the same or more number of cars than the conventional garage. This is due to the

inefficiencies of the traditional car garage. Automated systems are also safer than the current

norm. Being safely housed in a building with no traffic and no people ensures the vehicle is

safe from dents, scratches and minor accidents but also from vandalism and theft.They are

also more convenient as a driver doesn't spend time searching for a spot, walking to and from

their car and there's never a worry of forgetting where they parked. As a bonus, these systems

are also green. With no cars driving in and out of the building, the amount of pollution is

reduced to nearly zero.All of these factors together combine to make parking garages the

future of parking. Experts have already predicted that implementing these automated systems

parking will reduce the demand for the increasingly rare parking spot.

REFERENCES

www.wikipedia.com

Introduction to 8051 microcontroller(MAZIDI)

Page 46 of 47

Page 47: 238840918 final-report-hk-2

Electronics for you magazine-January 2013 edition

www.electonicsforu.com

www.project us .com

www.systemparking.com

Page 47 of 47