Find all your DIY electronics in the MakerShed. 3D Printing, Kits, Arduino, Raspberry Pi, Books & more!
2314788722_3f6982cc9e_b.jpg

This is a great way to interface an optical mouse with your Arduino. Just make sure your mouse has one of the required optical sensors before you do any permanent damage. If you are interested in a How-To Tuesday based on this project, let me know in the comments. Thanks!

More about connecting an Optical mouse to an Arduino

In the Maker Shed:
Makershedsmall
Arduino Family
Make: Arduino

Marc de Vinck

I’m currently working full time as the Dexter F. Baker Professor of Practice in Creativity in the Masters of Engineering in Technical Entrepreneurship Program at Lehigh University. I’m also an avid product designer, kit maker, author, father, tinkerer, and member of the MAKE Technical Advisory board.


Related

Comments

  1. Todd says:

    I would love to vote YES! for a Tuesday How-To.

    1. Marc de Vinck says:

      OK, it’s added to the list.

      1. sburlappp says:

        How fast can the image sensor bitmap be read out? You might be able to make a barcode scanner out of one of these. (I’d like a mouse with that built in!)

        How fast movement can these things track? You could make a tire-mounted bicycle speedometer/odometer. (Nearer the hub might be easier to keep up with.)

        Or, you could improve the repeatable positioning accuracy of a maze-solving robot (and greatly speed up its second run).

        Or, by mounting the sensor in the right place, and adding an Arduino and some relays, you could turn almost any electrically powered wheel/pulley/piston into a reasonably accurate continuous servo or linear actuator – for example, three bumper winches could be used to make a nice large-scale X-Y(-Z) positioning system. (I’m thinking: Parking Lot Plotter!)

        1. vivi says:

          The internal DSP has access to 1500fps image data (or more on newer models). Unfortunately to access this data externally you’re forced to use the serial port, which is very slow. 15fps might be the max you can get this way.

          Your idea to use it as an odometer is quite good. My G9 gamer mouse has a max speed of only 3.8m/s (about 14km/h) though, so a cheap standard mouse has probably an even slower limit.

          1. sburlappp says:

            That’s why I’m thinking very near the hub would work better, maybe put something with a visible texture in the spokes, and read it from 1/4 of the wheel radius, to measure 1/4 of the tire surface speed.

            You could build a nice surveyor’s wheel (hodometer) this way, too. (At walking speeds, you could measure directly off the tire, or the ground!)

  2. Simon says:

    You can also get the actual image off those mouse sensors too. I did it once using the parallel port on the PC and a little C# application. Unfortunately I lost all that code after a hard drive crash :(

    1. vivi says:

      I made a similar hack using an Arduino and some Java code : http://www.bidouille.org/hack/mousecam/index.php

      1. Marc de Vinck says:

        That’s awesome!! Thanks for sharing. I’m going to post about this tomorrow. Keep an eye on the blog.

  3. eliasyria says:

    hello there.
    i am trying to use the optical mouse that i have to measure the speed of surface. I do not have Arduino, i have connected the mouse to a USb ANALYZER and collected data that shows me the changes of X and Y’s. it seems that i need to write a C program for that and i do not have enough skills, can any one help me please
    thanks

    1. Mihai says:

      if you managed to do that… i would be very thankful if you could help me do the same…

In the Maker Shed