Parking Monitoring System.

(1)

PARKING MONITORING SYSTEM

NOR FARAH HIDAYAH BT BADUL ZAMAN

This report is submitted in partial fulfillment of the requirements for the award of Bachelor of Electronic Engineering (Industrial Electronics) with Honors

Faculty of Electronic and Computer Engineering Universiti Teknikal Malaysia Melaka


(2)

ii

UNIVERSTI TEKNIKAL MALAYSIA MELAKA

FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER

BORANG PENGESAHAN STATUS LAPORAN

PROJEK SARJANA MUDA II Tajuk Projek : PARKING MONITORING SYSTEM

Sesi

Pengajian : 2009/2010

Saya NOR FARAH HIDAYAH BT BADUL ZAMAN mengaku membenarkan Laporan Projek Sarjana Muda ini disimpan di Perpustakaan dengan syarat-syarat kegunaan seperti berikut:

1. Laporan adalah hakmilik Universiti Teknikal Malaysia Melaka.

2. Perpustakaan dibenarkan membuat salinan untuk tujuan pengajian sahaja.

3. Perpustakaan dibenarkan membuat salinan laporan ini sebagai bahan pertukaran antara institusi pengajian tinggi.

4. Sila tandakan ( ) :

SULIT* (Mengandungi maklumat yang berdarjah keselamatan atau kepentingan Malaysia seperti yang termaktub di dalam AKTA RAHSIA RASMI 1972)

TERHAD* (Mengandungi maklumat terhad yang telah ditentukan oleh organisasi/badan di mana penyelidikan dijalankan)

TIDAK TERHAD

Disahkan oleh:

__________________________ ___________________________________

(TANDATANGAN PENULIS) (COP DAN TANDATANGAN PENYELIA)

Alamat Tetap: Batu 3,Jalan Pantai Kg Bagan Pinang

71000 Port Dickson Negeri Sembilan.

Tarikh: Tarikh:


(3)

iii

“I hereby declare that this report is the results of my own work except for quotes as cited in the reference.”

Signature : ……… Author : Nor Farah Hidayah Bt Badul Zaman


(4)

iv

“I hereby declare that I have read this report and in my opinion this report is sufficient in terms of the scope and quality for the award of Bachelor of Electronic Engineering

(Industrial Electronics) With Honors”

Signature : ………

Supervisor’s name : Mdm Nurmala Irdawaty Bt Hassan Date :


(5)

v


(6)

vi

ACKNOWLEDGEMENT

First of all, I am greatly indebted to Allah SWT on His blessing to make this project successful and completely done in proper. I would like to gratitude and express my appreciation to all organizations and individuals who have kindheartedly contributed to my final year project in Universiti Teknikal Malaysia Melaka (UTeM). With the cooperation from all parties, the objectives of the project were achieved precisely to the expected outcome Additionally, I would like to give a honored thanks to Mrs. Nurmala Irdawaty Binti Hassan for supervise me with the proper guidance and full cooperation in any phase of the project especially in solving the problems that occurs from first to last of my final year project. Furthermore, I would like to thanks to my parents and family who have support me for all this years with their love and caring in term of moral, financial and advice through this project. Lastly, my appreciation goes to my fellow links in UTeM, especially from FKEKK Industrial Electronics department and all beloved friends. Their compliance in giving suggestions and technical support are valued while doing upon completion of my final year project.


(7)

vii

ABSTRACT

This project purpose is to build parking monitoring system that more efficient than the conventional. Nowadays, parking systems information just have a signboard at the entrance that give information about how many parking space is still available. The driver having a problem when they want to find available parking because it need time and it become worst when the parking slots are placed on building that have many floors or in the wide parking area. This project is fully constructed by Visual Basic Programming. It consists of front panel and virtual sensor slot that replaced signboard and sensor that are used in parking systems. It also include of booking system made in the front panel which is the driver has an option to make reserve slot available. The front panel will show the counter number of available slot, used slot and the total of parking slots. These box will change with variable color depends on the condition of the slots whether is available (green), not available (red) or reserved (yellow).


(8)

viii

ABSTRAK

Projek ini bertujuan membina sistem pemantauan letak kereta yang lebih efektif berbanding yang sedia ada. Sistem meletak kenderaan di negara ini mempunyai kekurangan seperti tiada paparan untuk kawasan meletak kenderaan yang masih kosong serta keadaannya. Masalah berlaku apabila pemilik kenderaan terpaksa bersusah payah untuk mencari kawasan letak kereta yang kosong untuk meletakkan kenderaan masing-masing. Hal ini sahaja sudah merugikan masa serta minyak kenderaan. Sistem ini mempunyai paparan hadapan yang dibina berasaskan aturcara Visual Basic. Sistem tempahan juga disediakan pada paparan hadapan tersebut. Apabila kenderaan memasuki pintu masuk, pengguna mempunyai pilihan menempah tempat untuk meletakkan kenderaan masing-masing. Kotak meletak kenderaan pada paparan hadapan akan menunjukkan warna yang berbeza untuk setiap operasi berlainan yang dijalankan. Paparan ini juga akan menunjukkan kiraan bagi setiap kawasan kenderaan yang masih kosong, kawasan yang digunakan serta jumlah bilangan keseluruhan kawasan meletak kenderaan tersebut. Sistem aturcara ini akan disambungkan kepada hardware supaya keluaran bagi sistem pemantauan parking ini menjadi lebih efiksyen dan sistematik.


