This is a common sight at big buildings, such as shopping malls and 5-star hotels, where the entrance for staff and regular vendors has a boom barrier. The staff cars and other regular vehicles have to slow down and wait near an infra-red (IR) scanner, which reads the faint radiation of an IR tag pasted on the vehicle’s windshield. The boom barrier opens if the tag is found in its database. The process is quite efficient and works unhindered. However, the only flip side is that the process does not work when there is no tag, or the tag is damaged, or it cannot be identified for some reason.
POC Video Tutorial in English:
POC Video Tutorial in Hindi:
The system proposed here takes care of such problems. When a vehicle approaches the boom barrier, a speaker automatically asks the driver to slow down and stop briefly within four metres of the scanner. A high-fidelity camera then reads the vehicle’s registration number on its registration plate and checks whether it is there in its database. If the number is found in the database, the boom barrier opens automatically and the driver is told on the loudspeaker to proceed.
Whenever a new unregistered vehicle arrives, its registration number is updated in the database (if the visitor is expected to visit regularly henceforth) and the process keeps running. This system requires no IR tag, no pasting of the tag on vehicles’ windscreens, and no big disk antenna for an IR scanner at the gate. The process can be further refined, so that the vehicles need not stop at all, by using a better camera and computer.
Bill of Material:
|Raspberry Pi 3 or Pi 4 computer with 4 / 8GB RAM||1|
|Raspberry Pi camera||1|
|HC-SR04 ultrasonic sensor||1|
|7-inch touchscreen for Raspberry Pi||1|
|5V, 2A DC power supply||1|
To achieve this, a powerful Raspberry Pi 4 computer is needed for this project. For measuring distance, the same image analytic can be deployed. But to make process simple, deployment of an HC-SR04 ultrasonic sensor is recommended. The moment a vehicle comes within four metres distance, the camera takes a frontal picture of the vehicle and compares its registration plate number with the already available numbers in its database.
HC-SR04 cannot measure beyond four metres. To make it measure beyond that, say, up to six metres, it can be fitted on a two-metre long pole with wires in front of the camera on the side of the passage such that when the barrier opens, it will go up with the barrier.
You can use voice synthesizer ‘espeak’ to issue voice instructions to the drivers. The instructions can be like welcome, slow down, come closer, drive away, etc.
To increase range of measurement further, from six metres to twelve metres, a TFMini–S (3.4-degree aperture) camera can be used, though a four to six metres distance is generally just right for this kind of activity. In case of an IR tag system, the effective distance is about two metres only from the scanner. That’s why the vehicle drivers are often asked to move closer.
If anyone thinks that by holding a registration plate in hand one can fool the system, that is not possible at all. The car classifier model “haarcascade_russian_plate_number.xml” is used here to identify the car first and then the number plate is identified, scooped, and read by this system.
The author’s prototype is shown in Fig. 1. The components needed for the project are listed under the Bill of Material table. Fig. 2 shows the circuit diagram of the project.
Here, for testing the project, an LED is being used as an indication for the stop barrier’s working. In real deployment, you can use a relay and a linear actuator to open the gate barrier.
As shown in Fig. 2, connect the HDMI display to the Raspberry Pi HDMI and the ultrasonic sensor to Raspberry Pi GPIO pin. Then connect the camera to the camera port using the ribbon cable provided with the camera. You can connect the actuator LED to the pin for the gate open or close actions. The images of the LCD, the ultrasonic sensor, and the camera are shown in Fig. 3, Fig. 4, and Fig. 5, respectively.