Go Down

Topic: mouse ir sensor question (Read 1 time) previous topic - next topic

Kris

Hi Guys,
just a quick question regarding mouse optics, now before we confuse this with optical mice, this is one of the old Ball mice that has two rotary wheels in it and some IR transmitter / reciever pairs.

ive already got a sketch working that picks up when you break the beam between them but im a little lost on how you sense which way the rotaty wheel is going? do i need todo this via the analog pin of the arduino and sense if the voltage was rising or falling on the IR reciever?

any advice would be appreciated.

johnwasser

You need two sensors per wheel and use a technique called "quadrature" to sense the direction.  The two sensors are offset such that they are about 90° out of phase.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Anachrocomputer

One rudimentary technique to sense quadrature optical detectors is to look for transitions (changes) in one sensor, then immediately look at the other sensor. The second sensor will be HIGH when going in one direction and LOW when going in the other.  This method is not the best way to do it, but it's simple and should get you started.

Kris

hi guys thanks for the replies, i understand what you say and how it would work, i'm just interested in how a normal mouse would accomplish this with only one sensor pair per rotor?

to give an idea, the picture below (not mine) is a very close representation of the mouse i have, it only has one transmitter reciever per wheel.



i would google the chip in my mouse and see if i could tap into that somehow but its a logitech marked chip and im struggling to find any info on it so far. i will try and get the markings on it later on incase someone on here knows more about them.

johnwasser

#4
Aug 04, 2011, 08:38 pm Last Edit: Aug 04, 2011, 08:42 pm by johnwasser Reason: 1
How many terminals do those black boxes have?  If they have three (or more) there could be two light sensors in the single package.

Edit: See http://en.wikipedia.org/wiki/Mouse_(computing)#Mechanical_mice
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Kris


How many terminals do those black boxes have?  If they have three (or more) there could be two light sensors in the single package.

Edit: See http://en.wikipedia.org/wiki/Mouse_(computing)#Mechanical_mice


thats a very good point that i took no notice of when i looked at the mouse initially :D will have a better look later, from what your saying i'm guessing there's three pins on the receivers...

thanks for the help everyone.

Anachrocomputer

In highly mass-produced goods like mice, the component suppliers will make parts that integrate just what's needed into a tiny package. So yes, it's quite likely that those sensors incorporate two optical detectors.

Go Up