Hi, we are a group of students trying to integrate Optical Flow PMW 3901 designed by Pesky Products with the Pixracer using the Arducopter ver 3.6 firmware .
So far the limited resources we have found pointed us to towards configuring the WIFI port, initially for the ESP 8266 Wifi Module. However, we are confused by how to configure it as well. Please help us (or save us) if you have any idea on how to do the above by responding below. Thank you!!!
Hi rmackay9, i wanted to clarify if driver that you stated above is for the pixracer board, or the PMW3901. I am new to this, so excuse me if this is a ignorant question. I have to download arduino for this right?
He means that ArduCopter can be compiled differently to be compatible with different hardware. In this case, the driver that you need is only included in the firmware when compiling it for the SkyViper, so you will need to modify the firmware before compiling so that it includes this driver for your hardware.
Despite the name, ArduPilot is not arduino. Many years ago it was built on arduino (… and Arduino is mostly just C++ with some helpful libraries together with an easy to use compile and upload environment) but these days ArduPilot is all C++. Instructions for building AP are here.
I’m happy to build it for you though of course once you’ve got the hardware ready. It’s a very easy change, we just need to move the “backend = AP_OpticalFlow_Pixart::detect(“pixartflow”, *this);” line down a couple of lines so it’s after the #endif
Ok so, I kinda really need to use the Pixracer Board hardware. According to various sources, the Wifi port can be converted into an SPI port for the optic flow as seen in this link: Configuring wi-fi port as SPI port in a Pixracer board
I’m thankful for your offer if you are still interested in helping us.
Sidenote: So sorry for the multiple threads. This is our first time using this platform, so we are kinda ignorant about the etiquette.
Just wondering if any of the newly supported FC boards, like the Omnibus f4 could be easily modified to work as well. I believe they use SPI buss to communicate with the OSD chip. If there was a way to tap into that bus, perhaps one could have a very affordable FC with a inexpensive Flow sensor. I know nothing about how any of this hardware works, but it would be great ( and inexpensive) for a small quad.
G’day Joe,
it’s feasible: the device should work with any board that has an exposed SPI, although the change Randy pointed out above would be needed. For a long time no-one used external SPI sensors (for good technical reason - it’s meant to be a PCB protocol, not for external peripherals), but with short cable lengths it should work.
Yup, I totally agree with what @james_pattison is saying - we should make the changes under ChibiOS because NuttX is on the way out… and it’s probably easier to do on ChibiOS.
I’ve also looked at Pixracer’s wi-fi port to a SPI conversion for external OSD connection.
It sounds pretty simple to do with ChibiOs, but my knowledge in hardware was not enough unfortunately.
my little plan to sneak that into the build didn’t work unfortunately, so no point testing. It will need to be a compile time option, with a big caveat: this flow sensor needs to be the only device on the SPI bus (so if your FC has one SPI bus with multiple chip selects for the IMU and external, don’t use it as you’ll probably crash).
I’ll work on putting a hook into OpticalFlow.cpp so that if PIXARTFLOW_SPI is defined, it will build for it. I’ll need to add instructions to the wiki as well.