BR-0016-01-2.jpg?width=251In case you're looking for an optical flow sensor, there is now one available in the DIYDrones store for a penny under $40.


This sensor is based on the ADNS3080 mouse sensor which is a good choice for optical flow because:
   high resolution: 30 x 30 pixel frames meaning it can see features that lesser mice cannot
   high speed: 2000 to 6400 frames per second update rate which contributes to better low light performance than other mouse sensors
   SPI interface meaning it can be interfaced to many micro controllers and co-exist with other sensors


Other features:

  • Intended to interface with a 5v microcontroller.
  • 8mm lens with 11 deg FOV
  • Standard M12x0.5 lens mount meaning you can replace the lense easily  if required


Instructions for connecting the sensor to your APM/Oilpan are here.


Things to be careful of:

  • Performs best outdoors in well lit environments
  • Does not play well with Fluorescent lights (the blinking throws off the sensor)
  • Needs a somewhat varied surface to see movement (plain carpets are not it's friend)


Uses including odometry and obstacle avoidance but I've used it mostly for horizontal position hold.


Note: integration with ACM and the existing GPS pos hold is a work-in-progress but should hopefully be completed in a few weeks.  Here is a video of a slightly modified version of the ACM code using only optical flow (and sonar for altitude hold).


Inspiration and some technical help especially early on came from Marko Klein Berkenbusch and his blog on position hold with mouse sensor.


Hope you like it, all comments welcome!

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones


  • Developer


         Yes, we don't have support for the Centeye optical flow sensor but I've been meaning to add that for at least 6 months.  Just haven't gotten to it.

  • Developer


        The original several hundred that shipped did not have an IR Filter on them so I'm a little surprised to hear that.  I'll have to check with 3D robotics.  The lens should be about 8mm with a fov of about 50 degrees although the sensor ends up seeing much less than that (more like 13deg I think) because most of the image from the lens falls outside of the little image sensor.

  • Hi Randy, question.  What lens is mounted on here? It seems that the module I have has an IR filter on them, is that correct?  Do you know where I can get a similar lens without an IR filter.

  • Developer

    @OG, the wiki has been updated to show how to connect the optical flow sensor to the APM2.  You probably knew that as your post is from some time ago...somehow I missed it!  sorry!



         Doug Weibel talked a little about doing that but I think he became busy with other, "no" I haven't seen anybody accomplish that.

  • I'm new to the site so I apologize if this question has already been answered on another blog but has anyone in the DIY Drones community looked into using the optical flow sensors for automated landing of fixed wing UAVs?  I have heard of systems that couple optical flow and airspeed measurements to calculate height above ground for fixed wings so I was curious if anyone has tried that yet using the ArduPilot.

  • Sorry George missed your post. I am currently concentrating my efforts getting a super stable platform, till then I've shelved the OF.

  • Hi Randy, could you tell me what I need to tune and how, in order to achieve the level of performance you showed in the video? It looks really cool.

    I have the optical flow and sonar mounted and flying with v2.3/v2.4 at the moment on the standard 3DR frame.  

  • Dave, did you manage to get any tests done?

  • Ellison, absolutely.

    I do all my initial testing indoors and i have a escape route, hence a rather scratched up ceiling ;) and then when outdoors i fly in a rural area, usually with noone around. When I'm doing anything that's not already tried and tested i tether the quad using a retractable sprung cord, it lets the quad wander whilst not allowing it to escape. Its also pretty good for PID tuning if you attatch it to one leg :)

    I totally agree that safety is paramount, apologies if my jest gave the wrong impression.

  • Dave, I commend the adventurous curiosity.  I hope you are taking the precautions against possibility of the drone going out of control, and hurting yourself or others.

This reply was deleted.