Design of an Automated Parking System

April 23, 2018 | Author: Tom Niyikuza | Category: Relay, Switch, Electrical Engineering, Electromagnetism, Manufactured Goods
Share Embed Donate


Short Description

This is a final year project done by NIYIKUZA Theophile and NIYITEGEKA Gilbert both were students at KIGALI INSTITUTE OF...

Description

KIGALI INSTITUTE OF SCIENCE AND TECHNOLOGY

TOWARDS A BRIGHTER FUTURE

FACULTY OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS

A Project Report on

DESIGN OF AN AUTOMATED PARKING SYSTEM Done by: NIYIKUZA Theophile Reg No: GS2009 0235 And NIYITEGEKA Gilbert Reg No: GS2009 0238

Under the supervision of  Prof.Dr.Eng. NTAGWIRUMUGARA Etienne

Kigali, August 2012

Project ID: ETE/4FT/12/22

KIGALI INSTITUTE OF SCIENCE AND TECHNOLOGY

TOWARDS A BRIGHTER FUTURE

FACULTY OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS

A Project Report on

DESIGN OF AN AUTOMATED PARKING SYSTEM Done by: NIYIKUZA Theophile Reg No: GS2009 0235 And NIYITEGEKA Gilbert Reg No: GS2009 0238

Under the supervision of  Prof.Dr.Eng. NTAGWIRUMUGARA Etienne

Kigali, August 2012

Project ID: ETE/4FT/12/22 ii

FACULTY OF ENGINEERING

DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING ELECTRONICS AND TELECOMMUNICATION TELE COMMUNICATION PROGRAMME

CERTIFICATION

This is to certify that the work presented in this report entitled:

“DESIGN OF AN

AUTOMATED PARKING SYSTEM” is an original work of  NIYIKUZA Theophile and

NIYITEGEGEKA Gilbert and it has not been submitted to any university or elsewhere in any

form for the award of a degree.

Supervisor Prof.Dr.Eng. NTAGWIRUMUGARA Etienne

Signature: ……………………… Date…:…………………………

Head of Department of Electrical and Electronics Prof.Dr.Eng. NTAGWIRUMUGARA Etienne

Signature: ……………………… Date…:…………………………

iii

DECLARATION

We, NIYIKUZA Theophile and NIYITEGEKA Gilbert hereby declare that, the work  presented in this report is our own contribution. To the best of our knowledge, this same work  has never been presented or submitted to any other universities or institutions of higher learning for the award of any degree. We therefore declare that, this work is our own contribution for the partial fulfillment of the award of the degree of Bachelor of Electronics and Telecommunication Engineering in KIST.

NIYIKUZA Theophile REG No.: GS20090235

Signature: ……………… Date: …………………… NIYITEGEKA Gilbert REG No.: GS20090238

Signature: ……………… Date: ……………………

This report has been submitted for examination with the approval of the following supervisor: Prof.Dr.Eng. NTAGWIRUMUGARA Etienne Department of Electrical and Electronics Engineering, KIST

Signature: …………………………… ……………………………………….. ………….. Date: ……………………………… ……………………………………… ………

iv

DEDICATION

With love and gratitude, we dedicate this research project report to:

To almighty God Our parents Brothers and Sisters All our friends and colleagues

Special dedication goes to my fellow brother HABUMUGISHA NORBERT who passed away so early, my Father IYAKAREMYE Leonard,

my Mother KANYANGE Rose, brother

MUSENGIMANA ALBERT, sisters and relatives, IMFURA Pierre Damien also to those

people who have guided and inspired me throughout my journey of education lastly my dear friends that helped me succeed in my Final year project. “NIYITEGEKA Gilbert”

Special dedication goes also to my father

LYIVUZE Leopold, my beloved mother

MUKASONGA M Madeleine, my brothers and sisters, Family of  NSABIMANA Jean de Dieu

and NIYGABA Josee Helene to all GBU KIST/KHI members, also to those people who have guided and inspired me throughout my journey of education. Lastly my dear friend SIBOMANA Faustin who helped me a lot through my engineering journey. “NIYIKUZA Theophile”

v

ACKNOWLEDGEMENTS

We heartedly thank Almighty God for the gift of life and spirit of hard work that He has always given to us especially during this project. We are grateful for members of our families and our relatives. We feel thankful to SFAR and KIST for their contribution for carrying out our studies. We sincerely thank Prof NTAGWIRUMUGARA Etienne, our guide in this project, for his constant support through the course and for providing necessary facilities to carry out this project work. We feel thankful to RUGEMA Charles, Eng BAZIRAMWABO Gabriel and Dr NIYONSABA Andrew for their kind contribution to the realization of this final year project. Thanks to several former lecturers and classmates who broadened our knowledge and technical skills to fulfill the requirement to this project.

vi

ABSTRACT

Design of an AUTOMATED PARKING SYSTEM consists of three main components namely the entrance gate, the entire parking space ground, and lastly the exit gate. The design is supposed to control the entrance gate in such way that it will let the vehicles to enter into the parking ground to a maximum number of parking spaces designed to accommodate vehicles into the parking( in our project we designed the parking to accommodate thirty vehicles including twenty four vehicles for public parking and six vehicles for local staff). The entrance gate will stop to let vehicles to enter into the parking ground when the provided parking space is full i.e. twenty vehicles are in the parking. The exit gate will allow the entrance gate to know that a vehicle has moved from the parking and the entrance gate can now be able to let another vehicle to enter into the parking. This automated system will be enabled by a program designed into a personal computer that will allow this system to occur due to the signals (card reader signal and ticket machine signal) connected to the parallel ports of the computer and then compiled by a computer program and the gives a command to the gate to open or to close the gate. As our country (Rwanda) is growing at the fastest speed, new technologies are being created each and every day to facilitate the key goals of Rwanda in the development. This is the reason why our group has chosen to design AN AUTOMATED PARKING SYSTEM which will allow drivers to be absolutely sure if the parking is full or not, without human interaction. The system will close the gate when the parking spaces are full and open the gate automatically when there is any space available in the parking. Both entrance and exit will be controlled by the computer parallel ports as main controller, due to the entrance card reader machine or ticket machine and exit card reader machine or ticket machine (signal input and output). Computer programming will be used to control (or to automate) the switch which will make the motor to rotate thus cause the gate to open as the gate will be normally closed. Apart from the simulation which will use CIRCUIT MAKER and MULTISIM, the programming language which will be used is C or C++.

vii

TABLE OF CONTENTS

CERTIFICATION.................................................................................................................. iii DECLARATION .................................................................................................................... iv DEDICATION ......................................................................................................................... v ACKNOWLEDGEMENTS ACKNOWLEDGEM ENTS .................................................................................................... vi ABSTRACT ........................................................................................................................... vii LIST OF FIGURES ................................................................................................................ xi LIST OF TABLES ................................................................................................................. xii LIST OF ABBREVIATIONS ABBREVIATIONS .............................................................................................. xiii CHAPTER1: INTRODUCTION ............................................................................................ 1 1.1.

Introduction.................................................................................................................... 1

1.2.

Problem statement ......................................................................................................... 2

1.3.

Objectives........................................................................................................................ 3

1.4.

Significance of the projects ........................................................................................... 3

1.5.

Scope and limitations of the project ............................................................................ 3

