Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Mouse IR detector

Status
Not open for further replies.

jbchrist

New Member
Hi,

I am trying to figure out how a computer mouse works and have come across a number of helpful websites telling me how the TWO sensors for the mouse work together to figure out the direction of the wheel. I opened up my mouse and I don't see the two sensors just the one IR emitter, and one IR detector with three pins. I assume that this is actually is a 2 sensors in 1 package, but I can't seem to find any documentation or parts on any online store.
Is this really a 2 sensors in 1 package deal? Can anyone find the part online?
 
I am assuming this not an optical mouse. look up quadrature encoding and grey (gray?) code. basically, it rellies on one of the two sensors changing value and then you can determine direction of rotation based on that. the stream coming off the two sensors is a 2 bit code: 00 01 11 10 00 ... Forward sequence is one direction, backwards is the the other. note that there is probably a PIC in that mouse.

You probably won't find any info on the specific parts but there is a fair amount of info on those sensors in general. Google for some combo of mouse IR sensor. I recall that there are several sites that have mouse hacking info but had to dig a bit to find.
 
Yep this encoding is used and it can work prety acurate just look at the tiny holes the that wheel.

They make special purpuse ICs for mosues that take there readings from sesors and butons and send them to the computer over a wire.This is dose all of the work.
 
I'm looking around but I can't seem to find any of those sensors. For my project I need the finely tuned IR Detectors. Does anybody know where I can get them?
 
jbchrist said:
I'm looking around but I can't seem to find any of those sensors. For my project I need the finely tuned IR Detectors. Does anybody know where I can get them?

Take an old mouse to pieces, I doubt they are available otherwise? - except in production quantities!.

Although I must admit, I'm rather unsure what you mean by "finely tuned"?.
 
yes, this request went from "how does a mouse work" to a specific need. maybe you could tell us what you are up to?
 
I am working on a project that is going to measure the direction and revolutions of a wheel. Essentially like a robot wheel.

I need to know the distance traveled, and the direction traveled.

I know that mice have already figured this out so I thought I would just imitate the mouse. What I like about the mice sensors is that the teeth on the roller/wheel are very small and I would like to imitate that as well in order to get the fine adjustment.

In order to get the direction the most common way I have seen is to use two sensors. Then the codes would be 00 01 11 10 00 as mentioned above. So do I need to get two sensors and position them up correctly, or is there a sensor available on the market that is essentially two sensor that would produce that code already.
 
why imitate? just figure out how to attach the actual interrupter disk and use the sensors directly.

there are lots of designs for building an encoder. check out the seattle robotic society newsletter (The encoder). somewhere I saw a design that used mouse guts though I don't recall where. of couse, google is your friend.

also, the book "Building Robot Drive Trains" by Clark & Owings has a nice section on this but they push the Hamamatsu chip which is pretty scarce. still, the techniques are worth understanding.

edit:
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top