Photodiode - Turn Digital Input pin into 1 with little light Input
From what I know, photodiodes work "backwards". That is, they create a current flow from the cathode to the anode, so in your schematic \$PD\$ is likely the other way around. This way, there's no light detection going on, I guess current will flow through the circuit at all times.







simulate this circuit &ndash; Schematic created using CircuitLab

The above schematic is my attempt at minimizing what's required for digitizing the PD output. It relies on the roughly-100 current gain (Beta) of the \$Q_1\$ transistor. \$10\mu A\$ should be enough to cause \$1mA\$ flowing through the collector-emitter junction. \$R_1\$ is simply a pull-up that says, that in dark conditions, the output will be HIGH. \$Q_1\$ then pulls it low-ish, when \$PD\$ gets illuminated enough.

To fine-tune the sensitivity threshold, you can try adjusting \$R_1\$ (or potentially replacing it with a potentiometer.)

Feel free to point out any mistakes I've made.