I found an old mouse with a ball and x/y optical encoders that I decided to sacrifice in the name of science.
I used this guide and the circuit around the IR LED and Transistors:
http://users.on.net/~merrifield/opto/index.html
In the mouse they have the 2 LEDs in series with a 85ohm resistor on 5V, the LEDs Vf is about 1.25V. Calculaced the current through them to about 30mA, so I used 220ohm with 1 LED for about 17mA current. LED/Resistor + Opto Transistor with a 4 pin connector is soldered on a piece of perfboard, the wheel is held in place with the plastic stands from the mouse.
This is where I start to get problems. I can't seem to have a stable output from the transistor pair only if I use a 74hc14 inverting schmitt trigger as a buffer, and take the output from the IC. I have tried different value pulldowns, series resistors, 2N3904 NPN, bs170 N-FET transistors, but my output with them is unreliable and triggers erratically.
Anyone worked with this type of encoder hardware? I would appreciate your experiences and suggestions!
http://users.on.net/~merrifield/opto/index.html
I used this guide and the circuit around the IR LED and Transistors:
http://users.on.net/~merrifield/opto/index.html
In the mouse they have the 2 LEDs in series with a 85ohm resistor on 5V, the LEDs Vf is about 1.25V. Calculaced the current through them to about 30mA, so I used 220ohm with 1 LED for about 17mA current. LED/Resistor + Opto Transistor with a 4 pin connector is soldered on a piece of perfboard, the wheel is held in place with the plastic stands from the mouse.
This is where I start to get problems. I can't seem to have a stable output from the transistor pair only if I use a 74hc14 inverting schmitt trigger as a buffer, and take the output from the IC. I have tried different value pulldowns, series resistors, 2N3904 NPN, bs170 N-FET transistors, but my output with them is unreliable and triggers erratically.
Anyone worked with this type of encoder hardware? I would appreciate your experiences and suggestions!
http://users.on.net/~merrifield/opto/index.html