Mouse-based Optical Flow Sensor to focus on nearer distances (<10cm)

Hi, I am experimenting with an optical flow sensor, based on the ADNS3080 mouse sensor. This sensor is mainly used (apart from computer mice) on quadcopters, in order to maintain their position while hovering and more.
You can read more about it here as it is the exact model I have.

I have successfully managed to use it with a common arduino, modifying some older versions of ArduPilot and code I found online. (I can post the code if necessary)

Unfortunately, this sensor has two "weak" points:

  1. Needs a lot of light to work well
  2. Isn't made to focus with distances less than 30 centimeters

I have mounted mine on a miniature vehicle, where its distance from the ground is approximately 5 centimeters. I've also added a bunch of LEDs around it, which seem to do the trick most of the times and provide enough light (the sensor will be enclosed later inside of the car, that's why those LEDs are necessary).
Unfortunately, it can detect "movement" in the two axis, only when the surface is "pluralistic" enough :P, or in other words whatever the sensor "sees" contains many "details".
For example, when I move the sensor over a monochromatic area, such as my table, it doesn't detect any movement. Whenever i place something like a sheet of paper on the surface, the sensor can detect the color change and sends the displacement values.

After reading around and considering the fact that the sensor can detect movement - even over monochromatic surfaces - if i am holding it 20-30 centimeters over the surface, i am almost sure that I cannot make it work as i want, due to the fact that everything the camera sees is "too blurry" due to the fact that it cannot focus in small distances.
The lens and the "camera" on it, are easily swappable and from what i read they mention that you can change them. I tried just removing the lens and replacing it with one taken from an OV7670 camera module. To my disappointment, that did not produce any considerably better or worse results.

Due to the fact that I am planning to use it over a single (more or less) color surface (a black race track), is there anything I can do to get what i want?
Does anyone know of a lens/camera that will focus on such small distances? Is there a way to make my own lens easily or find one that will suit?

Any ideas or suggestions will be greatly appreciated! Thanks! :slight_smile:

I wonder if an accelerometer would be better for your needs for detecting movement.

CrossRoads:
I wonder if an accelerometer would be better for your needs for detecting movement.

Not so helpful during long periods of time, if i want to see how much i've moved across two dimensions. There is an IMU which has an accelerometer on-board already though. :slight_smile:

The link you gave to the specs for your optical sensor is broken, but there are plenty of other flow sensors that use standard interchangeable lenses. See this somewhat dated paper: http://botsnlinux.net/school_projects/mouse_paper_colloquium_22march11.pdf

I am certain that you can find a combination of lens and sensor that will focus at the proper distance.

@jreming

jremington:
The link you gave to the specs for your optical sensor is broken, but there are plenty of other flow sensors that use standard interchangeable lenses. See this somewhat dated paper: 合肥卦悦商贸有限公司

I am certain that you can find a combination of lens and sensor that will focus at the proper distance.

Thanks for the paper. I can see that the author is also using a similar optical flow sensor to mine. I was just wondering whether someone here knows a lens that will focus in around that distance, since I have no idea where to look for one. I am thinking of removing the lens from an old mouse to begin with.

Strange that the link doesn't open for you. Try this: http://copter.ardupilot.com/wiki/common-optional-hardware/common-optical-flow-sensors-landingpage/common-mouse-based-optical-flow-sensor-adns3080/