1.6. Methodology and procedures ..................................................... ............................................................................................... .......................................... 4 1.6.1. Introduction Introduction .................................................................................. ................................. 4 1.6.2. Discussion................................................. ..................................................... ..................................................................... ................ 4 1.7.

Conclusion ....................................................................................................................... 4

CHAPTER2: LITERATURE REVIEW ................................................................................ 5

2.1. Introduction ......................................................................................................................... 5 2.2. Automated parking system ................................................ ................................................... 5 2.3. Parallel port basics .................................................... ........................................................................................................ ........................................................... ....... 6 2.3.1. Parallel port configurations .......................................................................................... 6 2.3.2. Pins and ports assignment .............................................. ................................................... 8 2.3.2.1. Port assignments ....................................................... ......................................................................................................... .................................................. 8 2.3.2.2. Outputs........................................................................................................................ 8 2.3.2.3. Inputs Inputs .................................................................................................. ........................ 9 2.3.3. Programming Programming the parallel port................................................................... ........................ 9 viii

2.4. Loop sensor/Metal detector ............................................... ................................................. 10 2.4.1. The basics of loop vehicle detection...................................................... ............................................................................ ...................... 10 2.4.2 How loop vehicle detection detection works ................................................................. .............. 10 2.4.2.1. Preformed and saw cut loops ..................................................... .................................................................................... ............................... 12 2.4.2.2. Loop extension cable ............................................... ................................................. 13 2.4.2.3. Loop vehicle detector detector ................................................................ ............................... 13 2.4.2.4. Number of outputs .................................................... .................................................................................................... ................................................ 13 2.4.2.5. Signal type ............................................. ..................................................... ................................................................... .............. 14 2.4.2.6. Diagnostics Diagnostics ......................................................................................... ...................... 14 2.4.2.7. Sensitivity .............................................. ..................................................... ................................................................... .............. 14 2.5. Card reader machine................................................................... machine................................................................... ........................................ 16 2.6. Ticket dispenser/paying dispenser/paying machine ............................................... ........................................ 17 2.7. Boom barrier ...................................................................................................................... 18 2.7.1. Control unit of boom barrier ........................................................................................... 19 2.8. Relays ..................................................... ........................................................................................................... ............................................................................ ...................... 20 2.9. Opto-isolators/coupl Opto-isolators/coupler er ........................................................ ........................................................................................................ ................................................ 21 2.11. Conclusion..................................................... ............................................................................................................ ................................................................... ............ 24 CHAPTER3: DESIGN AND SIMULATION OF AN AUTOMATED PARKING SYSTEM .................................................................................................................................25

3.1. Introduction ..................................................... ............................................................................................................ ................................................................... ............ 25 3.2. Description of the parking area .......................................................................................... 25 3.2. Design flow ..................................................... ............................................................................................................ ................................................................... ............ 27 3.3. Automated parking system ................................................ ................................................. 27 3.4. Block diagram of an automated automated parking system .................................................... ................................................................ ............ 28 3.5. Design of entrance card reader machine system driver circuit .......................................... 29 3.5.1. The design of PC switched circuit.............................................................................. ..... 29 3.5.1.1. The necessity of a PC switched circuit ............................................... ...................... 29 3.5.1.2. Working principle of the PC switched circuit ....................................................... .......................................................... ... 29 3.5.2. Opto-isolating Opto-isolating circuit ................................................................................ ...................... 30 3.5.3. Driver circuit ................................................ ..................................................... ................................................................... .............. 31 3.5.3.1. A transistor as amplifier amplifier ..................................................................... ...................... 31 ix

3.5.3.2. Relay ............................................. ...................................................... ............................................................................ ...................... 33 3.5.3.3. Flywheel Flywheel diode ................................................................. ........................................ 33 3.6. Entrance ticket machine system driving circuit circuit ........................................... ...................... 34 3.6.1. Working principle of the entire entrance switch system ............................................. 35 3.7. Design of Exit Switch Switch ........................................................................................................ ........................................................ ................................................ 36 3.8. Simulations results results .............................................................................. ............................... 38 3.8. Software design ............................................... ..................................................... ................................................................... .............. 40 3.8.1. Algorithm..................................................................................................................... 40 3.9. Flow chart of the software................................................. ................................................. 40 3.10. Functions used ............................................... ..................................................... ................................................................... .............. 41 3.11. Conclusion..................................................... ............................................................................................................ ................................................................... ............ 41 CHAPTER 4: CONCLUSION AND RECOMMENDATIONS RECOMMENDATIONS ...........................................42

4.1. Conclusion.............................................. ...................................................... ............................................................................ ...................... 42 4.2. Recommendations Recommendations ..................................................... ......................................................................................................... ......................................................... ..... 43 REFFERENCES .....................................................................................................................44 APPENDIX .............................................................................................................................45

APPENDIX1.pro APPENDIX1.project ject controlling code .............................................. ........................................ 46 APPENDIX2. APPENDIX2. Boom barrier characteristics ............................................... ............................... 49

x

LIST OF FIGURES

Figure 1. Parallel port physical configuration....................................... configuration....................................... .......................................... 6 Figure 2. Port Assignments Assignments .................................................. .................................................... ........................................................... ....... 8 Figure 3. Loop vehicle detector detector .............................................................................. ...................... 10 Figure 4. Vehicle sensing characteristics characteristics .............................................. ........................................ 11 Figure 5. Sq Sheet Metal in plane of Loop and Sq Sheet Metal perpendicular to the loop .......... 12 Figure 6. Preformed loop with extension cable ............................................................................ 12 Figure 7. Saw- cut loop wire and loop sealant............................................... ............................... 12 Figure 8. Loop vehicle detector detector .............................................................................. ...................... 15 Figure 9. Card reader machine ...................................................... ...................................................................................................... ................................................ 16 Figure 10. Ticket dispenser .................................................. .................................................... ......................................................... ..... 17 Figure 11. Boom barrier ............................................. ..................................................... ................................................................... .............. 18 Figure 12. Boom barrier control unit ............................................................................................ 19 Figure 13. Relay characteristics characteristics .................................................... .................................................................................................... ................................................ 20 Figure 14. Opto-isolator Opto-isolator ............................................. ..................................................... ................................................................... .............. 21 Figure 15. 15. Parking view ...................................................... .......................................................................................................... ......................................................... ..... 25 Figure 16. Entrance and exit parking view ................................................................................... 26 Figure 17. Block diagram of an automated automated parking system ......................................................... 28 Figure 18. Working principle of PC switched switched circuit ....................................................... ................................................................... ............ 29 Figure 19. 4N25 description description ................................................................................... ...................... 30 Figure 20. Amplifying circuit ....................................................... ....................................................................................................... ................................................ 31 Figure 21. Power transistor MJE3055T ................................................ ........................................ 31 Figure 22. Entrance card machine driving circuit................................................... ...................... 33 Figure 23. Entrance ticket machine driving circuit ................................................. ...................... 34 Figure 24. Entrance switch switch system ......................................................................... ...................... 35 Figure 25. Exit switch ................................................ ..................................................... ................................................................... .............. 37 Figure 26. Output waveform at entrance entrance card reader machine ................................................ ..... 38 Figure 27. Output waveform waveform at the exit switch............................................................................. 39 Figure 28. Algorithm Algorithm ................................................................... ................................................. 40

xi

LIST OF TABLES

Table 1.Control register............................................................................................................. 6 Table 2.Status Register.............................................................................................................. 6 Table 3.Data Register ............................................................................................................... 6

