We have used 2 sensors for different purpose. One is used for distance measurement, & the other is for to determine the proper length of the parking space.
This is a simple IR Tx – Rx sensor. which we have used to measure the distance i.e. is the width of the car. If it crosses the threshold value it gives a high pulse otherwise a low pulse. Thus this can work as a digital output circuit.
This sensor is used to measure the length of the parking space. There is a prob sticking out from right rear wheel. And the sensors(i.e.- Tx & Rx) are placed in such a way that while the wheel rotates the prob is detected by the sensors once for each revolutions & sense a high pulse. Now the wheel has a fixed perimeter, so if we can count how many time it rotates we can measure the length. Microcontroller keeps track of the number of high pulses thus send; The no high pulse multiplied by the wheel circumference gives us the length of parking space.