Keywords

1 Introduction

A smart city aims to improve quality of life for its citizen by harnessing technology to connect infrastructure, resources, and services, making the municipality safer and more sustainable, liveable, workable, and competitive. Smart cities should be able to monitor and automate operations and applications in utilities, buildings, and infrastructure in real time. To meet these challenges, smart cities require a range of communication networks. With a growing number of vehicles on the roads and poor roadway systems, traffic congestion and not being able to find a parking spot have become major issues. Parking in an urban environment is becoming difficult at times, constant circling round the block looking for a parking place. Drivers spend lot of time looking for parking ads in wasted time, fuel, and CO emission. Smart parking management system can find the vacant parking slot for a vehicle at different public places. Wireless sensors are embedded into parking slots transmitting data on the timing and duration of the free space via local signal processors to a central parking management. Smart parking reduces congestion, decreases vehicle emissions, lower enforcement costs, and reduces driver stress.

To improve and better govern parking systems, many automated models/systems have been developed for speed, convenience, and better efficiency for parking. These systems have evolved with time from being offline systems with screens displaying free parking slots to use SMS systems for reserving a slot and RFIDs for entry/exit. The current systems, however, have started using Websites, android applications, IoT, artificial intelligence, and machine learning for creating a better performance for parking systems and making them smart in general. While these smart parking models have many basic things in common as mentioned above, the difference lies in ideation and application of these algorithms and the efficiency of resources used.

In the past decade, many papers have improved and built upon earlier ideas for a faster and convenient way to build parking systems, but the chaos, confusion and frustration because of unorganized parking in areas with high vehicle density have been left unaddressed. This is where this paper comes into play by providing an efficient solution for not only faster and convenient parking and payments systems but also for organized and stress-free parking which can be made more and more cost-effective over time. Figure 1 shows the sequential steps in which this model works, and Fig. 2 depicts the prototype of this model with lesser parking slots.

Fig. 1
figure 1

Flowchart of smart parking system

Fig. 2
figure 2

Prototype model of smart parking system with two slots

2 Related Work

Starting from the paper by Srikanth et al. in 2009 [1] proposes the use of LCD screens to display the number of parking slots available in an area of a parking lot and other relevant information, we can see that the information is limited to that very parking lot. The solution proposed by Wei et al. in 2012 [2] used RFID-based cards that were given to the users, and accordingly, a Website is maintained for a record of free slots available. This approach is time consuming and does not focus on organized parking unlike our approach which focuses on organized parking and involves simply providing an OTP while exiting the parking lot. Orrie et al. [3] proposed an android application-based approach in 2015 similar to ours, but it still failed to include the concept of organized parking in the provided space to avoid congestions. Their payment system also includes RFID system, whereas OTP-based systems are a better approach. The proposal of Aydin et al. in 2017 [4] makes use of a magnetic sensor to find out whether there is a car parked or not; organized parking was not taken into consideration. Rizvi Syed et al. [5] have proposed a method which they call ASPIRE. It uses IoT, and in this method significant consideration is given to the driver’s parking preferences such as type of parking sought, the maximum price that the parker is willing to pay, and the maximum time to walk from parking space to the destination that the driver can tolerate. In today’s world what most of the people need is “on the go” parking facilities that are quick and easy to use, and the method proposed in [5] is not suitable to be implemented in many places which requires quick, time-saving solutions. Lin et al. [6] used AI and ML in the smart parking scenario which can be included in our current project for predicting traffic congestion and user behaviour. Athira et al. [7] proposed the use of machine learning to find out free parking slots using CCTV camera footage, but alignment of the camera and accuracy of their algorithm have to be perfect for this method to work; this method cannot be implemented everywhere, and the cost of the cameras exceeds the low-cost sensors that we are using by a great margin. Promy and Islam [8] proposed a manual system of marking a parking slot empty by the user when he/she leaves it and displays it to everyone using an android app. This also allows one user to call another; this approach is a little inconvenient and time consuming. An automated sensor-based approach is more feasible, cost-effective, and convenient. All the papers on this topic in the past show a trend that leads to automation and indicate towards proving that smart parking systems can be made better by the inclusion of AI and ML in the near future.

3 Methodology

3.1 Nodes and Cloud

One of the crucial steps in this project is to establish communication between the microcontroller (NodeMCU) and the database (Firebase) which is done by the command:

  • Firebase.begin (FIREBASE_HOST, FIREBASE_AUTH);

