Multiple photoresistors, single analog input. Will it work?

I have attached a quick and dirty paint drawing of a circuit. I have read that you have to do a double read with a delay when working with multiple analog inputs, as the board has to wait for something funky to happen with the voltage when it swaps which pin to check or something.

I would like to avoid this, so I thought hey, why not supply voltage on the digital pins and just swap between those, and take an analog reading on the same pin?

Would this work? I figured the diodes would be needed but after 6 weeks in my Instrumentation and Controls class I still haven’t done anything other than reducing circuits made entirely out of resistors, inductors, and capacitors so the operation of circuits containing diodes is foreign to me.

The objective here is to be able to take readings from one of the 8 photoresistors at a time in rapid succession. Calibration is a nonissue, as I would be looking for a deviation in value provided from a specific photoresistor. The idea is that a user presses a button, the arduino takes a few measurements from each of the photoresistors and avarages them to provide a value for each one, then begins to randomly select a photoresistor, check it rapidly for about a second, then quickly and randomly choose another and check it for about a second. If the returned value deviates by some percentage from the values measured when the button was pressed, then an object likely blocked the light source hitting the photoresistor (an LED).

This is to be a sort of “game” where the user must throw an object though one hole out of eight possible holes, but the correct hole to throw it through is randomly and rapidly changing, so the Arduino is only taking measurements from the photoresistor at the “correct” hole, but the arduino will rapidly change which hole is the “correct” hole and thus must be ready to quickly take readings from a different photoresistor.

I am not entirely sure whether the "double read" requirement is due to switching the input multiplexer, or something else in the ADC and its ability to respond to varying inputs, which would then be equally problematic for an external multiplexer such as you propose.

Other than that however, the principle would work quite OK. In fact, you should not need the diodes if you simply set each pin in turn to an output and HIGH to enable an LDR, and then as an input and LOW to to disable it. (All set initially to input and LOW.)

On the other hand, the double read is hardly a reason not to use separate analog pins. If that is what you need to do, you just do it!

Hi, you don't need the diodes, make each photoresistor a separate voltage divider and connect each to an analogue input, then do all your logic in software.
The photo-resistors can be left connected all the time. You have up to 16 analogue inputs to use.

http://playground.arduino.cc/Learning/PhotoResistor#.UxGagPmSzCs

Tom..... :slight_smile:

I have read that you have to do a double read with a delay when working with multiple analog inputs, as the board has to wait for something funky to happen with the voltage when it swaps which pin to check or something.

You have read that but you have not understood the context.
That is a solution for a problem you don't have, that is one where your input impedance are too high.