xii

LIST OF ABBREVIATIONS AC: Alternative current DC: Direct Current CMRR: Common Mode Rejection Ratio I/O: Input / Output Inportb: Inport byte KIST: Kigali Institute of Science and Technology LED: Light Emitting Diode LPT: Line Printer Port Outportb: Outport byte PC: Personal Computer PORTID: Port identity PVC: Polyvinyl chloride SCR: Silicon Controlled Rectifier SFAR: Student Financing Agency for Rwanda SPP: Standard Parallel Port TTL: Transistor To Transistor Logic TVM: Ticket Vending Machine UTC: Union Trade Center

xiii

CHAPTER1: INTRODUCTION 1.1.

Introduction

Automation is a key point in the process of development. Space management and time keeping has been an issue for so many years especially in Rwanda because the technology was still at a low level among people, but as Rwanda continues to develop in every sector of  activity, this is the reason why we have chosen to design an AUTOMATED PARKING SYSTEM. This system will allow people who are meant to be drivers in this project to park 

their vehicles in any parking provided and disable the drivers not to park; by opening and closing the gate automatically due to the number of vehicles present in the parking. This system will use simple principle which is a person computer running program and a controller. This system will use parallel ports of computer as a controller and a C programming language to enable and disable this system. This system program will consist of number of parking spaces available in the parking and programmed in computer so that if  any space is available in the parking the gate is open for a vehicle to enter and when there is no parking space the gate is closed.

This project report contains five chapters: the first chapter is the introduction which discusses about the motivation of this work being reported. The second chapter is the literature review which provides details about what others have done concerning this research and then sets benchmark for the current project as well as justifying specific solutions and techniques. The third chapter is research methodology which specifies the different methods used in order to carry out this research. The fourth chapter is the design which deals of how the project will work and give path to the result. The fifth chapter is all about recommendations and conclusions concerning this research giving summary of the main findings, statement of  encountered problems as well as limitation of this research.

1

1.2.

Problem statement

This research is aimed at designing an AUTOMATED PARKING SYSTEM. This research will have 3 main parts namely entrance gate, main parking, and exit gate. 

ENTRANCE GATE: at the entrance gate this research will deal with the control of the

entering vehicles in a such way that when there are empty spaces in the main parking the vehicles can enter and when there are no empty spaces vehicles will be limited to enter and the system will close the entrance gate until there is available any empty space in the parking. This system will be possible using the ticket machine at the entrance gate so that whenever a coin is inserted into the ticket machine the gate opens. 

MAIN PARKING: the main parking will contain a known number of parking space so

that when all parking spaces are occupied the entrance gate will be closed and all entering vehicles are blocked to enter, and when there is any empty space in the parking i.e. when a vehicle gets out the entrance gate will get open and this system will be calculated so that there will be no interference for vehicles when there is any empty space, this will be enabled by a computer program that controls the gate to open for a given period of time possible and then the gate comes at initial stage at a given period of time so that no other vehicle can enter except when it is allowed to enter. The system will be automated automatically so that whenever there is empty space the vehicle can enter and when there is no space the vehicle cannot enter. 

EXIT GATE: at the exit gate when the vehicle gets out, the system will provide a way of 

any vehicle to enter and this will be also enabled by a computer program. the system will be the same as to the entrance gate, in order for a vehicle to get out the driver must press the machine to enable the gate to open. At the exit gate there will be the pressing machine enabled for the purpose of pressing and enables the gate to open.

2

1.3.

Objectives

The main objective of this research is to design an AUTOMATED PARKING SYSTEM. The specific objectives are: 

To design a computer program program that interfaces a sensor sensor and an actuator



To design a parking space management system



To design an automatic gate control system

1.4. Significance of the projects

This project is of great significance because; the system we have designed will allow people to manage their parking space automatically without human presence. It will enable the drivers at the exit gate to enter if there is any empty space in the parking and disable them to enter when there is no empty space. It will manage the main parking spaces by alerting the drivers if there are spaces to park in or not. It will provide an automated system that whenever there is no space no one can access the parking and when there is space drivers can access the parking. In terms of money this project has 2 things in general; namely: 

It will reduce the number of people needed at the gate to guide drivers



It will provide a way of getting money for any institution that has this system because it can be put on the market and people use it for their interest like in a commercial sector where an institution has movement of clients that have vehicles and the institution cannot support them at the same time; hence this AUTOMATED SYSTEM can be a solution.

1.5. Scope and limitations of the project

This research is to design an AUTOMATED PARKING SYSTEM that will manage parking space automatically. This system can work in any parking ground. However, means (money and time) do not permit us to implement more than a demo of this AUTOMATED PARKING SYSTEM.

3

1.6. Methodology and procedures 1.6.1. Introduction

Precisely, research assists us to understand nature and natural problem especially for those one related to our project. This chapter describes the methodology employed and considerations taken into account for this project. It begins with the discussion of the project methodology, followed by system design procedure, techniques and tools utilized in this work.



Project descriptions.



Block diagram



Design procedures



Conclusions

1.6.2. Discussion

This is where we consulted people for their opinions and comments we discussed how this work  can be done successfully. Some people who carried similar studies, or related to some of the parts in this work, were contact. Under this, so many sources were used in order to have necessary understanding and useful information in our research. Those resources are: libraries, internet websites, books, and report done by others. 1.7. Conclusion

This chapter introduces the whole research project, how this project will be working and different steps that will be needed to conduct this research project. The aim of this research project is then explained in this chapter to ensure readers the purpose of  this project.

4

CHAPTER2: LITERATURE REVIEW 2.1. Introduction

This chapter is there to draw more light to the theories and principles applied in this project. All parts and components composing this research project are explained in detail in this chapter one after another. Different figures and tables are also used to clearly explain the different components composing this research project. 2.2. Automated parking system

Parking control is primarily an issue in relatively densely populated and relatively developing countries where the demand/supply situation for parking spaces makes parking facilities expensive and difficult. In urban locations AUTOMATED PARKING SYSTEM can be an investment opportunity

[6]

.

Parking restrictions take forms of: public parking control, private parking control, and local government parking control. The emphasis on restriction of parking is due to the fact that for local government parking for instance cannot be charged whereas public can be charged and can be a source of income for the government. There are obvious advantages for AUTOMATED PARKING SYSTEM namely: 

This system can increase the income of any organization that has this system in terms of  money.



This system can reduce the amount of money paid to the people in charge of a non automated parking system.



This system can be regarded as an investment opportunity for engineering companies.

5

2.3. Parallel port basics 2.3.1. Parallel port configurations

The parallel port is generally a 25-way (pins) female D-type connector. It is found on the rear of  a computer, and its configuration is as follows in fig.1

[1]

.

Figure 1. Parallel port physical configuration

The personal computer parallel port has a total of 12 Digital outputs and 5 Digital inputs accessed via 3 consecutive 8- bits 8- bits port in the processor’s I/O space. space. 

8 output pins accessed via the DATA Port



5 input pins (one inverted) accessed via the STATUS Port



4 output pins (three inverted) accessed via the CONTROL Port



The remaining 8 pins are grounded Register and their bits

6

Control Register o

PIN N (D-TYPE)

SPP SIGNAL

DIRECTION IN/OUT

REGISTER

BIT 1*

Strobe

IN/OUT

