Design and implement WSN/IOT smart parking management system using microcontroller

ABSTRACT


INTRODUCTION
The magnificent expansion on networks nowadays has led to the emergence of new topologies such as Wireless Sensor Network (WSN) and Internet-of-Things (IoT) [1,2]. Such networks have been proposed as a response to the spectacular evolution on smart devices such as phones, cars, cameras and others [3]. Since these devices have the accessibility to the internet thus, the networks have been examined in terms of taking the advantage of these devices to accomplish specific tasks [4][5][6]. This has led to propose smart houses where numerous devices inside a house can be incorporated to manage and secure the house [7,8]. Such application can be applied to various facilities such as hospital, shopping malls and others. One of the fields that needs to be investigated in terms of WSN and IoT is the parking areas located in numerous facilities [9][10][11][12][13]. This is due to the challenging task of managing occupied and non-occupied parking lots where driver can waste long time for finding an available parking especially during the congestion times [14][15][16][17][18]. Several research studies have addressed the domain of smart car parking for example, Swatha and Pooja [19] proposed a smart car parking system using Bluetooth-based transmission and Global Position System (GPS). The proposed method utilized the GPS to send the information regarding non-occupied or available parking to the user. Using the Bluetooth transmission via any smartphone, the system can accurately assign the nearest parking.
Ni et al. [20] proposed a privacy-preserving smart parking system. The authors have addressed the problem of violating private information of the user or driver when he\she submits personal queries seeking for available parking. For this purpose, the authors have presented an efficient and secured retrieval of information for the driver using Bloom filters. Rehena et al. [21] have examined the problem of smart parking system as an optimization issue where the aim is to find the optimal solution that can meet the user's desires. For this purpose, the authors have presented a multi-criteria algorithm that input the query of user and find an appropriate parking place based on preferred location, price and space by the user. Somani et al. [22], have proposed a smart car parking system based on a cloud-based approach. The proposed system utilized the cloud-computing environment in order to collect information about parking lot in specific area. Then, the information will be sent into Ultra High Frequency (UHF) sensors. Finally, the information will be passed into user's smartphone.
As depicted form the literature, one can notice that there are wide range of challenges that might still face proposing an efficient and smart car parking systems. One of these challenges is the energy consumption for the sensors installed in specific parking lot. Maintaining these sensors for prolonging their lifetime is an imperative demand. Hence, this paper proposes an efficient smart car parking using Motion Sensor and Light Dependent Resistors (LDRs). Finally, a prototype has been implemented in order to incorporate Arduino micro controller sensors along with smartphone app.

RESEARCH METHOD
The methodology of this paper can be depicted in Figure 1 where the proposed smart car parking system is composed of multiple components including the cloud-based IoT repository, which meant to store the information regarding occupied and non-occupied parking, as well as, a user-friendly application installed on the user's smartphone to get such information. The centralized server, which manages to store entire smart parking systems information such as number of slots, availability of vehicles etc. and this information, will be accessed through some secured gateways through network. This smart parking system, which consists of several components and their functionality includes:  Centralized server: maintains information about parking spaces present in the parking.  Arduino: the microcontroller that used to implement our parking system and it is attached sensors.  Android App: user can connect with the smart parking system with their smart phones.

Architecture components description
The architecture contains three main components which can be depicted in Table 1 where these components are being explained. The app will show all the parking spot and deduct the empty and full parking using Any phone that have Android OS Server An HTTP server, commonly named web server, is define as an information technology that processes requests via the HTTP network protocol used to spread and share information on the World Wide Web. This server will be responsible for reading the HTTP requests sent by the alert notification them and send broadcast message to user.

Android studio
Android Studio is the official Integrated Development Environment for Google's Android application advancement. Manufactured in light of JetBrains' IntelliJ IDEA programming and designed particularly for Android development Smart parking system user this IDE for the creation of this mobile App.

Block diagram
The following figures illustrates the different components in the project. it's consist of four parts, the main part is composed of Arduino Mega micro-controller connect to NRF24L01 Module which receive data of parking from anther parts and connect to PIR Sensor to detect the motion inside the parking space if it detect motion the LED light will switch on, and Arduino Mega connect to Cytron Wi-Fi shield which send the data of the parking spot to cloud server [23][24][25]. The second part is composed of Arduino Nano microcontroller connect to NRF24L01 Module which send data of parking to the main part, and connect to 3 Infrared to detect the full/empty parking spot, and servo to open/close the Entrance gate. The third part is composed of Arduino Nano micro-controller connect to NRF24L01 Module which send data of parking to the main part, and connect to 3 Infrared to detect the full/empty parking spot. The fourth part is composed of Arduino Nano micro-controller connect to NRF24L01 Module which send data of parking to the main part, and connect to 3 Infrared to detect the full/empty parking spot, and servo to open/close the Exit gate The block diagram of Smart Parking system is show below in Figure 2.

