Page 3 of 4

using XBee to replace PPM input

PostPosted: Thu Sep 16, 2010 7:11 pm
by Chris
Hey Tom,

I see lots of people talking about XBee here so I thought I'd post this question here too. I'm looking at replacing the PPM rc receiver with the XBee for control inputs and wondering if you had done this yet? Looks like the GPS uart2 uses an interrupt on each received char, but the uart1 doesn't, so would i need to implement an interrupt on uart1 as well to use it in flight? Any thoughts? Code? Thanks!

Re: Additional gluonpilot hardware

PostPosted: Thu Sep 16, 2010 7:18 pm
by Tom
Hi Chris,

I already gave this a lot of thought...
My first thought was that this isn't usefull for manual flight mode. I don't think I'd be able to control my funjet using the arrows on my keyboard or a joystick.
So, the next step would be to use this joystick only for stabilized flight mode. When you do nothing, it flies straight, when you are panicking, just pull up and the plane will climb.
But then I ask myself: why still flying in stabilized mode if you can use navigation mode? Instead of controlling the roll angle, you can as well just tell the damn plane where to fly to and how high to fly :-) This is what the groundstation does/will do...

Please give me your thoughts on that or what you had in mind.

Re: Additional gluonpilot hardware

PostPosted: Thu Sep 16, 2010 10:14 pm
by Chris
Absolutely, I see where you're coming from. Thanks for the quick reply.

For manual mode, you can get a USB transmitter that feels just like an RC transmitter:
http://www.hobbypartz.com/60p-dyu-1002.html
Maybe they make wireless verisons of this so you aren't tethered to the ground station, too.

For Stabilized mode I'm coming from the side of an unstable aircraft, like a quadcopter, which requires stabilization to fly. So really manual mode is stabilized mode.

And for the sake of simplicity and weight, one radio would be best. Small VTOL vehicles are very susceptible to weight gain, and even the small receiver counts for something. And you really only need one radio.

In terms of implementing this on GluonPilot, I was thinking I'd try to set up the "communication_input_task" function so it operated on interrupts similar to the GPS.
Then, in that function, test if the first character sent is "$" or something and if it is, treat this data as control input, not configuration stuff.
You'd probably want some stuff to select b/t PPM or this new serial control input, too.


So that's what's on my mind. What do you think?

Re: Additional gluonpilot hardware

PostPosted: Fri Sep 17, 2010 5:48 pm
by Chris
Ok, so looks like you already interrupt in the uart1_queue.c, so that last part of the above post probably sounds silly, haha.
Even though this XBee control input doesn't seem like a priority for you, if you, or anyone else, had some pointers while I stumble along on this adventure, I'd appreciate it! I'll start a new thread under "Firmware".

Re: Additional gluonpilot hardware

PostPosted: Wed Nov 17, 2010 11:59 pm
by lukasz
Will following xBee Adapter be any good?
http://www.adafruit.com/index.php?main_ ... cts_id=126
Price seems reasonable.

Also I have been looking at xbee Pro 802.15.4 modules: http://www.sparkfun.com/products/8876
Is the max available range for those about 1600m?

If I want to have a longer range than I need to look at 868Mhz?

Re: Additional gluonpilot hardware

PostPosted: Thu Nov 18, 2010 12:03 pm
by Tom
I guess they are good.

I did some tests with the boards from Sparkfun and (after some slight adaptations) they also work fine.

Unfortunately I didn't do any range tests with the 2.4GHz modems. My 868MHz modules have never been out of range, but I also never flew further away than about 1.5km :-)

Re: Additional gluonpilot hardware

PostPosted: Sun Nov 28, 2010 3:48 pm
by lukasz
Does anyone know if following Explorer Dongle http://www.sparkfun.com/products/9819 simulate FTDI cable?
I would like to have follwing set up:
- http://www.sparkfun.com/products/9819 + xbee on groundstation
- http://www.sparkfun.com/products/9132 + zbee connected directly to Gluonpilot.

I would like to eliminate FTDI cable.

Re: Additional gluonpilot hardware

PostPosted: Sun Nov 28, 2010 7:44 pm
by Tom
Hi Lukasz,

I would use the http://www.sparkfun.com/products/8687 + USB cable. It's easier to move the XBee module with a cable (for optimal reception). The module will work the same as the FTDI cable.

This one: http://www.sparkfun.com/products/9132
works fine in the air, but you will need to replace the diode with a 0 ohm resistor (or short circuit it) before it will work.

Re: Additional gluonpilot hardware

PostPosted: Mon Nov 29, 2010 10:41 pm
by lukasz
Thanks Tom.

I know that you switched from xbee 868MHz to 2,4GHz.
Was this dedicated by something?

Re: Additional gluonpilot hardware

PostPosted: Tue Nov 30, 2010 1:38 pm
by Tom
No no, I didn't switch. A customer from a non-european country needed telemetry. The XBee 2.4GHz was the quickest and easiest solution.