CONTROL 0

14*

Auto-linefeed

IN/OUT

CONTROL 1

16*

Initialize

IN/OUT

CONTROL 2

17*

Select-printer/select-in

IN/OUT

CONTROL 3

Table 1. Control register Status Register o

PIN N (D-TYPE)

SPP SIGNAL

DIRECTION IN/OUT

REGISTER

BIT 10

Ack

IN

STATUS 6

11*

Busy

IN

STATUS 7

12

Paper out/paper end

IN

STATUS 5

13

Select

IN

STATUS 4

15

Error/Fault

IN

STATUS 3

Table 2. Status register DATA Register o

PIN N (D-TYPE)

SPP SIGNAL

DIRECTION IN/OUT

REGISTER

BIT 2

DATA O

IN/OUT

Data 0

3

DATA 1

IN/OUT

Data 1

4

DATA 2

IN/OUT

Data 2

5

DATA 3

IN/OUT

Data 3

6

DATA 4

IN/OUT

Data 4

7

DATA 5

IN/OUT

Data 5

8

DATA 6

IN/OUT

Data 6

9

DATA 7

IN/OUT

Data 7

Table 3. Data Register

7

Pins with * symbol in this table are hardware inverted. That means, if a pin has a 'low' i.e. 0V, Corresponding bit in the register will have value 1. 2.3.2. Pins and ports assignment 2.3.2.1. Port assignments

Figure 2. Port Assignments

Note that there are eight outputs on the Data Port (Data 7(MSB) - Data 0(LSB)) and four additional outputs on the low nibble of the Control Port. /SELECT_IN, INIT, /AUTO FEED and  /STROBE.  /STROBE. [Note that with /SELECT_IN, the "in" refers to the printer. For normal printer operation, the PC exerts a logic zero to indicate to the printer it is selected. The original function of INIT was to initialize the printer, AUTO FEED to advance the paper. In normal printing, STROBE is high. The character to be printed is output on the Data Port and STROBE is momentarily brought low.]

[4]

.

2.3.2.2. Outputs

All outputs on the Data Port are true logic. That is, writing a logic one to a bit cause the corresponding output to go high. However, the /SELECT_IN, /AUTOFEED and /STROBE outputs on the Control Port have inverted logic. That is, outputting a logic one to a bit cause a

8

logic zero on the corresponding output. This adds some complexity in using the printer port, but the fix is to simply invert those bits using the exclusive OR function prior to outputting. 2.3.2.3. Inputs

Note that in the diagram showing the Status Port there are five status leads from the printer (BSY, /ACK, PE (paper empty), SELECT, /ERROR). [The original intent in the naming of most of these is intuitive. A high on SELECT indicates the printer is on line. A high on BSY or PE indicates to the PC that the printer is busy or out of  paper.

A low wink on /ACK indicates the printer received something. A low on ERROR indicates the printer is in an error condition.] These inputs are fetched by reading the five most significant bits of the status port. 2.3.3. Programming the parallel port

Each printer port consists of three port addresses: data, status and control port. These addresses are in sequential order. That is, if the data port is at address 0x0378, the corresponding status port is at 0x0379 and the control port is at 0x037a

[4]

. The following is the typical port assignment:

Printer

Data PORTID

Status PORTID

Control PORTID

LPT1

0x03bc

0x03bd

0x03be

LPT2

0x0378

0x0379

0x037a

LPT3

0x0278

0x0279

0x027a

In Turbo C, there are following functions used for accessing the port: Outportb ( PORTID, data); data = inportb ( PORTID); where data vary from 0x00h to 0xFFh outportb () sends a byte to port and inportb () reads a byte from the port. inportb () function returns byte at PORTID. outportb () function write the data to PORTID. outportb () returns nothing. 9

2.4. Loop sensor/Metal detector 2.4.1. The basics of loop vehicle detection

There are a number of ways to detect vehicles, ranging from hose style detection to ultra-sonic, to inductive loop. For traffic control or drive-thru, inductive loop technology is the most reliable. An inductive loop vehicle detector system consists of three components: a loop (preformed or saw-cut), loop extension cable and a detector

[1]

.

Figure 3. Loop vehicle detector

2.4.2 How loop vehicle detection works

The preformed or saw-cut loop is buried in the traffic lane or under parking ground. The loop is a continuous run of wire that enters and exits from the same point. The two ends of the loop wire are connected to the loop extension cable, which in turn connects to the vehicle detector. The detector powers the loop causing a magnetic field in the loop area. The loop resonates at a constant frequency that the detector monitors. A base frequency is established when there is no vehicle over the loop. When a large metal object, such as a vehicle moves over the loop hence the resonate frequency increases. This increase in frequency is sensed and, depending on the design of the detector, forces a normally open relay to close. The relay will remain closed until the vehicle leaves the loop and the frequency returns to the base level. The relay can trigger any number of devices such as an audio intercom system, a gate, a traffic light, etc. In general, a compact car will cause a greater increase in frequency than a full size car or truck.

10

This occurs because the metal surfaces on the under carriage of the vehicle are closer to the loop. Figures below illustrating how the under carriage of a sports car is well within the magnetic field of the loop compared to the sports utility vehicle. Notice that the frequency change is greater with the smaller vehicle.

Figure 4. Vehicle sensing characteristics

Also, it is interesting to note that the frequency change is very consistent between two vehicles of the same make and model, so much so that a detector can almost be designed to determine the type of vehicle over the loop. There is a misconception that inductive loop vehicle detection is based on metal mass. This is simply not true. Detection is based on metal surface area, otherwise known as skin effect. The greater the surface area of metal in the same plane as the loop, the greater the increase in frequency. For example, a one square foot piece of sheet metal positioned in the same plane of the loop has the same effect as a hunk of metal one foot square and one foot thick. Another way to illustrate the point is to take the same one square foot piece of sheet metal, which is easily detected when held in the same plane as the loop, and turn it perpendicular to the loop and it becomes 11

impossible to detect. The Sq Sheet Metal is easily detected when it is in the plane of the loop and not detectable when it is perpendicular to the loop.

Figure 5. Sq Sheet Metal in plane of Loop and Sq Sheet Metal perpendicular to the loop 2.4.2.1. Preformed and saw cut loops

A preformed loop is typically 3 to 5 turns of loop wire encased in PVC pipe for use in new construction before the pavement is installed. The loop wire is 14 or 16 awg stranded machine tool wire with an insulation of XLPE (cross-linked polyethylene) encased in PVC pipe to hold the loop’s shape and to protect p rotect the loop wire from damage while the pavement is installed.

Figure 6. Preformed loop with extension cable

A saw-cut loop is used when the pavement is already in place. The installation involves cutting the loop shape in the pavement with a concrete saw, laying the loop wire in the slot, pressing in a polyfoam backer rod to keep the wire compacted and finishing with saw-cut loop sealant or street bondo to fill the slot and protect the wire.

Figure 7. Saw- cut loop wire and loop sealant

12

2.4.2.2. Loop extension cable

Loop extension cable is used to extend the distance from the preformed or saw-cut loop to the vehicle detector, which is usually located indoors or in a weatherproof enclosure. The characteristics of the extension cable are just as important as the characteristics of the loop wire. It is recommended to use only 14, 16, or 18 awg stranded 2 conductor twisted, shielded cable with a polyethylene insulation jacket. The extension cable connections to the loop wire and the vehicle detector wires must be soldered. Do not use any other method for connection. The distance between the loop and the detector can safely be extended to 300 feet with proper extension cable, however check with the vehicle detector manufacturer for confirmation.

