Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

How do 1-axis of mice detect if it is going forward or back?

Status
Not open for further replies.

Hishamsaleh

Full Member level 1
Full Member level 1
Joined
Jan 6, 2003
Messages
98
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
969
Hi all,

in one of the last postes (not in this category) i found a similer guestion.. but with no right answer,,, I think that ppl didn't get the point of the question...
I know there is 2 axis in each mose to locate x-y motion... but for the singel axis.. i want to know how dop mice knew if the wheel is moving forward or backward...?

as you can see in the picture down, on each axis there is a transmitter and reciever... and wheel with about 36 hole that let transmitted beam to transmit to the resiever... so when the wheel moves, the beam recieved signal goes to be 1 0 1 0 1 0 1 0 1 like this... but what is the technique used to let the detector knows if it is moving clock wise or untic/w...

thanks in advence
 

bye the way:

1)in "how stuff works" i didn't find a technical answer.

2)in the pictures shown you find two sensors for each wheel... generally you will find only one for each.. but the resiever is 3-pins not 2 like shown... so they have the same function... but different shap or parts...
 

As you can see in the pictures, there are 2 sensors per axis
Lets call them A and B
each is positioned so to be in a 90 degree offset
So you may have something like this:
Forward
A 00001111000011110000
B 00111100001111000011
or Backward
A 00001111000011110000
B 11000011110000111100
Number of variations define pitch
Same stuff is also used on linear rules for machines
But they also have a home position for calibration, like
in printers, cnc etc...
 

yes:)

padspcb said:
As you can see in the pictures, there are 2 sensors per axis
Lets call them A and B
each is positioned so to be in a 90 degree offset
So you may have something like this:
Forward
A 00001111000011110000
B 00111100001111000011
or Backward
A 00001111000011110000
B 11000011110000111100
Number of variations define pitch
Same stuff is also used on linear rules for machines
But they also have a home position for calibration, like
in printers, cnc etc...

so you means:
if A reads 11 while B is 00 then B & A is 11, this means backward.
but:
if A reads 00 while B is 11 then A & B is 11, this means forward.

thanks in advance man... really your explanation is simple & gr8.
 

that's ok.. and how about the optical mouse???? what is the operation used?
 

it is the same principle for optical mouse

the optical light led shines with a certain flash rate used as a locking feature and 512 level depth in expensive pens tablets etc

just taking place of the led side of the optical coupler

a simple 3 btn mouse {normal one microsoft protocal}
uses two optical switch

an optical mouse has one {or more} light source for all pickups

similar rule of one one zero zero direction control just scalled as locked level scaller achived
described above

i made pic code reads a mouse position as two signed bytes -128 - +128 ans -128 - +128 for up dn left right

so... easy stuff

fifteen lines of picbasic code

on a 20 charicter 2 line lcd

didnt ever finish it off for the project i was using it for
but it works as described

same code as a terminal reader but instead of display ascii too lcd just too display the decoded packet bytes


a mouse protocol for 3 btn
uses a 5 bytes packet
each byte has 8 bits as said above

the first byte stores the button data the the movement for x,y
the next byte updated data since last packet sent
and so on for 5 byte long packet
first three bits are the buttons left middle

http://www.mousetrak.com/3byte.htm
http://www.mousetrak.com/5byte.htm


attached is a design in proteus
for reading a mouse
the code isnt included as i cant find it
one is for simulations
the other is the power circuit for a mouse using a max232 too provide the mouse with energy so isnt intended too simulate


*** updated versions

i found an error in the connections too the pim
but youll get the idea
very so simple

each start bit
@9600bps
till stop bit
 

someone for a challange should write a picbasic inc files

for a mouse handler routines too employ a given port

or at least send a request it is made an integral part
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top