RTRP Batch 2
RTRP Batch 2
BACHELOR OF TECHNOLOGY
in
ELECTRONICS AND COMMUNICATION ENGINEERING
Submitted by
R. Teena Sree (22R01A0454)
R. Karthik Reddy (22R01A0457)
N. Revathi (22R01A0444)
U. Harshith (22R01A0462)
Mr. D. Rahul, M. S
Assistant Professor
Department of Electronics and Communication Engineering
www.cmrithyderabad.edu.in
2023-24
Smart Parking System Using Arduino [email protected]
Smart Parking System Using Arduino
BACHELOR OF TECHNOLOGY
in
Electronics and Communication Engineering
Submitted by
CERTIFICATE
This is to certify that a Real Time/ Societal Research Project entitled with “Smart
Parking System using Arduino” is being submitted by:
EXTERNAL EXAMINER
ACKNOWLEDGEMENT
N. REVATHI 22R01A0444
U. HARSHITH 22R01A0462
DECLARATION
N. REVATHI 22R01A0444
U. HARSHITH 22R01A0462
INDEX
PAGE
ACKNOWLEDGEMENT 4
DECLARATION 5
ABSTRACT 8
INDEX 6
LISTOFFIGURES 9
LISTOFABBREVATIONS 10
CHAPTER
1. Introduction 11
1.1 Background of study and motivation 11
1.2 Project objective 11
2. Methodology and modeling 12
2.1 Introduction 12
2.5.4 IR sensor 20
2.7 Implementation 23
3. Results 30
3.2 Code 31
4.1 Conclusion 36
5. References 38
ABSTRACT
The smart car parking project aims to provide confusion free and easy parking. This
project helps the drivers of cars to park their vehicles with minimum waste of time with
accurate information of the availability of the space to park. It includes an Arduino Uno as the
microcontroller unit to which the servo motors, LCD display is interfaced. The LCD displays
the availability of the space, the IR sensors keep the check of the number of cars entering and
exiting the parking space. The IR sensors detect the availability of the parking space.
LIST OF FIGURES
FIGURE PAGE
2.1 Block diagram of parking system 8
2.2 Exit part of parking system 10
2.3 Arduino Uno board 11
2.4 16*2 LCD display 14
2.5 Servo motor 16
2.6 IR sensor 17
2.7 Board and connecting wires 19
2.8 Flowchart of parking system 20
2.9 The design of smart parking system using Arduino Uno 21
2.9.1 The code window on Arduino Uno 22
2.9.2 The code 23
2.9.3 The code picture 24
2.9.4 After simulation successfully 25
2.9.5 Running simulation 26
2.9.6 Running simulation 27
3.1 Working model of parking system 29
3.2 Actual working model 30
LIST OF ABBREVATIONS
3 I/O Input/output
5 IR Infrared Sensor
Integrated Development
6 IDE Environment
7 GND Ground
9 IC Integrated circuit
10 PC Personal computer
12 TV Television
INTRODUCTION
Parking is a major problem in our country. Drivers in our country cannot properly
park their vehicle in the parking slot because of improper parking systems. Sometimes
when they do not find any parking space, they park their vehicle in the roadside and as a
result roads become so narrow and occurs traffic jam.[1] Also, sometimes it seems that
people start fighting for parking slot in the parking lot. Because from outside people
cannot understand whether there is any parking space available or not. It also wastes a lot
of time. Till now no smart technology has existed to solve this problem. This project will
change and standardize the parking system for a parking lot. [3]
An automated car parking system is a process through which car parking can be done
more efficiently and easily than the manual method. The system will provide the user with
better services. The system counts the number of cars in the garage and checks if there’s any
vacancy. There’s an entry and exit path. When the vehicle enters, the display shows the
number of cars inside. When any vehicle leaves, the count decreases and is shown on display.
[2] If the garage is full. The display will show a message regarding that. This whole process
includes the use of Arduino, Display and sensor. The sensor detects whether the vehicle is
entering or leaving. The report then showed on display. [5]
2.1 Introduction:
This chapter will cover the detailed explanation of methodology that is being used to
make this project complete and working well. Many methodologies or findings from this field
mainly generated into journal for others to take advantages and improve as upcoming research
on projects. The methodology refers to the overall approach that our project requires. We need
to explain our project briefly, demonstrating that we comprehend the meaning of our
approaches. The methods are the tools of data collection, the procedure of our project. The
procedures or strategies used to find, select, process, and analyze information about a topic are
referred to as methodology. [14]
Shrewd Car Parking System Using Arduino UNO Designing, creating and delivering a
main edge stopping innovation is called Smart stopping.[12] It is a vehicle stopping
framework that helps drivers locate an empty spot. Utilizing the IR sensors in each stopping
space, it identifies the nearness or nonattendance of a vehicle. The brilliant Parking
framework is demonstrated as a correct, strong and cost-effective approach to guarantee that
street clients know precisely where empty car parking spots are. A particular procedure or set
of procedures demonstrating the issue is massive revision of teaching methodology. In a
report or article, the methodology section allows the reader to critically evaluate a study's
overall validity and reliability. So, this methodology chapter explains what we did and how
we did it.
The circuit shown in Fig. 1 an Arduino microcontroller (MCU) requires only 5V. As
Arduino Uno has an inbuilt 5V voltage regulator, a common 5V supply can be used for the
whole system.
The circuit shown in Fig. 1 an Arduino microcontroller (MCU) requires only 5V. As
Arduino Uno has an inbuilt 5V voltage regulator, a common 5V supply can be used for the
whole system.
The brain of the circuit is Arduino Uno MCU board (BOARD1). It is based on Arduino
UNO R3 V1.0 and has 14 digital input/output (I/O) pins, six analogue inputs, servo motor, a
USB connection, IR sensor. It can be programmed using Arduino IDE software IR sensor are
connected to Arduino digital pins 2 and 3 and servo motor are connected to Arduino pins 13,
which are used for serial communication.
The LCD display (LCD) is used to display messages during action. Here, a 16×2
display is used; each character is made of 5×7 dot-matrix. Pins 3, 4, 5 and 6 of the LCD are the
control lines connected to preset (PR1) output, pin 12 (Arduino), GND and pin 11 (Arduino).
Pins 11, 12, 13 and 14 are data pins of the LCD that are connected to pins 7, 6, 5 and 4 of
Arduino, respectively.
1) Entry Part:
The project is a sensor based automatic system. The Entry Part of the project consists
of Arduino UNO microcontroller to which a servo motor, IR sensor, LCD are interfaced. The
servo motor acts as a gate at the entrance, and it opens and closes when the IR sensor detects
the presence of car. The input IR sensors read presence of any car and sends to the controller
Arduino UNO board. While the entry IR sensor detects cars, it opens the door in condition of
having available slot. After entering the car, the gate gets closed with the help of servo motor.
The motor gets instructions from the board. The LCD displays the parking slots which are
empty for car drivers. While A car gets into a slot, the corresponding slot status in the LCD
display shows "Total Slots". At the time of exiting a slot, the status of the slot changed to
"Slots Occupied". When all the slots are booked, the system doesn't allow the fifth car to enter,
and shows "Sorry parking full". The IR sensors detect the presence and absence of cars in
each parking slot.
2) Exit Part
The Exit Part of the project consists of Arduino Uno to which a servo motor, IR
sensor and the object counter are interfaced. The servo motor acts as a gate at the
entrance, and it opens and closes when the IR sensor detects presence of car. When a car
exits from a slot, the exit IR sensor detects the car and opens the gate with the servo
motor. Then the total available free slot count increase by 1 in the screen.
Sure, Arduino is not the only electronic controller in the market, but there are many
micro-controllers available in the market such as Parallax, Basic Stamp and the most powerful
competitor, Raspberry Pi, all with powerful capabilities and the ability to work. Full projects,
of course depending on the needs of your project, but what distinguishes the following
Arduino Open-source platform Open-Source Hardware and Software.[23]
Arduino is made primarily of ATMEGA8 and ATMEGA168 controllers, and all its
designs are licensed under the Creative Commons license. This is the most important feature
for electronic circuit designers because it makes it easier for them to design anything they
want. The software is written in C ++, and is available to everyone to download and
programmers can modify it according to their needs.
It is the most widely used and widely used one of the many Arduinos. It is the first
choice for beginners. It is easy to learn. It operates with an ATmega328 controller. This type
has 14 digital ports (I / O), 6 of which can be used as ports to control the " PWM Outputs ", the
most important feature of this type is that the control chip" ATmega328 "is not fixed in the
board but installed on the holder of the integrated circuit" IC ". This feature makes it the best
option for beginners so that if burned the slide while working on your project by mistake, you
can Restore your work on the board as soon as you change the slide The ATmega328
controller is similar to the same model.
The first-ever type of Arduino's motherboard is the ATmega32u4 controller, which has
a unique feature that contains a built-in USB connection, eliminating the need to use a
secondary processor. The feature allows the panel as soon as it is connected to your device to
appear as a keyboard and mouse, which makes it ideally suited to build various applications
that enable you to control your PC. [23]
Advantages of Arduino:
Simplicity
Arduino's paintings are designed to suit the needs of all engineers, designers,
professors, students, and interactive electronics enthusiasts around the world
The price
The Arduino Plate is less expensive than any competitor of the same type. The most
Self-Assembly
Easy to deal with and easy to connect circuits, as we mentioned in our first article that
it was an easy solution to the problem of microcontrollers and complex connections.
Multi-platform
The Arduino program can work with all the different operating systems of Windows,
Mac and Linux, while most other boards running on Windows only
The term LCD , It is one kind of electronic display module used in an extensive range
of applications like various circuits & devices like mobile phones, calculators, computers,
TV sets, etc. These displays are mainly preferred for multi-segment light emitting diodes and
seven segments. The main benefits of using this module are inexpensive; simply
programmable, animations, and there are no limitations for displaying custom characters,
special and even animations etc.
Pin1 (Ground/Source Pin): This is a GND pin of display, used to connect the GND
terminal of the microcontroller unit or power source.
Pin2 (VCC/Source Pin): This is the voltage supply pin of the display, used to connect
the supply pin of the power source.
Smart Parking System Using Arduino [email protected]
Smart Parking System Using Arduino
Pin3 (V0/VEE/Control Pin): This pin regulates the difference of the display, used to
connect a changeable POT that can supply 0 to 5V.
Pin4 (Register Select/Control Pin): This pin toggles among command or data register,
used to connect a microcontroller unit pin and obtains either 0 or 1(0 = data mode, and
1 = command mode).
Pin5 (Read/Write/Control Pin): This pin toggles the display among the read or writes
operation, and it is connected to a microcontroller unit pin to get either 0 or 1 (0 =
Write Operation, and 1 = Read Operation).
Pin 6 (Enable/Control Pin): This pin should be held high to execute Read/Write
process, and it is connected to the microcontroller unit & constantly held high.
Pins 7-14 (Data Pins): These pins are used to send data to the display. These pins are
connected in two-wire modes like 4-wire mode and 8-wire mode. In 4-wire mode, only
four pins are connected to the microcontroller unit like 0 to 3, whereas in 8-wire mode,
8-pins are connected to microcontroller unit like 0 to 7.
Pin15 (+ve pin of the LED): This pin is connected to +5V.
Pin 16 (-ve pin of the LED): This pin is connected to GND.
The servo engine is a motor that comes with a Gear gearbox and a Shaft transmission
that gives motion greater torque and greater precision. This engine can rotate 180 degrees
and in some types 360 degrees. The servomotor is internally made up of a "mostly
microcontroller" control circuit. When the engine gives pulses at a certain time constant,
the engine rotates to the angle according to that time constant. In the Arduino,
programming environment there is a library called Servo Library installed in the program.
This library gives us the ability to control most of the 180-degree Cervo drives. At the end
of this post, you will have the ability to use the library's commands through practical
examples.[25]
Controlled device
Output sensor
Feedback system
It is a closed-loop system where it uses a positive feedback system to control motion and
the final position of the shaft. Here the device is controlled by a feedback signal generated by
comparing output signal and reference input signal.
Here reference input signal is compared to the reference output signal and the third signal
is produced by the feedback system. And this third signal acts as an input signal to control the
device. This signal is present if the feedback signal is generated or there is a difference
between the reference input signal and reference output signal. So, the main task of servo
mechanism is to maintain the output of a system at the desired value at presence of noises.[25]
2.5.4 IR Sensor:
An infrared (IR) sensor is a type of electrical gadget that detects and measures
infrared radiation in its surroundings. In the year 1800, an astronomer named William
Herchel made an unintentional discovery of infrared radiation. He found that the temperature
just beyond the red light was the highest when measuring the temperature of each hue of
light (separated by a prism). Because the wavelength of IR is longer than that of visible light,
it is invisible to the human eye (though it is still on the same electromagnetic spectrum).
Infrared radiation is emitted by everything that emits heat (anything with a temperature over
roughly five degrees Kelvin).[27]
The IR sensor module includes five essential parts like IR Tx, Rx, and Operational
amplifier. The pin configuration of the IR sensor module is discussed below.
The main specifications and features of the IR sensor module include the following.
Types of IR Sensor
The classification of IR sensors can be done based on the application which includes the
following.
Active IR Sensor
This type of sensor includes both the emitter & the receiver which are also known as
transmitter & receiver. In most situations, a laser diode or LED is used as a source. For non-
imaging infrared sensors, LED is used whereas laser diode is used for imaging infrared
sensors.
The working of an infrared sensor can be done through radiating energy, detected and
received through the detector. Further, it is processed through a signal processor to fetch the
required data. The best examples of active infrared sensors are reflectance & break beam
sensors.[27]
Passive Infrared Sensor (PIR) includes detectors only and this kind of sensor uses
targets like infrared transmitters or sources. Here, the object will radiate energy & detect it
through infrared receivers. After that, a signal processor is used to understand the signal to
obtain the required data. The best examples of PIR sensors are bolometer, Pyro-Electric
Detector, Thermocouple-Thermopile, etc. PIR sensors are available in two types like thermal
IR sensor and quantum IR sensor.[27]
- Board:
- Connecting wires:
The flow chart includes how the system works. The program flow chart is given below:
STOP
2.7 Implementation:
To implement the Smart Parking System, we have used Proteus professional 8.12
simulating software and Arduino IDE. Figure 9 shows the simulation implementation of the
project.
Firstly, A new project created without any firmware in proteus. After creating the blank
new project, there will be a schematic diagram window. In this schematic window, the
simulation circuit is constructed. All of the devices used here, were found under pick device
option. Arduino UNO R3 V1.0 was chosen as microcontroller board for Smart Parking
System. This system works on the basis of some major components such as Arduino UNO R3,
IR-SENSOR, MOTOR-PWMSERVO, LM044L 16x2 Alphanumeric Display had used in this
project.
Figure 2.9: The design of Smart Parking System using Arduino UNO
The display was connected to the board through the expander. So basically, we have
used the LM044L 16x2 Alphanumeric Display to print the slot list, each slot payment status of
the parking lot. For the connection of the Display, we used Remote 8-bit I/O expander to
reduce the connection with the Arduino pin. As it is a simulation-based project, IR sensor use
was not too easy. The logic states are used to show the functionalities of the IR sensors. Every
logic state connected to individual digital I/O pin of the Arduino UNO. The servo motor was
also connected with a digital pin for getting instruction and it get external power to run.
Two IR sensors are set at the gate of the parking spot to detect entry and exit of car.
Each slot also has an IR sensor to identify slot is empty or not. The servo motor rotates 180
degrees to open the gate and 90 degrees to close the gate. After setting up the components as
figure 9, we went to Arduino IDE and installed all the necessary libraries to run the project
successfully. Then the codes/commands were written and uploaded to the Arduino Board.
After uploading finely, the code worked without any errors.
While doing the setup, the project was evaluated to determine if every functionality is
accomplished or not. The code was edited as proposed requirements.
After running the instruction code finely, there will be a file found under IDE's
compiler console and this file location should be copied. In proteus, double click on the
Arduino board and in the program file section, paste the link without any change. Click ok and
run the simulation. The system will run expectedly. All the output was observed while running
the simulation as follows.
RESULTS
It guarantees snappy and computerized parking and simple recovery of vehicles.
Up to 3 cars can be effectively and securely parked in the outlined model.
The surface space required is identical to the parking spot of two cars as it were.
Most reasonable for parking in workplaces, shopping centers and comparable spots.
Low support levels are required by the framework.
Sensors utilized have high affectability and are anything but difficult to deal with.
Minimal effort framework, giving most extreme computerization.
It doesn't require observable pathway operation.
Cordial reorientation of cars for driving in and out.
Security of vehicle.
3.2 CODE:
#include <Servo.h>
#include <Wire.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);
Servo myservo;
#define ir_enter 2
#define ir_back 4
#define ir_car1 5
#define ir_car2 6
#define ir_car3 7
#define ir_car4 8
int S1 = 0, S2 = 0, S3 = 0, S4 = 0;
int flag1 = 0, flag2 = 0;
int slot = 4;
void setup() {
Serial.begin(9600);
pinMode(ir_car1, INPUT);
pinMode(ir_car2, INPUT);
pinMode(ir_car3, INPUT);
pinMode(ir_car4, INPUT);
pinMode(ir_enter, INPUT);
pinMode (ir_back, INPUT);
myservo.attach(3);
myservo.write(90);
lcd.begin(16, 2);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(“ WELCOME ");
lcd.setCursor(0, 1);
lcd.print("----------------");
delay(2000);
lcd. clear();
lcd.setCursor(0, 0);
lcd.print("TITLE : Car");
lcd.setCursor(0, 1);
lcd.print(" Parking System ");
delay(3000);
lcd. clear();
lcd.setCursor(0, 0);
lcd.print("Total Slots = ");
lcd.setCursor(0, 1);
lcd.print(" 4 ");
delay(3000);
lcd.clear();
Read_Sensor();
int total = S1 + S2 + S3 + S4;
int available = slot - total;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Slots Occupied = ");
lcd.setCursor(0, 1);
lcd.print( total );
delay(3000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Available Slots= ");
lcd.setCursor(0, 1);
lcd.print( available );
delay(3000);
}
Smart Parking System Using Arduino [email protected]
Smart Parking System Using Arduino
void loop() {
Read_Sensor();
lcd.setCursor(0, 0);
if (S1 == 1) {
lcd.print("S1:Full ");
} else {
lcd.print("S1:Empty");
}
lcd.setCursor(8, 0);
if (S2 == 1) {
lcd.print("S2:Full ");
} else {
lcd.print("S2:Empty");
}
lcd.setCursor(0, 1);
if (S3 == 1) {
lcd.print("S3:Full ");
} else {
lcd.print("S3:Empty");
}
lcd.setCursor(8, 1);
if (S4 == 1) {
lcd.print("S4:Full ");
} else {
lcd.print("S4:Empty");
}
slot = slot + 1;
}
}
delay(1);
}
void Read_Sensor() {
S1 = 0, S2 = 0, S3 = 0, S4 = 0;
if (digitalRead(ir_car1) == 0) {
S1 = 1;
}
if (digitalRead(ir_car2) == 0) {
S2 = 1;
}
if (digitalRead(ir_car3) == 0) {
S3 = 1;
}
if (digitalRead(ir_car4) == 0) {
S4 = 1;
}
}
Reduced traffic.
Reduced pollution.
Enhanced User Experience.
Integrated Payments.
Increased Safety.
Real-Time Data and Trend Insight.
Decreased Management Costs.
Increased Service and Brand Image.
Security from theft and car damage.
Simple structure, simple operation.
4.1 Conclusion
Our project detects empty slots and helps the drivers to find parking space in
unfamiliar cities. The average waiting time of users for parking their vehicles is effectively
reduced in this system. The optimal solution is provided by the proposed system, where most
of the vehicles find a free parking space successfully.[22] Our preliminary test results show
that the performance of the Arduino UNO based system can effectively satisfy the needs and
requirements of existing car parking hassles thereby minimizing the time consumed to find
vacant parking lot and real time information rendering. This smart parking system provides
better performance, low cost and efficient large scale parking system. It also eliminates
unnecessary travelling of vehicles across the filled parking slots in a city. Smart Parking
solutions are designed to provide drivers with the ultimate solution on their journey from
beginning to end without searching for parking, cost, travel time etc. This advantage comes by
paying marginal fees to the smart parking service providers. To change a culture which has
existed for several centuries is a humongous task. Parking has always been a now affair with
direct cash exchange. The inclusion of technology in this method is a change in culture which
will take time to establish. Smart Parking is one of the most adopted and fastest growing smart
city solutions across the world. Airports, universities, shopping centers and city garages are
just a few entities that have begun to realize the significant benefits of automated parking
technology.[28]
In this study, the various types of smart parking system and has been presented. From
the various examples of the implementation of the smart parking system being presented, its
efficiency in alleviating the traffic problem that arises especially in the city area where traffic
congestion and the insufficient parking spaces are undeniable. It does so by directing patrons
and optimizing the use of parking spaces. With the study on all the sensor technologies used in
detecting vehicles, which are one of the most crucial parts of the smart parking system, the
pros and cons of each sensor technologies can be analyzed.[16] Although, there are certain
disadvantages in the implementation of visual based system in vehicle detection as described
earlier, the advantages far outweigh its disadvantages.
In some of the parking areas are lacking such facilities and hence fail all the security
norms necessary to park a vehicle. Looking at such a huge concern, it is highly required that
each and every parking area should be well equipped with high tech parking control systems,
that nevertheless lasts the best. These innovative parking control systems not only make a
bright choice but also allow you to pay the right price without getting any worry.[12]
Parking control system has been generated in such a way that it is filled with many secure
devices such as barricades, swing gates, slide gates, parking control gates, toll gates, time
and attendance machine, car counting system etc. These features are hereby very necessary
nowadays to secure your car and to evaluate the fee structure for every vehicle’s entry and
exit. Nowadays parking is very important and hence it is necessary for every vehicle owner
to park his or her car in a secure designated parking slot available. To escalate this system
various parking owners have integrated themselves with sophisticated parking control
systems, which are high tech and offers full-fledged parking services.[6]
REFERENCES
[1] Thanh Nam Pham1, Ming-Fong Tsai1, Duc Bing Nguyen1, Chyi-Ren Dow1 and Der-
Jiunn Deng2. “A Cloud- Based Smart-Parking System Based on Internet-of-Things
Technologies”. IEEE Access, volume 3, pp. 1581 – 1591, September 2015.
[2] M. Fengsheng Yang, Android Application Development Revelation, China Machine
Press, 2010.
[3] Yanfeng Geng and Christos G. Cassandras. “A New Smart Parking System Based on
Optimal Resource Allocation and Reservations”. IEEE Transaction on Intelligent
Transportation Systems, volume 14, pp. 1129 -1139, April 2013.
[4] Cui Shiyao, Wu Ming, Liu Chen, Rong Na. “The Research and Implement of the
Intelligent Parking Reservation Management System Based on ZigBee Technology”.
Measuring Technology and Mechatronics Automation (ICMTMA) , pp. 741-744, January
2014.
[6] Z. Ji, I. Ganchev, M. O'Droma, and X. Zhang, ``A cloud-based intelligent car parking
services for smart cities,'' in Proc. 31st URSI General Assembly Sci. Symp. (URSI GASS),
Aug. 2014.
[7] Hamada R.H.AI-Absi Patrick Sebastian,” Vision-Based Automated Parking System ”in
10th International Conference on Information science,2010