Read out 4-pin optical Encoder (Quadrature?)

I bought this motor with an integrated speed encoder of eBay and dont know how to read it out.

I´ve worked with quadrature encoders before and know how to read them out but this one only has 4 instead of the usual 6 legs.
The pinout from the ebay description doesnt help, it´s missing GND for example.
I´ve tried to figure out which pins the LED are but nothing lit up however I wired it.
Ps.: I didnt forget the series resistor for the LED.

I´ve desoldered the PCB form the motor but it doesnt help me in any way.
The pinout is the one described on eBay.

Anyone else got an ideas how this one works?


It’s certainly not a quadrature encoder. There’s an image on the ebay page which shows how to wire it

I´ve seen that, but again, that´s a pretty crappy schematic. I´m not really sure where the "sent" and "receive" connections would attach in that circuit and I have no idea what kind of signal I´d be getting in the end and how the information is encoded in it.

If I´d just know the name of this type of encoder I could probably read up on it but I´m kina stuck at the moment.


It looks like a standard slotted optical encoder with an internal optocoupler. The device output goes to an external transistor which is switched on or off if the light blocked or not. It looks like a standard open collector output with a pullup resistor.

There’s another image which shows some actutal wiring

and the pin out

I think the two wires with nothing connected are the motor leads

The yellow is 5v Vcc. The black and red are sent and receive.

The resistors and the transistor are what’s shown in the previously posted image.

Then the white wire goes to the Arduino input, and the black would go to ground.

But your correct. The documentation on this is pretty crappy and I’m making my best guess from the available bits and pieces.

+5V to the 5V pin, 220ohm? resistor to ground on send (the LED), 10k? resistor to ground on the receiver (voltage divider with the photo-diode). Something like that ought to work. You'll get noisy analog pulses,
which might work on a digital pin with the right value of receiver resistor and some software-debouncing. I'd add upto 1nF of capacitance on the receive side to kill the EMI from the motor

Thanks everybody.

From all the information we´ve gathered I see another problem for my application though. To me it seems that there is only one Photointerrupter build into this encoder so I´d only ever be able to measure the absolute rpm and not the direction.
That´s necessary for my application though so it seems they are unusable anyway.
I´ll throw em into my junkbox and will probably just use them as dc motors without the encoders sometime.
I better look closer to what I buy next time!