Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

How does the mouse know if its going forward or backwards?

Status
Not open for further replies.

2000

Member level 5
Joined
May 14, 2001
Messages
87
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
764
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
 

Sebi

Member level 3
Joined
Jan 2, 2002
Messages
63
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,288
Location
Hungary
Activity points
444
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.
 

Nobody

Full Member level 3
Joined
Oct 4, 2001
Messages
165
Helped
9
Reputation
16
Reaction score
7
Trophy points
1,298
Location
Formosa
Activity points
1,593
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 .
 

gelly

Junior Member level 2
Joined
May 17, 2001
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
138
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
 

Rostfrei

Member level 2
Joined
Sep 17, 2001
Messages
51
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
463
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,
 

gelly

Junior Member level 2
Joined
May 17, 2001
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
138
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
 

Robby

Member level 2
Joined
Jan 24, 2002
Messages
50
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
423
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!
 

RegUser_2

Full Member level 2
Joined
Dec 24, 2001
Messages
125
Helped
11
Reputation
22
Reaction score
9
Trophy points
1,298
Activity points
1,507
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?
 

VoidMain

Newbie level 6
Joined
Feb 11, 2002
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
44
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.
 

2000

Member level 5
Joined
May 14, 2001
Messages
87
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
764
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
 

RegUser_2

Full Member level 2
Joined
Dec 24, 2001
Messages
125
Helped
11
Reputation
22
Reaction score
9
Trophy points
1,298
Activity points
1,507
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.
 

RegUser_2

Full Member level 2
Joined
Dec 24, 2001
Messages
125
Helped
11
Reputation
22
Reaction score
9
Trophy points
1,298
Activity points
1,507
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.
 

gelly

Junior Member level 2
Joined
May 17, 2001
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
138
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
 

Robby

Member level 2
Joined
Jan 24, 2002
Messages
50
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
423
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! :roll:

Robby
 

JabaThaSlut

Junior Member level 1
Joined
Apr 16, 2001
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
285
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. :D

Cheers

Jaba
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top