Internally, I've built the following circuit:
I'm not sure this is a reasonable circuit. Here's what I was thinking coming up with it:
The photodiode is reverse-biased for better sensitivity and linearity. The voltage drop across R1 is linear with respect to the power hitting the photodiode. To measure this voltage, I use an op amp, with potentiometer 2 causing negative feedback to reduce the op amp's ridiculous gain.
First, pot 2 is set for maximum gain and pot 1 is tuned so that in complete darkness the voltage at E just drops to ground. Then pot 2 is tuned to set the gain, and hence the range of brightnesses that can be measured.
However, the voltage at node E is not linear with respect to incoming light as I want and had expected it to be.
Example: In an otherwise-dark room, laser 1 produces an output of 0.678 (arbitrary units!) while laser 2 produces 2.198. However, together they only produce a reading of 2.290 (while one would expect 0.678+2.198=2.876). The op-amp is not saturated; I can produce a reading of ~18 with a much brighter source.
Question: what's going wrong with my circuit to cause this nonlinearity? Is the equation easy to find (so that I might correct for it in software)? Otherwise, if my circuit seems reasonable, which else might be going wrong?