Optical Encoder from Logitech Video Game Controller - Page 1
Forum section: electronics / beginners

author: Dumpsterholic
author_rank: Regular Contributor
timestamp: January 31, 2018, 04:51:23 pm
content: Hi all:I recently salvaged what I believe to be a video game controller originally used with some kind of automotive simulator. The plastic box, made by Logitech, had an automotive steering wheel (which I didn't keep), but inside was a nice steel bracket holding two DC motors. On the rear of one of the motors is a small circuit board labeled "Hobbes Optical encoder". On the circuit board itself are a resistor, a little blob that looks like a capacitor (though it is labeled "RT1"), an LED and a four-terminal device which I believe is an optical sensor (labeled "LQ2"). There is a slot in the circuit board through which protrudes a plastic wheel having slits in it, this wheel being affixed to the shaft of one of the motors.A bit of Googling informed me that this apparatus is a speed sensor. What I'd like to know is how to hook it up to do some experiments. There are five wires coming off the circuit board: black, yellow, white, green and red. Obviously, the thing needs power, which would account for two wires. What I'm wondering is what kind of a signal I should be looking for and from which wires. At present, I do not have an oscilloscope, but in a short time I hope to be able to save enough money to order a Rigol 4-channel model. Am I right in supposing that the optical encoder will output a square wave whose frequency varies with the speed at which the motor turns? It seems to me that would require only two wires, leaving me to wonder about the remaining three. If two are for power, that still leaves one wire not accounted for. Any hints or suggestions would be most welcome.

author: helius
author_rank: Super Contributor
timestamp: January 31, 2018, 05:02:33 pm
content: Given the application in a steering controller, it is more likely a rotary encoder (rather than a speed sensor). The 4-terminal device is a dual optical interrupter with a spacing such that rotating the disc outputs a quadrature signal (which indicates movement direction in terms of pulses). Quadrature means that the two output signals are 90° apart: if A goes high before B goes high, the wheel moved one step right; if B goes high before A does, it moved one step to the left, etc.

author: Dumpsterholic
author_rank: Regular Contributor
timestamp: February 01, 2018, 01:49:03 pm
content: Helius:Thanks for setting me straight. After a bit of Googling, and after slogging through some data sheets and application notes, I think I have a better idea how this circuit might have worked originally. The sensor was mounted on the shaft ofonemotor, but probably accepted input frombothmotors so as to be able to compare their relative rotation. Hence the five wires.Not something that interests me, so into the junk box it goes.... But that still leaves me with a working motor that has a slotted wheel on its shaft, and I probably have one of those slotted optical encoders in my junk box, so I can put those parts together and breadboard a circuit of my own which measures the motor's speed and provides feedback to control that speed. A very basic circuit idea, I know, but one that's appropriate to my rather low level of understanding.

author: paulca
author_rank: Super Contributor
timestamp: February 01, 2018, 02:27:53 pm
content: The optical/rotary encoder will be similar to those used in balled mice. A slotted wheel which they shine a light through and count the pulses with a MCU to determine how far the wheel had turned. As to how they determine direction, I have no idea.The two motors are usually because they have a position motor and an effects motor.One provides resistance to your movements, trying to maintain the wheel position based on response from the sim or large swings to move the wheel in your hands and the other does rapid vibration or short kicks when you hit bumps etc.They would almost certainly have been on the same belt or gear system.They are usually very strong high torque load speed "drill like" motors. In Logitech stuff they are fairly strong, in high end simulation wheels they are capable of breaking fingers and spraining wrists.Note, if it's a Logictec G27 they are worth money and so are the spare parts.

author: Buriedcode
author_rank: Super Contributor
timestamp: February 01, 2018, 04:49:43 pm
content: The "four terminal device" is most likely a dual photo sensor. For quadrature encoders you have a slotted wheel, a light source, and two sensors - spaced 90 degree's form each other (in terms of phase, not spacial orientation). They are in the same package because their spacing is important, and will be specific to the pitch of the encoder wheel.There are various diagrams on the web, here's a small animation:http://www.creative-robotics.com/sites/default/files/tutorials/QuadratureAnimation.gifThe point is, a single channel can determine how fast the shaft is rotating - simply counting the number of pulses in a fixed time period, or timing how long it takes for a fixed number of pulses. But... to work out direction, you need a second sensor out of phase, so you can determine direction depending on which one is leading the other. 180 degree's gives us nothing, just the inverse of the other sensor, but 90 degree's works.Optical encoders are usually for motor applications because mechanical encoders (that use tracks and wipers) wear out, and so would last a while for hand-operated apps, but because motors' obviously spin much faster, they would wear out in a day, and because only a thin encoder wheel is spinning, they don't load the motor. They are used in some hand operated applications where low torque is required, or for a 'main knob' that is used all the time, or just when the product is of higher quality.

author: Dumpsterholic
author_rank: Regular Contributor
timestamp: February 05, 2018, 12:08:51 am
content: Thanks to everybody who responded to my post. Based on those responses, I did some more research and learned a bit about quadrature encoders, so when I get around to building my own CNC machine, I just might have a use for the device I scrounged. And as it happens, I just found a computer mouse in a Dumpster, and now I'm going carefully dissect it to apply my new knowledge!Update: I did indeed dissect the mouse, and sure enough, there are three sub-units, each combining an LED and a "reflective optocoupler" (or whatever that doodad is called). Apparently, two of them detect X and Y motion, while the third connects to the thumb wheel. Each of the sub-units looks virtually identical to the one found inside the video game controller. Additionally, there are some passive components, including three switches, and the whole circuit is routed through an IC. The IC is labeled "Logitech 361125-0000 RTH010 0A100Q1 047B"; I Googled that part number and got some hits related to hacking mice, but I won't be surprised if I never find any specs as it is a proprietary part.Just out of curiosity, I wonder if anybody knows what's really inside that Logitech chip.