University of Science and Technology Faculty of Engineering Department of Computer and Electronic Systems Engineering A Research Submitted in Partial Fulfillment for the Requirements of the B.Sc.(Honors) Degree in Computer and Electronic Systems Engineering SMART PARKING SYSTEM DESIGN Prepared by: Abdeen Yousif Albasher Abdelnabi Supervised by: Dr. Mohammed Elnour Abdallah March-2016 اﻻية ِب ِب ِب ِب ِب ْس ي ا ِهَّللا ااِهَّلللْس َم ِب ااِهَّللل ي ااِهَّلللْس َم ُن )1( َم ِهَّلليَم اْسا ُنْسل َمآ )2( َم َم َم اْساِبْس َم َمآ )3( َم ِهَّللَم ُن اْسا َم َمَي َمآ )4( ﴾ صد االع ي سورة اال اﻵي ت)4-1( I DEDICATION To the fountain of patience and optimism and hope To each of the following in the presence of God and His Messenger. my mother dear To the big heart greatest cheerleader and he always pushed me to be the best I could be. And he always stood his ground. my dear father To those who have demonstrated to me what is the most beautiful of my brother’s life To the people who paved our way of science and knowledge All our Teachers Distinguished To the taste of the most beautiful moments with My friends I especially appreciated and thanked: Doctor ............. II ACKNOWLEDGMENT Thanks first and last to ALLAH who enable me to conduct this study by grace of him and donated my strength. For all those who have stood by me, and helped me in this thesis, we send our thanks and deepest gratitude. Special and deepest regards are due to my supervisor Dr.Mohammed Al-Nour for his assistance and supervision, to all friends who support me, Sincere thanks to everyone who stood beside me and helped me with enthusiasm and great faith, thank you all. III Abstract With the increase in car production and world's population, are requests more and more areas and parking facilities. In this project, a new parking cars are called smart car parking system (SPS) proposes to help drivers find vacant places in the parking lot in the shortest time. The new system uses ultrasonic (ultrasound) sensors to detect any occupancy parking lot. This system is designed to determine the correct path in which space is available to parking the car. RFID used to add a layer of security for this system, and communicating between the system and drivers happened through LCD screen that display the system status. IV المستخلص هغ الضيادة في إًتاج السياساث في الؼالن ، و صيادة تؼذاد السكاى الؼالوي , هٌالك صيادة في الطلب ﻻهاكي و هٌشاءاث ﻻيقاف السياساث. تقذهٌا في هزا الوششوع بؼول ًظام ركي لشكي الوشكباث لوساػذة السائقيي ﻻيجاد اهاكي شاغشة لشكي الوشكباث باسهل الطشق الووكٌه , يقىم هزا الٌظام الجذيذ باستخذام تقٌيت الحساساث فى ق الصىتيت لوؼشفت اﻻهاكي الشاغشة . هزا الٌظام صون لتحذيذ الوساس الصحيح الزي يتىفش به هكاى شاغش لشكي الوشكبت , كوا يقىم باستخذام جهاص التؼشف بالوىجاث الشاديىيت ﻻضافت طبقت هي الحوايت لهزا الٌظام و يتن التىاصل هغ السائقيي ػبش شاشت ػشض تقىم بؼشض حالت الوىقف. V CONTENTS Page Subject number I اﻵية Dedication II Acknowledgment III Abstract IV V المستخلص contents VI List of figures VIII Lists of Tables XII List of Abbreviations XIII CHAPTER ONE: INTRODUCTION 1.1 Background 1 1.2 Problem Statement 1 1.3 Objectives 2 1.4 Methodology 2 1.5 Layout 3 I CHAPTER TWO: CONTROL SYSTEM AND CONTROLLER 2.1 Introduction 4 2.2 Control system 4 2.3 Basic Components of a Control System 5 2.4 Classification of control systems 5 2.4.1 Open loop control system 5 2.4.2 Closed loop control system 6 2.4.3 Feedback 7 2.5 Controller 7 2.5.1 Basic Controller Types 8 2.5.2 Proportional Derivative (PD) Controller 8 2.5.3 Proportional Integral (PI) Controller 9 2.5.4 Proportional Integral Derivative (PID) 9 Controller CHAPTER THREE: Microcontroller application and types 3.1 Introduction 11 3.2 Microcontroller main components 11 3.2.1 Central processing unit 12 3.2.2 ROM 12 3.2.3 RAM 12 II 3.2.4 Input and Output Ports 12 3.2.5 Timer 13 3.2.6 Interrupt Circuitry 13 3.2.7 Buses 13 3.3 Types of microcontrollers 14 3.4 Programming of microcontroller 15 3.5 Applications of microcontroller 15 3.6 Microcontroller features 16 3.7 Arduino Microcontroller 16 3.7.1 Power 17 3.7.2 Memory 17 3.7.3 Pin Description 17 CHAPTER FOUR: Smart Parking System Simulation 4.1 Introduction 19 4.2 System Simulation 19 CHAPTER FIVE: Smart Parking System Design and Operation 5.1 Introduction 24 5.2 Input unit 25 5.2.1 RFID Reader 25 III 5.2.2 RFID Tags 28 5.2.3 Ultrasonic 31 5.3 Output Unit 31 5.3.1 Liquid crystal display 16x2 31 5.3.2 Servo Motor 32 5.4 Circuit Implementation 33 5.5 Operation 34 5.6 Software Description 36 5.7 Flow chart 37 CHAPTER SIX: CONCLUSION AND RECOMMENDATIONS 6.1 Conclusion 40 6.2 Recommendation 40 References 41 Appendices Appendix A Code A1 Appendix B Arduino Datasheet B1 Appendix C RFID Datasheet C1 Appendix D Ultrasonic Datasheet D1 IV List of Figures Page Figures Name of Figures Number Figure(2.1) basic relationship of component 5 Figure(2.2) Open loop Control 6 Figure(2.3) closed loop control 6 Figure(3.1) Microcontroller main components 11 Figure(3.2) Arduino Microcontroller 17 Figure(4.1) Basic system simulation 19 Figure(4.2) case p1 orp2 or p3 20 Figure(4.3) case p1 or p2 20 Figure(4.4) case p1 or p3 21 Figure(4.5) case p2 or p3 21 Figure(4.6) case p1 22 Figure(4.7) case p2 22 Figure(4.8) case p3 23 V Figure(4.9) full parking 23 Hardware Implementation of Smart Parking Figure(5.1) 24 System Figure(5.2) RFID 25 Figure(5.3) ID Format 28 Figure(5.4) RFID Tag 29 Figure(5.5) Ultrasonic 31 Figure(5.6) LCD 16x2 pin description 32 Figure(5.7) servo 33 Figure(5.8) Circuit implementation 34 Figure(5.9) Smart Parking System Final Project 35 Figure(5.10) Arduino development environment 36 Figure(5.11) Flow Chart 39 VI Lists of Tables Page Table Name of Table Number Table(5.1) Distance of different tag reader 26 Table(5.2) RFID pin description 27 VII List of Abbreviations AC Alternating Current ALU Arithmetic Logic Unit AREF Analog Reference ASCII American Standard Code for Information Interchange CPU Central Processing Unit D/A Digital to Analog converter DC Direct Current EEPROM Electrically Erasable Programmable Read- Only Memory GND Ground I/O Input/Output IC Integration Circuit ID Identification LCD Liquid Crystal Display LED Light Emitting Diode MISO Master In Slave Out MOSI Master Out Slave In PC Personal Computer PD Proportional Derivative PI Proportional Integral PID Proportional Integral Derivative PWM Pulse Width Modulation R/W Read/Write RAM Random Access Memory VIII RFID Radio Frequency Identification ROM Read Only Memory RS Register Select Rx Receiver SCK Serial Clock SOUT Signal Out SPI Serial Peripheral Interface SS Slave Select TTL Transistor-Transistor logic TWI Two Wire Interface Tx Transamination USB Universal serial bus VCC Voltage DC Input VCR Videocassette recorder IX Appendix A Program code #include <LiquidCrystal.h> #include <EEPROM.h> #include <Servo.h> #include "Ultrasonic.h" Servo servoLock; Servo myservo; LiquidCrystal lcd(18, 19, 5, 4, 3, 2); #define RFID_Enabled_Pin 16 #define servoPin 17 #define LockedPos 100 #define UnlockedPos 10 byte buffer[100]; byte RFID_Master[10] = {'3', '8', '0', '0', '7', '1', '2', '4', 'D', '5'}; byte RFID_car1[10], RFID_car2[10], RFID_car3[10],RFID_car4[10]; byte i; byte i2; boolean DoorLocked; byte checkPosition; boolean RFID_Master_Correct; boolean RFID_car1_Correct, RFID_car2_Correct, RFID_car3_Correct, RFID_car4_Correct; boolean RFID_SaveNextRead; long duration, inches, cm,cm1,cm2,cm3 ,duration1,duration2,duration3; //====================U1 const int pingPin = 14; const int echoPin = 15; //====================U2 const int pingPin1 = 10; const int echoPin1 = 9; A1 //====================U3 const int pingPin2 = 8; const int echoPin2 = 11; //====================U4 Ultrasonic ultrasonic(7); #define limit_min 10 void setup() { myservo.attach(12); pinMode(13, OUTPUT); pinMode(RFID_Enabled_Pin, OUTPUT); RFID_Enable(false); EEPROM_Read_card(); PreLock(); RFID_Enable(true); Serial.begin(2400); i = 1; lcd.begin(16, 2); clear0(); lcd.print(" WELCOME TO"); clear1(); lcd.print(" SMART PARKING"); delay(100); } void loop() { if (Serial.available()) { if (buffer[0] != 0x0A) { buffer[0] = Serial.read(); } else { buffer[i] = Serial.read(); if (buffer[i] == 0x0D) { A2 Serial.print("RFID Tag scanned: "); RFID_Enable(false); RFID_Master_Correct = true; RFID_car1_Correct = true; RFID_car2_Correct = true; RFID_car3_Correct = true; RFID_car4_Correct = true; for (checkPosition = 0; checkPosition < 10; checkPosition++) { #if defined(ARDUINO) && ARDUINO >=100 Serial.write(buffer[checkPosition+1]); #else Serial.print(buffer[checkPosition+1], BYTE); #endif if (buffer[checkPosition+1] == RFID_car1[checkPosition] && RFID_car1_Correct == true) { RFID_car1_Correct = true; //car1 RFID tag is detected } else { RFID_car1_Correct = false; //car1 RFID tag is not detected } if (buffer[checkPosition+1] == RFID_car2[checkPosition] && RFID_car2_Correct == true) { RFID_car2_Correct = true; //car2 RFID tag is detected } else { RFID_car2_Correct = false; //car2 RFID tag is not detected } if (buffer[checkPosition+1] == RFID_car3[checkPosition] && RFID_car3_Correct == true) { RFID_car3_Correct = true; //car3 RFID tag is detected } else { RFID_car3_Correct = false; //car3 RFID tag is detected } if (buffer[checkPosition+1] == RFID_car4[checkPosition] && RFID_car4_Correct == true) { A3 RFID_car4_Correct = true; //car4 RFID tag is detected } else { RFID_car4_Correct = false; //car4 RFID tag is not detected } if (buffer[checkPosition+1] == RFID_Master[checkPosition] && RFID_Master_Correct == true) { RFID_Master_Correct = true; //Master RFID tag is detected } else { RFID_Master_Correct = false;
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages91 Page
-
File Size-