ADNS3080 Optical flow sensor now available in the DIYDrones store!

In 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!

Views: 40971

Comment by on November 21, 2011 at 7:35am

Congratulations to all of the DIYdrones team!


As with most DIYdrones products, we will stock then in our UK based shop  for those of you in the UK/ EU.  You can find the optical flow sensor in our store at this link

Comment by I.S. on November 21, 2011 at 8:33am

Happy to hear about the OptFlow sensor finally!

@UT: do you have already in stock?
@Randy: I can see how to attach the board to the APM, but how to enable OptFlow in the code?

maybe a checkbox in the Mission planner upcoming?

Comment by Marko Kleine Berkenbusch on November 21, 2011 at 8:37am

Hi Randy,

Congrats, looks great, I will definitely have to give it a try!


Comment by Daniel Gru on November 21, 2011 at 8:45am

Just a basic understanding for Optical Flow sensors:
When wanting to use them for Position Hold, are they only good in low height? If so, up to which height will they be reliable (kind of like sonar?) Or can i still get good position Hold in 60m height?



Comment by Randy on November 21, 2011 at 8:46am




     For the moment, you have to add this line to your APM_Config.h (so you must load the code through Arduino IDE);

            #define OPTFLOW_ENABLED

     I would also recommend that until we get the GPS+Optflow blending fully tested that you set your Loiter PI values to zero but then increase the NAV_WP's P and I values a bit.

   Yes, you're right, I'll be talking with Michael O to get the check box added to the APMP.


Comment by Randy on November 21, 2011 at 9:01am


     There is definitely an altitude limit after which it doesn't make sense to use an optical flow sensor and instead you should use GPS.  I'm not yet sure exactly what that altitude is but so far I have kept my testing to under 5m.

     You can imagine that with a 30x30 pixel resolution looking down at the ground, eventually 1 pixel is going to be the size of a car.  I think at 60m altitude, with 11 deg field of view, 1 pixel will be equivalent to 0.35 meters so I don't expect it will be as accurate as a GPS at that height.

Comment by Roberto Navoni on November 21, 2011 at 9:15am

Great Work Randy,

i hope to test it as fast as possible :)



Comment by ThomasB on November 21, 2011 at 9:16am

Hi Randy,

I would like to use it with my STM32F4 which uses 3.3 V.

The ADNS works with 3.3V too, so is it possible to get the module to work with 3.3V by bridging the power stange?





Comment by Ellison Chan on November 21, 2011 at 9:19am

Nice, Randy. Is there a plan for sell the PCB separately or make the eagle files available?  I have a few ADNS3080's lying around.

Comment by Andrew Radford on November 21, 2011 at 9:27am

How does it do position hold - with such a narrow field of view, would tilting the quad slightly not 'look' like lateral movement to the sensor? Is it a case of compensating for that with the gyro (which sounds friggan hard...) or is it something more simple like a lowpass filter with a loooong time constant?


You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service