I've found others that have built similar devices, but not for OpenPilot. Fortunately others have tried similar experiments with sending receiver commands over UAVTalk, which means that I didn't have to build in support for the underlying mechanism, which is the GCSReceiver UAVObject.
The reason that I didn't just use the existing manual control via the GCS is that I don't want to be required to have a GCS, and I also think there will be less latency using a real-time OS and dedicated hardware, and less possibility of loosing control from a system hangup/crash.
So that's enough of the background, now to what I have so far...
I wanted to build something initially that would be relatively easy and cheap to build, so I built a prototype box out of a cheap ($10) STM32 board, a standard receiver, an Xbee, and some glue hardware:
IMG_20111215_203713.jpg 669.64K
82 downloadsThis box contains the processor, Xbee, 72Mhz PWM (converted to PPM) receiver, a USB interface to the GCS, JTAG for programming, and even a header for connecting another serial port for debugging. This is all wrapped up in a Radio Shack project box. Currently it's powered by USB, but I plan to add a battery connector to the secondary board to power off of a standard 2S battery. I used 2 boards because the processor and Xbee have 2mm pin spacing, so I have 2mm board connected to a standard 0.1" board via some 2mm connectors that I had lying around.
The software was the harder part. It runs on a stripped down CopterControl firmware, with all of the standard modules removed, and a single new (TransmitterControls) module that (currently) reads the PPM receiver port and handles the message relay, and sending out the GCSReceiver packets. The board initialization simply configures all 3 USARTS and the PPM receiver. Fortunately it is requires less than 64kB blash, which is all that the STM32 CPU that I chose has on it.
I'm using PPM for the receiver interface, but one could easily configure it to use any of the standard receiver types.
As I said, the TransmitterControls module monitors 2 USARTS using UAVTalk, and relays messages between them, so it's acting as a passthrough between the GCS, which is on the USB port side, and the flight computer, which is on the Xbee side. It also has a thread that reads the PPM receiver periodically and sends out GCSReceiver updates to the flight computer. The GCSReceiver messages have priority over the other GCS messages, so the latency sending out a GCSReceiver packet should be at most a single packet time.
In order to implement this I had to make some changes to UAVTalk. I added a status return from the receive function so that the receiver thread can know when a packet is complete, and I added a function to copy the packet out of the receive buffer so that it can be relayed. I also added support for additional transmit buffers to lessen the chance of packets being dropped. I plan to try to get these updated included in next when I've cleaned them up a bit.
In order to test this, I purposely did not include a receiver in my latest mini-quad build. I plan to use that to test this, and I have already flown it a few time without a problem. This is what it looks like:
IMG_20111215_203439.jpg 974.67K
99 downloadsThanks braindead4554 for sending me a motor to finish it with!
I've already started laying out version 2 of the transmitter hardware that is intended to replace the logic board in an old transmitter that I have:
IMG_20111217_084835.jpg 819.95K
74 downloadsThis version will go inside the transmitter, and will be attached directly to the sticks and switches, and will not need a receiver. It will also include another Xbee slot that will be used to talk to the GCS. It could contain an Xbee, a BluetoothBee, or WiFiBee.
I still need to do some more testing on the packet relay. Normally it works very well, but I have had the GCS loose connection a couple of time, but I've never lost connection with the quad. I want to add some debug to quantify latency and to track dropped packets. I also want to test range, and add RSSI monitoring so that the GCS can warn if the signal strength is getting low.
Oh, and I think all this hardware could all be replaced by a PipX!



United States
Luxembourg
Australia
Germany







