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

  • @Randy  Is it possible to use more then one? One for obstacle avoidance and one for alt hold? Or 4 all the way around for obstacle avoidance and one for al hold?

  • Sonar & flow sensr must be on the same plane, or absolut accuracy is not important?
  • Developer

    @Ellison,

         I'll check-up on the eagle files with Lorenzo & Sam.

    @Andrew,

         You're right about the error being a concern and it can cause some bad behaviour like drifting.  The size of the feedback from the sensor for a given horizontal movement increases linearly with the altitude so having the altitude measurement off by 10% will lead to the calculated distance also being off by 10%.  Still, if it was consistently off by 10% and you were just doing position hold it would be ok.

         I suspect timing differences between the IMU attitude measurements and the flow sensor measurements can also let some error in....and then there's the field-of-view constant, get that too low and the position algorithm will overestimate the roll/pitch compensation leading to a bad case of the wobbles!  Still this last one you probably don't need to worry about because I believe I've got it pretty close now.

     

    @I.S.

         I've always used a sonar because it gives much more accurate altitude information.  The barometer's got that "random walk" type behaviour which I suspect will cause a lot of trouble at low altitude which is probably where the optflow sensor is most useful.

  • Wow, I didn't see the link to the files, but looks like either they're not on the server yet, or there's an SSL server error.

  • The eagle file shop link seems to have some problems (at least with me)   :(

  • @Randy and UT: Thanks for your answers.

    I suppose sonar is compulsory, isn't it?

  • Distributor

    @IS we plan to start shipping the optical flow sensors from our store in a few days,

  • Ok - I suppose the 'hard' bit would be that there is error from the flow sensor, error from the IMU attitude, and I suppose you would also need altitude also? so error from the sonar. The maths I suppose is easy - was just wondering  how coping with all the error plays out in practice.

     

    It is very cool though and look forward to equipping my quad with one!

  • @Andrew: I think the compensation is done via the attitude estimate from the IMU (which is know to the quad anyways). It is not as hard as it may seem - look at Randy's instructions he linked.

  • 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?

This reply was deleted.