Help identifying this sensor
This is a simple transmissive optical sensor. The LED produces (infrared) light, and the phototransistor senses it 

Connect the LED (K to ground, A to +5 through 270 ohms or around that). Measure the voltage across the LED- it should be around 1.2V. Don't omit the resistor or you will destroy the LED. You won't be able to see the IR light, but a camera might pick it up. If the voltage is 1.2V then it is almost surely producing light. 

Connect the E to ground, C to +5 through 20K. Measure the voltage at C relative to ground- with nothing inserted into the slot. If it is not less than 0.6V or so increase the resistor, up to a maximum of maybe 200K. 







simulate this circuit &ndash; Schematic created using CircuitLab