I want to use my Arduino Uno with photodiodes connected in series such that when "dark", any of them would cause an "on" condition and remain "on" until all photodiodes detect full light.
My layout is 40 feet square with many railroad crossings which have gates and flashing signals that will be activated by trains riding over photodiodes embedded in the tracks leading to those crossings.
Does anyone have experience doing (Sketching) that type of project, please?
I think that using the wiring to determine the logic of the system is a waste of having an Arduino in the system. Also it is not that easy to get a photo diode to get a signal like that. Maybe you are thinking of how an LDR, Light Dependent Resistor works.
You would be better using a reflective optical switch and having a white blob of paint on the underside of the train or carriage you want to detect.
Think of photo diodes as SPST switches. All of the switches are in series and all are OFF. What is the resistance of that series of switches? Infinite. Now turn ONE switch on. What is the resistance? Still infinite. Turn all but one switch on and what is the resistance of the series string? Still infinite.
Perhaps you need to consider placing all the switches (photo diodes) in parallel. Then any one of them will be able to complete the circuit and show an "on" condition.
Even with all in parallel, you cannot know if more than one diode is illuminated.
If you continue, you will need to test EACH photo diode individually and use logic(software) to determine the next step.
Paul
Photodiodes act as current sources, which need to be connected in parallel so that the total current sums. Putting current sources in series is usually bad news (just as putting
voltage sources in parallel tends to be bad news).
So, when using photodiodes (PD), do I still need to use resisters in the scheme?
Example: One PD leg to 5V+, remaining PD leg to a resistor which is connected to ground. A lead from the junction of the 2nd PD leg and resistor connects to A0 (analog input) ....... or can the junction lead connect to any digital input?
In other words, can the 2nd PD leg (absent a resistor) just be directly connected to a digital input - creating a "1" or "0" switch when shaded from ambient (overhead fluorescent lighting)?