Hi all,
Thought it about time I posted something about my new project, which is all about getting way too many sensors airborne on something interesting. I've flown fixed wing models before (many years ago), multirotors look like more fun.
So far I have a PixFalcon, a Pi2 and Mega 2560. The Pi2 provides redundant connectivity (WiFi & 3G dongle), streams video from a camera module & mavproxy telemetry to a laptop running QGC. All good stuff thats been done before.
The Pi2 receives control inputs over Bluetooth from a PS3 controller (if directly connected) or 3G/WiFi from the groundstation laptop if thats where the controller is. This goes over USB to the Arduino Mega, which converts to S-Bus and streams to the PixFalcon - giving 18 channels to play with. Right now its set up to give 6 flight modes, remote kill, primary flight controls, RTL & I can set/clear trims & works quite nicely. I'll have to think of something for all the extra channels to do.
All this is running on a 12v power supply (on the kitchen table). Missing parts are motors, ESC's, battery and frame so there's plently more to do. I'm considering a T-6 with a 5500mAh 4S. The range of available parts is limited here in Chile but I found some D2830 Motors and 30A ESCs that may work - opinions welcome.
Above is a pic of what I've got going so far - next step is the frame.
Comments
You're right, delays have been an issue.
The arduino interrupts the pi every time it starts sending an s-bus packet to the PixFalcon. The pi has the next s-bus packet in the arduino serial buffer before its has to send the next one to the PixFalxon. Works nicely but took some doing, 14 milliseconds wasn't much to work with.
I did try eliminating the arduino but couldn't find a reliable way to generate s-bus on the Pi, I also needed more than the one serial port the Pi provides, which the arduino solved.
Telemetry goes through the Pi serial as you suggest, then UDP stream from MavProxy on the Pi to the groundstation laptop. Not sure what the delays are on that or how to measure it, seems OK for now.
Wifi between pi/groundstation is more than fast enough for everything. 3G is not so good and squeezing a video over it makes it worse. More work needed there.
Interesting project so far.
One thing that rings an alarm here is the potential delays (bluetooth, wifi, 3G all have their levels of latency, then USB is another source of latency and then just the number of nodes between the controller and the pixfalcon). May not be an issue for a photography or similar usage vehicle. I think you could skip the arduino perhaps and connect the Pi to the PixFalcon directly through serial.