Optical Mouse Sensor with Arduino

Connecting an optical mouse sensor with an Arduino microcontroller is a fairly simple task that can help you read horizontal and vertical movements. Any Arduino can be used to perform this operation and you will also need an optical mouse, of course. This tutorial is made for PAN3101, ADNS-2610, ADNS-2083 or ADNS-2051 optical sensors, but the library available is pretty extensive, so you might be able to use other kinds of optical sensors as well (the OptiMouse library for Arduino is available in the link).

Care must be taken when disassembling the mouse to take the optical sensor. It is important to know exactly what type of optical sensor you have, so you’ll have to do some digging to find out. The sensor will use 4 pins of the microncontroller, 2 for power supply and 2 for data. The data communication is serial and bi-directional, but depending on your optical sensor, the pins used from the Arduino may be different.

You may encounter interferences from sensor’s own controller used in the mouse, so disconnect it might be a good idea (the SDIO and SCLK wires). These two wires should be soldered to pins 3 and 4 respectively and pins 6 and 7 will be used for GND and 5v respectively. You will need to download the library mentioned above (the link provides a .zip with the library and example sketches that you can upload to the Arduino for verifications).

A very simple project that can come in handy in certain situations.

Optical Mouse Sensor with Arduino: [Link][via]