5
$\begingroup$

I'm a programmer by trade, and an amateur aerospace nut, with some degree-level training in both fields. I'm working on a UAV project, and while the good people over at DIY Drones have been very helpful, this question is a little less drone-related and a little more general robotics/electronics. Essentially, I'm looking at options for ground stations, and my current rough plan is something like this:

I have a PC joystick with a broken sensor in the base, which I plan to dismantle, separate the handle from the base, insert an Arduino Nano into the (mostly hollow) handle and hook it up to all the buttons and the hat thumbstick. Then, where the hole is that used to accept the stem to the base, I fit a bracket that runs horizontally to hold a smallish touchscreen (think Razer's Project Fiona tablet with only one stick), behind which is mounted a Raspberry Pi. The Nano talks to the RPi over USB as a HID input. The RPi will be running some custom software to display telemetry and other data sent down from the UAV.

My main question whether that Nano would have enough power to run the XBee that provides the telemetry link without causing lag in the control inputs. It's worth mentioning that the UAV will be doing fly-by-wire moderation, so slight stutters won't result in wobbly flying, but serious interruptions will still be problematic - and annoying. It's also worth mentioning that this will only be used as a simplified "guiding hand" control; there will ALWAYS be a regular remote control available (not least because of EU flight regulations) so this is just for when I don't want to use that. If that Nano won't do, what are my options? My first thought is to get a second Nano and get that to drive the XBee (the RPi has two USB ports after all) but there may well be a better way.

$\endgroup$
2
  • 1
    $\begingroup$ Please add some pictures to the question if possible, it definitely helps in understanding what you want. $\endgroup$ Feb 8, 2013 at 17:35
  • $\begingroup$ Will add a system diagram soon. $\endgroup$ Feb 12, 2013 at 9:50

2 Answers 2

2
$\begingroup$

The Arduino Nano should be able to interface with the XBee no problem.

If all you are using the Arduino for is forwarding a message that comes from the RPi, you might as well just use an XBee Explorer board (basically a FTDI Chip with a socket fit for an XBee). After configuration, all you need to do is to write to a serial port to get the XBee to send a message... All processing is done in-chip.

$\endgroup$
2
  • $\begingroup$ I also need something to handle inputs from five buttons, a slider and a thumbstick and pass them to the XBee. The RPi should also get to see these inputs, although it doesn't really matter whether that's in series or parallel. $\endgroup$ Feb 12, 2013 at 9:50
  • 1
    $\begingroup$ Concur. You'll get better real time characteristics by far off an Arduino running a well defined control loop than off a Raspberry Pi running a full Linux stack. $\endgroup$ Feb 18, 2013 at 15:50
2
$\begingroup$

If I'm understanding your architecture (from joystick to UAV) correctly, it is this:

${[\text{joystick}]-\text{wires}- \atop [\text{RPi}]-\text{USB HID}-}-[\text{Nano}]-\text{XBee}-[\text{UAV}]$

You're considering laying it out like this:

$[\text{joystick}]-\text{wires}-[\text{Nano}]-\text{USB HID}-[\text{Rpi}]-\text{USB HID}-[\text{Nano}]-\text{XBee}-[\text{UAV}]$

The Nano should be more than powerful enough to run the XBee and the controls. Even if it wasn't fast enough, I doubt that you could improve it by adding the latency introduced by two USB HID links and the processing onboard the RPi.

$\endgroup$
1
  • $\begingroup$ That's more or less it. The first is what I had originally, but then I started wondering whether the Nano would have the power to handle all three routes (joystick -> XBee, joystick -> RPi, RPi -> XBee) without introducing lag into any of them. I guess the easiest way is to wire it all up an the bench and test it; if it turns out to be slow then I can look into other options. $\endgroup$ Feb 13, 2013 at 9:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.