2.4.2.3. Loop vehicle detector

The proper installation and material is critical! In general, loop vehicle detectors from all manufacturers work under the same principle and will all work reliably if the installation is done properly and the correct materials are used. Vehicle detector features differ between manufacturers, and most are straight forward. The following features need special consideration.

2.4.2.4. Number of outputs

Most detectors provide a switch closure via a relay, which is typically configured as normally open. It is the number of outputs provided that may be important and how they can be configured. More and more devices, particularly in the drive-thru environments, need to be triggered by vehicle detection, such as audio communication, car timing, message greeting, electronic menu boards, gates, etc. Determine the number of devices that will be used now and in the future with the vehicle detector and match or exceed that number with the number of  available relay outputs.

13

2.4.2.5. Signal type

All detectors provide a constant presence style of signal output. In other words, the relay output is closed the entire time that a vehicle is present over the loop, and does not open again until the vehicle drives away. Most devices require this style of output signal; however some devices require a pulse style, which will only momentarily close the relay at the time when the vehicle is detected. Check the requirements of the devices that you are connecting to the detector. If you are connecting more than one device to the detector, make sure that the detector can provide the required signal types at the same time. Some detectors can only provide one or the other style of  signal output at a time. 2.4.2.6. Diagnostics

Some detectors provide PC diagnostics via a communication port on the detector. Diagnostic software gives you a visual picture of what is happening at the loop, and will help you troubleshoot any problems you may experience during installation or in the future. Detectors with this feature are usually in the same price range as other detectors and can help you save time solving a detection problem. The PC software and cable is usually additional, however keep in mind that if you have multiple installations you need only buy the software and cable setup once. Diagnostics software can also help determine the depth and position of the loop in the pavement. 2.4.2.7. Sensitivity

Most vehicle detectors have adjustable settings for sensitivity. If the detector is missing vehicles then the sensitivity is set too low. If the detector is jumpy or is creating false detections, it may be set too sensitive. However, all inductive loop detectors are dealing with the same physical characteristics of a magnetic field in a loop. The maximum height of detection is roughly 2/3 the length of the short side of the loop. For example, if you have a loop that is 18”x 60”, the maximum height of detection is 12” from the loop. Most manufacturers manufacturers have managed to push the height of detection to the full length of the short side, however keep in mind this is not as reliable.

14

The most effective way to increase sensitivity is to lengthen the short side of the loop. Most drive-thru loops are 18 to 24 inches wide. If you take an 18” x 60” loop and increase the short side to 24”, you have increased the height of detection by 4”. However, making the loop too wide can cause a different problem. In the drive-thru scenario where vehicles move slowly, and bumper to bumper, a system that is too sensitive may not be able to identify the gap between vehicles causing a missed detection. Another misconception about loop sensitivity is that increasing the number of turns in the loop will increase sensitivity. Increasing or decreasing the number of turns does not affect sensitivity. Increasing the number of turns increases stability. Three to five turns is ideal for maintaining the proper stability and sensitivity combination.

The frequency of the loop will change as the environment changes; as a result most detectors are designed to constantly adjust to this slow change in frequency over time. The detector’s purpose is to detect rapid changes in frequency. However, inductive loops and detectors are sensitive to temperature. When the temperature of the inductive loop increases, the frequency will decrease, and the opposite is true of the detector. When the temperature of the detector increases the frequency will increase. If the temperature of  either the loop or the detector increases or decreases too fast, false detections will occur. The loop, buried in the pavement is not likely to change temperature rapidly; however mounting the detector in the wrong place can cause such a problem. For example, mounting the detector directly in line with a window where it can get a cold blast of air whenever the window is open can result in problems.

Figure 8. Loop vehicle detector

15

2.5. Card reader machine

A card reader machine is a data input device that reads data from a card-shaped storage medium. Historically, paper or cardboard punched cards were used during the first several decades of the computer industry to store information and programs for computer systems; these were read by punched card readers. Card readers have subsequently been developed into electronic devices that are compatible with plastic cards embedded with either a barcode, magnetic strips, computer chips or other storage medium. In this research project; the card reader machine will serve the internal employees of an organization that has this typical AUTOMATED PARKING SYSTEM in order to recognize them and allow them to enter without paying the parking fees.

Figure 9. Card reader machine

16

2.6. Ticket dispenser/paying machine

A ticket machine, also known as a ticket vending machine (TVM), is a vending machine that produces tickets. For instance, ticket machines dispense train tickets at railway stations and tram tickets at some tram stops and in some trams. The typical transaction consists of a user using the display interface to select the type and quantity of tickets and then choosing a payment method of either cash, credit/debit card or smartcard. The ticket or tickets are printed and dispensed to the user

[8]

.

Figure 10. Ticket dispenser

In this research the ticket dispenser will be at the entrance gate so that when the drivers want to park they must pay first of all in order to enter. This ticket paying machine will differentiate parking users because the internal or local employees will be configured to use the card reader machine whereas the other clients will be paying the parking fees.

17

2.7. Boom barrier

A boom barrier is a bar, or pole pivoted to allow the boom to block vehicular access through a controlled point. Typically the tip of a boom gate rises in a vertical arc to a near vertical position. Boom gates are often counterweighted, so the pole is easily tipped. Boom gates are often paired either end to end, or offset appropriately to block traffic in both directions. Some boom gates also have a second arm, which pivots on links that allow the second arm to hang 300 to 400 mm below the upper arm when it descends into the horizontal position, to increase approach visibility Boom gates are typically found at level (rail) crossings, drawbridges, parking facilities, checkpoints and entrances to restricted areas. They are also the usual method for controlling passage through toll booths, and can also be found on some freeway entrance ramps which are automatically controlled to drop to restrict traffic in the event of accident cleanup or road closures without the need to dispatch road workers or law enforcement to use a vehicle to block  the way. Some boom gates are automatic and powered; others are manually operated in our design we will be dealing with automated boom barrier.

Figure 11. Boom barrier

18

[7]

. But in our design

2.7.1. Control unit of boom barrier

The combination of a special 180V/250V DC motor and lever system (barrier) represents a simple drive with high reliability. This drive system permits fast opening and closing times without bouncing of the boom in end positions. The special lever system ensures that the boom is locked in both end positions. For boom lengths of over 3 metres, a counterweight balancing spring is used. In the event of a power failure, however, it can be easily operated manually. This system is designed to receive signals from various optional controls such as smart card readers, speed control, remote control transmitters, infra red sensors, loop sensors, etc.

Figure 12. Boom barrier control unit

The boom barrier is designed to have a closing/opening time of 3s according to the boom barrier datasheet. The loop resonates at a constant frequency that the detector monitors. A base frequency is established when there is no vehicle over the loop. When a large metal object, such as a vehicle moves over the loop hence the resonate frequency increases. This increase in frequency is sensed and, depending on the design of the detector, forces a normally open relay to close. The relay will remain closed until the vehicle leaves the loop and the frequency returns to the base level. This means that the gate cannot return to normal position unless the vehicle moves from the loop range. 19

2.8. Relays A relay is an electrically operated switch. Many relays use an electromagnet to operate a

