Turning A Cheap Optical Mouse Into A Robot Odometer

Turning A Cheap Optical Mouse Into A Robot Odometer

John Graham-Cumming (JGC), author of The Geek Atlas, wrote in to let us know about a fun conversion he did with a cheap optical mouse:

For a small robot project I’m working on I needed a way to measure the robot’s progress across the floor. There are various possibilities, such as: use stepper motors (expensive and am recycling some old continuous run servos), add an encoder to the wheels (would need to go buy some parts for that), or use the optical sensor for a mouse.

I had a really old PS/2 optical mouse lying around which contains an MCS-12085 optical sensor that has a rather simple serial interface suitable for connection to a microcontroller. Inside there are two separate areas of components. On the right in the picture above is the PS/2 interface chips and four nice extras that I desoldered for later use (three microswitches and a quadrature encoder)…

This is a great example of repurposing something that might otherwise go to a landfill; and to top it off, JGC has posted some code you can use as an Arduino interface to the optical mouse sensor. Read all about his conversion at his blog.

The Geek Atlas
128 Places Where Science and Technology Come Alive
The history of science is all around us, if you know where to look. With this unique traveler’s guide, you’ll learn about 128 destinations around the world where discoveries in science, mathematics, or technology occurred or is happening now. Travel to Munich to see the world’s largest science museum, watch Foucault’s pendulum swinging in Paris, ponder a descendant of Newton’s apple tree at Trinity College, Cambridge, and more.

12 thoughts on “Turning A Cheap Optical Mouse Into A Robot Odometer

  1. Tomek Brzezinski says:

    this is superb. I believe this is just what I needed. Thank for sharing!

  2. andres says:

    The old Apple usb optical mice had a direct pulse output. I had the same idea but unfortunately mechanical issues put the robot on hold.

  3. Torrent News » Convert a Cheap Optical Mouse Into a Robot Odometer [Robotics] says:

    […] | John Graham-Cumming via Make Zine […]

  4. Mengkonversi Optical Mouse Murah Ke Odometer Robot [Robotika] [lifehacker-on.blogspot.com] | . says:

    […] | John Graham-Cumming via Membuat Zine […]

  5. Convert A Mouse Into A Robot Odometer | Lifehacker Australia says:

    […] [John Graham-Cumming via Make Zine] […]

  6. Bosstiger says:

    Reblogged this on Gigable – Tech Blog.

Comments are closed.

Discuss this article with the rest of the community on our Discord server!

I'm a tinkerer and finally reached the point where I fix more things than I break. When I'm not tinkering, I'm probably editing a book for Maker Media.

View more articles by Brian Jepson


Ready to dive into the realm of hands-on innovation? This collection serves as your passport to an exhilarating journey of cutting-edge tinkering and technological marvels, encompassing 15 indispensable books tailored for budding creators.

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).