![]() | ![]() | ![]() |
| | |||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| hi opened up an old wheel mouse. a wheel with perforations is revolving and a photo-transistor, led pair sense the gaps and closed portions of the wheels. how does it get to know in what direction the mouse is moving? i mean the direction of spinning of the wheel. please anybody who knows tell me. thanx. | |
| |
| | (permalink) |
| It is probably a quadrature encoder. Each LED has a detector across from it and the wheel spins in the middle. The gaps in the wheel cause the detector to see flashes of light, either dark or light (0 or 1 is what is seen digitally) Notice you have an LED pair? That means you have two light-sensors, one to go with each LED. Each emitter/detector pairs is positioned 90 degrees out of phase. This means that if you take the current value of each detector (light/dark or 1/0 in digital) and compare it with the pair of values from the last reading you can tell the direction it is going because the values are unique. For example for a motor (or wheel) spinning: ================================= Constantly spinning clockwise Detector A: 101010101010101010 Detector B: 010101010101010101 Therefore motor is spinning clockwise if: A/B = 1/0 previously and is now 0/1 OR A/B = 0/1 previously and is now 1/0 ================================ Constantly going counter clock-wise: Detector A: 10101010101010101010 Detector B: 10101010101010101010 Therefore the motor is spinning counterclockwise if: A/B = 0/0 previously and is now 1/1 OR A/B = 1/1 previously and is now 0/0 I am pretty sure these values are not the combination an encoder really outputs, it is just an illustrative example to sort of describe how it is interpreted. You can determine speed by counting how many flashes occur per second or minute or whatever. Last edited by dknguyen; 1st July 2006 at 08:12 AM. | |
| |
| | (permalink) |
| but there is only one led receiver pair per wheel.. | |
| |
| | (permalink) |
| You aren't looking at the scroll wheel right? I only opened up ball mice a few times a long time ago before I knew anything about them. The only slotted wheel in my optic mouse now is the one for the scroll wheel. Last edited by dknguyen; 1st July 2006 at 08:15 AM. | |
| |
| | (permalink) |
| no i didnt. its still working only the circuit and wheel. thats why i am surprised. i tried passing small wires though the gap, still it senses the direction correctly. i am amazed... | |
| |
| | (permalink) |
| actually it is still connected to the compueter so we can check the output.. | |
| |
| | (permalink) |
| couldnt get you. there is no wheel in optical mouse. | |
| |
| | (permalink) |
| If it was a quad encoder the wire might not do anything noticeable by you since you would have to hold it so perfectly to block any light from getting through the slot while moving the mouse. Maybe you can get more answers here: http://computer.howstuffworks.com/mouse2.htm Last edited by dknguyen; 1st July 2006 at 08:24 AM. | |
| |
| | (permalink) |
| the mouse i am seeing is actually having only two buttons, no scroll wheel. it is a ball mouse. the wheels are for encoders only. | |
| |
| | (permalink) |
| The HowStuffWorks article says there should be two LEDs per wheel. Makes sense for what I said, but not for what you have... | |
| |
| | (permalink) |
| but there is only one. i am sure. i will try to post a pic. | |
| |
| | (permalink) |
| How many light detectors are there? Because there HAS to be four if it's a quad encoder (I can't think of it being anything else the way you described it). It might be that instead of using two LEDs per wheel, one LED is used from behind a barrier with two pinholes that are positioned 90 degrees out of phase, to simulate two LEDs thare are 90 degrees out of phase. Last edited by dknguyen; 1st July 2006 at 08:35 AM. | |
| |
| | (permalink) |
| here's the pic. only one led, no barrier also. what do you mean by 90 degree out of phase. you mean ac supply is being given to leds? | |
| |
| | (permalink) | |
| Quote:
I can't see stuff in your picture too clearly, except that does only seem to be one LED per wheel. Wait until morning on my side of the world...maybe someone else knows. Last edited by dknguyen; 1st July 2006 at 09:09 AM. | ||
| |
| | (permalink) |
| if dc is applied to leds(which i think is the case) the output must be a square waveform. | |
| |