1. A circuit comprising: a source light and a photodetector which are positioned relative to each other to function as a light-detector pair; a sensor controller having means for selecting said source of light to energize it to provide a light coupling relationship with said photodetector; said photodetector having a terminal at which an open-condition voltage is developed for an open condition i.e. when no object is between said photodetector and said source of light and at which a blocked-condition voltage is developed for a blocked condition i.e. when an object is between said photodetector and said source of light; a comparator having inverting and non-inverting inputs thereto and an output therefrom and means for coupling said inverting input to said terminal; a digital to analog converter having its input coupled to said sensor controller and its output coupled to said non-inverting input of said comparator; said sensor controller having means for ascertaining said open condition voltage in cooperation with said comparator and said converter, said sensor controller also having a memory in which a test value is stored; said test value corresponding to a predetermined fraction of said open-condition voltage; and said sensor controller issuing said test value to said D/A converter which supplies a corresponding voltage to said non-inverting input of said comparator to enable said comparator to generate first and second signals corresponding to said open condition and to said blocked condition, respectively, with respect to said photodetector.