(9)

ix

CONTENTS

CHAPTER TITLE PAGE

PROJECT TITLE i

STATUS REPORT FORM ii

STUDENT DECLARATION iii

SUPERVISOR DECLARATION iv

DEDICATION v

ACKNOWLEDGEMENT vi

ABSTRACT vii

ABSTRAK viii

CONTENTS ix

LIST OF FIGURE xii

LIST OF ABBREVIATION xiv

I INTRODUCTION

1.1 Project Introduction 1

1.2 Project Objectives 2

1.3 Problem Statement 3


(10)

x 1.5 Short Brief on Methodology 4

1.6 Report structure 5

II LITERATURE REVIEW

2.1 Introduction 6

2.2 Project Component 6

2.2.1 Visual Basic 7 2.2.1.1 Comparison between Visual

Basic 6.0 and Visual Basic.net

7 2.2.1.2 Steps to use Visual Basic 6.0 8

2.2.2 Serial Cable 11

2.3 Limit Switch 12

2.4 Parking System Project 13 2.4.1 Parking Lot Occupancy Tracking

System

13 2.4.2 Kuala Lumpur International

Parking System

14 2.4.3 Sunway Pyramid Parking System 15

2.5 Previous project 17

III METHODOLOGY

3.1 Introduction 23

3.2 Project Methodology 24

3.3 Flow chart model 25

3.4 Operation flow diagram 26

IV RESULT AND DISCUSSION


(11)

xi 4.2 First Stage Result: Preliminary Result 28

4.2.1 Discussion of first stage result 30 4.3 Second stage result 30 4.4 Visual Basic 6 Code Setup 33 4.5 Problem Encountered 35 4.5.1 Displaying Counter problem 35 4.5.2 Parking Error by User 36 4.6 Overall Result and Explanation 36 4.7 Coding Explanation 41

4.8 Discussion 46

V CONCLUSION AND

RECOMMENDATION

5.1 Conclusion 47

5.2 Recommendation 48

REFERENCES

APPENDIX A APPENDIX B APPENDIX C


(12)

xii

LIST OF FIGURES

NO TITLE PAGE

2.1 New project list icon 8

2.2 Toolbox icon 9

2.3 Command box icon and Properties command icon.

9

2.4 Code witting icon 10

2.5 Connection serial port at the PC 11

2.6 Serial port pins 12

2.7 Limit switch 13

2.8 Parking Vacant Diagram using GUI Interface

14 2.9 Signboard display parking 15 2.10 Car detector and Light indicator 16 2.11 Example Variable Message Display (VMS) 18

2.12 System Flow 20

2.13 Menu to search parked car 21 2.14 Module to draw car park layout 24 3.1 Flow Chart of Methodology 25 3.2 The real operation flow diagram for parking

system


(13)

xiii 4.1 Block Diagram of Component in Parking

Monitoring System

27 4.2 Expected result from first stage result 29 4.3 Illustration of the parking map in the VB

system

29 4.4 Visual Basic Front Panel Display 31 4.5 A1 Slot Changing Colour to Yellow 32 4.6 Slot Changing Colour to Red 32 4.7 Initial Value Set on the Counter 33 4.8 The Counter Running on A1 34 4.9 The Counter When Car Going Out 34 4.10 The Counter When No Reserved 35

4.11 Virtual Sensor Panel 35

4.12 Front panel show slots have been booking and counting

37 4.13 Front Panel Show Slots Have Been Booking 37 4.14 Front Panel Show Slots Have Been Parked 38 4.15 A way to integrate VB to hardware 38 4.16 Example of the Label coding 39

4.17 Coding in Form1 40

4.18 Coding in Form2 41


(14)

xiv

LIST OF ABBREVIATION

PLC - Programming Logic Controller PC - Personal Computer

VB - Visual Basic

GUI - Graphical User Interface NO - Normally Open

NC - Normally Close


(15)

1

CHAPTER I

INTRODUCTION

1.1 Project Introduction

