parking management system, we aim to create a smart parking system which will not only calculate the total capacity for cars in the parking area but will also direct the cars to an empty spot where they can park their cars in an orderly fashion. This parking management system will require at least 6-8 proximity sensors to detect the presence or absence of a car and also to detect if a car has entered the parking area. Secondly we will also use 18 red LEDS which will be used to guide the driver to a vacant space in the parking lot. Lastly we will use one red and one green LED which will tell the driver when he/she has to enter the car in the parking lot (to avoid congestion).
Working of parking management system
We will use a micro controller (PIC18F46K22) to control the working of our project. When a car enters the parking area, the IR sensor placed at the entrance will give a high at its output. This output is then fed to the interrupt pin of the microcontroller and after executing some code in the interrupt service routine, the micro controller decrements the remaining capacity and gives an intelligent output to the guide the car at its parking spot. This output is given in the form of blinking LEDs. When a parking space is occupied, the path (made by blinking LEDS) changes automatically so that it points to a new vacant location. When all parking locations are occupied, the LCD gives a output of “Parking Full !”. A green LED lights up initially to indicate that a car can enter the parking lot.
The moment it enters, the green LED switches off and a red LED turns on. This red LED indicates that the next car cannot enter and it stays that way until the car (which has entered) has parked to an empty location. IR sensors are also placed at each parking spot. These sensors are needed to tell the microcontroller whether a parking space is occupied or not. This is achieved by giving the output of the sensor to Port B of the microcontroller (Interfacing).
Circuit Diagram of parking management system
Circuit diagram of parking management system is given below. It is just a demo of parking management system so for practical purposes one need to implement larger circuit than this.
Explanation of Circuit Diagram of parking management system
For this project we have used all ports of the microcontroller except for PORT E. For inputs form IR sensors, we have used logic states where ‘1’ means that a car is parked at that spot and ‘0’ means the the parking space is unoccupied. Port C and Port A are interfaced with the microcontroller using SIL connectors. Port C and Port A are used as output ports and they are used to light up the LED path and to control the green/red LED at the entrance. Port B is also interfaced with the micro controller using a 8-pin SIL male connector, Port B is used for input to the microcontroller . Each pin of port B is connected to the output of one of the IR sensors. (6 sensors for parking + 1 sensor for entry + 1 sensor for exit) . The LED path can be thought of as 3×3 matrix where a set of two LEDs represent a single element of the matrix. The memory clear/reset pin is always given a high at input because otherwise the simulation does not run. Lastly Port D is interfaced to the LCD and will be used to show the capacity of the parking area.
Code for Project parking management system
Code for parking management system is not free of cost. If you are interested to purchase code, contact me at email@example.com
Explanation for Code of parking management system
Essentially the code works using interrupts. Interrupts are used to handle entry and exit of cars on a priority bases and they trigger execution of certain functions which run in a while loop in the main code.The parking lot is divided into a 3×2 matrix. A 1 in a matrix represents a car being parked there and it is updated once every time in a while loop. When a car enters and a path has to be made, the matrix is expanded into a 3×3 matrix. A 1 in the LED matrix indicates an empty parking spot.The matrix is biased to always give the closest parking spot to the exit. A path of 1’s is created from the empty spot to the entrance and is refreshed every cycle. So if a parked car leaves from a spot closer to the exit the path reroutes to that empty spot.
To avoid confusion only one car is allowed to enter the parking lot at a time till it is parked.Once the LED matrix is made a loop is run to make the path blink one LED at a time. Making it intuitive and easy to follow. The positions of LEDs and sensors that correspond to the matrices have to be fixed to particular ports and pins.Entry LEDs allow entry only if there is an available spot, or if the entered car is parked. However, a leaving car doesn’t halt entry as there is obviously only one way out so guidance isn’t needed.The LCD also changes text for each situation. The delays added in the LED path are purely for show and do cause delays in computation and LCD updating. The circuit needs about a second to adjust to any changes.