A Smart Car Parking System is something which has not been implemented in many areas. At most places watchmen have been assigned for the smooth functioning of vehicles in the parking area. However, lots of unskilled labor is used up in this. But this is a system which has been realized in many of the developed countries and so this was the basic reason for motivation of undertaking this Project. The System might seem complex to operate, but it is extremely simple to model such a system using Finite State Machines (FSM). This system will have a variety of applications in a multitude of places, and the most important part is that the concept of this system can be extended beyond a car, to say, to allow people to pass through a line in a Cinema hall or a Mall. Thus, in this project, a Verilog Code and a testbench was written for Smart Car Parking System Model.
The state transition diagram has been constructed by considering 5 states viz. Idle, Wait_Pass, Right_Pass, Wrong_Pass, and Stop. Firstly, when the Sensor_Entrance is at logic ‘1’ which would mean the request to entry by some car, the state would change from ‘Idle’ to ‘Wait_Pass’ where the correct password would have to be entered by the person to be allowed entry inside the Car Parking slot. So, if ‘Password_Correct’ is at Logic ‘1’, then the state will be changed to ‘Right_Pass’, else it will be changed to ‘Wrong_Pass’. Now suppose the right password had been entered, and the car has not yet passed the barrier, then the gate will remain open showing no change of state. However, if the car has crossed the barrier and thus the ‘Sensor_Exit’ is at Logic ‘1’, then the state will change back to ‘Idle’, indicating the closing of the door and returning to initial state. Now, suppose a wrong password was entered as a result of which ‘Password_Wrong’ is at Logic ‘1’ then, the state will change from ‘Wait_Pass’ to ‘Wrong_Pass’ and it will remain there until a right password is entered after which it will go from ‘Wrong_Pass’ to ‘Right_Pass’. ‘Wrong_Pass’ state will not trigger the opening of the door. Finally, suppose both the ‘Sensor_Entrance’ and ‘Sensor_Exit’ are at Logic ‘1’, showing one of the cars almost having entering the other side and being detected by ‘Sensor_Exit’ and another which is just behind it and is wanting to enter. Then, once the first car passes through, the gate will automatically close after coming into the ‘Stop’ state, and so the car behind would have to provide the ‘Password_Right’ to be allowed an entry inside the parking slot. This is done for the smooth functioning of the Smart Parking Slot System and avoid two cars entering together if they are close behind one another.