Tuesday, May 17, 2011

Optical Mouse Sensor

Mouse imaging 3-pt text
Full-size image download
Mouse imaging 3-pt text
Close-up of hacked mouse
Full-size image download
Close-up of hacked mouse
I had a cheap optical mouse sitting around where one of the wires had broken, and wanted to do something with it.
The vast majority of the sensor chips in optical mice are made by Avago. The chip in my particular mouse was labeled A1610. Looking at the other datasheets on their site, I found that the ADNS-2610 sensor had a similar pinout and features to my mystery device. The sensor is an 18x18 pixel device, with 6-bit (64-level) greyscale output. Each pixel is 1/200" and images are acquired at 1500 frames per second.
Optical mice have a low-resolution high-speed greyscale camera in them. The sensor chip contains this camera, along with a processor. This processor acquires images and determines in what direction the micro-scale features beneath the mouse are moving. It passes this data off to another processor which periodically produces the signals necessary to communicate the updates back to the computer it is plugged in to.
To tap in to the sensor chip, I cut through the data traces connecting the sensor to the interface processor. This allowed me to solder wires directly on to the pins of the sensor device. I then connected the sensor to an Atmel AVR microcontroller. I then wrote AVR code which talked to the sensor directly, extracting the raw sensor pixel and movement data and sending it back to a computer via serial port.
This particular sensor is a very low-end model. The frame rate back to the PC is on the order of 5 frames per second. Also, each pixel has to come from an individual frame, and thus a large amount of motion blur is introduced. Combining the image data with offsets returned from the actual mouse functions of the device produces a crude handheld scanner, but the lag and blur make it very difficult to use. With a higher-end sensor, much better performance should be easily obtainable.
Hacked mouse and AVR circuit
Full-size image download
Hacked mouse and AVR circuit
Crude handheld scanner
Full-size image download
Crude handheld scanner
  • Optical Mouse Sensor

No comments: