Patching into an optical mouse with a PIC

[MikyMouse] cracked open a couple different optical mice (or is it mouses?) in order to play with the data communications coming off of the chips inside. Once he figured out the protocol, it wasn’t too hard to grab the data for use in his own projects. The chip that controls the mouse is one of two he looked at, either an ADNS2051 or an ADNS2610. They run at 5V and use serial communications via SDIO and SCK pins. The clip after the break shows the test apparatus displaying coordinates of the mouse on an LCD screen. This seems like an easy and inexpensive way to get position data from your project. The only tricky part is going to be deciding when and how to to zero out the location.

Not interested in this type of mouse hack? Can we spark your curiosity with this mouse auto-fire project?

12 thoughts on “Patching into an optical mouse with a PIC

  1. Better yet is using a optical mouse as a low res camera for motion detection or low cost computer vision.

    I have at least 1 ardunio bot using a mouse chip as vision for obstacle avoidance.

  2. For just simple mouse data don’t USB mice still detect the clock signal and switch to PS/2 communication? I seem to remember that old USB mice came with a USB-to-PS/2 adapter. This is still neat, none-the-less.

  3. i did this for a robot, it was pointing to the floor, and then i made a closed loop control system, so i could control the robot speed and position in real time. optical mouses are very nice sensors indeed.

    1. Can i use this with ADNS2051 too? i tried your code while replacing DY address to 0×04 based on the sensor’s datasheet and instead of displaying the output x&y to the lcd, i tried to display it to hyperterminal using serial connection with pic16f877a. But no luck, please give some advice, thanks :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s