I have used a servo motor(to control entry and exit), two ir sensors(counts the cars entering and leaving) and a seven segment display(to display the count) to implement smart car parking with arduino uno. The ir sensors are detecting obstacles continuously without any actual obstacle in it's path. Only for few random orientations of sensors, the project is working properly i.e., sensors are detecting only when there is an obstacle. What could be the issue and how do I debug it?
Need more info. I assume the IR sensor has a LED on one side and a detector on the opposite side similar to the emergency stops on garage door openers.
Are they aligned correctly? How wide is the beam? How far out of alignment can they be before you loose the signal?
Are the brackets stiff or could one or both be moving?