Parkme: Smart Parking Based on Embedded System and Sensor Network

Chintya Wijaya
6 min readJun 1, 2021

--

Locate. Reserve. Park.
Easy way to park your car!

Have you ever been late for something important (e.g. work, school, or college) just because you spend most of your time looking for a parking space? If yes, what do you feel?

Problem

You must be upset if you waste your time at a parking lot. Urban people can relate to this problem because the number of vehicles continues to increase substantially. Based on Statistics Indonesia, the number of passenger cars in 2019 reached 15.5 million units with a one million increase from 2018. If this continues to happen with no additional parking lots, the vehicle owners (esp. car) will find it difficult to park their vehicles.

The difficulty in searching for parking spaces will waste their time on the way to work, meetings, school, etc. Worse, it will make them late. We know that “ngaret” is our culture, and this can make it worse.

So, what are the solution alternatives for this problem?

Solution Alternatives

To make it easier I’ve made a simple issue tree.

Issue tree for this problem

Increase the street or remote parking

It will be impactful in an area with wide streets and remote areas, but not in a big city. As we know, the vehicles increases significantly in the urban areas, so it will be hard to find a remote area in the city.

Use stackers to double supplies

Stackers can double the parking supplies by lifting the vehicles so the another vehicles can be parked below. But, it is difficult to build the infrastructure.

Use a rent system

It can be applied in a housing like apartment, or companies can rent a place for their employees. But it couldn’t be applied to public areas like shopping areas, public service areas, etc.

Provide real-time parking availability

It might be hard and expensive to build the sensors, but it can give a good impact if planned well.

To prioritize these alternatives, this effort-impact matrix will help.

Effort-impact matrix

Based on this matrix, I will prioritize the alternative: provide a real-time parking availability.

Parkme

Parkme is an embedded system based parking sensor network. The sensors will be put the parking spaces to let users know about the availability. The sensors will send information to a microcontroller which transmits those data wirelessly to an online database using Wi-Fi. The information will be displayed on mobile app for the users. Block diagram below is the hardware design of Parkme.

Block Diagram

Parkme will use microcontroller NodeMCU which which is embedded with an ESP8266 unit. The sensors will be ultrasonic sensors to detect the existence of a car.

Microcontroller with sensors (src: fritzing)
Wiring

The wiring will be like this:

  • Trigger connected to D3 NodeMCU
  • Echo connected to D4 NodeMCU
  • VCC connected to 3.3v NodeMCU
  • GND connected to GND NodeMCU

The online database will be Google Firebase. Also, the mobile app (Android or iOS) can be connected to the database. Parkme will need a GPS to locate the parking spot.

Setelah merangkai komponen, cuplikan program berikut akan mendeteksi jarak sensor tersebut terhadap suatu objek. Dalam kasus ini, objek adalah kendaraan.

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#define triggerPin D3
#define echoPin D4
char auth[] = “masukkan token dari email”;
char ssid[] = “masukkan nama wifi”;
char pass[] = “masukkan password wifi”;
WidgetLCD lcd(V5);
void setup() {
Serial.begin(9600);
pinMode(triggerPin, OUTPUT);
pinMode(echoPin, INPUT);
Blynk.begin(auth, ssid, pass);
lcd.clear();
lcd.print(0, 0, “Jarak cm”);
}
void loop() {
lcd.clear();
lcd.print(0, 0, “Jarak cm”);
long duration, jarak;
digitalWrite(triggerPin, LOW);
delayMicroseconds(3);
digitalWrite(triggerPin, HIGH);
delayMicroseconds(12);
digitalWrite(triggerPin, LOW);
duration = pulseIn(echoPin, HIGH);
jarak = (duration / 2) / 29.1;
Serial.print(jarak);
Serial.println(“Cm”);
lcd.print(7, 1, jarak);
Blynk.run();
delay(3500);
}

Sensor has trigger pin to send signals and echo pin as a receiver. Receive duration will be saved in variable duration and the distance between sensor and object will be measured with sonar principle, distance is a half of the product of speed and duration. The measurements will be displayed on Blynk which connected to Wi-Fi. The distance will be the threshold if the vehicle is above the sensor.

If the distance is smaller than the threshold, the parking spot is unavailable and the information will be sent to online database used by mobile application. The application will display the unavailability. Otherwise, the application will display the availability.

The system flow will be like this.

Flowchart

On this mobile app design there are more advanced features like parking reservation and payment. Users can reserve their spot for 5 minutes before the entering the location. Then, they will be asked to scan the QR code at the parking entrance.

Nowadays people use e-money to park so does Parkme. The balance will be shown on the app and available for top up. To pay, users need to show their QR code to a scanner before the exit portal.

Parkme Mobile App

Prototype

Parkme Prototype

Users can locate themselves with GPS and find the closest parking lot. The fee is also displayed. Users can also search for parking lots and check the availability. After selecting the parking lot, users will be asked to choose the parking spot and reserve for 5 minutes. At the entrance, scan the QR code and the time will be counted. After parking, users will be asked to show their QR code at the exit portal and they can choose 2 ways of payment: cash or e-money. The parking will be done after “Payment Success” displayed.

How to test the system?

We can make mini model with car miniatures, ultrasonic sensors, and microcontroller. Then connect them to a mobile app with Firebase.

Mini model

We can adjust the scale in real life and test it to one place, then two places, and so on. The testing will be about sensor testing, error detection, and mobile app testing along with database and GPS. Furthermore, we can also test the integrated payment with e-money.

Conclusion

Parkme can be the solution for parking problems by providing information about real-time parking availability with vehicles detection. It will detect the existence of the vehicle by using ultrasonic sensor and NodeMCU microcontroller. Parkme is an application with online database Firebase connected with microcontroller using Wi-Fi. Sensor readings will be displayed in the application.

References

https://www.cnnindonesia.com/teknologi/20210203115349-384-601700/sensus-kendaraan-di-indonesia-lebih-dari-133-juta-unit

Singh, Joseph & Nair, Nanthiine & Krishnan, Prajindra. (2018). Iot based Parking Sensor Network for Smart Campus. International Journal of Engineering and Technology(UAE). 7. 26–34. 10.14419/ijet.v7i4.35.22316.

https://medium.com/@muftiramdhani25/nodemcu-with-sensor-ultrasonic-hc-sr04-c606ffa58bd

https://the-crew-tok.blogspot.com/2018/09/cara-memakai-sensor-ultrasonik-pada.html

--

--