I have 4 of these sensor circuits and can't quite figure out the optimal resistor value to use.
Here's what I assume (which somewhere I may be wrong):
The datasheet for the IC states leakage current is +/- 1uA which means its a 5 mega ohm resistor in a voltage divider calculation.
So if I made the pull-up a 2 mega ohm resistor, then 5/7 * 5 = 3.57 volts in if photo-transistor doesn't turn on. which is logic 1 input for many gates but I'm not even using that high of resistor.
But then I learned transistors have capacitance in them and I think my photo-transistor has a 15uS turn-on and turn-off time?
So given this circuit, I chose schmitt trigger because I want the signal to be clean and fast.
I made a microcontroller circuit (connected output of this circuit to demultiplexer input then output of that to one micro's GPIO pin through a resistor) to try to sense when light goes on and off.
I gave roughly a 15uS between each sensor before microcontroller selects the next sensor to sense for light.
Then if light is detected within that 15uS then a 1ms timer starts to see if the light turns off. If it does then detection is complete.
So is my choice of 560K a good pull-up resistor value or do I need to increase detection timing? and what about the schmitt triggers? Is that a good idea for cleaning up signals or is there a better reason to replace them with just inverters (74HC04)?
the phototransistor is an everlight pt334-6c