Electrical – How to wire multiple ir photodiodes on one arduino pin

arduinoinfraredphotodiode

I'd like to use 50 ir photodiodes.
But, I'm not sure about it because I want it to be read only on one analog pin of an arduino.

My idea is to wire parallel like in this picture.

But, I'm just not sure if all photodiodes will work if I wire like this…

So, is my schematic right or wrong?
If it is OK, what value should I use for the resistors?

Or do I need another component to connect all the photodiodes to one pin on an arduino?

Thanksenter image description here

Best Answer

I'm afraid that doing it the simple way simply will not work. Let's say that your diodes are drawing 1 mA each. With 50 in parallel, that will be a total of 50 mA. Assuming a resistor of about 50 ohms, your nominal voltage will be $$V= 5 - iR = 5 - .05\times 50 = 5 - 2.5 = 2.5 \text{ volts} $$ and if a bug blocks all of the light to one diode the current will drop by 1 mA, and the voltage will increase by $$\Delta V = .001\times 50 = 50\text{ millivolts} $$ While this is detectable with an Arduino, it overlooks something important. If the overall illumination level changes by 2%, the current will also change by 1 mA, and the voltage change will be impossible to distinguish from a bug.

What you need to do is to sample each diode in series, and fast enough not to miss a bug, and at your apparent level of knowledge I haven't the faintest idea how to do that.

Sorry.