Best way to get inputs from multiple photosensors

I would like to make an array of photosensors (shooting for 5x5 to begin with). I'm thinking I would use voltage comparators (LM393 or similar) to read digital values back to the Arduino. Basically, I'm thinking I would duplicate the circuitry on these types of breakout boards.

Will this work?

Yes.

If you want the LM393s can be wired ORed as they are open collector, then only one Arduino input would be needed.

Show us a schematic before you settle on your design.

Thanks for the quick response. Are you saying I can connect them all to the same voltage comparator and then just read it 100 times sequentially to gather input from 1 digital pin?

image

The above is the equivalent circuit of one 393 circuit.

The output transistor has no pull-up resistor (open collector).

If you want any of the 393s to cause one pin on the Arduino to go HIGH/LOW then you use one pull-up resistor and tie all the 393 outputs to this one resistor and to the input pin.

If you want to be able to determine which sensor caused a change, then you need separate pins on the Arduino.

If you just want an on/off signal then it should work. You will need 25 input pins so either an Arduino MEGA or some kind of input expansion.

You might not need a comparator. Using the photoresistor as part of a voltage divider (one pot? one pot and one fixed resistor?) connecting to an Arduino input may be sufficient.