IoT Raspberry Pi Based Smart Parking System with Weighted K-Nearest Neighbours Approach

Md Shohel Sayeed, Huzaifah Abdulrahim, Siti Fatimah Abdul Razak, Umar Ali Bukar, Sumendra Yogarayan


Due to the limited availability of parking slots in parking areas, drivers often have difficulty finding an empty parking slot. The number of parking slots available at a particular location is usually less than the number of vehicles. Hence, drivers spend a lot of time looking for vacant parking slots, which eventually delays the completion of their tasks, such as paying bills, attending a meeting, or visiting a patient at the hospital, etc. There are a couple of parking guidance systems that have been highlighted by the other researchers, but most of them lack real-time, convenient guidance. This research proposed a smart parking guidance system made of an IoT Raspberry Pi combined with an Android application that makes use of the weighted k nearest neighbours for positioning the vehicle. This was achieved through the use of Wi-Fi signal strength indicator fingerprinting, allowing for real-time navigation and parking detection. In order to achieve real-time parking over the internet, Raspberry Pi hardware and the ThingSpeak IoT cloud with ultrasonic sensors are used in the proposed method. An Android application was involved in this parking detection system, which adopted IoT approaches to estimate the location of users in real-time and provide routes using route-finding techniques to assist drivers in finding their desired parking slots. Data from the sensors was processed and translated into the Raspberry Pi using the Python programming language. They were sent using the Message Telemetry Transport protocol to send parking data to the ThingSpeak IoT cloud in real-time. This data was displayed via the Android app. The user is then able to view each available parking slot, acquire the route, and be directed with high accuracy to the parking slots of their choice. In this study, advanced sensing and communication technologies were used together with the weighted k nearest neighbours algorithm for positioning and wayfinding in order to improve parking guidance accuracy. Based on the experimental results, the proposed system showed a lower average error rate of 1.5 metres in comparison to other positioning techniques, such as GPS, or other similar algorithms for positioning, such as maximum a posteriori, which have shown average errors of 2.3 metres and 3.55 metres, respectively, a potential increase of more than 35% from the previous error rate.


Doi: 10.28991/CEJ-2023-09-08-012

Full Text: PDF


Smart Parking; IoT; WKNN; Parking Guidance; Raspberry Pi; Positioning System.


Kingatua, A. (2020). Bluetooth Indoor Positioning and Tracking Solutions. Medium, San Francisco, United States. Available online: (accessed on April 2023).

Krishnaveni, B. V., Reddy, K. S., & Reddy, P. R. (2020). Position Estimation of Ultra Wideband Indoor Wireless System. 2020 International Conference on Artificial Intelligence and Signal Processing (AISP). doi:10.1109/aisp48273.2020.9073234.

Blazek, J., Jiranek, J., & Bajer, J. (2019). Indoor Passive Positioning Technique using Ultra Wide Band Modules. 2019 International Conference on Military Technologies (ICMT). doi:10.1109/miltechs.2019.8870099.

Dabove, P., Di Pietra, V., Piras, M., Jabbar, A. A., & Kazim, S. A. (2018). Indoor positioning using Ultra-wide band (UWB) technologies: Positioning accuracies and sensors’ performances. 2018 IEEE/ION Position, Location and Navigation Symposium (PLANS). doi:10.1109/PLANS.2018.8373379.

Said, A. M., Kamal, A. E., & Afifi, H. (2021). An intelligent parking sharing system for green and smart cities based IoT. Computer Communications, 172, 10–18. doi:10.1016/j.comcom.2021.02.017.

Sadhukhan, P. (2017). An IoT-based E-parking system for smart cities. 2017 International Conference on Advances in Computing, Communications and Informatics, ICACCI 2017, 2017-January, 1062–1066. doi:10.1109/ICACCI.2017.8125982.

Shinde, S., Patil, A., Chavan, S., Deshmukh, S., & Ingleshwar, S. (2017). IoT based parking system using Google. 2017 International Conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud) (I-SMAC). doi:10.1109/i-smac.2017.8058256.

Pham, T. N., Tsai, M. F., Nguyen, D. B., Dow, C. R., & Deng, D. J. (2015). A cloud-based smart-parking system based on Internet-of-Things technologies. IEEE Access, 3, 1581-1591. doi:10.1109/ACCESS.2015.2477299.

Salma, Olanrewaju, R. F., & Arman, M. M. (2019). Smart parking guidance system using 360o camera and Haar-cascade classifier on IoT system. International Journal of Recent Technology and Engineering, Special Issue, 8(2S11), 864–872. doi:10.35940/ijrte.b1142.0982s1119.

