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

  • Alex, do you steel sure what you was test LAST firmware version (3.2.1)? In my controllers (I have 3) I dont able activate OF_Loiter mode. With or without connection with optical sensor. Only old versions able to switch OF_Loiter mode (I check 3.1.2) but In Mission Planer in status I don't see any information from sensor. May be it MP problem, I don't know, I don't check it in flying yet in old version, but I want new version cover Optical Flow!

  • Hi Arkady

    It has been a while since I tested it, but I believe activating Loiter is possible. I activated it without an optical sensor attached and all it did was lock out my controls and i crashed into my garage! I was hoping it would hold position when there was no signal but still allow repositioning. nope :)

    I have not yet got round to wiring up my ADNS3080 yet so I don't know if it will work if properly connected.

  • I understand what APM is no longer supported, but Randy, ore Alex answer please, what software release support  ADNS3080 sensor yet?  Last 3.2.1 version seems not support, it is not possible to activate OF_Loiter! 

  • Well they don't call it DIY for nothing eh?!

  • Hi OG, how do you fit in here, marketing? I'm kind of looking for some advice from the arducopter developers here.

    Goodluckbuy? you weren't be any chance the one that sold me an optical flow sensor claiming it to be pixhawk compatible eh?

  • It is my intention to dive into the software. I participated in the RoboCup SPL league for 4 years, I have a background in pose estimation and control algorithms. I want to get up to speed and join the development community where ever it currently is, bust first I have to complete my hardware build. While I am completing the hardware, I am trying to figure out the software ecosystem and choosing the right flight control stack. I have been away from the project for a few weeks, i recall I came to the conclusion that arducopter was the better choice for autonomous systems.

    Anyway, I am just working with pre-built binaries for the moment, I am not ready to dive into the code yet. I want to achieve stable position control first. They said the HC-SR04 wasn't compatible with the pixhawk, that didn't stop me from using an Arduino Nano to build an interface. Optical flow is the last piece of the puzzle for me from the hardware side, then I will be ready to start compiling the code from source. If the ADNS3080 is not compatible then perhaps that is where I need to start. I just would rather not be having to fully understand the framework that would be required to build the software interface, it would be good if that is already existing, as I would prefer to just work inside modules, such as geometry/sensor fusion. 

    Anyone finding this due to keyword search, here is my HC-SR04 pixhawk solution:

    https://bitbucket.org/albuckley/alx_hc-sr04_pixhawk/wiki/Home

    I am wondering if I will have to do something similar for the optical flow sensor. I put all my cash into a flight control board and quality motors. The PX4FLOW is too $$$ for while I am currently on a job hunt.

    I am still trying to sort out the confusion between the APM software and APM hardware and the history of the pixhawk. With the over lap of names it means all search terms just leads to same pages over and over again, it is hard to research this. 'Mission Planner' and 'APM Planner' does not help either.

    From what I understand, the pixhawk is the latest in the 3DR series, the descendent of the APM2.6.

    The ADNS3080 was compatible with the APM2.6, I don't understand why the software module to drive it would be removed (well I can think of a few motivations).

    I am beginning to think it is b/c arducopter was not the flight stack for the APM2.6, but it has since been ported to the pixhawk. That would explain the lack of existing legacy code.

    I am trying to build a block diagram of the software/hardware ecosystem as I must assume I am not the only one being slown down by wrapping my head around the evolution of the architecture and documentation. The vast majority of my searches lead to pages from 2012, I'm sure there is some super blog out there I haven't found yet.

    Anyway, that is my story, I haven't spoken with anyone in the community yet, it does look like it is time for me to get on to the mailing list. I am beginning think there are competing factions though. I don't want to commit a particular community or choice of code base without first knowing I have the whole scene mapped out.

    I think at this point, all I am looking to know is can I connect the ADNS3080 to the pixhawk SPI port and have it acknowledged by the system by setting the right flag, ie will it receive the raw data? I have my soldering iron ready to go to build a cable and then mount the sensor on my chassis. It is pretty much the last hardware thing I have to do before diving into the software. I'll be tuning my pitch roll offsets now that I have finally found the guide for it. Up until now I have been dealing with a very hazardous suicidal menace that is more like a flying lawn mower than anything else :D

    albuckley / ALX_HC-SR04_pixhawk / wiki / Home — Bitbucket
  • Developer

    @Ravi, 3DR doesn't sell the ADNS3080 sensor anymore.  There are clones out there though if you want one.

  • @andy, I could not locate the sensor in store. can u send direct link.

  • Developer

    @Alex,

    Copter-3.3 supports the px4flow sensor for position hold in Loiter mode.

    If you'd like to write an ADNS3080 optical flow driver that would be very welcome.  It was requested by Luis on the dev team a few weeks ago.  Best to join drones-discuss@googlegroups.com I think.

    Beyond writing a PX4Firmware driver to read the sensor's values there will also need to be some math done in the ardupilot AP_OpticalFlow library to convert those readings using the vehicle's attitude and rotation rate.

  • Hi

    I have spent days now researching what has been with the ADNS3080 lately with arducopter 3.x and pixhawk.

    All I have found is dead links to wikis, references to APM2 FC board and older flight stacks or pages about the PX4FLOW ($$).

    I am willing to do what work is required to interface with the pixhawk, I just would like to know if arducopter has support on the software side of things.

    No one has done this?

    cheers

    Alex

This reply was deleted.