I'm using a couple TCRT1000 reflective optical sensors in my project. I am using it on a rotary encoder printout consisting of white and black strips. For some reason, no matter how I orient the sensor, it senses the position of the Black->White transition differently than the White->Black transition. I'm not referring to hysteresis. What I mean is White is on the left side of the sensor and Black is on the right side verses the other way around. I don't really understand why that would happen, although I remember seeing some blogger saying that he ran into this problem and fixed it by printing it so that the white strips were smaller than the black ones or something like that. Is this a known issue with reflective optical sensors in general? If so why is that happening? It just doesn't make sense to me.
Wild guess: the sensor receives light from a wide angle, so that the white fields are already "seen" when approaching, not only when exactly under the sensor. When a white field approaches the sensor, the brightness will increase until the transistor pulls the signal low, then stay constant for some time, then decrease again when the field disappears at the other side. That's why the active (white) areas can/should be smaller than the dark areas for a symmetric waveform (50% duty cycle).
The datasheet mentions a peak operating distance of 1 mm. Any larger distance will increase the angle, from which light is reflected back to the phototransistor, making it turn on earlier and turn off later.
BTW I hope you added an pullup resistor to the collector?