Thakre, M. P., Borse, P. S., Matale, N. P., & Sharma, P. (2021). IOT Based Smart Vehicle Parking System Using RFID. 2021 International Conference on Computer Communication and Informatics (ICCCI). doi:10.1109/iccci50826.2021.9402699.

Kodali, R. K., Borra, K. Y., Sharan Sai, G. N., & Domma, H. J. (2019). An IoT Based Smart Parking System Using LoRa. Proceedings - 2018 International Conference on Cyber-Enabled Distributed Computing and Knowledge Discovery, CyberC 2018, 151–154. doi:10.1109/CyberC.2018.00039.

Zhao, J., Wu, Q., Chen, J., & Huang, Y. (2019). Parking, Intelligent Parking System. 2019 IEEE 4th Advanced Information Technology, Electronic and Automation Control Conference (IAEAC). doi:10.1109/iaeac47372.2019.8997654.

Anand, A., Kumar, A., Rao, A. N. M., Ankesh, A., & Raj, A. (2020). Smart Parking System (S-Park) – A Novel Application to Provide Real-Time Parking Solution. 2020 Third International Conference on Multimedia Processing, Communication & Information Technology (MPCIT). doi:10.1109/mpcit51588.2020.9350429.

Mackey, A., Spachos, P., & Plataniotis, K. N. (2020). Smart Parking System Based on Bluetooth Low Energy Beacons with Particle Filtering. IEEE Systems Journal, 14(3), 3371–3382. doi:10.1109/JSYST.2020.2968883.

Aditya, A., Anwarul, S., Tanwar, R., & Koneru, S. K. V. (2023). An IoT assisted Intelligent Parking System (IPS) for Smart Cities. Procedia Computer Science, 218, 1045–1054. doi:10.1016/j.procs.2023.01.084.

Mago, N., Mittal, M., Bhimavarapu, U., & Battineni, G. (2022). Optimized outdoor parking system for smart cities using advanced saliency detection method and hybrid features extraction model. Journal of Taibah University for Science, 16(1), 401–414. doi:10.1080/16583655.2022.2068325.

Krishnan, R. S., Narayanan, K. L., Bharathi, S. T., Deepa, N., Murali, S. M., Kumar, M. A., & Prakash, C. R. T. S. (2022). Machine Learning Based Efficient and Secured Car Parking System. Recent Advances in Internet of Things and Machine Learning. Intelligent Systems Reference Library, 215, Springer, Cham, Switzerland. doi:10.1007/978-3-030-90119-6_11.

Anwarul, S. (2022). An Efficient Minimum Spanning Tree-Based Color Image Segmentation Approach. Advanced Computing, IACC 2021, Communications in Computer and Information Science, 1528. Springer, Cham, Switzerland. doi:10.1007/978-3-030-95502-1_44.

Ali, J., & Khan, M. F. (2023). A Trust-Based Secure Parking Allocation for IoT-Enabled Sustainable Smart Cities. Sustainability (Switzerland), 15(8), 1–18. doi:10.3390/su15086916.

Rani, P., & Sharma, R. (2023). Intelligent transportation system for internet of vehicles based vehicular networks for smart cities. Computers and Electrical Engineering, 105, 108543. doi:10.1016/j.compeleceng.2022.108543.

Georgiou, K., Constambeys, T., Laoudias, C., Petrou, L., Chatzimilioudis, G., & Zeinalipour-Yazti, D. (2015). Anyplace: A Crowdsourced Indoor Information Service. 2015 16th IEEE International Conference on Mobile Data Management. doi:10.1109/mdm.2015.80.

Jekabsons, G., Kairish, V., & Zuravlyov, V. (2011). Analysis of Wi-Fi based indoor positioning accuracy. 6th International Conference on Electrical and Control Technologies, ECT 2011, 45–50.

Peng, X., Chen, R., Yu, K., Ye, F., & Xue, W. (2020). An improved weighted k-nearest neighbor algorithm for indoor localization. Electronics (Switzerland), 9(12), 1–14. doi:10.3390/electronics9122117.

Full Text: PDF

DOI: 10.28991/CEJ-2023-09-08-012


  • There are currently no refbacks.

Copyright (c) 2023 Md Shohel Sayeed, Huzaifah Abdulrahim, Siti Fatimah Abdul Razak, Umar Ali Bukar, Sumendra Yogarayan

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.