You are on page 1of 22

2021

Smart Parking Management System

Section - 4
Group – 4

Dinesh Pabba - 110073924


Upendra Patike - 110073215
Sree Ganesh Kumar Reddy Mattam Pottimgari - 110033029

GENG8030 - Computational Methods and Modeling for Engineering Applications


UNIVERSITY OF WINDSOR | Windsor, Ontario, Canada

iii
TABLE OF CONTENTS

DECLARATION OF ORIGINALITY............................................................................

ABSTRACT.......................................................................................................................

LIST OF FIGURES.........................................................................................................

1 INTRODUCTION...........................................................................................................

2 OBJECTIVE...................................................................................................................

3 COMPONENTS..............................................................................................................

4 FLOWCHART................................................................................................................

5 DESCRIPTION...............................................................................................................

6 CODE...............................................................................................................................

7 WORKING....................................................................................................................

8 ADVANTAGES AND DISADVANTAGES...............................................................

9 CONCLUSION.............................................................................................................

REFERENCES.................................................................................................................

iv
DECLARATION OF ORIGINALITY

We, Sree Ganesh Kumar Reddy Mattam Pottimgari, Dinesh Pabba, and Upendra
Patike hereby confirm that we are the sole authors of the written work here
enclosed and that we have compiled it in our own words. Parts excepted are
remedies of structure and content by the supervisor. Parts excepted are revisions
and content by the supervisor.

v
ABSTRACT

This project focuses on developing a Smart Parking Management System using the
Arduino Uno kit and MATLAB Application Designer. The MATLAB Application
Designer is used to “Smart Parking App” and to program Arduino Uno. The app
consists of different function blocks such as Servo motor angle actuation system,
Buttons, LED output subsystem, Counter function block.

The servo motor arm acts as the barrier arm of the parking lot and is controlled
through switches, a comparator, and a Digital Signal Processing (DSP) counter.
The DSP counter introduces defer the time for servo motor movement. The LED
output subsystem act as the traffic light system and is created utilizing switch
squares, 0 or 1, and is handed-off dependent on the servo motor angle. Counter
system is planned to utilize buttons and MATLAB function block. The number of
available spots is taken care of in a memory unit and will be revived for each
segment on the entry and exit of the vehicle.

The planned framework oversees and monitors the number of vehicles entering
and leaving the parking area. Furthermore, the framework shows the number of
parking spaces previously taken and those accessible at present.

Arduino Uno circuit contains a couple of parts like a button, servo engine, and
three LED. The model created is conveyed on the Arduino Uno circuit board
through Application association in MATLAB. The complete model is executed
with the mix of the Arduino Uno hardware equipment and MATLAB
programming

vi
LIST OF FIGURES

1. Figure 1: Side view of Arduino Uno Wiring Diagram……………………….12

2. Figure 2: Top view of Arduino Uno Wiring Diagram ………………………12

3. Figure 3: Arduino Uno Setup with Smart Parking System App………………13

4. Figure 4: Graphical User Interface of Smart Parking System App……………14

vii
1 INTRODUCTION
Amidst a growth in population and skilled workforce, there is a substantial need for
wealth creation to be managed in sustainable infrastructure. The most common
application for these is in a parking lot.

Nowadays, parking a vehicle has become a terrifying task for every customer. Given
the increase in the number of vehicles on the road, the chances of finding a parking
space are extremely slim. People tend to go out and about a lot on weekends.
However, once they arrive at their destination, they become tired of looking for
parking spots for their vehicles, resulting in a waste of time and fuel.

Research by INRIX observed that the normal American driver spends on average 17
hours a year searching for a parking space. That search costs every driver around $345
in sat around, gas, and discharges. In bigger urban communities, drivers invest more
energy searching for spots. In New York City, drivers go through a normal 107 hours
out of every year searching for stopping, and an expected $2,243 in sat around idly,
gas, and outflows(a). To solve this problem, a unique solution like Smart Parking
Management System is useful which eliminates the need for high manpower and
budget.

2 OBJECTIVE
To develop a smart parking system utilizing the Arduino Uno with a programmed
lifting bar, light markers, and a display to show the number of spots accessible nearby.
This assists drivers with discovering any empty spots accessible in the parking area,
the number of accessible spots and the number of filled spots. This information
appears while entering the parking region. The message is displayed with the
assistance of the MATLAB Application.

3 COMPONENTS

