Figure 1 - Ultrasoinc Parking Car Counter (click to enlarge)
Using ultrasonic sensors is a popular way of measuring distance. The same principle is implemented in car parking sensors, sonars and other similar devices. But you can also use this technology to make your own cheap ultrasonic counters without having to use switches or IR laser light interceptors. We will demonstrate you how you can easily build your fully operational Ultrasonic Parking Lot Car Counter device using PIC-Ready1 Board with PIC16F887, Two Distance Meter2 Boards, Serial 7-seg Display and Keypad 4x4 with EasyPull. Just connect the cables, load the example and device is ready to rock.
Program is designed to use two ultrasonic sensors: one for detecting the cars that enter the parking, and the other for detecting cars leaving the parking.
- Once program is started, you have to set the number of available parking spaces. Simply tap the desired four digit number on the keypad, and press asterisk (*) when finished.
- The program is then ready to go. Distancemeters are activated and car detection algorithm is now operational.
- As soon as the car passes by the entering sensor, the number of parking spaces on the display is decremented by 1.
- As the car passes by the exit sensor, the number of available parking spaces increases by 1.
Applications
Project has numerous applications. We only suggest several:
- Building your own Car Lot Counters
- Building People Counter Devices
Expanding the project with some other devices, you can find dozens of interesing applications. Don’t hesitate to send us photos of what you have built using this project kit.
Figure 2 - Ultrasonic Parking Car Counter Schematics (click to enlarge)
Source code of this project is provided for free, so you can modify it to suit your needs. Since PIC16F887 comes preprogrammed with free UART Bootloader, you won’t have to spend a dollar more on external programmers. You can modify the project as much as you like, and expand this basic functionality with your own implementation ideas.