In our proposed model, two slots are being operated from one microcontroller (Fig. 2). The data from different sensors (ultrasonic and LDR modules) is received and processed by the microcontroller. Based on the data received and the conditions that are defined for the intended working of the model in the microcontroller, a state for the operated slot is selected. If Laser-LDR pairs of slot 1 turn “LOW” and slot 1 ultrasonic sensor turns a distance below the threshold set for the ground clearance level of the vehicles targeted, then a state of “Occupied” is set for slot 1 in the database. If Laser-LDR pairs turn “LOW” and ultrasonic sensor turns a distance more than the threshold, then a state of “Free” is set for slot 1. Lastly, if Laser-LDR pairs turn “HIGH”, a state of “Tripped” is set for slot 1. The above method follows for slot 2 as well. The states set for slot 1 and slot 2 are now updated on database by using the command:

  • Firebase.set (firebaseData, “slot1”, slot1);

3.2 Cloud and Android Application

First step of using the application involves signing in, which generates a unique UID in the authentication database corresponding to a particular user; this UID is used to store other information of that user in the real-time database. Once the user logs in and opens the “Details” page corresponding to a particular parking lot, the application sends a GET request to the database requesting for the state of the slots in that particular parking lot; the data is returned by the database and is displayed on the details page of the application (Fig. 5a).

After parking the vehicle, user scans the QR code corresponding to that slot (a unique QR code is attached with every parking slot), the application again sends a GET request asking the database the state of that particular slot and displays a message accordingly under the QR code scanner in the application (Fig. 6a–c). If the state is “Occupied”, then the application generates a unique random 6-digit OTP. The application then makes a JSON object which contains email, OTP, slot occupied and timestamp of the current user. Then, the application sends a POST request to the database uploading the JSON object previously created on the database. There is a two-way communication between the android application and the database.

3.3 Webpage and Cloud

The webpage is made to provide a convenient payment system by simply providing the OTP while exiting a parking lot. The OTP generated by the android application is unique for each user. When the OTP is entered in the search bar provided on the webpage and is submitted, the backend searches the database for that OTP. If the OTP exists, the database returns the user email, timestamp, slot corresponding to that OTP, and the information is displayed on the webpage (Fig. 7). The total amount can be calculated by using the timestamp returned by the database. If the OTP does not exist, it displays “OTP does not match” on the webpage.

4 Results

The smart parking system worked with good efficiency and cost minimization with one microcontroller being used for two slots. The first result obtained is in the database after the registration/login is done by the user (Fig. 3). The next result obtained will be the real-time navigation to slot selected by the user (Fig. 4).

Fig. 3
figure 3

User collection in database

Fig. 4
figure 4

Navigation to parking 1, Shiv Nadar University

Fig. 5
figure 5

a When no vehicle is parked at slot 1. b When the vehicle is improperly parked at slot 1. c When the vehicle is properly parked at slot 1

Fig. 6
figure 6

a Message below QR scanner when no vehicle is parked at slot 1. b Message below QR scanner when vehicle is not parked properly. c Message below QR scanner when vehicle is parked properly

Fig. 7
figure 7

Details of the user after searching for the OTP provided

After a user navigates his/her way to the preferred/nearest parking slot and tries to park the vehicle, one of the following three results is obtained:

  1. 1.

    The application shows “Free” for that slot if no vehicle occupies that slot (Fig. 5a).

  2. 2.

    The application shows “Tripped” for that slot if the vehicle is parked improperly (Fig. 5b).

  3. 3.

    The application shows “Occupied” for that slot if the vehicle is parked properly (Fig. 5c).

The next result is obtained from the QR scanner. When the user reaches the slot, there are following three scenarios possible with their consequent results:

  1. 1.

    If the user has not parked the vehicle but scans the QR code or the user scans the OTP before parking the vehicle, the application shows “No vehicle parked at SlotX” (Fig. 6a).

  2. 2.

    If the vehicle is not parked properly (in an organized way), the application shows “Vehicle is not parked properly at SlotX” (Fig. 6b).

  3. 3.

    If the vehicle is parked properly, the application generates an OTP and displays it below the QR scanner (Fig. 6c).

The last result is obtained through the database from the webpage which shows the details of the user after searching for the OTP provided by the user. This would include a time stamp for the time the vehicle was parked to calculate the total payment (Fig. 7).

5 Conclusions

With the ever-increasing traffic and pollution, the conventional ways of parking systems are becoming obsolete and time consuming. There is an urgent need of smart, efficient, and effective ways to tackle these problems. The work done in this field by other people observed that the initiative taken up to make the parking systems was smart but lacks the focus of organized parking and quick payment options to save time and avoid parking congestions. This paper has taken up above problems and is able to solve them up to an acceptable level. This paper with the help of Laser-LDR pairs and ultrasonic sensors makes sure that the parking is properly done, and the inclusion of QR codes and OTP has proved to be useful in reducing the time taken while making payment and exiting the parking lot. Other features like navigation to the nearest parking lot and user login system have made the implementation more secure and useful. There are still huge possibilities of improvement in the system by the inclusion of artificial intelligence and machine learning. Features like predicting user behaviour and smooth flow of vehicles in the parking lot without congestion can be implemented using AI and ML.