1. Arduino Uno x 1, a microcontroller board that supports both digital and analogous
data inputs and outputs. [1]
2. Servo motor x 1, is an actuator for action and position control that has its
feedback circuit and is very useful for closed-loop control systems. [1]
3. Buttons x 2, for entry and exit.
4. LEDs x 3, Red-Green-Yellow LEDs.
5. Breadboard x 1 for all the electrical connections including all the components and
wires.
6. Jumper wires for connections.

1
4 FLOWCHART

2
5 DESCRIPTION

The Arduino Uno will be attached, and code will be written within the MATLAB
application. The command will primarily aim to make the LED lights blink when enter
and exit buttons are pressed, as well as move the servo motor arm at the same
moment.

When users press the enter key in the app, it will look for available spots in the
parking area. If there are any empty spaces, the servo motor arm will spin from 0 to 90
degrees, causing the traffic light in the app and the corresponding green LED on the
board to begin blinking. The MATLAB Application will then display 'Welcome!!!' to
allow vehicles to enter. After a few seconds, the servo motor arm will return to 0
degrees, indicating that the entrance is closed, and the red LED will glow. If the
parking space is full, the arm will not open. The red LED will remain lit, and the app
will display 'Please Come Back Later.' Correspondingly, pressing the exit button
causes the light to turn green and the servo arm to open, allowing the vehicle/vehicles
to exit. The arm will then close, revealing the red LED.

6 CODE
classdef appx_try < matlab.apps.AppBase

% Properties that correspond to app components


properties (Access = public)
UIFigure matlab.ui.Figure
KnobLabel matlab.ui.control.Label
knob matlab.ui.control.Knob
DateDatePicker matlab.ui.control.DatePicker
DateDatePickerLabel matlab.ui.control.Label
message matlab.ui.control.Label
title matlab.ui.control.Label
enterButton matlab.ui.control.Button
exitButton matlab.ui.control.Button
resetButton matlab.ui.control.Button
image matlab.ui.control.Image
redLampLabel matlab.ui.control.Label
redLamp matlab.ui.control.Lamp
greenLampLabel matlab.ui.control.Label

3
greenLamp matlab.ui.control.Lamp
AvailableSpotsLabel matlab.ui.control.Label
availableSpotCounter matlab.ui.control.NumericEditField
StatisticsSwitch matlab.ui.control.Switch
StatisticsSwitchLabel matlab.ui.control.Label
yellowLampLabel matlab.ui.control.Label
yellowLamp matlab.ui.control.Lamp
Spinner matlab.ui.control.Spinner
end

properties (Access = private)


