I agree with Oli, but lacking other info, here's a few suggestions.
"String of phototransistors" suggests they are wired in series. If they are all normally illuminated and hence "on", then when one is interrupted the chain goes to high resistance state. You presumably have a resistor or current source in series with this, and this is all wired across a voltage supply to create a voltage divider which your comparator is monitoring?
If that's the case, then here are some possible issues:
- the blocking of the phototrans doesn't occur as immediately as you perhaps believe
- the transition from low res to high res vs position of the obstruction isn't the same from one phototrans to another
- the phototrans fields of view may differ.
- Different phototrans may be seeing differing amounts of ambient light, which means the amount of current still flowing when ostensibly "off" may differ.
A further problem is that the transition you are looking at is one in which the series resistor (or current source) is charging the capacitance of the wiring, the phototransistors and the comparator input. That's normally a fairly small capacitance (so would charge quickly). But to get the phototrans chain to saturate (maximally conduct, produce minimal drop) when unobstructed, you may have chosen a relatively high series resistance. That high resistance which will slow that transition, and also make it sensitive to different degrees of offness of the blocked phototrans.
The larger problem is trying to deal with a bunch of phototrans in series. You may well be better off dealing with each phototrans separately. You could connect individual phototrans+resistor divider direct to a digital gate (cheap, and can include hysteresis to avoid noisy transitions) like an 74HC14, or 4093 (tie input pairs together). You can AND or OR these together to get aggregate results. You may be able to place these "signal conditioning" components close to the phototransistors to avoid running so many wires to your main electronics.
This strategy allows you to deal just with the characteristics of individual phototransistors, and to isolate anomalies, without having to deal with the effect of the rest of the chain on the individual detectors.
Hopefully this answer is not too far off base, considering we don't really know your setup. :-)