switching mechanism mechanically, but other operating principles are also used. Relays are used where it is necessary to control a circuit by a low-power signal (with complete electrical isolation between control and controlled circuits), or where several circuits must be controlled by one signal

[2]

.

A relay is an electrically operated switch. Current flowing through the coil of the relay creates a magnetic field which attracts a lever and changes the switch contacts. The coil current can be on or off so relays have two switch positions and most have double throw (changeover) switch contacts as shown in the diagram below. Relays allow one circuit to switch a second circuit which can be completely separate from the first. For example a low voltage battery circuit can use a relay to switch a 220V AC mains circuit. There is no electrical connection inside the relay between the two circuits; the link is magnetic and mechanical.

Figure 13. Relay characteristics

20

2.9. Opto-isolators/coupler

B.L Theraja, in his book, “A textbook of electrical technology”, reminds that optical isolators are designed to electrically isolate one circuit from the other while allowing one circuit to control the other. The usual purpose of isolation is to provide protection from high voltage transients, surge voltages and low level electrical noise that could possibly result in an erroneous output or damage to the device. Such isolators allow interfacing of circuits with different voltage levels and different grounds. An optical isolator consists of a light source such as a LED and a photo detector such as photo transistor

[3]

.

When a LED is forward biased, the light produced by it is transferred to the phototransistor which is turned ON thereby producing current through the external load.

Figure 14. Opto-isolator

Fig14 is a simple circuit with an opto-isolator. When switch S1 is closed, LED D1 lights, which triggers photo-transistor Q1 and pulls the output pin low. This circuit, thus, acts as a NOT gate.

In electronics, an opto-isolator (or optical isolator, opto-coupler, photo-coupler or photo-MOS) is a device that uses a short optical transmission path to transfer a signal between elements of a circuit, typically a transmitter and a receiver, while keeping them electrically isolated. Since the signal goes from an electrical signal to an optical signal back to an electrical signal, electrical contact along the path is broken.

21

A common implementation involves a LED and a phototransistor, separated so that light may travel across a barrier but electrical current may not. When an electrical signal is applied to the input of the opto-isolator, its LED lights, it lights sensor then activates, and the corresponding electrical signal is generated at the output. Unlike a transformer, the opto-isolator allows for DC coupling and generally provides significant protection from serious over voltage conditions in one circuit affecting the other. With a photodiode as the detector, the output current is proportional to the amount of incident light supplied by the emitter. The diode can be used in photovoltaic mode or a photoconductive mode. In photovoltaic mode, the diode acts like a current source in parallel with a forward biased diode. The output current and voltage are dependent on the load impedance and light intensity. In photoconductive mode, the diode is connected to a supply voltage, and the magnitude of the current conducted is directly proportional to the intensity of light. An opto-isolator can also be constructed using a small incandescent lamp in place of the LED; such a device, because the lamp has a much slower response time than a LED, will filter out noise or half-wave power in the input signal. In so doing, it will also filter out any audio or higher frequency signals in the input. It has the further disadvantage, of course, that incandescent lamps have finite life spans. Thus, such an unconventional device is of extremely limited usefulness, suitable only for applications such as science projects. The optical path may be air or a dielectric waveguide. The transmitting and receiving elements of  an optical isolator may be contained within a single compact module, for mounting, for example on a circuit board; in this case, the module is often called an opto-isolator. The photo sensor may be a photocell, phototransistor, or an optically triggered SCR or Triac. Occasionally, this device will in turn operate on power relay or contactor. LCD Programming E-mail Print

PDF

Liquid crystal display is very important device in embedded system. It offers high flexibility to user as he can display the required data on it. But due to lack of proper approach to LCD interfacing many of them fail. Many people consider LCD interfacing a complex job but according to me LCD interfacing is very easy task, you just need to have a logical approach. This page is to help the enthusiast who wants to interface LCD with through understanding. Copy and 22

Paste technique may not work when an embedded system engineer wants to apply LCD interfacing in real world projects.

First thing to begin with is to know what LCD driver/controller is used in LCD.Yes, your LCD is dumb it does not know to talk with your microcontroller. LCD driver is a link between the microcontroller and LCD. You can refer the datasheet of LCD to know the LCD driver for e.g. JHD 162A is name of LCD having driver HD44780U.You have to interface the LCD according to the driver specification. To understand the algorithm of LCD interfacing user must have datasheet of both LCD and LCD driver. Many people ignore the datasheets and end up in troubles. If you want to interface LCD successfully you must have datasheets.

Why people ignore datasheets? Most of us do not like to read 100 pages of datasheet. But for a accurate technical specification datasheets are must. I will show you a technique to manipulate a datasheet within minutes.

First thing to find out in datasheet is the features viz. operating voltage, type of interface, maximum speed for interface in MHz, size of display data RAM, number of pixels, bits per pixel, number of row and columns. You must have the pin diagram of LCD.Pin diagram of LCD driver can be omitted. Study the type of communication protocol whether it is parallel or serial interface. Check how LCD discriminates data bytes and command bytes, which pins on LCD are used for communication. Study Interface timing diagram given in the datasheet. From datasheet of LCD driver find out whether hardware reset is required at startup, what is the time of reset pulse, is it active low and which pins of LCD are to be toggled.

Major task in LCD interfacing is the initialization sequence. In LCD initialization you have to send command bytes to LCD. Here you set the interface mode, display mode, address counter increment direction, set contrast of LCD, horizontal or vertical addressing mode, color format. This sequence is given in respective LCD driver datasheet. Studying the function set of LCD lets

23

you know the definition of command bytes. It varies from one LCD to another. If you are able to initialize the LCD properly 90% of your job is done. 2.11. Conclusion

This chapter summarizes different components that will be needed during the realization of this research project and tries to highlight different components parts of the entire project components as well as their different characteristics. Different working principles of different components are detailed in this chapter to ensure the real working scheme of this research project.

24

CHAPTER3: DESIGN AND SIMULATION OF AN AUTOMATED PARKING SYSTEM 3.1. Introduction

This chapter introduces the working principle of this research project and tries to highlight different steps composing this research project. Different circuits composing this research project are detailed, sketched and explained in this chapter. Equations and calculations needed to carry out this research project will be detailed and explained in this chapter. 3.2. Description of the parking area

Figure 15. Parking view

25

The parking is designed to have 30 parking spaces including 24 spaces for public parking spaces designed to use ticket machine and 6 parking spaces designed to accommodate local staff  vehicles using card reader machine. The computer program will be needed to control the in/out of the vehicles to ensure that the parking is full so that it can close the gate until there is available space in the parking to open for another vehicle that needs to park.

Figure 16. Entrance and exit parking view

26

3.2. Design flow

The standard AUTOMATED PARKING SYSTEM design flow starts with parking description and block diagram sketching, then circuit design followed by simulations. 3.3. Automated parking system

This research is aimed at designing and simulation of an automated parking system. An automated parking system is defined as a system that will manage parking spaces. This system will allow people who are meant to be drivers in this project to park their vehicles in any parking provided and disable the drivers not to park by opening and closing the gate automatically due to the number of vehicles present in the parking. This system will use simple principle which is a person computer running program and a controller. This system will use parallel ports of computer as a controller and a C programming language to enable and disable this system. This system program will consist of number of parking spaces available in the parking and programmed in computer so that if any space is available in the parking the gate is open for a vehicle to enter and when there is no parking space the gate is closed. The design of an automated parking system consists of 3 main parts which are Entrance gate, Main parking, and Exit gate. Each of these parts play significant role to make the system successful done the job. The following diagram shows the entire working principle of the entire automated parking system research project.