counter = 14; % Description
arduinoUno;
ser ;
images =
{'p0.jpg','p1.jpg','p2.jpg','p3.jpg','p4.jpg','p5.jpg','p6.jpg','p7.jpg','p8.jpg','p9.jpg','p10.jpg','
p11.jpg','p12.jpg','p13.jpg','p14.jpg'};
end

methods (Access = private)

function knobValueChanged(app, event)


value = app.knob.Value;
end
function knobValueChanging(app, event)
changingValue = event.Value;
end
end
% Callbacks that handle component events
methods (Access = private)

% Code that executes after component creation


function startupFcn(app)
app.arduinoUno = arduino("COM9","Uno");
app.ser= servo(app.arduinoUno,'D9');
end
% Button pushed function: resetButton
function resetButtonPushed(app, event)
app.message.Text = 'WELCOME!';
app.redLamp.Color='red';
app.greenLamp.Color='black';
4
app.yellowLamp.Color='black';
app.availableSpotCounter.Value=14;
app.counter = app.availableSpotCounter.Value; app.image.ImageSource='p0.jpg';
writeDigitalPin(app.arduinoUno,'D4',1);
writeDigitalPin(app.arduinoUno,'D6',0);
writeDigitalPin(app.arduinoUno,'D8',0);
writePosition(app.ser,0);
thingSpeakWrite(1570650,app.counter,'WriteKey','KOC5NZCUWL1YHI6W');
for i=0:1:100
app.knob.Value = i; pause(0.01);
end
for i=100:-1:0
app.knob.Value = i;
pause(0.01);
end
end
% Button pushed function: enterButton
function enterButtonPushed(app, event)

if app.counter>0
app.message.Text = 'Welcome!!!';
app.redLamp.Color='black';
app.greenLamp.Color='black';
writeDigitalPin(app.arduinoUno,'D4',0);
writeDigitalPin(app.arduinoUno,'D6',0);
pause(1);
for i=1:2:100
app.knob.Value = i;
%pause(0.01);
if ((i<25) || (i>50 && i<75))
app.yellowLamp.Color='yellow';
writeDigitalPin(app.arduinoUno,'D8',1);
else
app.yellowLamp.Color='black';
writeDigitalPin(app.arduinoUno,'D8',0);
end
end
app.greenLamp.Color='green';
writeDigitalPin(app.arduinoUno,'D6',1);
writePosition(app.ser,1);
app.counter = app.counter-1;
5
app.availableSpotCounter.Value=app.counter;
thingSpeakWrite(1570650,app.counter,'WriteKey','KOC5NZCUWL1YHI6W');
if app.counter == 0
app.message.Text = 'Please Come Back Later';
end
pause(1);
for i=1:1:4
if mod(i,2)==0
app.image.ImageSource=char(app.images(14-app.counter+1));
else
app.image.ImageSource=char(app.images(14-app.counter));
end
pause(0.5);
end
for i=100:-1:0
app.knob.Value = i;
pause(0.01);
end
writePosition(app.ser,0);
pause(1);
app.redLamp.Color='red';
app.greenLamp.Color='black';
writeDigitalPin(app.arduinoUno,'D4',1);
writeDigitalPin(app.arduinoUno,'D6',0);
elseif app.counter == 0
app.message.Text = 'Please Come Back Later';
end
end

% Button pushed function: exitButton


function exitButtonPushed(app, event)
if app.counter<14
app.message.Text = 'WELCOME!!!';
app.redLamp.Color='black';
app.greenLamp.Color='black';
writeDigitalPin(app.arduinoUno,'D4',0);
writeDigitalPin(app.arduinoUno,'D6',0);
pause(1);
for i=1:1:100
app.knob.Value = i;
6
if ((i<25) || (i>50 && i<75))
app.yellowLamp.Color='yellow';
writeDigitalPin(app.arduinoUno,'D8',1);
else
app.yellowLamp.Color='black';
writeDigitalPin(app.arduinoUno,'D8',0);
end
pause(0.02);
end
app.greenLamp.Color='green';
writeDigitalPin(app.arduinoUno,'D6',1);
writePosition(app.ser,1);
app.counter = app.counter+1;
app.availableSpotCounter.Value=app.counter;
thingSpeakWrite(1570650,app.counter,'WriteKey','KOC5NZCUWL1YHI6W');
pause(1);
for i=1:1:4
if mod(i,2)==0 app.image.ImageSource=char(app.images(14-app.counter+1));
else
app.image.ImageSource=char(app.images(14-app.counter+2));
end
pause(0.5);
end
for i=100:-1:0
app.knob.Value = i;
pause(0.01);
end
writePosition(app.ser,0);
pause(1);
app.redLamp.Color='red';
app.greenLamp.Color='black';
writeDigitalPin(app.arduinoUno,'D4',1);
writeDigitalPin(app.arduinoUno,'D6',0);
end
end

% Value changed function: knob


function knobValueChanged2(app, event)
value = app.knob.Value;
writePosition(app.servo,1);
7
end
end
% Component initialization
methods (Access = private)

% Create UIFigure and components


function createComponents(app)
% Create UIFigure and hide until all components are created
app.UIFigure = uifigure('Visible', 'off');
app.UIFigure.Color = [0.9098 0.898 0.1373];
app.UIFigure.Position = [100 100 640 480];
app.UIFigure.Name = 'MATLAB App';

% Create knob
app.knob = uiknob(app.UIFigure, 'continuous');

app.knob.ValueChangedFcn = createCallbackFcn(app, @knobValueChanged2,


true);
app.knob.Position = [94 34 99 99];

% Create message
app.message = uilabel(app.UIFigure);
app.message.HorizontalAlignment = 'center';
app.message.FontSize = 20;
app.message.Position = [35 352 105 24];
app.message.Text = 'Welcome!!!';

% Create title
app.title = uilabel(app.UIFigure);
app.title.HorizontalAlignment = 'center';
app.title.FontSize = 28;
app.title.FontWeight = 'bold';
app.title.FontColor = [0.1725 0.1804 0.7804];
app.title.Position = [187 403 267 34];
app.title.Text = 'Smart Parking App';

% Create enterButton
app.enterButton = uibutton(app.UIFigure, 'push');
app.enterButton.ButtonPushedFcn = createCallbackFcn(app, @enterButtonPushed,
true);
app.enterButton.BackgroundColor = [0.4078 0.7686 0.8902];
8
app.enterButton.FontSize = 20;
app.enterButton.FontWeight = 'bold';
app.enterButton.Position = [57 250 100 31];
app.enterButton.Text = 'Enter';

% Create exitButton
app.exitButton = uibutton(app.UIFigure, 'push');
app.exitButton.ButtonPushedFcn = createCallbackFcn(app, @exitButtonPushed,
true);
app.exitButton.BackgroundColor = [0.4078 0.7686 0.8902];
app.exitButton.FontSize = 20;
app.exitButton.FontWeight = 'bold';
app.exitButton.Position = [57 185 100 31];
app.exitButton.Text = 'Exit';

% Create resetButton
app.resetButton = uibutton(app.UIFigure, 'push');
app.resetButton.ButtonPushedFcn = createCallbackFcn(app, @resetButtonPushed,
true);
app.resetButton.Position = [461 25 100 22];
app.resetButton.Text = 'RESET';

% Create image
app.image = uiimage(app.UIFigure);
app.image.Position = [249 94 379 290];
app.image.ImageSource = 'p0.jpg';

% Create redLamp
app.redLamp = uilamp(app.UIFigure);
app.redLamp.Position = [195 269 34 34];
app.redLamp.Color = [1 0 0];

% Create greenLamp
app.greenLamp = uilamp(app.UIFigure);
app.greenLamp.Position = [196 182 34 34];

% Create AvailableSpotsLabel
app.AvailableSpotsLabel = uilabel(app.UIFigure);
app.AvailableSpotsLabel.HorizontalAlignment = 'right';
app.AvailableSpotsLabel.Position = [28 308 86 22];
app.AvailableSpotsLabel.Text = 'Available Spots:';
9
% Create availableSpotCounter
app.availableSpotCounter = uieditfield(app.UIFigure, 'numeric');
app.availableSpotCounter.Position = [139 308 54 22];
% % Create yellowLampLabel
% app.yellowLampLabel = uilabel(app.UIFigure);
% app.yellowLampLabel.HorizontalAlignment = 'right';
% app.yellowLampLabel.Position = [201 250 39 22];
% app.yellowLampLabel.Text = 'yellow';

% Create StatisticsSwitchLabel
app.StatisticsSwitchLabel = uilabel(app.UIFigure);
app.StatisticsSwitchLabel.HorizontalAlignment = 'center';
app.StatisticsSwitchLabel.FontSize = 20;
app.StatisticsSwitchLabel.Position = [306 21 86 24];
app.StatisticsSwitchLabel.Text = 'Statistics';

% Create StatisticsSwitch
app.StatisticsSwitch = uiswitch(app.UIFigure, 'slider');
app.StatisticsSwitch.Position = [325 60 45 20];
% Create yellowLamp
app.yellowLamp = uilamp(app.UIFigure);
app.yellowLamp.Position = [196 226 34 34];
app.yellowLamp.Color = [1 1 0];

% Create DateDatePickerLabel
app.DateDatePickerLabel = uilabel(app.UIFigure);
app.DateDatePickerLabel.HorizontalAlignment = 'right';
app.DateDatePickerLabel.Position = [460 56 31 22];
app.DateDatePickerLabel.Text = 'Date';

% Create DateDatePicker
app.DateDatePicker = uidatepicker(app.UIFigure);
app.DateDatePicker.Position = [506 56 102 22];
app.DateDatePicker.Value = datetime([2021 11 15]);

% Show the figure after all components are created


app.UIFigure.Visible = 'on';
10
end
end
% App creation and deletion
methods (Access = public)

% Construct app
function app = appx_try
% Create UIFigure and components
createComponents(app)
% Register the app with App Designer
registerApp(app, app.UIFigure)
% Execute the startup function
runStartupFcn(app, @startupFcn)
if nargout == 0
clear app
end
end

% Code that executes before app deletion


function delete(app)
% Delete UIFigure when app is deleted
delete(app.UIFigure)
end
end
end

7 WORKING
The smart parking system's fundamental circuit diagram is shown in Figure 1 and Figure
2. The Arduino Uno board is powered by a computer's USB port. Power supply, analogue
and digital signal inputs and outputs are all located on the board. The servo motor and
LEDs are connected by the breadboard, which is connected to the Arduino Uno board.

A0, A1, and A2 are the analogous signal ports on the Uno board, respectively. The digital
component, on the other hand, is numbered 0,1,2,3 accordingly. The circuit connections
are made as needed, and the connection commands are entered into the MATLAB
programme so that the microcontroller in the Arduino board can recognize them. Figure 3
depicts the actual configuration of the parking system application.

11
Figure 1: Side view of Arduino Uno Wiring Diagram

Figure 2: Top view of Arduino Uno Wiring Diagram

The fundamental theme of this project is to compute the available open parking spots for
vehicles, while with an Arduino board, LED lights and servo motor’s arm are used to
control the vehicles' passage and exit.

12
The MATLAB Application in Figure 3 generates the code required for the project [2]. A
button at the door section detects the appearance of a vehicle and, as a result, activates a
servo motor, which then opens the way and allows the vehicle access. The MATLAB
programme then increases or decreases the number of parking spaces in the app by one
unit respectively for an entry or exit of a vehicle. LEDs are used in the circuit to provide
a signal to vehicles for passage and exit.

Figure 3: Arduino Uno Setup with Smart Parking System App

Shopping malls, government agencies, educational institutions, and other organizations


can all benefit from this smart parking system model. It is possible to optimize time,
resources, and manpower. It dramatically lowers management costs.

13
Figure 4: Graphical User Interface of Smart Parking System App

However, because it has moving parts and requires a steady power source, thorough
maintenance must be performed on the system regularly to ensure its smooth operation
[2].

8 ADVANTAGES AND DISADVANTAGES

 Minimal Infrastructure - Users find the best available spot, saving time, resources,
and effort. The parking lot fills up quickly, and commercial and corporate entities can
make clever use of the available space. More automation and less manual action save
money on work costs and asset depletion.
 Lowered traffic - As fewer cars are required to drive around; traffic flow improves
looking for a free parking spot.
 Less room for errors -The execution of such a PC-controlled framework will
significantly decrease human blunders.
 Truly little pollution - Finding parking consumes approximately one million barrels
of oil every day. An effective parking solution will save you a lot of time on the road,

14
reducing the number of additional vehicle emissions and, as a result, lowering the
global environmental impact
 Improved Online Experience - A smart parking solution will integrate the entire
parking system transforming the user experience into a unified action Fee to the
driver, identification at the location, search and time notifications are all fully
integrated into the arrival procedure at the destination which can be extremely
beneficial to lot owners in terms of how to make changes enhancements for drivers.
 Enhanced Security - Parking lot staff and security guards have access to real-time lot
data, which may assist them to avoid parking complaints and unusual activity.
Detection and tracking cameras can collect useful information. Reduced spot-
searching traffic on the streets may also help to lessen accidents caused by the
distraction of looking for a parking place.
 Statistical data and trend guidance - Over time, a smart parking system may provide
data that reveals user and lot correlations and patterns.
 A drawback is witnessed in the reduction of personnel, which results in fewer entry-
level jobs.
9 CONCLUSION

The smart parking system is an automated electro-mechanical system that monitors and
keeps updated information in the ThingSpeak cloud platform and assists the users on
available parking spots in the parking lot. Important measures will be taken to guarantee
that the Smart Parking Management System is working appropriately to meet most of the
objectives. It is, without a doubt, a strong and stable framework that addresses the
parking problem.

15
REFERENCES

[1] Krishna Chaitanya, V. et al. 2021, Smart Parking Management System, IOP
conference series, Earth and environmental science, viewed 25 November 2021,
<https://iopscience.iop.org/article/10.1088/1755-1315/796/1/012014>.

[2] Lin, Trista, Hervé Rivano, and Frédéric Le Mouël 2017, A survey of smart parking
solutions, IEEE Transactions on Intelligent Transportation Systems 18.12 (2017): 3229-
3253, viewed 25 November 2021, <https://ieeexplore.ieee.org/document/7895130>.

[3] M. Manville and D. Shoup, 2005, “Parking, people, and cities,” J. of Urban Planning
and Development, vol. 131, no. 4, pp. 233–245, viewed 25 November 2021,

[4] M. Chester, A. Fraser, J. Matute, C. Flower, and R. Pendyala, “Parking infrastructure:


A constraint on or opportunity for urban redevelopment?” J. of the American Planning
Association, vol. 81, no. 4, pp. 268–286, 2015

[4] Alaba, Fadele Ayotunde, et al. "Internet of Things security: A survey." Journal of
Network and Computer Applications 88 (2017): 10-28.

[2] Parking Logix 2019, Is the Search for Parking Making Your Roads Congested?
Parking Logix, viewed 25 November 2021, <https://parkinglogix.com/search-for-
parking-roads-congested/>.

16

You might also like