# how to wire together multiple photoresistors to make one big sensor?

I'm using an esp32 dev board, and a bunch of 5v laser diode emitters pointed an equal number of photocell resistors across a plane. The goal is only to detect when any two or more beams break at the same time.

I could try to wire up one resistor per pin (the 32 has 18 analog pins), which I know enough to do on my own, but that feels stupid. I feel like there is a smarter way to just wire up the photocells so that any simultaneous break of two or more beams will result in a net change that is big enough for me to read on one pin.

To be clear, I don't care when 0 or 1 beam breaks, only 2 or more.

Is there a way for me to wire together the photocells (series? parallel?) so that I can then test what 0 breaks reads at, what 1 reads at, and then act on 'whatever 2 or more breaks' reads at? What would that circuit look like?

• photo resistors are relatively slow to respond to a change in light intensity .... what response speed do you need? – jsotola Nov 1 '18 at 17:49
• why don't you arrive at the solution experimentally? .... wire together the photocells (series? parallel?)  .... do each of those and use an ohmmeter – jsotola Nov 1 '18 at 17:52
• Search for light fence circuits, you can see how this has been done many times before. I think many systems sequentially switch one LED on and read the corresponding sensor at speeds high enough to appear simultaneous to a moving hand reaching into a hydraulic press or whatever. – KalleMP Nov 1 '18 at 19:48

I would take the following approach:

• Measure the resistance of one device with laser absent and laser present. You will have two readings.
• Mathematically model the circuit with all photo-resistors lit and then with two dark.
• See if you think you can create a potential divider that will allow you to reliably detect the difference in voltage between those two states.