Thanks for reading my post!
I recently took apart an HP scanner/printer and pulled out some interesting parts. I can't seem to get an optical encoder/motor assembly to work, and there are no part numbers or markings that lead me to a datasheet.
Attached pictures below show two photos of the assembly itself, and a schematic I made to keep track of things. A-F connected to a ribbon cable. Here is how I interpreted it:
A and B are clearly for powering the motor
The two 1.8kOhm resistors serve as pull-up resistors for the two outputs (E and F)
The 101Ohm resistor is current-limiting resistor for the IR emitter.
C is the cathode for the emitter, and powers the pull-up resistors.
D is the anode for the emitter, and a common emitter for both channels of the phototransistor detectors.
E and F are the two outputs, pulled high when in the dark and low when illuminated.
So, I connected C directly to 5V, D directly to ground, and alternated trying E and F in Pin8 and ran the very simple code below (which works fine for a simple slot IR interrupter) while I slowly turned the motor shaft. Surprisingly, pin 8 always reads high.
Has anyone else pulled these out of a printer and made them work? Have I overlooked something? Any help is much appreciated!
int InputPin = 8;
int LEDPin = 13;
void setup() {
 pinMode(InputPin,INPUT);
 pinMode(LEDPin, OUTPUT);
}
void loop() {
 digitalWrite(LEDPin,digitalRead(InputPin));
}