I have salvaged an optical sensor board from a HP printer just as the one shown c9101-80190-A to use it other hobby projects.
The problem is, I cannot be sure whether it's working or not, as I get always the same voltages (with and without séparation between the diode and the receiver) as shown in the following schematic.

simulate this circuit – Schematic created using CircuitLab
How can I find out if a photogate is working or not?