Parking monitoring system helps to display the number of available parking and also show the map of parking area. This project is focus on a way to develop a new parking monitoring system that will replace the conventional car park. Nowadays, a conventional car park have display panel that vacancy of parking lot but it just a number only that show how many parking are still available or not. The driver does not know where parking slot is is still available and this can make waste the time and also oil cost. The way that can solve this problem is by developing a parking system which includes PC display panel for the parking lot. This display also need sensor slot which display on the Visual Basic System to help give information status and vacancy of parking lot in car park area. By integrate the parking monitoring system with hardware that is Programming Logic Controller (PLC) systems, this will make a parking lot become well organized because hardware will detect the car from sensor that are using


(16)

2 in the parking lot and after that the output from sensor will integrate with Visual Basic programming which will be display of the condition in the parking slot.

1.2 Project Objectives

To make sure this project work as planned, a few objectives were determined where these objectives will be followed as a guide through the whole completion process of this subject in order to achieve the desired output. These objectives were provided by sequence of project from beginning until the end of project. A detailed explanation for each objective will be discussed.

The objectives to be achieved in this project are:

• To write the program for parking slot of Parking Monitoring System using Visual Basic Programming language.

• To develop front panel for Parking Monitoring System using Visual Basic Programming language.

• To write the program of the virtual sensor for Parking Monitoring System using Visual Basic Programming.

• To write the program for the status and counter of the front panel using Visual Basic Programming.

• To integrate hardware (PLC) with Visual Basic Programming (PC front panel display) using RS-232 cable.


(17)

3

The increased of use cars now days have lead to parking issues and concerns at car parks. Due to various behavior and desires of visitors, car parking problems arise from the moment before visitors enter the car park until after they leave the car park. With the system representation, the parking operators and management can make better decisions in choosing solutions to car parking problems. This is main idea of developing Parking Monitoring System.

There are a lot of obvious problems occur at the parking place such as spending time to search for a parking space. When entering the parking space especially at a larger area with many numbers of cars inside, searching available space to park is a big problem and will take long time to get one if there are still have available parking. This situation can be more complicated when during on busy hours. The problems become tougher when the parking slots are placed on building that have many floors or in the wide parking area. With developing this parking monitoring system they would not know if there is some slot left for them to park the car. If there is no parking slot left, the car owner usually made their own decision to park the car in the wrong place.

1.4 Scope of Work

The scope of work is the process to produce a front panel, the virtual sensor and the integrating hardware and Visual Basic Programming. There are list of the activity that have been done during producing the Parking Monitoring.


(18)

4 Visual Basic (VB) programming software is selected to create the simple graphic interface which is called front panel where the created screen should have the information about the parking slot vacancies, used and total. It also provides the button for booking the car slot. This includes the sensor of the parking slot built in the Visual Basic to show the process of this Parking Monitoring System.

1.4.2 Front Panel

The front panel is constructed by using VB software. The status of the car park slot represent as variable color that is yellow (reserved), red (used) and green(available) in the box. It also contains the booking system to the user.

1.4.3 Integrate software and hardware.

Hardware is constructing from PLC which using ladder builder to show condition of parking slot and limit sensor as sensor to detect a car. To make the real situation show the parking slot condition, using Visual Basic coding to integrate between PLC and PC display (sensor slot and front panel constructed using VB programming).

1.5 Brief Explanation of Methodology

This project will starts from discussing with supervisor and understanding the concept and objectives of this project. The important is doing the research about this project. Start with planning and start to design the front panel using Visual Basic. After that, design the sensor slot in Visual Basic to replace the sensor on real operation situation. After done the sensor programming, project is run to determine the output which is the counter of the parking slot and sensor slot which is can function or not. If problem occurred, return back to check the coding of the Visual Basic and try to run again the project to check the output. After finish all part of programming, testing again the output whether it can function and integrate with hardware systems part (PLC).


(19)

5

1.6 Report Structure i. Chapter 1

Review about car parking system such as introduction, objectives, problem statement and scope of project.

ii. Chapter 2

This chapter discuss about the literature review, theory of component using and some examples of conventional car parking.

iii. Chapter 3

Describe about project methodology used in this project, project process flow and project layout.

iv. Chapter 4

These chapters describe about result of this project. On this chapter also write about discussion about this project.

v. Chapter 5

This chapter was clarifying about recommendation and conclusion about this project.


(20)

6

LITERATURE REVIEW

2.1 Introduction

This chapter discuss about reviews of existing project created to get an idea about the project design, conception and any information that related to improve the project. With different concept and design, there are other creations and innovations of projects done by other people. Researches related to this project also covered in this chapter.

2.2 Project Component

This project consist a lot of component used and the future development of this project. Below are the lists of the component used in this project and the entire component that can be use in the future development of this project.

2.2.1 Visual Basic

Visual Basic is the important part on this project. Visual Basic is the third generation event-driven programming language and integrated development environment (IDE) from Microsoft. Visual Basic is also considered a relatively easy to learn and use programming language, because of its graphical development features and basic heritage. In this project Visual Basic 6.0 is used.


