To confuse myself less, I'm gonna say photosensor instead of phototransistor because everytime I type, I type photodiode. lol
Lowering the resistor from supply to photosensor did help quite a bit and the voltage measurement at input pins of the 74HC251 is < 1V or 3.5V which is OK. so 2 out of 4 boards of sensors now work.
But I have some photosensor which is connected to a long cable before hitting the sensor detection, and that detection doesn't work. I verified this by testing at the 74HC251 and the input voltage reads < 3V which doesn't mean logic high for the part.
The cables I'm using are the following for each set of sensors that don't work:
For the one set of 12 sensors, I'm using 1 wire in the grey flat ribbon cable 10-core I bought from here:
https://futurlec.com/Cable.shtml to connect it to the main board (yes I need to make some boards separate from others). Its about 60cm in length.
For the other set of photosensors that don't work, I'm using the same kind of cable but coloured about 15cm in length as well as a 3-foot DB9 serial cable. (In other words, the wire length from photosensor to the input of the opamp is about 3 feet in length)
However, the two sets of sensors that do work have cable lengths that are shorter. One length is about 30cm and the other length is about 10cm.
Having said that, I made another schematic with resistor values I corrected. and I use high values for R3 and R4 in the megaohm range. About 1.8M.
So this leads me to a couple questions:
1. What is the resistance of one wire in a flat-ribbon cable given the length?
2. What is the resistance of one wire in a 3-foot DB9-DB9 serial cable extension cord?
3. How do I adjust the value of the resistor marked 68K on long wire connections such as the ones I described so that the photosensor can be detected?