An Optical Mouse Sensor For Robotic Vision

Readers with long memories will remember the days when mice and other similar pointing devices relied upon a hard rubber ball in contact with your desk or other surface, that transmitted any motion to a pair of toothed-wheel rotation sensors. Since the later half of the 1990s though, your rodent has been ever significantly more likely to rely upon an optical sensor taking the form of a small CCD camera connected to motion sensing electronics. These cameras are intriguing components with applications outside pointing devices, as is shown by [FoxIS] who has used one for robot vision.

The robot in question is a skid-steer 4-wheeled toy, to which he has added an ADNS3080 mouse sensor fitted with a lens, an H-bridge motor driver board, and a Wemos D1 Mini single board computer. The D1 serves a web page showing both the image from the ADNS3080 and an interface that allows the robot to be directed over a network connection. A pair of LiPo batteries complete the picture, with voltage monitoring via one of the Wemos analogue pins.

The ADNS3080 is an interesting component and we’d love see more of it. This laser distance sensor or perhaps this car movement tracker should give you some more info. We’ve heard rumors of them being useful for drones. Anyone?

22 thoughts on “An Optical Mouse Sensor For Robotic Vision

  1. I’ve always thought the use of cheap optical mouse sensors would be a good means of Yaw drift compensation for 6DoF sensor solutions. Glad to see that the sensors are becoming a reasonably easy thing for hackers to get their hands on now.

  2. Readers with long memories will remember the days when mice and other similar pointing devices relied upon a hard rubber ball in contact with your desk or other surface, that transmitted any motion to a pair of toothed-wheel rotation sensors.

    Yes, I do, have several like that… and I recall going to use a computer at school, and finding that a previous student has stolen the ball out of the mouse I’m about to use, to supplement his own deficiency in the ball department.

    1. Long ago, I was in the “computer center” (remember those?) very early in the AM trying to get some code to run on a remote Cray YMP4 (remember those?) via a PC terminal/Telnet. There was some poor undergrad hourly guy taking the little rubber balls out of the mice and cleaning them since they were used all day every day.

      I had to ask him “Did you ever think that you’d wind up washing mouse balls to make the rent?”

    2. my school had these mice with the rotory encoders attached directly to tapered discs which made contact with the mouse pad. they were angled such that one was x and the other was y. they were terrible mice though, we used to make fun of them. but its probably because of the childish tendency to play with other people’s balls. so procurement went out of its way to find mice that couldn’t be castrated.

  3. I wanted to try something like this when I was in 2nd year in university, for a robotics competition. Scrapped the idea after realizing what my max speed would be, based on the mice at the time…

  4. “Readers with long memories will remember the days when mice and other similar pointing devices relied upon a hard rubber ball in contact with your desk or other surface, that transmitted any motion to a pair of toothed-wheel rotation sensors. ”

    Some of us remember hand scanners in a similar format.

  5. Some of first desktop rodents were plain steel ball bearing on rubber mat. Encoders were continuous rotation potentiometer -some not continuous- with rubber wheel contacts. Some wack jobs turned them upside down and called them trackballs. Ball was replaced with a plate on some. Before that x-y analog joystick and light pen. And then before that… binary mapping bearskins grids and bone knives called cursor keys. RF Wireless optical using spoiled bratz. Both ways uphill I tells u._ old fart Rant with this is very old done before when optical mice werent nearly cheap.. Go climb the archives.

  6. I played with using the camera in an early optical mouse to read characters off the sheet of paper it was being rolled over. I always kind of wondered if someone with enough determination could write a virus that would read and assemble the images picked up by the mouse’s camera into significant amounts of information.

  7. A bit offtopic but …

    I wonder why I don’t see more junk box mouses in use for various tasks. I mean, including the inbuilt micro-controller and not just the CCD sensor.

    Unless things have changed recently, most mouses will auto-detect a USB or PS2 connection.

    In PS2 mode they works with a very simple serial protocol that is perfect for use with a micro-controller on only 2 GPIO pins.

    They would be great for digital movement feedback when something is driven with common non-synchronous DC motors.

  8. I’ve got some info on and a library for using the ADNS505 with Espruino here: http://www.espruino.com/ADNS5050

    We did a make your own Robot hack day with them about 3 years ago – full docs at http://www.espruino.com/RobotPCB

    They’re really cool, however the image sensor is really small so it’s almost impossible to get a good enough lens in focus with a decent FOV on them (and the bare chip doesn’t come with a lens – you’d have to gut a mouse).

    The sensor readout on the ones I looked at is really diagnostic only – one pixel per frame, so while they have a crazy high FPS it’s still pretty slow to get an image out. I’d love to hear if there was something similar that would actually make a more useful camera…

  9. That’s great – just checked the datasheet and it looks like the ADNS3080 can be put in a ‘frame capture’ mode. However the other sensors that I looked at like the ADNS3050, ADNS5050 and ADNS2620 only have a ‘Pixel Grab’ command – so one pixel per frame (albeit at ~4000fps).

    What do you use as a lens on yours? What kind of field of view do you get?

    1. Argh. sorry – meant to reply to the above comment from Arsenio. I checked a few more out – ADNS2030, ADNS5020 and ADNS2610 also only have a pixel grab command – so ADNS3080 having a full frame readout would seem to be reasonably rare.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.