I made exactly the same circuit shown(source of the circuit is part of figure 6 took from www.ti.com/lit/ds/symlink/opt101.pdf ) here. The only change was that I used +5 volt power supply(across pin 1 and 3) instead of +15V as drawn in the data sheet).
After making the circuit, I made direct sunlight to fall on the IC, output voltage was almost zero. I am able to see a positive spike(around 1.5 V) only at the moment when I block the light path and make no light fall on the IC. After the spike, the voltage is again zero. When I unblock the light, again a spike(this time negative spike(around -1.5 V)) appeared at that moment.
I mean, the circuit gives a non zero output ONLY WHEN THERE IS SUDDEN CHANGE IN INTENSITY. But instead, there must be a output voltage depending on intensity of light and not as a function of rate of change of intensity.
What mistake am I doing?