Professional Documents
Culture Documents
Faculty of Engineering
Systems Engineering
Submitted by:
Supervised by:
April 2018
1
2
اآليـــــة
ﭧﭨ
ﭽﭶ ﭷ ﭸ ﭹ ﭺ ﭻ ﭼ ﭽ ﭾ ﭿ
ﮀﮁﮂ ﮃﮄ ﮅﮆﮇﭼ
صدق اهلل العظيم
لقمان٤١ :
I
إىل كن األعصاء يف حياتي كن مو إيتم بي وزعاني
أمي
أبي
إىل كن أضتاذ قادني إىل الدزب املهري وأوصمين إىل غاية العمم
II
الشكر والعرفان
اتقدم بالشكر أجزله وبالعرفان كله إلى اساتذتي الذين لم يبخلوا
الصورة ،،
III
Abstract
IV
المستخلص
انهذف يٍ هذا انًشزوع هى تنفيذ يىاقف انسياراث األوتىياتيكيت يٍ خالل انتحكى في دخىل وخزوج
انسياراث ويعزفت حانت يىاقف انسياراث قبم انذخىل .يتكىٌ انًشزوع يٍ حساساث ،و وحذة تحكى،
يىتىراث نهذخىل وانخزوج ،و يعزف نهتعزف عهى األشخاص انًخىنيٍ نهى بانذخىل.
يساعذ هذا اننظاو عهى انحذ يٍ يشاكم يىاقف انسياراث في انًذٌ انكبيزة واألسىاق انًزدحًت ويزاكز
انتسىق.
V
Table of Contents
االيت I
االهذاء II
ٌانشكز وانعزفا III
Abstract IV
انًستخهض V
Table of Contents VI
List of Figures VIII
Table of Abbreviations IX
Chapter One : Introduction
1.1 Background 1
1.2 Problem Statements 2
1.3 Objective 2
1.4 Methodology 2
1.5 Layout 3
Chapter Two : Theoretical Background
2.1 Introduction 4
2.2 Automatic Car Parking System History 4
2.3 Microcontroller 6
2.3.1 Application Of Microcontroller 7
2.3.2 Types Of Microcontroller 8
2.4 Sensors 9
2.5 Electronic motors 11
Chapter Three : System Hardware and Software
3.1 System Description 13
3.2 System Hardware 14
3.2.1 Arduino 14
3.2.2 RFID 15
3.2.3 RFID Tag 16
VI
3.2.4 Servo Motor 16
3.2.5 Ultrasonic 17
3.2.6 Liquid Crystal Display 16x2 18
3.3 System Software 19
3.3.1 Flow Chart 20
3.3.2 Program Code 23
3.3.3 System Simulation 35
Chapter Four : System Implementation and Testing
4.1 Introduction 36
4.2 System Implementation 36
4.3 System Testing 38
4.3.1 case 1 38
4.3.2 case 2 39
4.3.3 case 3 40
4.3.4 case 4 41
Chapter Five : Conclusions and Recommendation
5.1 Conclusion 42
5.2 Recommendation 42
References 43
Appendices
VII
List of Figures
Figure (3.1) Component Block Diagram 13
Figure (3.2) Arduino UNO 14
Figure (3.3) RFID 15
Figure (3.4) RFID Card 16
Figure (3.5) Servo Motor 17
Figure (3.6) Ultrasonic 18
Figure (3.7) LCD 19
Figure (3.8) Simulation 35
Figure (4.1) System Implementation 37
Figure (4.2) Case 1 38
Figure (4.3) Case 2 39
Figure (4.4) Case 3 40
Figure (4.5) Case 4 41
VIII
Table of Abbreviations
AC Alternating current
℃ Celsius
CMOS Complementary Metal Oxide Semiconductor
dB Deutsche Bahn
DC Direct current
FIFO Frist In First Out
GHz Giga Hertz
GIS Geographic information system
GND Ground
GNU General Public License
INT Interrupt
I/O input/output
ISM Industrial Scientific and Medical
KB Killo byte
TCP Transmission Control Protocol
TV Television
LCD liquid crystal display
LED Light Emitting Diode
mA Milli Ampere
IX
Mm Millimeter
MPU Midi Processing Unit
mW Milli Watt
NMEA National Marine Electronics association
UARTs Universal Asynchronous Receiver Transmitters
UDP User Datagram Protocol
USB Universal Serial Bus
PANs personal area networks
PC Personal Computer
PIO Programmable Input/output
X
CHAPTER ONE
INTRODUCTION
1
CHAPTER ONE
INTRODUCTION
1.1 Background
1
automatic car parking system is a solution to this ordeal. This
vehicular technology has been implementation using many other
systems but a cost effective, simple and accurate solution will greatly
appreciated. This project explains in detail.
Searching for an available parking has been very difficult this days
because there is a few spaces to parking, because of that this will
waist the driver time and may not even found one.
1.3 Objectives
To reduce man power.
To getting high efficiency with sensitive.
To reducing the material cost.
To design and implement automatic parking system.
1.4 Methodology
2
be close enough to RFID transmission it will make the RFID card
circuit turn on and sends the card information to RFID receiver then
send the number to microcontroller to check the number of the free
space for car parking . If there are free space it will send a text
message to the LCD with the number of free space to park the car, at
the same time the microcontroller sends signal to servo motor to open
the barrier, then the driver will go to the empty spot to park the car .
When the car be above the parking spot it will intercept with the
sensor which it makes these parking spot unavailable . This loop will
do until the parking being full. If the car come and the parking is full
this message will appear on LCD “sorry no more space”.
1.5 Layout
3
CHAPTER TWO
THEORITICAL
BACKGROUND AND
LETRITURE REVIEW
4
CHAPTER TWO
4
Los Angeles, Chicago, New York, and Cincinnati. In addition, one of
the Kent automatic parking garages in New York is an art deco
landmark that was converted into luxury condominiums in 1983. A
system that is prevalent all over Japan is the “Ferris-wheel,” or
“paternoster system”, which — was created by the Westinghouse
Corporation in 1923 and built in 1932 on Chicago‟s Monroe Street.
In the past two decades, the concept of intelligence in terms of smart
parking systems became more popular in the most vibrant cities,
especially in malls and shopping centres. (Melsen 2013) In the mid-
80s, the systems used for parking relied mainly on the traditional
method of pushing a button in the device next to the checkpoint to get
a parking ticket and on exiting, the driver must pay before inserting
their ticket in order for the barrier to rise. This was the method used to
determine how many cars came in and out the system each day, and it
was used to count the number of vacant spaces available. It began by
utilizing different methods such as sensors or barriers to be able to
know the status of parking lots. All these methods developed
dramatically further until recently the term „smart city vision‟
emerged.
5
2.3 Microcontroller
6
2.3.1 Application Of Microcontroller
7
2.3.2 Types Of Microcontroller
8
- Renesas Electronics: RL 78 16-bit MCU; RX 32-bit MCU;
Super H; V850 32-bit MCU; H8; R8C 16-bit MCU.
- Silicon Laboratories Pipelined 8-bit 8051 Microcontrollers and
mixed-signal ARM-based 32-bit microcontrollers.
- STMicroelectronics STM8 (8-bit), ST10 (16-bit) and STM32
(32-bit).
2.4 Sensors
Sensors and sensor systems are vital to our awareness of our
surroundings and provide safety, security, and surveillance, as well as
enable monitoring of our health and environment. A transformative
advance in the field of sensor technology has been the development of
smart sensor systems. The definition of a smart sensor may vary, but
typically at a minimum a smart sensor is the combination of a sensing
element with processing capabilities provided by a microprocessor.
That is, smart sensors are basic sensing elements with embedded
intelligence. The sensor signal is fed to the microprocessor, which
processes the data and provides an informative output to an external
user. A more expansive view of a smart sensor system, which is used
in this article, a complete self-contained sensor system that includes
the capabilities for logging, processing with a model of sensor
response and other data, self-contained power, and an ability to
transmit or display informative data to an outside user. The
9
fundamental idea of a smart sensor is that the integration of silicon
microprocessors with sensor technology can not only provide
interpretive power and customized outputs, but also significantly
improve sensor system performance and capabilities.
10
2.5 Electronic Motor
Electronic motors are essentially inverse generators: a current through
coils of wire causes some mechanical device to rotate. The core
principle underlying motors is electromagnetic induction. By
Ampere's law, the current induces magnetic field, which can interact
with another magnetic field to produce force, and that force can cause
mechanical motion. A motor is basically generator run backwards
(using current to produce motion rather than motion to produce
current), and in fact the modern era of practical motors was initiated
by accident when one DC generator was accidentally connected to
another in 1873, producing motion and leading Zenobe Gramme to
realize that his generators could also be used as motors. The first AC
motors(synchronous and then induction) were invented by Tesla in the
1880s.Electric motors are estimated to now consume over 25% U.S.
electricity use (though some estimates are even higher, to up to 50%,
and over 20%of U.S. total primary energy). While large electric
motors can be extremely efficient at converting electrical energy to
kinetic energy (_ > 90%), those efficiencies are only achieved when
motors are well-matched to their loads. Actual efficiencies in normal
usage practice in the U.S. are substantially sub-optimal (motors are
oversized for the loads they drive). Small electric motors are also
inherently less efficient (more like 50%). Motor design and, even
11
more importantly, motor choice and use practices are an important
area of potential energy conservation. This reading is a (very brief)
introduction to four most basic types of electric motors:
Brushed DC
Brushless DC
Synchronous AC
Induction
12
CHAPTER THREE
SYSTEM HARDWARE
AND SOFTWARE
13
CHAPTER THREE
13
3.2 System Hardware
3.2.1 Arduino
14
3.2.2 Radio Frequency Identification (RFID)
15
3.2.3 Radio Frequency Identification RFID Tag
The EM 4100 125 kHz RFID Card is one of the most popular models
in the proposed range of read-only proximity cards, i.e. not offering
the possibility to store data.It has been designed in a standard format
so it can be easily slipped into your card holder or wallet. Compatible
with the RFID 125 kHz Module for Arduino, Raspberry Pi, Intel
Galileo and Waspmote, it has a unique identifier. As shown in Figure
3.4
A Servo is a small device that has an output shaft. This shaft can be
positioned to specific angular positions by sending the servo a coded
signal. As long as the coded signal exists on the input line, the servo
will maintain the angular position of the shaft. As the coded signal
changes, the angular position of the shaft changes. In practice, servos
16
are used in radio-controlled airplanes to position control surfaces like
the elevators and rudders. They are also in radio-controlled cars,
puppets, and of course, robots. Servos are extremely useful in
robotics. The motors are small, as shown in Figure 3.5, the motor have
a built in control circuitry, and are extremely powerful for their size. It
draws power proportional to the mechanical load. A lightly loaded
servo, therefore, doesn't consume much energy.
3.2.5 Ultrasonic
17
Figure 3.6 Ultrasonic
18
Figure 3.7 LCD 16x2 pin description
For system software the microcontroller Arduino used to create debug and boot the code,
The code written with C++ programming language compiler for the arduino, It is
seamless and easy to write, build and debug application C++ language, The system
software is containing three parts, which are the program programming code, flow chart,
simulatation.
19
3.3.1 Flow Chart
Start
Configure LCD
Initialize LCD
Configure Servo
Read RFID
No If RFID
High
Yes
Check Distance
20
X
No If
Print A/V distance
<10
Yes
Print N/A
Check Distance1
No If
Print A/V
distance1
<10
Yes
Print N/A
Check Distance2
Yes
No If
Print A/V distance2
<10
Yes
Print N/A
21
X
Check RFID
No If
seriel1
Yes
Print user1
No If
seriel2
Yes
Print user2
No If
seriel3
Yes
Print user3
22
3.3.2 Program CODE
#include <SoftwareSerial.h>
#include "RDM6300.h"
#include <LiquidCrystal.h>
#include <Servo.h>
RDM6300<SoftwareSerial> rdm(&rdm_serial);
Servo myservo;
Servo myservo1;
int i=0;
int i1=0;
int i2=0;
int button = 3;
23
const int trig2Pin = A4;
long duration;
int distance;
long duration1;
int distance1;
long duration2;
int distance2;
long duration3;
int distance3;
void setup()
Serial.begin(9600);
lcd.begin(16, 2);
myservo.attach(7);
myservo1.attach(6);
pinMode(button, INPUT);
24
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
delay(1000);
lcd.clear();
myservo.write(0);
myservo1.write(0);
void loop()
s:
25
lcd.setCursor(0, 0);
delay(200);
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
distance= duration*0.034/2;
digitalWrite(trig1Pin, LOW);
delayMicroseconds(2);
digitalWrite(trig1Pin, HIGH);
delayMicroseconds(10);
digitalWrite(trig1Pin, LOW);
distance1 = duration1*0.034/2;
26
digitalWrite(trig2Pin, LOW);
delayMicroseconds(2);
digitalWrite(trig2Pin, HIGH);
delayMicroseconds(10);
digitalWrite(trig2Pin, LOW);
distance2 = duration2*0.034/2;
digitalWrite(trig3Pin, LOW);
delayMicroseconds(2);
digitalWrite(trig3Pin, HIGH);
delayMicroseconds(10);
digitalWrite(trig3Pin, LOW);
distance3 = duration3*0.034/2;
Serial.print("Distance: ");
Serial.println(distance);
27
Serial.print("Distance1: ");
Serial.println(distance1);
Serial.print("Distance2: ");
Serial.println(distance2);
Serial.print("Distance3: ");
Serial.println(distance3);
i=1;
lcd.setCursor(1, 1);
lcd.print("N/A");
lcd.setCursor(1, 1);
lcd.print("A/V");
28
if (distance1 < 10){
i1=1;
lcd.setCursor(7, 1);
lcd.print("N/A");
lcd.setCursor(7, 1);
lcd.print("A/V");
i2=1;
lcd.setCursor(13, 1);
lcd.print("N/A");
lcd.setCursor(13, 1);
lcd.print("A/V");
29
if (distance3 < 10){
i=0;
i1=0;
i2=0;
myservo1.write(90);
delay(2000);
myservo1.write(0);
delay(100);
if((i==1)&&(i1==1)&&(i2==1)){
goto s;
else
if (digitalRead(button)==HIGH){
goto l;
if (digitalRead(button)==LOW){
30
goto s;
l:
lcd.clear();
lcd.setCursor(0, 0);
lcd.println("ENTER CARD:");
last_id = rdm.read();
Serial.print("RFID:0x");
rdm.print_int64(last_id);
31
Serial.println();
if(last_id == my_id) {
Serial.println("USER1:");
lcd.setCursor(0, 1);
lcd.println("USER1:");
myservo.write(90);
delay(5000);
myservo.write(0);
lcd.clear();
goto s;
if(last_id == my_id1) {
Serial.println("USER2:");
lcd.setCursor(0, 1);
lcd.println("USER2:");
myservo.write(90);
delay(5000);
32
myservo.write(0);
lcd.clear();
goto s;
if(last_id == my_id2) {
Serial.println("USER3:");
lcd.setCursor(0, 1);
lcd.println("USER3:");
myservo.write(90);
delay(5000);
myservo.write(0);
lcd.clear();
goto s;
if(last_id == my_id3) {
Serial.println("USER4:");
lcd.setCursor(0, 1);
lcd.println("USER4:");
33
myservo.write(90);
delay(5000);
myservo.write(0);
lcd.clear();
goto s;
34
3.3.3 Simulation
35
CHAPTER FOUR
SYSTEM
IMPELEMENTATION AND
TESTING
36
CHAPTER FOUR
4.1 Introduction
In this section , the system circuit will be implemented using the
component that mentioned in chapter three also testing the system to
ensure its performance.
36
Figure 4.1 system impelementation
37
4.3 System Testing
In this section the system is start in 6 cases , how the car enter the
parking ,status of parkings is show in LCD, and cars exit from the
parking.
4.3.1 Case 1
When the car comes the RFID read the tag on the card , if the tag is
registered in the system the entry servo will open the barrier and the
LCD will show the available parking as shown in the Figure 4.3 after
the car parking in either P1 or P2 or P3 the parking availability will be
reduced.
38
4.3.2 Case2
When the car comes the RFID read the tag on the card , if the tag is
registered in the system the entry servo will open the barrier and the
LCD will show the available parking as shown in the Figure 4.4 in
this case P2 or P3 after the car parking in either P2 or P3 the parking
availability will be reduced.
39
4.3.3 Case 3
When the car comes the RFID read the tag on the card , if the tag is
registered in the system the entry servo will open the barrier and the
LCD will show the available parking as shown in the Figure 4.5 after
the car parking in P1,P2 the parking will be full
40
4.3.4 Case 4
When all parking filled up with cars the LCD will show to the driver
(N/A N/A N/A)(no more space) message , and the entry barrier will
not open as shown in Figure 4.6 if an unregistered car comes the
barrier will not open to the driver to park his car.
41
CHAPTER FIVE
CONCLUSION AND
RECOMMENDATION
42
CHAPTER FIVE
5.1 Conclusion
5.2 Recommendation
42
REFRENCES
43
10.M. Y. I. Idris, E. M. Tamil, N. M. Noor and K. W. Fong,
“Parking Guidance System Utilizing Wireless Sensor Network
and Ultrasonic Sensor”, Information Technology Journal, ISSN
1812-5638, (2009).
11.B. K. Konstantinos Domdouzis and C. Anuba., “An
experimental study of the effects of different medium on the
performance of rfid system,” vol. 21. Advanced Engineering
Informatics, 2011.
12.http://ovens.reviewed.com/features/the-history-of-smart-
appliances
13.Chip Hall of Fame: Atmel ATmega8". IEEE Spectrum:
Technology, Engineering, and Science News. Retrieved 2017-
10-10
14.David Harris & Sarah Harris (2012). Digital Design and
Computer Architecture, Second Edition, p. 515. Morgan
Kaufmann. ISBN 0123944244.
44
Appendix
45