Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


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?

Reply
 
LinkBack Thread Tools Display Modes
Old 1st July 2006, 07:53 AM   (permalink)
Default wheel mouse

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.
samarsingla is offline  
Old 1st July 2006, 08:01 AM   (permalink)
Default

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.
dknguyen is offline  
Old 1st July 2006, 08:03 AM   (permalink)
Default

but there is only one led receiver pair per wheel..
samarsingla is offline  
Old 1st July 2006, 08:12 AM   (permalink)
Default

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.
dknguyen is offline  
Old 1st July 2006, 08:15 AM   (permalink)
Default

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...
samarsingla is offline  
Old 1st July 2006, 08:16 AM   (permalink)
Default

actually it is still connected to the compueter so we can check the output..
samarsingla is offline  
Old 1st July 2006, 08:19 AM   (permalink)
Default

couldnt get you. there is no wheel in optical mouse.
samarsingla is offline  
Old 1st July 2006, 08:20 AM   (permalink)
Default

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.
dknguyen is offline  
Old 1st July 2006, 08:23 AM   (permalink)
Default

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.
samarsingla is offline  
Old 1st July 2006, 08:25 AM   (permalink)
Default

The HowStuffWorks article says there should be two LEDs per wheel. Makes sense for what I said, but not for what you have...
dknguyen is offline  
Old 1st July 2006, 08:27 AM   (permalink)
Default

but there is only one. i am sure. i will try to post a pic.
samarsingla is offline  
Old 1st July 2006, 08:29 AM   (permalink)
Default

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.
dknguyen is offline  
Old 1st July 2006, 08:42 AM   (permalink)
Default

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?
Attached Images
File Type: jpg TMPAAAEC.jpg (258.6 KB, 27 views)
samarsingla is offline  
Old 1st July 2006, 08:44 AM   (permalink)
Default

Quote:
[ORIGINAL MESSAGE BEFORE CORRECTON]
No, it has to do with the sine wave you can draw to represent the state of the LED/detectors. The sine wave of each pair is 90 degrees out of phase.

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.
No, it has to do with the square wave you can draw to represent the state of the LED/detectors. The square wave of each pair is 90 degrees out of phase.

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.
dknguyen is offline  
Old 1st July 2006, 08:49 AM   (permalink)
Default

if dc is applied to leds(which i think is the case) the output must be a square waveform.
samarsingla is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 12:07 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

eXTReMe Tracker