Professional Documents
Culture Documents
ARDUINO
Abstract
The Development of Smart Parking System offers a simple and
comprehensive solution to the problem of finding a convenient parking spot in
large. The system itself consists of a user-interface at the entrance of the parking
garage, which allows the parking attendance to view all available parking spaces.
Some of the benefits of car parking are optimum utilization of space, low
construction cost, low working and maintenance cost to name a few. Although
automated parking like smart parking has made the condition a little better than
the earlier situation, there is still scope for improvement. This is because people
still face problems of space availability, searching time and waiting time in
public places like malls, multiplexes, railway stations, shopping streets etc. With
the new technology of smart parking, majority of these issues will be solved.
i
TABLE OF CONTENTS
ABSTRACT
TABLE OF CONTENTS
LIST OF ABBREVIATIONS
CHAPTER ONE: GENERAL INTRODUCTION
1.1 PROJECT BACKGROUND
1.2 PROBLEM STATEMENT
1.3 OBJECTIVES
1.4 LITERATURE REVIEW
1.5 SCOPE OF REPORT
CHAPTER TWO: COMPONENTS OF PROJECT
2.1 COMPONENTS OF PROJECT
2.2 MAIN COMPONENTS
2.2.1 ARDUINO UNO
2.2.2 SERVO MOTOR
2.2.3 RADIO FREQUENCY IDENTIFICATION
2.2.4 LIQUID CRYSTAL DISPLAY
2.2.5 SD CARD READER
2.2.6 RTC MODULE
2.2.7 INFRARED (IR) SENSORS
2.3 OTHER COMPONENTS
2.3.1 LIGHT EMITTING DIODE
2.3.2 SD CARD READER
2.3.3 REAL TIME CLOCK (RTC)
2.3.4 POTENTIOMETER
2.3.5 PIEZOELECTRIC (BUZZER)
ii
REFERENCES
ii
List of Abbreviations
RFID Radio-Frequency Identification
RST Reset
GND Ground
UART Universal
Asynchronous
Receiver/Transmitter
IOREF Input/output Reference
AREF Analog Reference
SPI Serial Peripheral Interface
RS Register Select
R/W Read/Write
Bklt Backlight
TX/RX Transmitter/Receiver
vii
viii
Chapter One
General Introduction
1
1.1 Project background
With the increasing populations and easy accessibility of car, the number
of car users has increased which generates the problem of parking around the
shopping malls, hotels, and various other visiting places. The present
conventional parking systems are unable to handle too much vehicles and it’s
too much land consuming.
By referring the name of smart parking system, drivers are supposing to get the
parking lot easy and without the feeling of frustration but the true story is always
not what we expected. The main reason of it is because the system name is smart
but the guidance mechanism is not complete and efficient enough.
Moreover, there are some parking system do not even have any guidance
mechanism it is due to the extra cost that have to bear by the owner. As a
consequence of increased the level of difficulty for the driver to, seek for car park
lot.
Here is an example of problems normally faced by some of the Ghanaian drivers
who intended to find a car park. First of all, the ticket is still available for the
driver although the car park is full and causes the drivers seek more time to
patrolling around. Secondly would be the lack of indication to the free parking
lot. Next issue is the drivers simply park their vehicles at any place they like
which might block the loading bay and cause the pathway of the car park become
narrow. There are many more issues that arises by the driver but the point that
listed is the most critical issue that needs to be solved.
In my project, I will be focusing on the security of the car park system ensuring that
all reserved slots are always maintained, improvement of the guidance mechanism.
The guidance mechanism is to be built to guide the driver to the empty
parking lot in a short time without any feeling of fuss and hassles.
The availability of parking lot inside car park is obtained from the sensors that
count the number of cars entering and exiting. This information of parking lot
availability inside car park is generally expressed in terms of full or empty on
display board at the entry of car park as well as showing the lot number if
available. The actual number of cars parked inside car park is stored with respect
to the date and time on the SD card reader.
There are two types of parking management systems. First are a normal parking
system and the other one is an automatic parking system. For normal parking
system we have to drive our car to find a free space which is time consuming,
fuel wasting, and provide no security mean. For an automatic parking system is
used to make the whole process of parking cars more efficient and less complex
for both drivers and administrators entering and exiting.
1
1-2 Problem Statement
There are many car parks available in Ghana; however, the security system and
the guidance mechanism of these parking systems are neither smart nor efficient
enough to operate the car park. Therefore, these systems are not efficient in terms
of both time to-park and guidance mechanism, that is waste of time and fuel yet
increase the crime rate.
2
1-3 Objectives
In this section the work related to the smart car parking is expressed. There
are many works has been implemented to solve the parking problem.
The engineers have been built a prototype of an automated parking system
which will automatically park and retrieve the vehicle without the driver. The
driver will park his vehicle on a pallet at the platform of the car park. Then the
sensor will detect the available empty parking spaces and display them on the
control panel. After the driver selects the desired parking space on the control
panel, the vehicle will be transported to that parking space [3].
Author’s model the important components are the parking zones, the users
and the database required for the smart parking system. The management decides
the parking tariffs and broadcasts live parking information to vehicle drivers. On
receiving parking details, the user chooses a desired parking space and also
books a space. [4]
Where the idea was based on the use of Radio Frequency Identification (RFID)
technology to enter and exit cars where RFID was placed at the entrance gate
and exit gate, where the driver when he enters the receipt of the card to open the
gate to enter and when the exit delivers the card and receive a receipt worth the
amount to open the gate to exit it shown in figure (1-1).
In our project, we also used Radio Frequency Identification (RFID)
technology with Arduino for entry and exit. We also added a Liquid Crystal
Display (LCD) to display the parking capacity. When entering the car, it
increases by one and when the exit is less than one. Also use another Liquid
Crystal Display (LCD) to view the car's place in the parking and use led
everywhere to see this place busy or not. But we could not use the cost at
checkout.
1.3 Scope of report
To find the practical results required, this thesis will focus on the following:
1- The smart parking system consist of Arduino microcontroller, infrared sensors, servo
motor, Sd card reader, Real Time Clock (RTC), Infrared sensors (IR) and LCD display as the
main components. Arduino is use as the main microcontroller for the project. The
microcontroller will be program as a counter use to count the number of cars entering
and exit an indoor parking space. This system uses infrared sensors to detect cars that
enter or leave the parking space. Besides that, there is an automatic gate controlling the
entrance and the exit way by the Arduino microcontroller based on the information from
the sensors.
2- Communication between this stratification is done using the Infrared sensors (IR) to
send data to the main controller to control the data and show the empty places inside the
parking lot so that the drivers know the empty places quickly on the LCD to achieve the
best efficiency and performance of the proposed system.
3- The final implemented system can be used as an initial model (prototype) for future
development and marketing.
Chapter Two
Component of Project
7
2.1 Component of Project
Microcontroller ATmega2560
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limit) 6-20V
Digital I/O Pins 28 (of which 15 provide PWM
output)
The UNO can be powered via the USB connection or with an external
power supply shown in figure (2-2); the board can operate on an external supply
of 6 to 20 volts.
If supplied with less than 7V however, the 5V pin may supply less than five
volts and the board may become unstable. If using more than 12V, the voltage
regulator may overheat and damage the board. The recommended range is 7 to
12 volts. [6]
10
The power pins are as follows:
VIN: The input voltage to the board when it’s using an external power source (as
opposed to 5 volts from the USB connection or other regulated power source).
You can supply voltage through this pin, or, if supplying voltage via the power
jack, access it through this pin.
5V: This pin outputs a regulated 5V from the regulator on the board. The board
can be supplied with power either from the DC power jack (7 - 12V), the USB
connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the
5V or 3.3V pins bypasses the regulator, and can damage your board. We don't
advise it. [5]
3.3V: A 3.3 volt supply generated by the on-board regulator. Maximum current
draw is 50 mA.
GND: Ground pins. All this pins shown in figure (2-3).
Input/output Reference (IOREF): This pin on the board provides the voltage
reference with which the microcontroller operates. A properly configured shield
can read the IOREF pin voltage and select the appropriate power source or
enable voltage translators on the outputs for working with the 5V or 3.3V.
11
Reset: Bring this line low to reset the microcontroller.
Input and Output pins:
Each of the 54 digital pins on the Mega can be used as an input or output,
using pinMode (), digitalWrite (), and digitalRead () functions. They operate at
5 volts. Each pin can provide or receive 20 mA as recommended operating
condition and has an internal pull-up resistor (disconnected by default) of 20-50
k ohm. A maximum of 40mA is the value that must not be exceeded to avoid
permanent damage to the microcontroller.
In addition, some pins have specialized functions:
Serial: 0 (RX) and 1 (TX); Serial 1: 19 (RX) and 18 (TX); Serial 2: 17 (RX) and
16 (TX); Serial 3: 15 (RX) and 14 (TX).
Servo motors have been around for a long time and are utilized in many
applications. They are small in size but pack a big punch and are very energy-
efficient shown in figure (2-6). These features allow them to be used to operate
remote-controlled or radio-controlled toy cars, robots and airplanes. Servo
motors are also used in industrial applications, robotics, in-line manufacturing,
pharmaceutics and food services. [8]
To fully understand how the servo works, we need to take a look under the
hood. Inside there is a pretty simple set-up: a small DC motor, potentiometer, and
a control circuit shown in figure (2-7). The motor is attached by gears to the
control wheel. As the motor rotates, the potentiometer's resistance changes, so
the control circuit can precisely regulate how much movement there is and in
which direction.
When the shaft of the motor is at the desired position, power supplied to the
motor is stopped. If not, the motor is turned in the appropriate direction. The
desired position is sent via electrical pulses through the signal wire. The motor's
speed is proportional to the difference between its actual position and desired
position. So, if the motor is near the desired position, it will turn slowly,
otherwise it will turn fast. This is called proportional control. [7]
This means the motor will only run as hard as necessary to accomplish the
task at hand, a very efficient little guy.
The motor's neutral position is defined as the position where the servo has
the same amount of potential rotation in the both the clockwise or counter-
clockwise direction. The PWM sent to the motor determines position of the
shaft, and based on the duration of the pulse sent via the control wire; the rotor
will turn to the desired position. The servo motor expects to see a pulse every 20
milliseconds (ms) and the length of the pulse will determine how far the motor
turns. For example, a 1.5ms pulse will make the motor turn to the 90° position.
Shorter than 1.5ms moves it in the counter clockwise direction toward the
0° position, and any longer than 1.5ms will turn the servo in a clockwise
direction toward the 180° position shown in figure (2-8).
2.2.3 Radio-frequency identification (RFID)
3.3 v 3.3 volt The Module can use only this amount of
voltage.
RST Reset Will clear the module to initial state
Signaling between the reader and the tag is done in several different
incompatible ways, depending on the frequency band used by the tag.
RFID tags can be passive, active or battery-assisted passive. An active tag
has an on-board battery and periodically transmits its ID signal. A battery-
assisted passive (BAP) has a small battery on board and is activated when in the
presence of an RFID reader. A passive tag is cheaper and smaller because it has
no battery; instead, the tag uses the radio energy transmitted by the reader.
However, to operate a passive tag, it must be illuminated with a power level
roughly a thousand times stronger than for signal transmission. That makes a
difference in interference and in exposure to radiation. [9]
2.2.4 Liquid Crystal Display (LCD)
The process of controlling the display involves putting the data that form
the image of what you want to display into the data registers, then putting
instructions in the instruction register. The Liquid Crystal Library simplifies this
for you so you don't need to know the low-level instructions. [10]
20
2.3 Other Component
The light emitting diode is P-N junction diode, which consists of two leads
and semiconductor light source. When it is activated by applying the suitable
voltages across its leads then it emits the light energy in the form of photons and
the color of this light was determined by the band gap of semiconductor material.
This light energy is produced by the recombination of electrons and electron
holes with in this device and this process is called electroluminescence process.
This process was stated in twentieth century from solid state material when it is
heated at room temperature then it emits the light energy. At the beginning the
infrared light emitting diode was developed and its light intensity was low but it
is still frequently used in variety of consumer electronics circuits such as remote
controls. [9]
One of the light emitting diode with electrical symbol and practical structure
diagram is shown in figure (2-11).
21
2.3.2 Sd card reader
This Micro SD Card is used for transferring data to and from a standard SD card. The pin
out is directly compatible with Arduino and also can be used with other microcontrollers. It
allows us to add mass storage and data logging to our project.
Features
1. Input Voltage: 3.3V/5V
2. With all SD SPI Pins out: MOSI, SCK, MISO and CS, for further connection
3. Through programming, you can read and write to the SD card using your Arduino
4. Make your SD application easier and simpler
5. Communicate with Arduino using SPI interface
6. Push-pop socket with card slightly over the edge of the PCB so it’s easy to insert
and remove
7. 4 mounting holes with 2.2mm diameter
8. Only use 4 I/O pins on the Arduino
9. Size: 42mm x 25mm x 5mm
https://i2.wp.com/randomnerdtutorials.com/wp-
content/uploads/2017/08/DSC01082-Copy.jpg?w=700&ssl=1
2.3.3 Real Time Clock (rtc)
A Real Time Clock (RTC) is basically just like a watch - it runs on a battery and
keeps time for you even when there is a power outage. Using an RTC, you can keep
track of long timelines, even if you reprogram your microcontroller or a power plug.
The real time clock (RTC) is widely used device that provides accurate time and
date for many applications. Many systems such as IBM pc come with RTC chip on
mother board. RTC chip uses an internal battery which keeps time and date even
when the power is off. In some microcontrollers have inbuilt RTC while others
require interfacing.
FEATURES:
Highly Accurate RTC Completely Manages All Timekeeping Functions
3.3V Operation
https://i1.wp.com/randomnerdtutorials.com/wp-content/uploads/2016/09/rtc-front-and-
back-view.png?w=515&ssl=1
2.3.4 Potentiometer
[6] https://www.arduino.cc/en/Main/arduinoBoardMega2560
[8] http://www.jameco.com/jameco/workshop/howitworks/how-servo-
motors-work.html.
[9] https://www.wikipedia.org/
[10] https://www.arduino.cc/en/Tutorial/HelloWorld.
[11]https://www.alibaba.com/product-detail/Intelligent-RFID
smart-automatic-vehicle-access_535257863.html.
46