27

3.4. Block diagram of an automated parking system

Figure 17. Block diagram of an automated parking system

This system will consist of card reader machine, ticket machine/paying machine, entrance switch, boom barrier, personal computer, display, exit switch.

28

3.5. Design of entrance card reader machine system driver circuit

A circuit designed to drive the relay is made up of three main parts. Whenever in this report the term “ driver

circuit”

is used, we refer to “the “the circuit designed to energize the relay as an

actuator”. actuator ”. 3.5.1. The design of PC switched circuit 3.5.1.1. The necessity of a PC switched circuit

This system is designed to be controlled by a computer. What we mean when we use the term “controlled” in our context is firing the actuator (Relay) for a given input vol voltage tage which is scientifically proved to be safe for an automated parking system. For this reason, a relay must be powered to allow the boom barrier (gate) to open whenever there is a request (input voltage) due to driver who wants to park his vehicle and received a ticket from the ticket machine. The computer will control the parking spaces according to the number of inputs provided in the  programming language lan guage (“C”) i.e. there must be a known number of o f parking space programmed in the computer and whenever it is full, the gate closes and when there is an empty space the gate can open once there is a request (the driver presses the ticket machine and there is a space in the parking hence the gate can open)

[6]

.

3.5.1.2. Working principle of the PC switched circuit

U2 OP4N25

U1 OP4N25 J1

S2

(a)

Vs1 5V -

(b)

Figure 18. Working principle of PC switched circuit

29

U3 OP4N25

+

(c)

Through running a program developed in the PC, a signal which is either LOW (0V) or HIGH (5V) can be sent to the parallel port. We designed a way of connecting the anode of the optocoupler to the one of data pins (pin1, pin14, pin16 and pin17) of the parallel port which are control pins and the cathode of the optocoupler to one of data pins (pin18 to pin 25) which are ground pins . Figure (a) the cathode of the optocoupler is connected to pin25 and the anode connected to pin 1.

Figure (b) shows how sending 0V to the anode of the optocoupler works just as closing a switch, and thus whenever there is an input signal (the driver presses the ticket machine) the parallel port of the computer behaves as a switch.

Figure (c) shows how sending 5V to anode works just as connecting the positive pole of the 5 V voltage source to anode of the optocoupler. Now, if there is an input signal (the driver presses the ticket machine) the parallel port behaves like a voltage source.

3.5.2. Opto-isolating circuit

4N25 optically coupled isolator

Figure 19. 4N25 description

The 4N25 is optically coupled isolator consisting of a Gallium Arsenide infrared emitting diode and an NPN silicon phototransistor mounted in a standard 6-pin dual-in-line package; Surface mount option is available as well.

30

The optocoupler works on a very simple principle. It first converts the incoming electrical energy into optical energy using an LED and then again converts the optical energy back to the electrical energy using an n-p-n transistor with the optical energy provided at its base. The optocoupler is attached in between of the parallel port and the driver circuit. Its main purpose here is to serve as an isolator. In fact, the relay is driven by a high current. The output of  the optocoupler is fed to the base of power Transistor. 3.5.3. Driver circuit

This is the last electronic circuit of this system. It is designed to give to the relay the power enough to move to-and-fro the iron core which must block or unblock (depending on the command) the input voltage from the parallel port. In fact, the signal from the optocoupler which is not enough to drive the relay is first amplified by the transistor in order to be able to drive the relay 3.5.3.1. A transistor as amplifier

Figure 20. Amplifying circuit

Figure 21. Power transistor MJE3055T

31

From the data sheet of MJE3055T transistor, the maximum biasing voltage is 5V for it to act as an amplifier. Let R2 be the current limiting resistor and R1 the biasing resistor. Let’s take arbitrarily R2=470Ω as current limiting resistor and 5V (maximum rating) as the biasing voltage. Considering the voltage source of 5V and a Vce sat=0.2V for the phototransistor, we get 

=

1( − 1

Hence; 5 =

0.2)

+ 2 1

470+1

11.8

As R2=470 Ω we get 11.8R1-5R1= 11.8R1-5R1= 5(470) Hence we get R1=345.5882353 which is approximately equal to the standard value of R1=330Ω.

Calculations for the current

The base current passing through the transistor can be found to be: Ib = (12V-0.2V-1.8V)/470Ω=21.3mA. (12V-0.2V-1.8V)/470Ω=21.3mA. This is by considering Vce sat=0.2V for the phototransistor and the cut-in voltage for the transistor MJE3055T to be 1.8V.

From the data sheet of MJE3055T as an amplifier, the maximum rating base voltage is 5V. So, in order to drive this transistor into active region, a biasing resistor of 330Ω is put in order to take less current and the balance will be used by the transistor in order to get enough current to drive the relay.

The current taken by this resistor is=1.8V/330Ω=5.45mA Thus, Ib =21.3mA-5.45mA=15.85mA From its datasheet, hfe =100. Thus, Ic =15.85mA*100=1.58A.

32

3.5.3.2. Relay

The current flowing through the coil of the relay creates a magnetic field which attracts a lever and changes the switch contacts. 3.5.3.3. Flywheel diode

Whenever the relay is driven, flywheel diodes are necessary. The large inductance of the coil can cause large voltage spikes to appear across the switching element (relay or transistor doing the switching), unless the current flowing through the coil is allowed to dissipate slowly. When the switch is closed, the current flowing down through the coil is limited by the resistance of the coil. Inductors do not like the current flowing through them to change quickly, and they will generate a voltage of their own to stop this happening. Therefore when the switch is opened, the inductor generates a voltage to make the current continue down through the coil. Because the switch is now opened, the current flows up through the diode, and back round into the inductor. The diode is called a "flywheel" diode. The above theory made us able to come up with the following relay driver circuit:

Figure 22. Entrance card machine driving circuit

33

In this research we have designed the card machine system driving circuit to serve only the internal staff of any organization that can have this type of parking; so that it can be their reserved parking accessing method which prevents them from public parking system (reserved for clients who will be asked to pay in order to park their vehicles). 3.6. Entrance ticket machine system driving circuit

In this circuit; the principle is almost the same as for the card machine system except that there is additional circuit that will block the relay when the parking is full and unblock the relay when there is any space in the parking so that the gate (boom barrier) can close and open depending on the request respectively. The same circuit components will remain the same as from the first circuit (entrance card system) except some arrangement.

Figure 23. Entrance ticket machine driving circuit

This system operates on the simple principle that uses two switches S1 and S2; S1 will normally drive the relay to make the gate to open once there is an input voltage that makes the relay to 34

function and S1 is normally open and drives the circuit when there is an input request (5V from the ticket machine) And S2 is a normally closed switch that will be disabled (become open) when the number of  parking space provided in the computer programming is full and hence the gate can no longer open because the circuit will be an open circuit. The switch S2 will get to the initial state (normally closed) when there is any parking space available in the parking space; so that the gate can open when there is an input request (the driver presses the ticket machine).

This system will be a public parking access method to enable the clients to park their vehicle when there is any space in the parking ground after paying the parking fees.

3.6.1. Working principle of the entire entrance switch system

Figure 24. Entrance switch system

35

