Poor man's IR obstacle sensor make sense(improve) from signal under daylight
A photo diode should be used in reverse bias mode for better speed, and AC coupling should be used to reduce interference from most ambient light sources.  







simulate this circuit &ndash; Schematic created using CircuitLab

Some added design notes on the above circuit:  

L1 lets most of the DC current pass to ground but blocks most of the higher AC current.  

The op-amp gain needs to be fairly high (maybe 50 or more) as the diode's reverse current signal is very small.   

The two high value resistors bias the signal at 0v so a maximum output (wider swing) signal can be obtained (and easily rectified if needed).  Bias at a voltage other then near 0v could overload the op-amp's output when using a high gain.  

The bias resistors are very high values because the diode current is very small, (the effective diode output impedance is also very high). Low value resistors would swamp out the diodes signal.  The higher values here also help to keep the bandwidth wide.  

The diode does not operate as a simple diode, it puts out a fairly linear reverse current related to the intensity of light hitting it.  

Using AC pulses allows for an easy separation of the ambient light signals (at or near DC) and the desired LED light signal (high frequency pulses).  

The coding of the output signal is such that a stronger reflection coming from the LED (as when  moving closer to an object) gives a higher AC signal at the output.  The signal could be rectified to get a DC voltage related to the reflected light level.  

Some additional photo diode reference:  http://en.wikipedia.org/wiki/Photodiode