Hello,

I'm trying to use the optical encoder from a ball mouse to make a cheap quadrature encoder for an electric motor.

I've removed the part of the PCB with the LED and sensor, and wired them up the same way as the mouse. The sensor has three pins - +5V and two outputs. I've connected the outputs to ground via a 20K resistor and hooked up the 5V pin to my power supply. If I then measure the output from one of the sensor pins with a voltmeter I can see the voltage swing between about 1V and 4.5V as I block and unblock the sensor. But if then attach the output to an input on my PIC the PIC doesn't see any change, and the voltage on the pin only reaches a fraction of 1V.

One of the websites I've seen on this topic uses a hex inverter, so I've tried this to see if it improves things. With this set up I get a very clean 0V or 5V when connected only to the voltmeter, but similar results as soon as I connect it to the PIC.

I'm sure I'm doing something wrong that'll be obvious to more experienced readers. Any help is greatly appreciated.

Thanks,

Luke