If you are using the setup in the first schematic then the voltage will decrease when more light strikes upon the photodiode as then the photodiode allows current to follow creating a voltage divider.
You'll have to do your own tests on the photodiode itself, namely an inline Current measurement after the photodiode as well as a Diode test on the photodiode to determine it's voltage drop.
Vout = ((VCC - Vce) * (Idiode / (VCC - Vce))) / (R1 + (Idiode / (VCC - Vce)))
Where:
Vout is the Voltage output from the detector
VCC is the voltage of the battery or regulator.
Vce is the voltage drop of the photodiode.
Idiode is the current flowing through the photodiode when light strikes upon it.
R1 is the resistor above the photodiode, your reference resistor.
Again, you'll have to do some tests but just use the formula above as a baseline for your code to predict(or atleast have a good idea) for the high values and low values of your IR Emitter/Detector pair.
,macdad-(Nick)