This bidirectional optical switch detects the direction of movement of an object that passes between them. The circuit is from a Texas Instruments optoelectronics manual from 1992 and the supply is 5 V, as it is an application with TTL logic. The maximum speed of passage depends on the chosen logic family.