Hardware connections
In order to simulate the hardware connections, 9 points of Arduino micro controllers have been implemented along with a main point. Table 2 describes the main point sensors specifications. As shown in Table 2, there are five types of sensors. First type is intend to sense the motion produced by objects in order to detect vehicle motion. Second type is intend to sense the light in order to configure the status of parking alarm whether it on or off. Third type of sensor is intend to collect information regarding the non-occupied parks. Fourth type aims to connect the pins, while the fifth type is intend to send the information to the server. Table 3 shows the description of sensors from pin 1 to pin 3.
As shown in Table 3, there are six type of sensors that have been implemented between pin 1 to pin 3. The first type aims to sense the vehicle object whether it is located on the gate of parking or not. While, the second type aims to turn the parking alarm into on or off based on the occupation status produced by first type sensors. Third, fourth and fifth types are meant to detect whether parking occupied or not for spot 1, spot 2, and spot 3 respectively. Finally, the sixth type aims to send the information collected form the latter sensors into the main Arduino sensor. Table 4 depicts the specifications of the sensors implemented from pin 4 to pin 6.  As shown in Table 4, four main types of sensors have been implemented between pin 4 to pin 6. The first, second and third types are meant to detect whether the parking occupied or not for spot 1, spot 2 and spot 3 respectively. Finally, the fourth type aims to send the information into the main sensors. Eventually, for Table 5, the sensors types between pin 5 to pin 9 are six types. First type is intend to sense the motion produced by objects in order to detect vehicle motion. Second type is intend to sense the light in order to configure the status of parking alarm whether it on or off. For the third, fourth and fifth types, the aim was to detect whether parkings are occupied or not for spot 1, spot 2, and spot 3. Finally, the sixth type aims to send the information to the main sensors.

RESULTS AND ANALYSIS
After the design phase, we implemented the project as four parts. The main part is composed of Arduino Mega micro-controller connect to NRF24L01 Module, which receive data of parking from another parts and connect to PIR Sensor to detect the motion inside the parking space. If it detect motion the LED light will switch on, and Arduino Mega connect to Cytron Wifi shield which send the data of the parking spot to cloud server. Part A is composed of Arduino Nano micro-controller connect to NRF24L01 Module which send data of parking to the main part, and connect to 3 Infrared to detect the full/empty parking spot, and servo to open/close the Entrance gate. The part B is composed of Arduino Nano micro-controller connect to NRF24L01 Module which send data of parking to the main part, and connect to 3 Infrared to detect the full/empty parking spot. The part C is composed of Arduino Nano micro-controller connect to NRF24L01 Module which send data of parking to the main part, and connect to 3 Infrared to detect the full/empty parking spot, and servo to open/close the Exit gate. Figure 3 shows all the four parts connected together.
As shown in Figure 3, there are multiple sensors where the first type is the Arduino nano micro-controller which can be depicted in Figure 4(a). While the second type is the Infrared which can be depicted in Figure 4(b), and finally, the third one is related to the servo motor in the entrance gate which can be depicted in Figure 4(c). On the other hand, Figure 4(d) shows the sample car used in the simulation. The simulation has been adjusted to test the motion of the sample vehicle in which the first sensor at the entrance will detect the car as shown in Figure 5(a). Consequentially, the Arduino nano micro-controller will sense the motion of the car when it passes the parkings as shown in 5(b). After that, when the car is being occupying the parking as shown in Figure 5(c), the proposed prototype application will show that parking is occupied as shown in Figure 5(d).
Finally, the last sensor which is the LCD will sense the light of parking alarm in order to clarify the number of occupied and non-occupied parking lots as shown in Figure 6. Eventually, Figure 7 will show the lighting system where the LDR and PIR sensors are incorporated to send the information to the main micro-controller. This can be depicted where the LDRs are sensing the light until it stops (i.e. the parking is active). As well as, the PIR will sense the object motion in which if the LDR is stop sensing, the LED will turn into on as shown in Figure 7. However, if the driver hits the parking inappropriately, the LED will not turn on until the car is being parked properly as shown in Figure 8. Table 6 shows the final readings of from the information collected of all the sensors. Apart from the effectiveness of the proposed system, it showed an efficient performance in terms of the energy consumption which makes it competitive and scalable.

CONCLUSION
This paper has presented a smart car parking based on a cloud-based approach along with variety of sensor types. Passive Infrared Sensors (PIRs) have been used to sense the object motion. While LED and LCD sensors have been utilized to sense the light of the parking alarm and display information regarding the occupied and non-occupied parking lots. Finally, multi-micro controller of Arduino have been exploited in order to transmit the information collected to the server. Finally, a prototype Android application has been developed in order to receive the information from the server. For future direction, the use of Raspberry Pi sensors can improve the transmission of information.