This vehicle counter counts the number of cars and the vacant space available in a parking lot and shows the values on a three-digit dual-colour display. The number of cars is shown in red colour and the space available in green colour.
The circuit design is the same as for the ‘Traffic Light Count-Down Timer with Dual-Colour Display’. So if you already have this project, you don’t have to buy or assemble a new Arduino board. Just by burning the parking_counter code given in this article into the ATmega328 microcontroller, the functioning of the board can be changed to a vehicle parking counter. For parts-list, circuit description and AVR programming using Arduino IDE,.
Fig. 1 shows the block diagram of the Arduino based vehicle parking counter.
 |
| click to enlarge |
Vehicle loop detector
Almost all parking lots in buildings or malls use loop detectors buried inside the road to detect the movement of vehicles crossing the gates. They detect the vehicles but ignore the gate crossing by humans, bicycles, etc. Usually, these detectors are part of electronic oscillator circuits. The loop detector circuitry and its description are not included here. However, its basic concepts are described here to give you some idea about how the loop detector works along with the vehicle parking counter.
A typical two-way gate system with boom barriers is shown in Fig. 2. When you approach a vehicle parking boom gate, you may notice a rectangular scar where the road surface has been cut with a saw and then re-sealed. This is the sensor loop. The loop consists of one or more turns of wire buried in the roadway and connected to an electronic circuit which can detect avehicle passing over it.
The boom barrier is raised by pressing a switch to allow vehicles cross the gate. The boom barrier automatically lowers down after the vehicle crosses the gate.
Vehicle loop detector connections to parking counter
Fig. 3 shows a typical preformed loop with extension cable. The two ends of the loop wire are connected to the loop extension cable, which, in turn, connects to the vehicle detector consisting of an electronic circuitry enclosed in a box.
 |
| Fig. 3: Typical preformed loop with extension cable |
Almost all parking lots in buildings or malls use loop detectors buried inside the road to detect the movement of vehicles crossing the gates. They detect the vehicles but ignore the gate crossing by humans, bicycles, etc. Usually, these detectors are part of electronic oscillator circuits. The loop detector circuitry and its description are not included here. However, its basic concepts are described here to give you some idea about how the loop detector works along with the vehicle parking counter.
The detector powers the loop causing a magnetic field in the loop area. A base frequency is established when there is no vehicle over the loop. When a vehicle crosses the loop, the resonant frequency of the loop increases. This increase in frequency is sensed and, depending on the design of the detector, causes a normally open relay to close. The relay will remain closed until the vehicle leaves the loop and the frequency returns to its base level. The relay activates the control devices such as an audio intercom system, gate motor and vehicle counter.
Fig. 4 shows a typical dual-channel loop detector. It has two relays. One relay energises when the vehicle enters the parking area and the other energises when the vehicle exits the parking lot. The normally-open (N/O) terminals of these relays are connected to the parking counter.
Circuit operation
In case you do not have access to loop detectors, the circuit can be tested using switches S1 and S2 in place of the relays (see Fig. 1).
There are three modes of operation, which can be selected using jumpers P1 and P2 as shown in the table.
When jumper P1 is kept open and P2 is closed to ground, the mode of operation is ‘setting.’ Set the parking lot capacity (say, 999) using switches S1 and S2, wait for ten seconds and switch off the circuit. The parking space capacity is now stored in the internal EEPROM of ATmega328. Setting mode is required only once during installation in a new parking lot.
 |
| Fig. 4: A typical dual-channel loop detector |
When jumpers P1 and P2 are kept open, the circuit operates in vehicle counting mode. Here the display shows the number of vehicles inside the parking lot. When the vehicle count reaches 90 per cent of the maximum capacity of the parking lot, the display will start blinking. So if the maximum count is set at 60, as soon as the vehicle count is 54 or more the display starts blinking. This feature can be used to put ‘parking full’ sign and stop entry of vehicles except the priority vehicles.
When jumper P1 is closed and jumper P2 is opened, the circuit operates in vacancy counting mode. The display turns green to shows the total number of vacant spaces available in the parking lot.
Installation of the parking counter
One vehicle detector is installed at the exit gate and the other at the entry gate. Connections are simple. Switch S1 is connected to N/O contact of the relay at the exit gate and S2 to N/O contact of the relay at the entry gate. Every time a vehicle crosses the entry gate, the count increments by 1, and when a vehicle crosses the exit gate the count decrements by 1.
During normal operation, jumpers P1 and P2 should be kept open. These may be replaced with suitable pushto- on switches during installation. The operator can use jumpers P1 and P2 as per the modes listed in the table to check the capacity and space available in the parking lot.