(21)

7

2.2.1.1 Comparison between Visual Basic 6.0 and Visual Basic.net

There are many differences between VB6 and VB.NET. Much of the current VB6 code base will not run under VB.NET due to changes in VB.NET's syntax and language, its use of the new common runtime, and its switch to WinForms from the VB6

form model.

Visual Basic.NET includes an upgrade tool to assist in converting VB6 projects to .NET. The tool adds an upgrade report to your project listing any problems and

inserts comments into your code and To Do items into the new Task List indicating

where additional changes need to be made.

However, understanding the following changes can help simplify migrating your existing VB6 code. For further information on this topic, visit Microsoft's web site.

Beside the changes discussed here there are many new and fundamentally different language features and programming concepts incorporated into the VB.NET platform. The big ones include: Polymorphism, Inheritance and Encapsulation (PIE), operation overloading, parameterized constructors, class-level attributes and operations.

2.2.1.2 Steps to use Visual Basic 6.0

To make this project is success; firstly student must familiar with Visual Basic Programming. In this project, Visual Basic 6.0 is used to develop a Parking Monitoring System. There are a few steps to study and learn about this Visual Basic Programming before start to make a real programming for this project. Below is the few steps to start a Visual Basic.


(22)

8 1. Start Visual Basic. Usually, 'Start > Programs > Microsoft Visual Studio >

Microsoft Visual Basic 6.0'.

2. Click the default Standard EXE icon and then click the Open button.


(23)

9 3. Click the Command Button icon in the Toolbox.

Figure 2.2: Toolbox icon

4. Click the first Command Button to select it. Open the property window and change the Name property to Command.


(24)

10 5. Double click at the Command Button object in the form to open the code window for that button. Enter the code, after the automatically entered code Private Sub CommandA_Click().

Figure 2.4 : Code witting icon

6. Click the Run button in the toolbar at the top of the VB 6 development environment window to execute the program.


(1)

1.6 Report Structure i. Chapter 1

Review about car parking system such as introduction, objectives, problem statement and scope of project.

ii. Chapter 2

This chapter discuss about the literature review, theory of component using and some examples of conventional car parking.

iii. Chapter 3

Describe about project methodology used in this project, project process flow and project layout.

iv. Chapter 4

These chapters describe about result of this project. On this chapter also write about discussion about this project.

v. Chapter 5

This chapter was clarifying about recommendation and conclusion about this project.


(2)

LITERATURE REVIEW

2.1 Introduction

This chapter discuss about reviews of existing project created to get an idea about the project design, conception and any information that related to improve the project. With different concept and design, there are other creations and innovations of projects done by other people. Researches related to this project also covered in this chapter.

2.2 Project Component

This project consist a lot of component used and the future development of this project. Below are the lists of the component used in this project and the entire component that can be use in the future development of this project.

2.2.1 Visual Basic

Visual Basic is the important part on this project. Visual Basic is the third generation event-driven programming language and integrated development environment (IDE) from Microsoft. Visual Basic is also considered a relatively easy to learn and use programming language, because of its graphical development features and basic heritage. In this project Visual Basic 6.0 is used.


(3)

2.2.1.1 Comparison between Visual Basic 6.0 and Visual Basic.net

There are many differences between VB6 and VB.NET. Much of the current VB6 code base will not run under VB.NET due to changes in VB.NET's syntax and language, its use of the new common runtime, and its switch to WinForms from the VB6 form model.

Visual Basic.NET includes an upgrade tool to assist in converting VB6 projects to .NET. The tool adds an upgrade report to your project listing any problems and inserts comments into your code and To Do items into the new Task List indicating where additional changes need to be made.

However, understanding the following changes can help simplify migrating your existing VB6 code. For further information on this topic, visit Microsoft's web site.

Beside the changes discussed here there are many new and fundamentally different language features and programming concepts incorporated into the VB.NET platform. The big ones include: Polymorphism, Inheritance and Encapsulation (PIE), operation overloading, parameterized constructors, class-level attributes and operations.

2.2.1.2 Steps to use Visual Basic 6.0

To make this project is success; firstly student must familiar with Visual Basic Programming. In this project, Visual Basic 6.0 is used to develop a Parking Monitoring System. There are a few steps to study and learn about this Visual Basic Programming before start to make a real programming for this project. Below is the few steps to start a Visual Basic.


(4)

Microsoft Visual Basic 6.0'.

2. Click the default Standard EXE icon and then click the Open button.


(5)

Figure 2.2: Toolbox icon

4. Click the first Command Button to select it. Open the property window and change the Name property to Command.


(6)

window for that button. Enter the code, after the automatically entered code Private Sub CommandA_Click().

Figure 2.4 : Code witting icon

6. Click the Run button in the toolbar at the top of the VB 6 development environment window to execute the program.