This circuit shows how to control a TTL logic gate with a phototransistor. The phototransistor supports an equivalent as does the emitting diode. The resistor in series with the emitting LED can be 330 ohms for 5 V logic and 120 ohms for 3 V logic.

This circuit shows how to control a TTL logic gate with a phototransistor. The phototransistor supports an equivalent as does the emitting diode. The resistor in series with the emitting LED can be 330 ohms for 5 V logic and 120 ohms for 3 V logic.