The entire entrance switch consists of two main parts card reader machine system to serve the local staff that has not to pay the parking fees and the ticket paying machine system to serve the public that has to pay the parking fees in order to park their vehicles.

The card reader machine system is designed in such way that the output voltage of the card reader machine (5V) is directly connected to the boom barrier (Gate) so that in case the parking space is full, and the gate is closed unless there is availability of parking space to open; the card reader machine system will always enable the local staff to park their vehicles without problem. However each staff has an appropriate parking space so that he/she cannot interfere with others in their parking space.

The ticket paying machine is designed in such way that it is connected to the parallel port of the computer so that in case the parking space is full, the parallel port of the computer will disable the switch to drive the boom barrier to open due to the computer programming used to control the open and close of the boom barrier (Gate) designed in this project.

The switch will be automated in such way that when there is a space in the parking the boom barrier (Gate) can open; and when there is no space the boom barrier is closed until there is availability of the parking space.

3.7. Design of Exit Switch

The exit switch consist of two main parts card reader system designed for local staff use and ticket machine system designed to serve public that are requested to push the machine button so that the computer can recognize that there is a space available in the parking and any vehicle at the entrance gate can enter and park.

The staff will insert their cards as usual to open the boom barrier (Gate). The above theory made us able to come up with the following circuit: 36

Figure 25. Exit switch

37

3.8. Simulations results

Figure 26. Output waveform at entrance card reader machine

38

Figure 27. Output waveform at the exit switch

39

3.8. Software design 3.8.1. Algorithm

To meet the requirements of this automated parking system, all that a PC must do is to send and receive signal and wait till the end of a required task is performed. The steps involved are: Step1. Check the status of the availability of parking spaces Step2. Insert the card or push the button of the ticket machine Step3. The computer sends the signal to parallel port Step4. Get the requested task  Step5. The boom barrier opens the gate

3.9. Flow chart of the software

Figure 28. Algorithm

40

3.10. Functions used

To realize the above work, some of the functions are used: clrscr(): This function is used to clear the screen and it is included in headerfile. It clears the previous output from the screen and displays the output of the current program from the first line of the screen. outportb(): sends a byte of data to port. It is included in the headerfile . inportb(): reads a byte from the port. It is included in the headerfile . printf(): prints all types of data values to the console. It requires conversion symbol and variable names to print the data. It is included in headerfile

Using the above literature, a software code was developed to carry out the required task. The full code of this program using timer or delay program is shown in the appendix.

3.11. Conclusion

The purpose of this chapter is to clarify and confirm the working principle of this research project by showing all steps needed to carry out this research project and that is why we have come up with needed major steps to carry out this research project. We have designed a block diagram that shows different steps to follow in carrying out this research project. We designed a sample parking ground showing typical description of a related parking system to be controlled automatically. We have done simulations to predict the required output needed to carry out this research project in order to be sure.

41

CHAPTER 4: CONCLUSION AND RECOMMENDATIONS 4.1. Conclusion

As we had set some specific objectives when starting this project (see 1.3 Objectives of this report) all of them were reached successfully (100%). Those objectives were: 

To design a parking space management system



To design an automatic gate control system



To design a computer program that controls the gates

Objective 1: Designing a parking space management system was successful. After many

attempts to design the parking management system using sensors and logic gates, we were finally able to design it using boom barriers, and some other electronics components. Objective 2: Design and simulation of an automatic gate control system was successful. We

have used electronics components to design a control switch which is indispensable for limiting the number of cars which enters in the parking. By using the ticket machine authentication, the number of commercial parking places is limited by a computer program. Objective 3: Design of a computer program that controls the gates was successful. Is still in

progress and we are planning to finish it by the time of giving the final copy of our final year project dissertation.

42

4.2. Recommendations

In the phase of design and simulation, it has been very difficult to finish it, because our project involved many principles from various areas which are Electrical, Mechanical and Programming, and those areas are different from our area of study which is Electronics and Telecommunication. So we suggest that people from different departments, should carry out one project together, so that it may be more accurate and genius.

KIST laboratories don’t have enough components and devices; this prevented us from doing the implementation. From this our recommendation comes on KIST to help students to get the required components on time as each department would have been known the project topics of  each student.

Much care should be taken while connecting circuits to the PC parallel port because it can get damaged if mistakes are made in the circuit connected to it. So, the circuit must be double checked before being connected to the PC.

We recommend for the future designers to keep on improving this topic so that it may include some features like control cameras, user friendly interface in advanced programming languages, encryption and the increase of the security part of our system.

43

REFFERENCES

[1]. Owen BISHOP, “ELECTRONICS “ELECTRONICS - A FIRST COURSE”, Elsevier Linacre House Jordan Hill Oxford 0x2 8DP UK, P.36-47, 2006. [2]. M.K. BAGDE, S.P. SINGH, KAMAL SINGH, “ELEMENTS OF ELECTRONICS”, published by S. CHAND&COMPANY LTD, RAM NAGAR, NEW DELHI, 5th Edition, 110055, p.19-61, 2002. [3]. NN BHARGAVA, DC KULSHRETHA, SC GUPTA, “BASIC ELECTRONICS & LINEAR CIRCUITS”, Tata Mc Graw-Hill Graw-Hill Publishing Company Limited, p.126-161, 2004. [5]. I.J. NAGRATH, “ELECTRONICS –  ANALOG AND DIGITAL”, Prentice Hall of India Private Limited, New Delhi, 110001, p.533-550, 1999. [6]. B.L. THERAJA, A.K. THERAJA , “ELECTRICAL TECHNOLOGY”, S.CHAND & COMPANY LTD, RAM NAGAR, New Delhi, 24th Edition (First Multicolor Edition), 110055, , p.175-188 ,2005. [7]. B.L. THERAJA, THERAJA, “BASIC “BASIC ELECTRONICS – SOLIDE – SOLIDE STATE”, STATE”, S.CHAND & COMPANY LTD, RAM NAGAR, New Delhi, 5th Edition (Multicolor Illustrative Edition), 110055, p.274287 , 2006. [8]. ]. http:// http://www.logix4u.net [9]. http://www.electrosoft.com [10]. http://www.wisegeek.com[11 [12]. http://www.scribd.com [10]. http://logix4u.net/component/content/article/31-lcd/55-lcdprogramming [13].http://www.codeproject.com/Articles/4981/I-O-Ports-Uncensored-1-Controlling-LEDsLight-Emit

44

APPENDIX

45

APPENDIX1.project controlling code  /*PROGRAM  /*PROGRAM TO MANAGE MANAGE THE THE PARKING PARKING SPACES*/  SPACES*/ 

#include #include #include

#define in_port 0x03bc #define out_port 0x03bd void main() { clrscr(); int max=24; int ticket_in; int ticket_out; int card_in; int card_out; int available_spaces; int present_staff; while(!kbhit()) { ticket_in=inportb(in_port); ticket_out=inportb(in_port); card_in=inportb(in_port); card_in=inportb(in_port); { if in_port==89 {

46

ticket_in=ticket_in++; } else if inport==59 { ticket_out=ticket_out++; } else if inport==C9 { card_in=card_in++; } else if inport==4D { card_out=card_out++; } else { printf("THERE IS AN ERROR IN THE INPUT CONNECTIONS"); } } available_spaces=(24-(ticket_in-ticket_out)); present_staff=card_in-card_out; if available_spaces>0 && available_spaces
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF