[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?
[youtube=http://www.youtube.com/watch?v=ccebebWv_fI&w=470]
I wonder if the mouse sensor can be used as a contact less tachometer. Could be quite useful for some projects.
This was done years ago over at Kronos Robotics.
http://tinyurl.com/2mts57
it depends on the speed you want to misure… remember that you have a delay from reading to reading and that the maximum displacement is “128” (from reading to reading too)… but it’s a good idea! (ps mice or mouses isn’t the same? XD http://dictionary.reference.com/browse/mouse)
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.
Sprite_tm also wrote an article about this: http://spritesmods.com/?art=mouseeye and used it again a while later: http://spritesmods.com/?art=bristlebot
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.
Pretty good write up. And these are the things I wanted to see at HaD…
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.
@ino
you might wanna have a look at this page: http://translate.google.com/translate?hl=en&sl=de&u=http://www.roboternetz.de/phpBB2/zeigebeitrag.php%3Ft%3D32134%26highlight%3Dmaussensor&ei=sAVETaCwM8GBOuqxwaEC&sa=X&oi=translate&ct=result&resnum=2&ved=0CCwQ7gEwAQ&prev=/search%3Fq%3Droboternetz%2Bmaussensor%2Blinse%26hl%3Den%26prmd%3Divnsfd
They hacked the lens in order to be able to mount it farther away from the surface.
I’m interested in building this hack. Can you give me details?
you can find the details here: http://ferretrobotics.blogspot.com/2011/01/interfacing-optical-mouse-usb-with-pic.html
Can i use this with ADNS2051 too? i tried your code while replacing DY address to 0x04 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 :)