Professional Documents
Culture Documents
Lately, the conception of smart cities have acquired huge popularity. Thanks to
the evaluation of the internet of things, the hypothesis of smart cities now seems to be
reachable. Unchanging endeavours are being made in the field of IOT in order to
maximize the efficiency and accuracy of urban infrastructure.Problems such as, traffic
overcrowding, limited car parking facilities and road safety are being addressed by IOT.
The proposed Smart parking system consists of an on-site deployment of an IOT
module that is used to monitor the state of availability of parking space. A mobile
application is also provided that allows an end user to check the availability of parking
slots accordingly. In a few years, the craze towards smart parking increases. This
system has already been employed and implemented in different foriegn developing
countries which made their lives more organized. We can say that vehicle parking is
one of the most time taking processes in our country. So, it would be better to
implement this idea which can save more time and reduce sound pollution. Many
corporate companies have already proposed the concept of smart parking system as
included in smart cities developing project. Our government has recently introduced the
planning of modifying the small towns and urban areas into Smart cities. Most of the
work has already started in order to introduce smart cities to this modern era. The
proposal of a smart parking system has also included in that plan of course it is one of
the important systems. As the traffic system plays a vital role in our daily activities, the
development of it is also very essential. This can also be used to increase the income of
the government by providing some additional features to our proposal. The additional
features mentioned here is parking slot booking facility and implementing charges with
respect to the time of parking. Nowadays most people have some knowledge about the
internet and almost every person has their own smartphone. So, there are many
chances that our proposal will succeed. The most important consideration is online
booking and checking anything online has become the habit for most of the people. So,
our proposal that is Smart Parking System doesn’t cause any problem to the end users.
This paper gives brief knowledge about the advantages, development process and the
intention to propose the project. So, it would clear the doubts regarding the Smart
parking system.
1
UNIT-1
INTRODUCTION
1.1 Introduction
2
find free parking space location exactly. The main drawback of parking system detection
systems are low accuracy, light and weather conditions. In this work, a methodology to
implement mobile application to find parking space use IR sensors to find vacant slots.
Availability of a free slot is transmitted using NodeMCU to the server and
retrieved through adafruit. The owner of the parking slot can get analytics of the number
of free and available slots for a given period. It provides a comprehensive parking
solution both of user and owner.
Smart parking is a parking solution that can include in ground smart parking
sensors, cameras or counting sensors. These devices are usually embedded into
parking spots or positioned next to them to detect whether parking bays are free or
occupied. This happens through real-time data collection. Searching for a parking spot
has become a daily routine for a lot of people all over the world. It is usually a time
consuming and frustrating process that a lot of citizens have to go through. Next to
parking being such a daily pain, it also has a big impact on the pollution of the planet.
Inorder to overcome this type of problems and to develop the living style we have
introduced a smart parking system in which you can able to check parking slot
availability in your mobile. This can help to save your time. Smart parking and its smart
parking sensors can be seen as a part of smart cities. These smart cities are cities that
are driven by an IT infrastructure and by using this infrastructure, cities can enhance the
quality of life and improve economic developments for its inhabitants. Becoming a smart
city can be a good way to collect historical data in a relatively easy way. By collecting
this data, cities can analyze how processes like parking can be optimized. Recently, we
can see that some of the shopping malls are providing parking slots to individuals but
that is a manual process and does not provide the parking slot availability status in any
kind of internet platforms. So the project proposes some modifications to the present
existing parking system that is nothing but placing sensors at every existing parking slot.
So that by connecting the sensors to the iot platform the end users will be able to see
the parking slot availability status through an app or website. It is a simple but crucial
development which is an essential need to the era having at least one vehicle for each
family.
Fishing for a parking space is a routine activity and it is estimated that nearly 30%
of urban congestion is created by drivers cruising for parking space, according to ITS
America’s market analysis, also resulting in oil wastage, almost one million barrels of
world’s oil everyday. This ever growing traffic congestion and uncertainty in the parking
availability enforced the need for a smart parking system. A Smart parking technology
that will help optimize parking space usage, improve the efficiency of the parking
operations and help smoother traffic flow.
3
1.3 Block Diagram:
In this Smart parking system using IOT, we are using five IR sensors and two
servo motors are connected to node MCU. Node MCU controls the complete Process
and sends the parking availability and parking time information to Adafruit IO so that it
can be monitored from anywhere in the world using this platform. Two IR sensors are
used at entry so that it can detect the cars at entry and exit gate and automatically open
and close the gate.
4
Two Servo motors are used as entry and exit gate, so whenever the IR sensor
detects a car, the servo motor automatically rotates, and after delay it returns to initial
position. Another three IR sensors are used to detect if the parking slot is available or
occupied and the data to node MCU. Adafruit IO dashboard also has two buttons to
operate the entry and exit gate.
For this project we created a total nine feeds for exit gate, entry gate, slot1 exit
and entry, slot2 exit and entry and slot3 exit and entry. To run the code, we need to
install required libraries and have to set the tool settings. For a successful compilation
all needed are syntaxes, libraries and board using.
To get started with Adafruit, you need to create an account in Adafruit IO and
this is absolutely free. You need to know your API key and username to connect
Adafruit server to your project, for that you have to select IO and you can be able to see
your API key and the username. After including those credentials into your code with
correct syntax, you need to create a dashboard to your project in Adafruit and have to
feed your inputs.
5
API key in Adafruit IO
6
1.4 Components and materials used in smart parking system
The following are the components used for smart parking system:
1.4.1 Node MCU:
Node MCU is an open source firmware for which open source prototyping
board designs are available. The name Node MCU combines node and MCU (
MicroController Unit). The term “ NodeMCU” strictly speaking refers to firmware rather
than the associated development kits. Both the firmware and prototyping board designs
are open source. The firmware uses the Lua scripting language. The firmware is based
on eLua project, and built on the Espressif Non-OS SDK for ESP8266. It uses many
open source projects, such as lua-cjson and SPIFFS. Due to resource constraints,
users need to select the modules relevant for their project and build a firmware tailored
to their needs. Support for the 32-bit ESP32 has also been implemented. The
prototyping hardware typically used in a circuit board functioning as a dual in line
package which integrates a USB controller with a smaller surface mounted board
containing the MCU and antenna. The choice of the DIP format allows for easy
prototyping on breadboards. The design was initially based on the ESP-12 module of
the ESP8266, which is a Wifi soC integrated with tensilica xtensa LX106 core, widely
used in IOT applications.
7
Pin Diagram for NodeMCU
8
1.4.2 IR sensor:
Picture of IR sensor
9
1.4.3 Servo motor:
A servo motor is a rotary actuator or linear actuator that allows for precise
control of angular or linear position, velocity and acceleration. It consists of a suitable
motor coupled to a sensor for position feedback. It also requires a relatively
sophisticated controller, often a dedicated module designed specifically for use with
servomotors. Servo motors are used in applications such as robotics, CNC machinery
or automated manufacturing. Servo motors are not a specified class of motor, although
the term servomotor is often used to refer to a motor suitable for use in a closed-loop
control system. Servo motors are used in applications such as robotics, CNC machinery
or automated Manufacturing.
10
1.4.4 Male to Female jumper wires:
These are jumper wires male to female used in connecting female header pins
of any development board to other development boards having male connectors.
These are jumper wires male to male used in connecting the female header pin
of any development board to other development boards or breadboards. Also you can
combine it with female jumper wire to create male to female jumper wire.
11
1.4.6 PCB:
12
1.4.7 Female berg Strips:
The female berg strips are commonly used as low cost connectors for custom
made cables or perforated prototyping PCBs. The standard spacing is the same as on
most solderless breadboards.
Male berg pin is a type of electrical connector consisting of rows of the male
connector. The pins are inserted to PCB or other board to prevent damage of wires and
cables which cannot directly soldered on PCB
13
1.4.9 NodeMCU cable:
One meter long USB cable. It has the regular sized A plug on one end and a
micro plug on the other. Ideal for new Arduino Uno boards, charging almost every new
mobile phone except those from Apple and more. It has the full five-wire configuration in
a neat flat cable style. Either for data transmission or phone charging, this 1M noodle
flat wire data line V8 micro USB to USB charging cable for android phone will bring you
much convenience and help in daily life. Adopting high quality material with fine
workmanship, this data cable is durable in use.
14
1.5. Softwares used in Smart Parking system
1. Arduino IDE
2. Adafruit IO
1.5.1 Arduino IDE:
15
1.5.1.1 Steps to install Arduino IDE
1. Go to Arduino.cc website
16
3. Begin the Download
After clicking on the download link you will be redirected to the donation page
here you can donate or skip it if you like by clicking on just download link
17
Open the downloaded file
A new window will open asking you to agree to the license agreement.
Now you will see all available options to install the software with.
If you do not know what you need, it is the best to keep everything checked as you can
change it later when the installation has finished.
18
6. Choose the installation path
Now you have to choose the path the software will be installed in.
It is fine to leave it as the configured location but if you want the arduino IDE
somewhere else you can change that here.
19
Wait until the installation is finished, it should not take very long.
When the installation is finished you may click on close to end the setup wizard.
To launch the IDE you can click on the desktop icon that was created for you or by
searching for it in the start menu.
20
1.5.2 Adafruit:
21
UNIT-2
EXISTING SYSTEM
India is facing a new problem nowadays – lack of sufficient parking space. With
families getting smaller and the total number of motor vehicles exceeding the total
number of heads per family, the parking scenario is woefully falling short of the current
requirements in the country. The situation is such that on any given working day
approximately 40% of the roads in urban India are taken up for just parking the cars.
The problem has been further exacerbated by the fact that nowadays even people from
low income groups are able to own cars. The number of families with cars has become
much more than what the country is able to manage. As it is, the cities in India are
highly congested and on top of that the parked cars claim a lot of space that could
otherwise be used in a better way. Thanks to poor, and at times zero, navigability, Indian
cities are regarded as some of the worst options for living. The existing parking system
in India has parking slots with lack of navigation facilities and online checking of parking
slot availability status. That means parking slots refer to the existing system is a space
useful to park a vehicle without having no knowledge of having a vacancy slot to park
the vehicle before reaching the parking slot which can cause disturbance to the public,
increase pollution and wastage of fuel. This can cause wastage of time and affects the
mood of the driver. In some cases, Such as the parking areas having less wide roads
leads to heavy traffic which may affect the schedule plan of many people. The horn
sound causes much disturbance to the people living in nearby areas.
22
UNIT-3
PROPOSING SYSTEM
23
we have chosen Adafruit is that it is absolutely free of cost and technically has high
features when compared to other platforms. It can be used to monitor the data from
anywhere in this world and it does not have any extra charges for using particular
function. Actually it suits best to implement this project. Creating an account in adafruit
is much easier, all you need is an email ID. It is fully secured and can be used for low
and medium project proposals. It does not need an expert to change modifications and
give instructions that means the operation is a very easy task and can be finished in
less time when compared to other platforms. We have to accept that coding is
somewhat difficult than some other applications but it gives the best results and the user
can experience the professional feel and smooth touch. Coming to our project, we can
be able to monitor the detailed report about the parking status along with date and time
much easier. We are also able to control some of the features through Adafruit.
24
3.1 Advantages of smart parking system
● Less pollution:
Because smart parking sensors transmit live data, drivers will have a real time
overview of the occupancy of parking bays. This means that free spots can be
filled quicker, which will reduce the time that a parking spot is empty.
● Safety:
The use of Smart Parking sensors can optimize safety within cities. As a result
of placing, for instance, on ground sensors on parking bays, people will not be as
stressed as when they are looking for parking spaces. Because these people will
know where they are going, they can simply navigate to their parking spot and
they will not have to stress out about it.
Parking space will become intelligent by use of smart parking sensors on the
parking bays that you’re able to see historical data which is stored.
25
3.2 Application:
Here we have used the Adafruit website to monitor the status of parking slot
availability with data storage facilities. If we modify the privacy settings an end user can
be able to view the parking slot availability status.
1. To use Adafruit IO, first you have to create an account on Adafruit IO. To do this,
go to the Adafruit IO website and click on ‘ Get started for free’ on the top right of
the screen.
2. After finishing the account creation process, log in to your account and click on
‘AIO’ key on the top right corner to get your account username and AIO key.
When you click on AIO key, a window will pop up with your Adafruit IO AIO key
and Username. Copy this key and username, it will be needed later in this code.
26
3. Now, after this, you need to create a feed, click on ‘feed’. Then click on actions,
and then on ‘Create a new feed’ as shown in the image below.
4. After this, a new window will open to enter the name and description of the feed.
The writing description is optional.
27
5. Click on ‘create’, after this, you will be redirected to your newly created feed.
After creating feeds, now create an Adafruit IO dashboard to show all of these
feeds on a single page. To create a dashboard, Click on dashboard option and
then click on action, and after this, click on ‘Create a new dashboard’.
In the next window, enter the name for your dashboard and click on ‘create’.
6. As the dashboard is created now, we will add our feeds to the dashboard. To add
a feed, click on the ‘+’ in the top right corner.
28
To add a button on the dashboard click on the desired block.
29
UNIT-4
PROGRAM AND CODE
30
Now go to Tools>Boards>Boards Manager.
31
In Boards Manager windows, Type esp in the search box, esp8266 will be listed there
below. Now select the latest version of the board and click on install.
32
4.2 Code:
#include <ESP8266WiFi.h>
#include <Servo.h>
#include <NTPClient.h>
#include <WiFiUdp.h>
#include <NTPClient.h>;
#include <WiFiUdp.h>
#include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"
const char *ssid = "Willett"; // Enter your WiFi Name
const char *pass = "02011976"; // Enter your WiFi Password
33
boolean s1_occupied = false;
boolean s2_occupied = false;
boolean s3_occupied = false;
WiFiClient client;
Adafruit_MQTT_Client mqtt(&client, MQTT_SERV, MQTT_PORT, MQTT_NAME,
MQTT_PASS);
void setup() {
delay(1000);
Serial.begin (9600);
mqtt.subscribe(&EntryGate);
mqtt.subscribe(&ExitGate);
timeClient.begin();
myservo.attach(D4); // servo pin to D6
myservos.attach(D5); // servo pin to D5
34
pinMode(carExited, INPUT); // ir as input
pinMode(carEnter, INPUT); // ir as input
pinMode(slot1, INPUT);
pinMode(slot2, INPUT);
pinMode(slot3, INPUT);
WiFi.begin(ssid, pass); //try to connect with wifi
Serial.print("Connecting to ");
Serial.print(ssid); // display ssid
while (WiFi.status() != WL_CONNECTED) {
Serial.print("."); // if not connected print this
delay(500);
}
Serial.println();
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP Address is : ");
Serial.println(WiFi.localIP()); //print local IP address
}
void loop() {
MQTT_connect();
timeClient.update();
hh = timeClient.getHours();
mm = timeClient.getMinutes();
ss = timeClient.getSeconds();
h= String(hh);
m= String(mm);
h +" :" + m;
entrysensor= !digitalRead(carEnter);
exitsensor = !digitalRead(carExited);
s1 = digitalRead(slot1);
s2 = digitalRead(slot2);
s3 = digitalRead(slot3);
35
if (entrysensor == 1) { // if high then count and send data
count= count+1; //increment count
myservos.write(OPEN_ANGLE);
delay(3000);
myservos.write(CLOSE_ANGLE);
}
s1_occupied = true;
if (! EntrySlot1.publish((char*) EntryTimeSlot1.c_str())){}
}
if(s1 == 0 && s1_occupied == true) {
Serial.println("Available1 ");
ExitTimeSlot1 = h +" :" + m;
//Serial.print("ExitTimeSlot1");
//Serial.print(ExitTimeSlot1);
s1_occupied = false;
if (! ExitSlot1.publish((char*) ExitTimeSlot1.c_str())){}
}
if (s2 == 1&& s2_occupied == false) {
Serial.println("Occupied2 ");
EntryTimeSlot2 = h +" :" + m;
//Serial.print("EntryTimeSlot2");
//Serial.print(EntryTimeSlot2);
s2_occupied = true;
36
if (! EntrySlot2.publish((char*) EntryTimeSlot2.c_str())){}
}
if(s2 == 0 && s2_occupied == true) {
Serial.println("Available2 ");
ExitTimeSlot2 = h +" :" + m;
//Serial.print("ExitTimeSlot2");
//Serial.print(ExitTimeSlot2);
s2_occupied = false;
if (! ExitSlot2.publish((char*) ExitTimeSlot2.c_str())){}
}
if (s3 == 1&& s3_occupied == false) {
Serial.println("Occupied3 ");
EntryTimeSlot3 = h +" :" + m;
//Serial.print("EntryTimeSlot3: ");
//Serial.print(EntryTimeSlot3);
s3_occupied = true;
if (! EntrySlot3.publish((char*) EntryTimeSlot3.c_str())){}
}
if(s3 == 0 && s3_occupied == true) {
Serial.println("Available3 ");
ExitTimeSlot3 = h +" :" + m;
//Serial.print("ExitTimeSlot3: ");
//Serial.print(ExitTimeSlot3);
s3_occupied = false;
if (! ExitSlot3.publish((char*) ExitTimeSlot3.c_str())){ }
}
Adafruit_MQTT_Subscribe * subscription;
while ((subscription = mqtt.readSubscription(5000)))
{
if (subscription == &EntryGate)
{
//Print the new value to the serial monitor
Serial.println((char*) EntryGate.lastread);
37
if (!strcmp((char*) EntryGate.lastread, "ON"))
{
myservos.write(OPEN_ANGLE);
delay(3000);
myservos.write(CLOSE_ANGLE);
}
}
if (subscription == &ExitGate)
{
//Print the new value to the serial monitor
Serial.println((char*) EntryGate.lastread);
uint8_t retries = 3;
while ((ret = mqtt.connect()) != 0) // connect will return 0 for connected
{
mqtt.disconnect();
delay(5000); // wait 5 seconds
38
retries--;
if (retries == 0)
{
// basically die and wait for WDT to reset me
while (1);
}
}
}
39
UNIT-5
RESULT
In this study, the implementation of smart parking system has been presented.
Its efficiency in alleviating the traffic problem that arises especially in the city area where
traffic congestion and insufficient parking spaces are undeniable, It does so by directing
patrons and optimizing the use of parking spaces. With the study of IR sensor
technology used in detecting vehicles, which is one of the crucial parts of a smart
parking system. Although there are certain disadvantages in the implementation of
smart parking systems, the advantages overweighs its disadvantages.
● The system benefits of smart parking go well beyond avoiding time wasting.
● Developing smart parking solutions within a city solves the vandalism and
pollution problem.
● Fuel saving (According to a report, smart parking can result in 220,000 gallons of
fuel saving till 2030 and approx 300,000 gallons of fuels saved by 2050.)
● More automation and less manual activity saves on labor cost and resource
exhaustion
● Drivers are less distracted looking around for a spot because they know where
they can park their car. They will have full attention on the road. By having the
attention on the road, the chances of occurrence of accidents are very low.
● It reduces the traffic congestion on roads so that there will be more benefits.
40
41
UNIT-6
REFERENCES
https://www.researchgate.net/publication/303842610_IoT_based_Smart_Parking_Syste
m
https://en.wikipedia.org/wiki/NodeMCU
https://en.wikipedia.org/wiki/Arduino#:~:text=The%20Arduino%20integrated%20develop
ment%20environment%20%28IDE%29%20is%20a,the%20IDE%20for%20the%20lang
uages%20Processing%20and%20Wiring.
https://io.adafruit.com/
http://www.arduino.cc/
https://github.com/arduino-libraries/NTPClient
https://github.com/adafruit/Adafruit_MQTT_Library
https://arduino.esp8266.com/stable/package_esp8266com_index.json
42