This series of slotted optical switches, from Optek Technology, consist of an IR LED and an NPN silicon phototransistor. They sit within a black plastic housing, mounted on opposite sides of the slot. The OPB827 and OPB828 are designed for mounting on a P