How To Build IoT-based Smart Parking App
Smart parking development implies an IoT-based system that sends data about free and occupied parking places via web applications. Let's make it a reality.
Join the DZone community and get the full member experience.Join For Free
Smart parking development implies an IoT-based system that sends data about free and occupied parking places via web/mobile applications. The IoT device, including sensors and microcontrollers, is located in each parking place. The user receives a live update about the availability of all parking places and chooses the best one.
In order to investigate the technologies behind the smart parking solution, we implemented an internal research project. The main idea was the creation of smart parking using the Internet of Things and ultrasonic sensors, where available parking places could be displayed in a web application.
This video shows the result of our internal IoT-based smart parking project:
IoT Based Smart Parking Solution
Used IoT ecosystem:
Hardware: ESP8266 microcontroller, HC-SR04 distance measurement sensor
Network: MQTT protocol
Cloud & Analytics: Amazon Web Services: AWS IoT, AWS Lambda
The IoT device consists of an ESP8266 microcontroller and an HC-SR04 distance measurement sensor. The sensor periodically measures the distance and transmits this data to the microcontroller, which is connected to the AWS IoT service via the MQTT protocol.
Periodically, the device sends measurements to the cloud where they are stored in AWS IoT shadow as a sensor state. A sensor detects a parked car by measuring the distance to the nearest obstacle—in our case, to the bottom of the car. The state can be “occupied” if the distance is in the range of 100mm – 500mm, “free” if the distance is more than 500mm, and “dirty” if the distance is less than 100mm, which means that the sensor may be unclean. All of these values can be easily configured. These values represent both free and occupied parking lots.
In our case, if the sensor detects nothing up to 50 cm, the status is set to “free” and is shown to the user.
The “occupied” range is between 10 and 50 cm.
Below 10 cm, the status is “dirty." It means the sensor might be covered with mud or an obstacle, and requires checking.
When a driver accesses the system via the web application, a signal is sent to the Lambda function. It reads the sensor state values from AWS IoT shadow and displays parking spaces depending on the state. Green color: free space; red color: occupied space; yellow color: pollution.
For now, this particular solution may be used for MVP and POC (proof of concept).
The building of a full-fledged IoT-based smart parking system will be different. Hardware, software, and firmware selection will depend on the size of the specific parking area and the number of parking slots.
Mobile and/or web application features also play a big role in the IoT system architecture. If business requirements show demand for a smart parking development, a more advanced application might be created.
All the hardware should always be selected by the IoT specialist. Depending on the IoT system architecture, developers will select the most suitable hardware. In some cases, it’s better to use gateway and LPWAN for IoT sensors, for others it may not be.
Other Tech Options for Smart Parking System
The improvement of a smart parking system depends on business needs. Taking into account retail and healthcare technology trends, smart parking might take priority. Returning to our smart parking solution, the main features that might be improved are:
LoRaWAN protocol will increase the autonomous operating time of a smart parking system. Due to LoRa Alliance’s specification, the LoRaWAN protocol is optimized for low power consumption, which means that you don’t need to change batteries more often than once every 2-5 years. Furthermore, it is designed to scale from a single gateway installation up to large global networks with billions of devices. Thus, it would be a good idea to apply this or any LPWAN protocol for a smart park.
Data Science and Computer Vision technologies based on video stream are also a perfect match for IoT-based innovations. On the subject of smart parking development, Data Science, Machine Learning, and Computer Vision might be applied for car number recognition.
This feature allows:
- Automatic gate opening, if the car belongs to a given park
- Navigation of cars to available and suitable parking slots
Sensor integration is also a good upgrade for smart parking systems. The most applicable are:
- Ultrasonic sensors: Ultrasonic sensors measure distance by using ultrasonic waves in time between the emission and reception. Advantages: high accuracy of the sensor. The disadvantages: the probability of sensor contamination.
- Electromagnetic field sensors: Electromagnetic field sensor is a small-scale microelectromechanical system device for detecting and measuring magnetic fields. The solution is based on the change of the electromagnetic field as the metal mechanisms approach one another.
- Infrared sensors (IR sensor); An infrared sensor is an electronic device that emits in order to sense some aspect of its surroundings. An IR sensor can measure the heat of an object as well as to detect motion. An IR sensor works in a similar way to ultrasonic sensors.
Custom mobile and web IoT applications might be developed depending on business needs. The function of a parking slot order may be a killer feature for mobile/web apps. If a parking area is a few kilometers long, an integrated AR navigation may help drivers not to get lost looking for their own car.
All the features mentioned above are not the limit of the technology. The more technology innovations we implement, the more features we can add. For most cities, smart parking is still evolving technology. Only by implementing new ideas can we make smart solutions like these available and use them to improve our everyday life.
Published at DZone with permission of Serge Koba. See the original article here.
Opinions expressed by DZone contributors are their own.