Developing Smart Car Parking System Using Wireless Sensor Networks Aliyu Ahmed Mikail Olaniyi Computer Engineering Computer Engineering Federal University of Technology Minna, Nigeria Federal University of Technology Minna, Nigeria aliyu.ahmed@futminna.edu.ng mikail.olaniyi@futminna.edu.ng Jonathan Kolo Stephven Oyetoro Computer Engineering Computer Engineering Federal University of Technology Minna, Nigeria Federal University of Technology Minna, Nigeria jgkolo@futminna.edu.ng oyetorostephven@gmail.com also called a car lot or a bay, is a cleared expanse of land - often ABSTRACT of extensive or massive size that is meant and designed for park- Car parking is a serious problem and one of the major contributors ing vehicles. Car parking system is developed with a view to ef- to traffic congestion in urban areas. This challenge is as a result of fectively manage parking of vehicle. Smart parking is a scheme sharp increase in numbers of automobiles on the roads. This paper which uses numerous technologies to effectively manage a parking presents the development of a smart parking system using wireless space [1, 2]. Traffic congestion in cities and suburban areas have in- sensor networks. The system can monitor the state of every park- creased due to increase in the number of car users. Recurrent traffic ing lot by deploying a magnetic sensor node on each lot and also congestion in general is as a result of roadway lacking sufficient ca- identify improper parking using infrared sensor to check if vehicles pacity for the volume of cars – too many cars or too little roads. The are properly parked. The system uses Xbee radio for transmitting bases of traffic congestion (traffic jam) are complex and information to the base station which performs necessary composite but they all stems from having too many cars on the information processing, analysis and interpretation on the data same road at the same time. Car drivers searching for parking received to usable and meaningful format for the end users. The space contribute to between 8% to 74% of traffic congestion as results obtained after qualitative testing of the developed argued in the research of [3]. A related study conducted by prototype shows that server concurrency utilization is in the International Parking institute, 2012 appraised that 30% of car average of 12 users per minute. It was also observed that the steering the city at any instant of time are doing so as car drivers system acquire speedup in terms of average response time of are scanning for parking space [3]. Consequently, traffic 1.414 seconds. This implies that the system is robust to handle congestions lead to frustration on the part of the driver and also large number of users and is also fast enough in terms of waste of time. Economically, it translates to wastage of fuel and response which gives accurate information about the parking lot. carbon emission can lead to environmental pollution and other With the system in place, traffic related hazards, fuel wastage and associated hazard (e.g. Global warming as a result of carbon other relted hazards could be reduced. emission). A significant way out of these car parking problem is to de- crease CCS Concepts the time taken by car drivers to search and find parking spots. This can be achieved by incorporating new technologies to exist- ing • Hardware ➝ Communication hardware, interfaces and storage systems and this give rise to Wireless Sensor Network (WSN) to ➝ Wireless integrated network sensors be considered as an effective way to improve parking situation [4]. Keywords WSN is drawing bigger interest thus, allowing them to speed- ily Car park, Xbee, wireless sensor networks, automobile, traffic, evolve owing to their massive usage capability across several Magnetic sensor disciplines [5]. As a result of advancement in technology, WSN stems from wireless networking, which is an interconnection of nodes that do not necessitate any form of cable [6]. This offers 1. INTRODUCTION mobility and flexibility in transmitting data over a network Car park are commonly found in cities and suburban areas which medium [7]. WSN have found many civil, industrial, military, have significant effect in reducing the amount of traffic. They are general engineering, civil engineering, environmental, agriculture often found in places such as shopping malls, sports stadiums, and medical application which includes smart office spaces, schools, churches and similar venues. Parking is an act of bring- commercial and residential security, border surveillance, ing to a halt and (or) leaving a vehicle unoccupied. A parking lot, intelligent buildings and bridges, precision agriculture, disaster recovery and so on [2]. With this wide range of application, it is reasonable to consider WSN in car parking system. In this paper, we present the development of a parking system that will operate by sensing parking spaces if available via sensors, CoRI’16, Sept 7–9, 2016, Ibadan, Nigeria. notably a magnetometer. With a parking space in place, combining WSN with the system offers the possibility of developing a smart system for car parking that could be an important factor in solving the problems of parking and none the less offers an easy and cost effective solution which would maximize utilization and minimize 201 human interference. The results are communicated wirelessly to spaces may be and reduces traffic congestion which results from car owners when queried, notifying car owners of the condition of many vehicles pursuing limited parking spaces. It determines the the parking space. This system differs from early parking system parking prices according to their pricing scheme and broadcasts which utilizes human placed strategically at the parking lots to the prices to all users periodically, it also offers a storage system assist drivers in parking their vehicles. Application of Sensor for storing the parking information, QR codes and prices for further technology to parking system allows for measurement of analysis; pricing is a centralized decision made in regards decisions conditions of interest such as magnetic (metal) fluctuations and to state of parking lots and user demands. The system notwithstand- light radiation (radiation or reflection of light from objects). ing did not offer parking guidance system and the presence of a reservation authority defeats the aim of smartness of the system. The rest of the paper is organized as follows. Section 2 presents the related work in this area of study, while section 3 discusses the In [12] Intelligent parking lot application utilizing remote sen- sor system design and implementation. The results obtained is systems examined the impact of identifying vehicles by com- presented in section 4 and section 5 concludes the paper. paring the acoustic, visual light, infrared, temperature, ultrasonic, and magnetic sensors. Their trials checked that ultrasonic and at- tractive sensors have better precision and unwavering quality in 2. REVIEW OF RELATED WORKS parking spot. A number of related works exist in literature. Some of them are presented here. [1] proposed automatic parking indicator utilizing Also, [13] proposed a Smart Parking System utilizing WSN in- microcontroller whose primary point is to streamline around novation which gives propelled components like remote parking space accessible for stopping. It enables the stopping of vehicles, observation, mechanized direction, and parking reservation mech- floor after floor, also called a multi-level displaying the accessible anism. This framework utilizes a dream based location technique openings on LCD, subsequently lessening the ground space (CCTVs) as a detecting nodes to distinguish empty parking spot. utilized. The framework permits number of autos to be stopped by The framework is equipped for controlling clients to effectively prerequisite, making the framework modernized and a space- find empty parking spots in order to stop their vehicles. It shows sparing one. In spite of space saving feature of the system, it does that the execution of the framework can fulfil the needs and not specify the mechanism used in parking of vehicles on the prereq- uisites of existing stopping issues along these lines multi-level system. In addition, it lacks a parking guidance system minimizing the time it takes to discover empty parking garage, for guiding drivers to where available parking lot is and it constant data ren- dering, and keen reservation components yet no requires much wiring to achieve the system. execution metric is utilized as a part of testing the framework. Similarly, [8] developed a car parking system based on Field A car park observing framework utilizing wireless sensor net- Programmable Grid Array. The parking framework was achieved work was presented in [14]. It utilizes different sensor nodes using Finite State Machine modelling. The framework has two (equipped with a 3-axis AMR sensor) and a sink node, a gateway, primary modules, the identification module and opening checking and a server to monitor a parking lot. This system shows it relia- module. The Identification module distinguishes the guest and the bility in energy usage since radio frequency (RF) transmission opening checking module checks the space status. These modules only occurs when sensor values show abrupt changes after being are displayed in HDL and actualized on FPGA. FPGA technology com- pared against each other. This reduces the quantity of RF offers flexibility, enhance modification using algorithmic state ma- transmis- sion operations and moderate battery power. While [15] chine to carry out more task. In this system, the afore knowledge proposed a street parking system (SPS) in light of remote sensor of the status of the parking slot is not known and lacks the guiding systems. The framework can screen the condition of each parking system for direction. Furthermore, the IR sensor which is the only spot by deploying magnetic sensor node (utilizing a HMC5883L car detector sensor used in the system is subjected to environmental magnetic sensor), which recognizes the earth’s magnetic field conditions such as humidity and light. intermittently along the roadside and every node mounted on the Smart parking system with image processing facility (Multi- middle floor of a parking spot. Power utilization parity is level car parking system) proposed by [9] obtained information accomplished by furnish- ing switches with sunlight based board about available parking spaces, process it and then place the car at a for regular data forwarding. Also, an Intelligent Parking Lot certain position. The system is a mechanical framework intended to Application Using Wireless Sensor Networks which utilizes both minimize the territory and/or volume required for parking vehicles. magnetic and ultrasonic sen- sors for precise and solid recognition It gives parking to vehicles on different levels stacked vertically to of vehicles in a parking garage was proposed in [12]. This work expand the quantity of parking spots while minimizing area use. depicts an adjusted vari- ant of the minmax calculation for However, the cost of setting up the system is high and there is a recognition of vehicles utiliz- ing magnetometers, and a single entry and exit point which can lead to traffic congestion if calculation for ultrasonic sensors. The work of [16] presents the several cars arrive simultaneously. outline and usage of a model arrange- ment of Smart Parking Services based on Wireless Sensor Net- works (WSN) that permit In the same vain, [10] carried out an improved work, smart park- ing vehicle drivers to discover free stopping spots. The proposed plan system architecture using ultrasonic to help drivers in discov- constitutes a remote sensor system, in- stalled web-server, central ering empty parking spots in a brief time frame. The framework web-server and an end client application i.e. a mobile phone application that allows vehicle driver to find vacant parking lots. utilizes ultrasonic (ultrasound) sensors to identify parking garage inhabitancy or improper parking. Regardless of the minimal effort Furthermore, [7] presented a work on Smart Parking System us- and simple installation of ultrasonic sensors, the parking system ing Wireless Sensor Networks that describes the implementation may receive wrong data due to sensor sensitivity to temperature of an energy and cost efficient smart parking system for multi- changes and extreme air turbulence. Furthermore, the implementa- level parking facility using wireless sensor network. The system tion of improper parking detection using ultrasonic sensor in park- moni- tors the availability of free parking slots and guides the ing system is not viable. vehicle to the nearest frees lot. In addition, it monitors other events such as the amount of time the vehicle has been parked for billing Smart parking system based on reservation by [11] addressed the purposes along with the status of each mote. By keeping the difficulty that arises from not knowing where the available number of sen- sors low, it minimizes cost. It also keeps the 202 energy consumption of each mote in check by allowing the 3.3.2 Communication module systems to sleep periodically and also by reducing the communication range of motes. The communication module of the receiver unit functions to collect data from the sensor and process them to meaningful information to The system presented here seek to achieve remote parking lot be forwarded to the entrance display module and client’s module. detection, direction guide, correction of improper parking and en- The basic components here are Arduino Uno, which serves as the hanced performance in terms of system’s response time and relia- processor and Xbee radio which receives information from the bility. transmitting unit. 3. SYSTEM DESIGN AND 3.3.3 Parking management, Entrance display and IMPLEMENTATION Guidance module The design of the system is presented here The parking management module is the program that is used in managing the parking lot by determining if a parking space is 3.1 Overview of System Architecture occupied or empty. It forwards its results to the entrance display The system consists basically of two (2) units: The Transmitting and guidance module for it to be displayed on the LCD board. This and Detection Unit and the Receiving Unit. These units are further module also contains the web server which hosts the website where divided into modules. The modules that make up the system are: information about the parking lot status is displayed on the internet. WSN module, communication module, parking management and guidance module, entrance display module and client module. The 3.3.4 Client module block diagram of the system architecture is shown in Figure 1. Client module allows car drivers to interact with the system by querying the system for available parking space. This module con- sists of the parking application called parker and a website, which car drivers use to gain access to required information. 3.4 Hardware Design Considerations 3.4.1 Arduino Fio (Microcontroller) The Arduino Fio microcontroller board (the heart of the system) is built on ATmega328P and operates on a 3.3V and 8MHz. It consists of 14 digital input/output pins (in which 6 function as PWM outputs), 8 analogue inputs, an on-board resonator. It also has a reset button and outlets used for fitting pin headers. It possesses connections meant for a Lithium Polymer battery and a charge circuit over USB with an XBee socket on the bottom of the board. 3.4.2 HMC5883L Magnetometer The Honeywell HMC5883L designed for low-field sensing is a surface mount, multi-chip module. It has a digital interface used for applications such as low-cost compassing and magnetometry. HMC5883L has an advantage over other magnetic sensor technolo- gies as it uses Honeywell’s Anisotropic Magneto-resistive (AMR) technology. This sensor includes accuracy in-pivot sensitivity and Figure 1. System Block Diagram. linearity. 3.2 Transmitting and Detection Unit 3.4.3 IR Sensor The transmitting and detection unit detects the status of the parking An active IR sensor is engaged to detect improper parking. The lot using sensors and sends the data to the receiving unit using a sensor employs an infrared light source which projects a beam of radio transceiver. The modules here include WSN module and the light that is detected at a separate detector. IR sensor will be placed Communication module. at the entrance of the park and detects if cars are parked well or not well parked. It has a range of 0 - 100 meters. 3.3 Receiving Unit The receiving unit processes the data received from the transmitting 3.4.4 Xbee Radio and detection unit. It acts as the sink station and the gateway to the Xbee radio is a super-high radio which uses 802.15.4 protocol in internet. The modules here include the communication module, the creating a radio sensor network. These modules allow a very re- parking management, guidance and entrance display module and liable and simple communication between microcontrollers, com- the client module. puters and systems with a serial port. It also supports point to point and multi-point networks. In this application, the Xbee Radio serve 3.3.1 WSN Module as the transceiver that has the capability to communicate with The WSN module consists of a magnetic sensor (to measure phys- the Arduino Ethernet shield and the internet via a laptop or an ical parameter), an IR sensor (to detect improper parking), RF android phone. transceiver, a power source, processor and Arduino Fio. The WSN module is designed to specifically suit the parameters to be mea- 3.4.5 LCD (Hitachi HD44780) sured. The Xbee series 1, which is 802.15.4 enabled is used as the The LCD unit which is referred to as the liquid crystal display unit wireless transceiver. is a flat panel display that works by passing a small amount of elec- 203 tricity through liquid crystal i.e. it uses the light modulating prop- The final Android based client’s application is deployed on an erties of liquid crystals to display for visual display. The Hitachi Infinix Zero phone as shown in Figure 3. HD44780 is one of the most common LCD controller chips de- signed for embedded systems and microcontrollers. The chip sup- ports many shapes and sizes of displays using the 16 x 2 display. 3.4.6 Arduino Ethernet Shield The Arduino Ethernet is a microcontroller board based on the ATmega328. It has a 32kb flash memory of which 0.5kb is used for boot loader. The shield offers the capability for Arduino to communicates with world over Ethernet using common network protocols. For the purpose of this work, the shield serves as a web server listening to client requests and replying appropriately. Figure 3. Final Application deployment screenshot taken from an 3.5 Software Design Consideration Infinix Zero one phone. C language was used in programming the Arduino Fio and Ar- 3.6 Network Protocol Configuration duino Uno using sketches while the HMC5883L uses a kind of Star Network Topology is employed for this smart parking system. rhythmic serial language called I2C. Programs written and used for Owing to the fact that a star topology uses a central switch which this work include: Sensing, Detection and Detection Unit code, Im- acts as conduit to transmit messages and provides a common con- proper parking code, Receiving and Display Unit code, and Client nection points for all nodes, it therefore introduces a single point Application Code. of collision for all devices connected to it. This reduces the damage caused by failure of devices on the network ensuring that the failure of one device does not affect the entire network. The disadvantage 3.5.1 Client Application Code Implementation of this system is that the failure of the central node results to failure The client application is coded using Android Studio, an integrated of entire network. The network has the sensor nodes (source node development environment for developing android application. Fig- i.e., the node that generates data) known as the router or end de- ure 2 shows the application interface design layout in Android Stu- vice. This forwards data to a sink which is a collection point where dio data is processed, stored, or forwarded onward to other networks via longer-range and higher-throughput wireless communications mechanisms. Arduino Ethernet shield serves the purpose of data aggregator, base station or gateway as can be seen in Figure 4. Figure 4. Parking Lot Sensing Network Topology Using Star Topology. Figure 2. Application interface design layout in Android The flowchart of the processes and the operations taken to Studio. achieve the overall system implementation is depicted in Figure 5. 204 1.2 Response Time The response of the system is determined by the threshold set for the system and the corresponding output values using V0 = √ x. where V0 is the output value and x is the distance in centimeters of the car to the prototype system. Thus, Setting the Threshold at 30 i.e. Th = 30, the response of the system is given in Table 2. Table 2. System Response Interpretation X (cm) LCD Response RGB Response Interpretation ≥30 Available Green parking lot empty 20 Available Green parking lot empty <20≥1 Available Green parking lot empty <1≥0 Occupied Red parking lot occupied Five different trials done with the constant threshold value of 30 is given in Table 3. in each case the corresponding time of the system’ response is recorded. Table 3. System Response Interpretation Tests Time to respond (seconds) 1 1.87 Figure 5. System Flow Chart. 2 1.26 3 1.28 4 1.39 5 1.27 4. PERFORMANCE EVALUATION Y is the distance of the car to the Magnetometer (our proto- type) in centimeters; while, L1, L2, L3, L4, L5 and L6 are X-axis 1.1 Magnetometer Sensitivity Magnetometer values in Tesler of different geographical locations. The sensitivity of the prototype is carried out with respect to differ- The normalized Magnetometer readings (scaled to 5 times the raw ent geographical locations. The Magnetometer (HMC5883L) read- values for distinctive view) against the distances of the car to the ings for six geographical locations obtained are shown in Table 1. prototype system is shown in Figure 6. From Figure 6, it is noted that the magnetometer values vary depending on the type of metal and the magnetic declination of the Table 1. Magnetometer Readings of different locations geographic location. The sensor values equally give information Y(cm) L1 L2 L3 L4 L5 L6 about the status of the lot depending on the value it reads. At 30 -377 -379 -378 -379 -376 -380 a distance of about 2cm to other higher values, it can be seen 20 -381 -382 -383 -380 -381 833 that lines in the graph maintain a constant slope meaning that, 15 -387 -385 -384 -384 -387 -387 10 -392 -390 -394 -393 -394 -393 The average response time of 1.414 seconds is achieved. 5 -413 -412 -415 -416 -414 -415 1 -438 -438 -435 -438 -437 -436 1.3 Web server concurrency 0 -918 -916 -916 -917 -919 -917 Web Server Concurrency is to evaluate the number of concurrent users the web server can serve at the same time. The goal of this evaluation does not concern how fast the website is or how the website scales. For concurrency evaluation, it is evaluated on hourly basis. the magnetometer values do not change because, no change is detected in the condition of the parking lot. It can also be seen that between 0cm to 1cm, the curves show sharp changes, with highest magnetometer readings which means that a car has been detected in the lot causing fluctuations in its readings. These Magnetometer readings are used to adjust the lighting system of the lot which is interpreted as green for available and red for occupied. Thus, for this work, the Magnetometer readings between 0cm and 1 cm are interpreted as occupied lot and while, the Magnetometer reading between 2cm and 30cm are interpreted as empty lot. Figure 6. Magnetometer readings against car distance to prototype system. 205 1.3.1 Web server concurrency Analysis [4] D. Jyoti and S. Wagh. Management of parking guidance Data collected for three days during the system’s deployment are information system based on WSN. International Journal of given in table 4. This shows that from the local deployment of the Emerging Technology and Advanced Engineering, 4(2):551–555, system, three number of users can be served concurrently by 2014. the web server. However, this result does not formalize the [5] S. Kumar and D. Shepherd. Sensit: Sensor information value of concurrent users for any public deployment of the technology for the warfighter. In International Conference on system as that was not carried out. Information Fusion International (FUSION’01), 2001. Table 4. Web server Concurrency Test Result [6] E. Premeaux. Tele sensation. In Arduino Project to Save the Days Visits/min Visits/hr Average Average World, 2011. Time spent concurrent user [7] J. Jeffrey, R. G. Patil, S. K. Narahari, Y. Didagi, J. Bapat, and min D. Das. Wireless sensor network based smart parking. In The 1 1 12 1.5 0.30 Sixth International Conference on Sensor Technologies and 2 3 6 2.5 0.25 Applications, pages 306–311, 2012. 3 2 7 2.3 0.26 [8] R. Kaur and B. Singh. Design and implementation of car parking system on FPGA. International Journal of VLSI Design & Communication Systems, 4(3):67–77, 2013. 5. CONCLUSION [9] M. I. Reza, A. A. Rokoni, and M. Sarkar. mart parking system The development of a Wireless Sensor Network based smart park- with image processing. Intelligent Systems and Applications, pages ing system to efficiently address the issue of car parking has been 41–47, 2012. presented. WSN ensures that data are being forwarded and routed [10] A.and Mustaffa Kianpisheh, P. N. Limtrairut, and P to the base or sink station wirelessly, where the data is further pro- Keikhosrokiani. Smart parking system (SPS) architecture using cessed. Testing and evaluation of the developed system has shown ultrasonic detector. International Journal of Software that server concurrency utilization of averagely three users per min- Engineering and Its Applications, 4(3), 2012. utes and fast response time of about 1.414 seconds guarantees the [11] M. Patil and R Sakore. Smart parking system based on robustness and efficiency of the system. However, the following reservation. International Journal of Scientific Engineering and future directions are recommended for more effective and efficient Research (IJSER), 2(6):21–26, 2014. system: [12] S. Lee, D. Yoon, and A. Ghosh. Intelligent parking lot • application using wireless sensor network. In IEEE ’08, pages 48– System can be made intelligent to read magnetic reading 57, 2008. differ- ence of an area and automatically adjust itself to the reading. [13] V. P. Kumar and T. S. Siddarth. A prototype parking system using wireless sensor networks. International Journal of • The system can be integrated with database that stores details Computer Communication and Information System (IJCCIS), of car drivers e.g. face, name, type of car etc. for security purposes. 2(1):276–280, 2010. • Payment solution can be integrated into the system and [14] J. H. Moon and T. K. Ha. A car parking monitoring system reserva- tion of parking space. using wire- less sensor networks. International Journal of Electrical, Computer, Electronics and Communication • A mesh-based WSN topology can be employed in the Engineering, 7(10):830–883, 2013. system to ensure scalability [15] Z. Zhang, X. Li, H. Yuan, and F. Yu. A street parking 6. REFERENCES system using wireless sensor networks. International Journal of Distributed Sensor Networks, pages 1–10, 2013. [1] C. H. Abhinash, R. L. Abhinay, A. Ajay, and S. Bharadwa. Automatic parking slot indicator using microcontroller. 2011. [16] S. V. Reve and S. Choudhri. Management of car parking system using wireless sensor network. International Journal of [2] V. N. Bhonge and M. Patil. Wireless sensor network and RFID Emerging Technology and Advanced Engineering, 2(7):262–268, for smart parking system. International Journal of Emerging 2012. Technology and Advanced Engineering, 3(4):188–192, 2013. [3] L. Yihan, S. S. Panwar, and M. Shiwen. A wireless biosensor network using autonomously controlled animal. IEEE Sensors ’06, pages 6–11, 2006. 206