Electronic – Help identifying this sensor

identificationschematicssensor

I would like to know if this is a sensor and the name of it if it is possible. I post two pictures, sorry about bad quality of them.

In my opinion it works sending different signal if something is between little "crystal sticks" into the dark of the black box.

Would be wonderful to know the schema to connect it to an Arduino, also if is mandatory to add some other component like resistor (I should post another question for this, may be)

Both components are very similar with a few little differences.

Thanks a lot in advance.

enter image description here

enter image description here

Best Answer

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.

schematic

simulate this circuit – Schematic created using CircuitLab