| Author |
Message |
2000
Joined: 14 May 2001 Posts: 89
|
30 Jun 2002 17:11 How does the mouse know if its going forward or backwards? |
|
|
|
|
hello friends,
I'm working with an encoder for a DC motor that works just like a mouse wheel. My question is, if the wheel seems to be mechanically symetrical, how does the mouse controller know if the ball is going forward or backward? the same question for the left or right sides...
regards,
2000
|
|
| Back to top |
|
 |
Sebi
Joined: 02 Jan 2002 Posts: 63 Location: Hungary
|
30 Jun 2002 17:29 |
|
|
|
|
In mouse You can find for left and right direction and position sensing a dual opto-gate with phase shifting.The controller IC convert these signals
for PC.You can build a same circuit with flip-flops and up-down counter.
|
|
| Back to top |
|
 |
Nobody
Joined: 04 Oct 2001 Posts: 250 Location: Formosa
|
30 Jun 2002 17:33 |
|
|
|
|
There're 2 photo-led-sensor pairs put alone X and Y axis of wheel .
So u can detect the X and Y movment to decode the direction.
U had better open ur mouse to take a look .
|
|
| Back to top |
|
 |
gelly
Joined: 17 May 2001 Posts: 20
|
30 Jun 2002 17:39 mouse wheel |
|
|
|
|
hi
actually, the mouse have 2 axes (x and y)
if u remove the ball, u'll see 2 axes and 1 or 2 wheels to close
up the ball.
the encoder is a quadrature encoder type like used un
feedback motors like servo...(only dubble made)
for further encoder info (details ) see link below.
h**p://ww*w.seatt*lerob*otics.org/enc*oder/ju*n97/en*coding.html
enjoy...
gelly
|
|
| Back to top |
|
 |
Rostfrei
Joined: 17 Sep 2001 Posts: 54
|
30 Jun 2002 21:32 |
|
|
|
|
Hello folks !
I understand that mouse have two axes (x, y), but lets take only one axe in consideration y (up or down). The wheel in the mouse for up and down rotates and blocks/unbloks the light beam of photo-led-sensor. How do we know from only that information if the mouse is going up or down? So far this only tells me that the mouse is moving (up or down).
Thanx for all your answers.
Regards,
|
|
| Back to top |
|
 |
gelly
Joined: 17 May 2001 Posts: 20
|
30 Jun 2002 21:52 mouse |
|
|
|
|
hi
if u go to the link i gave before, u'll understand....
u have 2 sqware waves,
the 2 waves are shifted 90° (mechanicly, by moving the 1st fotocel
1/4 wave further than the 2nd fotocel)
if u see this picture (imaginary) in front of you....
than u can say...
if upgoing edge 1st fotocel is there , and followed by upgoing edge from
2nd fotocel....then direction is ">"
if edge 2nd fotocel is first and then edge 1st cel...
the direction would be "<"
u can also calculate speed from this....
if quadrature encoder is a 500ppr type (500 pulses pro revolution)
no need to explain further ?....
hope this is clearing a little bit.
greetz, Gelly
|
|
| Back to top |
|
 |
Robby
Joined: 24 Jan 2002 Posts: 46
|
30 Jun 2002 22:01 Mouse_Move_Detect |
|
|
|
|
Rostfrei,
quite simple:
--plastic--| breaktrough into wheel |---plastic-
O led1 led2 O
now shift breakthrough in left direction, what happens ? Beam break first at led1. The same in the other direction, led2 signals puls rising at first. Really quite simple. This Principle is call -> Direction Discrimination.
Robby
Sorry, draw with ascii is not easy, imagin please led1 & led2 underneath breaktrough!
|
|
| Back to top |
|
 |
RegUser_2
Joined: 24 Dec 2001 Posts: 235 Helped: 2
|
30 Jun 2002 23:52 |
|
|
|
|
What ball, what optocouplers? My mouse is optical. No moving parts. It consists of a twodimentional CMOS image sensor, a bright LED to act as a "shutter" to define the timebase and a DSP to do something about the acquired images. Actually mine mouse contains two such systems installed on a 45 deg angle reative to each other for better resolution.
What some could expect is, that in order to determine the direction, the DSP should try to correlate two consecutive images and derive the disposition, hence the direction and the speed of the mouse scan for the given timebase. This presumably means that the mouse pad have to have some optical features. The damned thing however is quite happy on a "featureless" surface like say a white paper. Any idea what could be the principle of operation of this thing?
|
|
| Back to top |
|
 |
