Dear Ajay ,
You need to connect it the comparator input across the photo diode (D1) . All the best !!
You may have to modify your circuitry. The photodiode will have a dark current passing through it even at complete darkness. So at any point of time your comparator +ve terminal is not going to have a voltage less than -ve terminal for the circuit to work. You can use another potential divide(or a pot to adjust sensitivity) in one of the terminals while the photo diode-resistor divider is connected in the other terminal.
With that setup mentioned vsrs I see the LED change value when a multimeter is connected at "Pos" and "Neg". Then if I cover photodiode and uncover photodiode it functions beautifully, with digital multimeter giving me voltage variation from 0.something volts to 4.7V.
If I remove the multimeter probes and repeat the test. i am unable to see the result. The LED is always ON whatever I do with the photodiode.
I am not sure that I understand this :-()
Note: adding resistors 10k,100k, 1M,2M,2.5M or R4 (without DMM) in the circuit above did not give proper output .
How do I make my photodetect circuit fool-proof ? I should not be having a multimeter connected in my end result.
R4 should be actually a pot, rather than a resistor. You can tune it accordingly. Before connecting the setup with the circuit you can individually check the voltage generated across R1 while photo diode is covered and uncovered and decide on the tripping point.