Developer

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

Comments

  • I also want it!

  • Any idea when 3D Robotics plans to sell the Optical Flow Sensor for ArduPilot 2.5?  I noticed there hasn't been much discussion in the last few months.

  • Developer

    Not completely sure.  I've heard they will be back but they've had some problems getting their hands on the ADNS3080 sensors.  There is a better (but much more expensive) PX4FLOW sensor but it doesn't work with the APM (yet).

  • Developer

    @Steven,

        that sounds like the serial connection between your computer and the APM board is unreliable so it's losing packets and it sounds like the python program isn't reliable enough to recover from that.

        does it ever display an image or is that the first thing that comes out?

        by the way, when the sensor and APM actually talk they don't use the serial protocol so this issue doesn'tnecessarily mean that there's anything wrong with the sensor..but it will be harder to get the lens focused without being able to see the image.

  • Developer

    James,

         They cross but shouldn't be connected.  txs.

  • Developer

    Jan,

         The optical flow sensor really only helps with horizontal position hold so it won't help with altitude hold.  For that the baro or sonar is better.  catch you later.

  • Developer

    Ah, much, much better!  That's what it should look like.

    Yes the OF_LOITER pids will need some tuning.  It's a fairly simple control method..just a single PID controller for roll and another for pitch.  In the regular Loiter we use a pair of controllers (distance + speed) for each axis.

    Recently I've discovered the wonders of "complementary filters" so this may be the way that we can combine the optical flow speed with the gps position to make regular loiter better.  That's not a super simple task but that's really where we need to get to.  So you attach your optical flow and it just uses it when it can to make your loiter performance better..no special OF_LOITER mode required.

  • Developer

    Jan,

        Ok 6:30pm is probably too late in the day.  The mouse sensor it's built with does require a lot of light...that's it's main weakness actually.

  • Developer

    Jan,

        By the way, grass should be ok.  flat black pavement is not so good, carpet is terrible.

  • Developer

    Jan,

        When focussing the lens have you tried to grab an image with the python sketch?  It's a bit annoying to get it set-up but it is helpful in getting the focus right.  Once you get it right, I'd tape that lense in place so it can't move anymore.

        What time of day were you testing?  you have some good data in there but it's not consistent enough for the sensor to operate properly.

This reply was deleted.