VoidMain
Joined: 11 Feb 2002 Posts: 14
|
01 Jul 2002 0:08 |
|
|
|
|
Even if a white paper seems featureless, I has grain, which can be easily used as a reference. As you've said, the DSP just correlates low res images (32x32 if I remember well) at high speed, it's all the magic within.
Try to do the same experiment with a polished black surface (a black book cover will do), and the mouse won't move.
|
|
| Back to top |
|
 |
2000
Joined: 14 May 2001 Posts: 89
|
01 Jul 2002 1:28 |
|
|
|
|
I understood what you guys say, when using 2 leds it makes sense, but in this mouse there is only one led/receiver per wheel... so... is it all about the pulsed signal and the skipped pulses? how to define direction with only one "optical barrier"?
regards,
2000
|
|
| Back to top |
|
 |
RegUser_2
Joined: 24 Dec 2001 Posts: 235 Helped: 2
|
02 Jul 2002 8:30 |
|
|
|
|
I understood what you guys say, when using 2 leds it makes sense, but in this mouse there is only one led/ receiver per wheel... so... is it all about the pulsed signal and the skipped pulses? how to define direction with only one "optical barrier"?
Hmm, may be they got two-pixel sensor in the same package? I don't see how else could some get a direction info, except if the reticle have very specific coding (even then though the light source have to move relative to the sensor, what is not the case of a LED/Photodetector pair), yet so far there is nothing specific into the mice weel. It is anisotropic about the both rotational directions.
|
|
| Back to top |
|
 |
RegUser_2
Joined: 24 Dec 2001 Posts: 235 Helped: 2
|
02 Jul 2002 8:40 |
|
|
|
|
| Sorry to waste the bandwidth, but if the LED part of a single LED/photodiode pair consists of two elements chopped at high frequency, then a lock-in of the photodetector at the chop frequency could produce phase sensitive info when the mouse weel rotates, this way providing dirrection info.
|
|
| Back to top |
|
 |
gelly
Joined: 17 May 2001 Posts: 20
|
02 Jul 2002 19:09 encoder |
|
|
|
|
hey guys, stick to the point
when the man wants some info,
just try to help and dont explain him the optical mouse technology.
the question was about an dc motor and encoder.
well, about the fotocells, they are fitted in one housing
and 'looks' like 1 thing that supposed to be the led.
there is one barrier but.....
diffucult to draw here...
yesterday i prepared a hand drawing , but could not
put it in the message.
sorry.
gelly
|
|
| Back to top |
|
 |
Robby
Joined: 24 Jan 2002 Posts: 46
|
02 Jul 2002 20:44 yes gelly |
|
|
|
|
yes gelly,
It seems to be so:
Someboby got a question like how is the temperature today, and suddently a lot of people starts a discussion about the klima changes on earth.
But the fact is, the pur man never get a simple answer for a simple question.
strange!
Robby
|
|
| Back to top |
|
 |
JabaThaSlut
Joined: 16 Apr 2001 Posts: 17
|
03 Jul 2002 1:07 |
|
|
|
|
Hi
I am an Industrial Motion control engineer by trade so I'll explain the process as simply as possible.
All incremental encoder devices work on the principle of delivering 2 output waveforms (minimum), 90 degrees out of phase from each other.
By reading which pulse train rises (or falls) first, directional information can be obtained. Thus such a device is able to give both directional and positional (by counting the pulses) data. Quite simple really.
Cheers
Jaba
|
|
| Back to top |
|
 |
Google AdSense

|
03 Jul 2002 1:07 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
bunalmis
Joined: 03 Jan 2003 Posts: 254 Helped: 5 Location: Turkey
|
20 Jan 2003 13:52 Re: How does the mouse know if its going forward or backward |
|
|
|
|
You can see an animation at the follaving link.
You will see how is work the incremantal encoder.
http://www.geocities.com/pidpwm/dcmcon.html
|
|
| Back to top |
|
 |