The Naked Scientists

The Naked Scientists Forum

Author Topic: How does an optical mouse work?  (Read 8234 times)

Offline chris

  • Neilep Level Member
  • ******
  • Posts: 5339
  • Thanked: 65 times
  • The Naked Scientist
    • View Profile
    • The Naked Scientists
How does an optical mouse work?
« on: 20/03/2009 09:45:16 »
Gone are the days of the balls clogging up with bit of grease, hair, lunch left-overs - modern mice have a bright LED shining from the bottom. So how does this "read" the surface and translate this into movements of my mouse pointer?

Chris


 

Offline dentstudent

  • Neilep Level Member
  • ******
  • Posts: 3146
  • FOGger to the unsuspecting
    • View Profile
How does an optical mouse work?
« Reply #1 on: 20/03/2009 10:10:20 »
Gone are the days of the balls clogging up with bit of grease, hair, lunch left-overs

Chris

I see that you've improved your personal hygiene, then!
 

lyner

  • Guest
How does an optical mouse work?
« Reply #2 on: 20/03/2009 10:26:06 »
The wonders of cheap, powerful, signal processing.
The mouse takes pictures of the table beneath it at a high sampling rate. The processing is done in two dimensions but it is easier to describe it in one dimension (motion side to side, for instance). By comparing each picture with the previous  one, it is relatively simple to tell whether it has moved left or right. One way is to analyse the picture in terms of its spatial frequencies and then see how the phases change from picture to picture. If the phase increases, then the mouse is going, say, left and if it is decreasing, the mouse is going right.
By combining this with up/down movement information, the mouse can detect which direction it is moving and how fast.  
Actually, the mouse has a relatively easy job because the whole of its picture is moving and your brain is part of the feedback loop which controls where you actually put the pointer on the screen. It just has to sample things fast enough and have enough contrast in its picture to get sense out of it. It is much harder to detect motion of objects across a fixed background - or even various objects moving against a moving background. Lots of grunt needed to do that!

I remember going into a shop (Dixons, I think) on Oxford street, several years ago. They had an flashy new model Apple computer with a 'NEW' optical mouse on display. They had put it on a shiny glass topped table to make it look really flashy but the mouse didn't / couldn't work! DURRRRR - they hadn't sussed out why. I had to use the mouse on my sleeve to make it work.

See http://en.wikipedia.org/wiki/Optical_mouse#Optical_mice for a more coherent discussion.
 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
How does an optical mouse work?
« Reply #3 on: 20/03/2009 21:41:24 »
Gone are the days of the balls clogging up with bit of grease, hair, lunch left-overs

Chris

I see that you've improved your personal hygiene, then!

 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
How does an optical mouse work?
« Reply #4 on: 20/03/2009 21:43:45 »
SC. My mouse is on a uniform;y white piece of paper yet it still tracks without a problem.

When I had it on my desk, which is white with a glass top, it didn't work.
 

lyner

  • Guest
How does an optical mouse work?
« Reply #5 on: 21/03/2009 09:59:05 »
It may look uniform to your eyes, DrB, but the mouse image sensor can work by picking up the texture. Possibly, the monochromatic illumination at a low angle helps to enhance the rough appearance of your 'plain' paper?
 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
How does an optical mouse work?
« Reply #6 on: 21/03/2009 17:47:53 »
So why wouldn't it work on my glass desktop?
 

Offline stroialbert23

  • First timers
  • *
  • Posts: 3
    • View Profile
How does an optical mouse work?
« Reply #7 on: 21/03/2009 18:42:07 »
Gone are the days of the balls clogging up with bit of grease, hair, lunch left-overs - modern mice have a bright LED shining from the bottom. So how does this "read" the surface and translate this into movements of my mouse pointer?

Chris
The optical mouse not as ball to clean it is necessary
 

lyner

  • Guest
How does an optical mouse work?
« Reply #8 on: 21/03/2009 23:41:33 »
So why wouldn't it work on my glass desktop?
No texture.
 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
How does an optical mouse work?
« Reply #9 on: 22/03/2009 02:15:27 »
But there is texture under the glass.
 

Offline Chemistry4me

  • Neilep Level Member
  • ******
  • Posts: 7709
    • View Profile
How does an optical mouse work?
« Reply #10 on: 22/03/2009 02:38:50 »
Too thick?
 

Offline Raghavendra

  • Hero Member
  • *****
  • Posts: 835
  • Quantum
    • View Profile
    • Raghavendra
How does an optical mouse work?
« Reply #11 on: 22/03/2009 09:02:50 »
You should use lense... ha ha a hah aha ha h a
 

lyner

  • Guest
How does an optical mouse work?
« Reply #12 on: 22/03/2009 20:17:10 »
But there is texture under the glass.
The light source of the mouse, presumable points along the surface - yes, mine does, I checked. It won't get to the underneath of your glass and back up to the sensor (total internal reflection at the top surface, probably).
DON'T BE AWKWARD! Use it properly or I'll take it away from you.
 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
How does an optical mouse work?
« Reply #13 on: 22/03/2009 21:31:57 »

DON'T BE AWKWARD! Use it properly or I'll take it away from you.

Try it, Bucko!
 

Offline techmind

  • Hero Member
  • *****
  • Posts: 934
  • Un-obfuscated
    • View Profile
    • techmind.org
How does an optical mouse work?
« Reply #14 on: 23/03/2009 00:04:13 »
Of course all common mice use optical priniciples - the older ones use wheels with slots in them and light beams passing through the slots...  ;)

The newer mice marketed as "optical" use a cheap low-resolution CCD/CMOS camera (maybe something like 64x64 pixels) and image the surface of the tabletop and as sophiecentaur said, use correlation algorithms to track the motion of the image from one frame to the next.

The illumination is glancing-angle - it shines on the surface near-horizontally or tangentially. This gives high contrast illumination of surface roughness, so a piece of paper is actually very good. It might even work on fairly scratched glass, but won't work on a highly polished surface having no texture of its own.

Presumably the camera has a limited depth of field so wouldn't see clearly if spaced a few millimetres from a textured surface by a layer of glass - also geometrically the light would tend to be off-target of where the camera is looking as you change the spacing.


I haven't tried it, but you might manage to confuse an optical mouse if you tried using it on a material printed with a high-contrast repetitive pattern such as fine (1-2mm?) uniformly-spaced black and white lines... you might also find that in doing so it'll only work sideways and not up and down or somesuch.
« Last Edit: 23/03/2009 00:10:40 by techmind »
 

lyner

  • Guest
How does an optical mouse work?
« Reply #15 on: 23/03/2009 19:06:32 »
Aliasing is what you're referring to, I think.
 

The Naked Scientists Forum

How does an optical mouse work?
« Reply #15 on: 23/03/2009 19:06:32 »

 

SMF 2.0.10 | SMF © 2015, Simple Machines
SMFAds for Free Forums
 
Login
Login with username, password and session length