Can someone confirm if OF_Loiter and the OF sensor available on the DIY Drones store works with the APM 2.0 (not 2.5)
The wiki is ambiguous there's a wiring diagram for the APM 2.0; but the comments say it doesn't work due to a difference in voltage (3.3v vs 5.0v) and that the next hardware revision is required.
The OF test feature in the console seems to give data when you wire the sensor as per the diagram, but I am unsure if OF_Loiter is implemented in 2.8.1 and if it isn't, whether the OF sensor is used in any flight modes.
The optical flow sensor DOES work on the APM 2.0 board. However, due to an incompatibility between the sensor and the APM logic, it's not simply "plug and play" like the sonar.
Just follow the diagram, and it will work. You will have to solder three wires onto the indicated spots on the board; with a decent soldering iron and the right tip, this is easy (hot iron, like 700F, and a small tip. this makes for a very quick job)
It seems that a lot of the wiki comments are outdated or otherwise confusing.
Cool, thanks Thomas.
That was what I thought, I was getting x/y data in the of test in the console.
As for flight modes, what modes does it work in? Only OF_Loiter? Is that "done"?
When I got into a hover and switched on OF_Loiter the quad would immediately start drifting away from it's location (I had no GPS lock as I was indoors). Switched back to stabilise and it would stop.
How do I test the sensor with an APM2? I confess I didn't do the focus and image tests with it before wiring it in. The instructions say to flash the arduino with a different PDE (am familiar with arduinos), once I do this, does that mean I need to reload my firmware after, or does it just replace the console mode? or is it extra? Where do I get the original from to reload after testing the sensor? It was unclear how this worked which is why I didn't perform the tests.
Thanks for the info so far.
If I understand correctly, OF_Loiter is still a work in progress and we are recommended against using it. However, that is the only mode that uses the OF sensor.
I'm working to build a quad that can hover inside for a very long time. I have not used OF_Loiter yet but I have connected the hardware and checked the output in the console. The test instructions on the Wiki page seem like a pain, but I guess it's the only way to check the focus, etc. I have no familiarity with any programming at all... so I have a lot to learn, just to be able to test this sensor.
Did you connect your sensor with the pins facing "forward" on the vehicle? If not, that would be an easy explanation for your drifting problem. Besides that, you may want to fiddle with the OF_Loiter PID settings. If you aren't familiar with PID tuning, it's a very common mechanism in robots so there's lots of info on the internet. Also, the wiki has a decent page: http://code.google.com/p/arducopter/wiki/AC2_loiter_PID