How to wire up optical encoder

Hi!

Someone at printer maintenance gave me an optical rotary encoder from a printer and I want to connect it to Arduino, but I have problems decyphering the wiring. When I search for datasheet I cant find that specific model, but I did find one selling on ebay (not that it matters anyway). Did someone already have experience wiring sensor like this and could share the procedure? Thanks a lot!

IMG1
IMG2
IMG3
IMG4
IMG5

The type could be Q9852, but I'm not sure. The brand could be Avago or Agilent. Avago was once a part of HP, and Agilent is a spin-off from HP, so I guess that printer is a HP printer.

Google for : HEDS-9710 datasheet You find them at Agilent and at Avagotech. I think that might be a similar encoder.

Koepel: The type could be Q9852, but I'm not sure. The brand could be Avago or Agilent. Avago was once a part of HP, and Agilent is a spin-off from HP, so I guess that printer is a HP printer.

Google for : HEDS-9710 datasheet You find them at Agilent and at Avagotech. I think that might be a similar encoder.

Thanks for this! I think it has the same wiring

PCB CONNECTOR

I have wired it to arduino and tried two programs to get a response from it, but so far nothing :\ Then I tried printing value of analogRead when its connected to A0 but still nothing when I spin the wheel :\ I can, however, see red light inside.

Edit: Hmm it has two power plugs, one is connected via resistor and the other is connected directly. So far I used the one with a resistor.