3D Robotics

Adding wireless telemetry to ArduPilot

You may have noticed that we had wireless telemetry in our flight testing last week. It's really easy to add. The first thing to keep in mind is that you should use Xbee modules in a different frequency range than your RC equipment. If you've got 72Mhz RC gear, you can use 2.4Ghz Xbee modules. We use Xbee Pro wireless modules with a Adafruit adapter board on the aircraft side, and a Sparkfun USB adapter board on the ground/laptop side. If you've got 2.4Ghz RC gear, you should use 900Mhz Xbee modules. We use a Xbee Pro with the wire antenna for the aircraft, and and Xbee Pro with a SMA antenna connector (and a good 900Mhz antenna) on the ground, with the same adapter boards as above. Next, you need to set up your Xbee modules. They ship with a default of 9600bps, which you must change to 4800 bps for ArduPilot 1.0 or 57,600bps for ArduPilot 2.x. Connect them with your FTDI cable (see instructions here) then use Digi's X-CTU utility to change the baud rate to 4800 or 57,600 (in the modem configuration tab--press the Read button and then click on and change the baud rate line). You should also give them unique Network IDs so they'll be paired. Just use any 3-digit number, and just make sure you've set it the same on both modules. (Don't use 999 if you're going to be flying around me--that's mine!). When you're done with the settings, click "Write". Remember that after you change the baud rate you have to switch back to the PC Settings tab and change the baud rate there, too, or the utility won't be able to communicate with the module. (Switch it back to 9600 when you're switch to the second module, if it's still in the default mode, and repeat the process.) On the ArduPilot side, use three jumper wires to connect the following pins circled in red on the board below: --Xbee RX to ArduPilot FTDI port TXO --Xbee 5v+ and GND to the VCC and GND pins next to the FTDI port.

It will end up looking like this:

(Note: the above is to get telemetry from the Autopilot. If you just want to see the NMEA data from the GPS module, connect the TX pin to ArduPilot's RXI pin, right next to the to TXO pin, instead.) On the ground side, connect the other Xbee module to your laptop with your FTDI cable, as described here. That's it! If you open up a terminal program on your laptop and set the baud rate to 4800 or 56,000, depending on which ArduPilot software version you're using, you should see ArduPilot telemetry coming in. Anytime there is a "Serial.println" in the code, that data will be sent through the Xbees to the ground. You can record any data you want, and even GPS datalog from the ground! Couldn't be easier. BTW, if you want to test the range of your Xbee link, connect the plane-side Xbee module's RX and TX pins together to create a loopback circuit and use the X-CTU utlitity's range test function. For the modules we're using you should get around a mile. Once you've got the wireless connection set up, you can use our Ground Station to display real-time telemetry with ArduPilot 2.1 and up:

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • All,

    I'm sorry - I meant Super Star, I also have an Easy Star but I'm using a Turnigy 2838-2350 on that.
  • Is it possible to try out the telemetry with the FTDI board? or does it have to be with the xbee?? I am trying out with tye board but cant make it work and I would like to know it its possible and how it is done.
  • 3D Robotics
    Re: replacement motor for EasyStar: the Mulitplex power pack comes with Himax HC2815-2000 Brushless Motor.
  • Thomas,

    I forgot to update everyone on the Packetization Timeout problems... I currently have the modules set to 3 and have not experienced any problems.

    For anyone trying to follow along, open up X-CTU, connect to your XBee Module, click Modem Configuration, scroll down under Serial Interfacing, and change the 3rd option (x) RO - Packetization Timeout to 3.

    I was having a lot of software issues pushing GPS data through which I think was causing the issue. One thing I would like to point out to anyone working in a Windows environment, you may experience a problem when pushing NMEA (GPS) strings through your serial ports where your mouse will start jumping all over the screen... Anyways after much hardship I determined that issue to stem from legacy Windows functionality in which the OS thinks NMEA data is actually a signal from a Serial Mouse even if the drivers loaded for something totally different. The way to deal with this is to open up the Device Manager and check under "Mice and other pointing devices" and right-click disable the Serial Mouse that you will find there... This occured under Windows XP-Pro SP3 with the latest patches.

    As for the flight test.. I assembled my buddies and we headed out to our flying spot to test the wireless setup for a few minutes before the sun went down.. Long story short I had changed the stock Easy Star prop (9X5.5) for a 9X6.. After about a minute in the air at full throttle to gain altitude the motor completely seized. We didn't realize this until the plane entered a complete flat stall because the FMA was set to max gain. The plane was at about 700 ft at that time so I was able to drop the nose, gain speed, and glide in for a very rough emergency landing. Bent the landing gear pretty bad but there was no damage. The motor is totaled - chunks of the brushes and magnets were rattling around in the can, the wires are all scorched..

    I'm doing the math now to figure out what kind of brushless motor I need to replace the stock 600 size motor on an Easy Star... Any suggestions?
  • Thomas C,

    Sorry it took so long to respond, I'm about to begin finals..

    I have purchased the 8 dbi patch antenna and this weekend will be testing the setup (with the whips and the patch antenna). I'll write up a little report and post it back on here when we get results.

    Brian W,

    Thanks for the rules, we'll get a stand for the patch antenna (or maybe we'll throw it up on top of a building) and document the range difference.
  • 3D Robotics
    To all that are having problems with the program reading the serial port, we're aware of the bug. It's something to do with the Labview runtime engine. NI is helping us fix it....stay tuned.
  • has anyone tried sending data back to Ardupilot through labview or another program? that could come in handy for lots of things!
  • Just to confirm, I am running into the same problem as Jonas. I've verified nothing else is using the com port, and that I can get serial data from the port via TeraTerm. Nothing shows up as a selectable COM port. I'm running Vista 64-bit with the Labview 8.6 runtime.
  • Moderator
    You have to change the file extension association back to Labview.
    You don't have to edit the registry, it's a Control Panel/Program Files app, depending on your operating system.
    (I'm using Win 7 RC right now and can't remember the XP or Vista directions at the moment)
  • Developer
    I have same problem, but I had Video_Impressions_2 software loaded, it stores video projects withs xxxx.vi extension files causing conflicts with LabView 8's xxxx.vi, virtual instrument files. I uninstalled Video_Impressions_2, but it didn't remove all files. I think this is a simple registry problem, but don't know to fix. Any help? Thanks
This reply was deleted.