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

  • Here is another shot angle.

  • XBee Adapter Mod for use with XBee Pro 900 modules

    I opted to use the XBee Pro 900 module for its increased transmit power and range, however some have noticed that these modules are slightly longer than the normal XBee module footprints. Because of this some modification is necessary to the Adafruit Xbee Adapter in order to facilitate the Pro series modules.

    As you can see in the picture below, the Pro series module extends backwards to occupy the space indicated by the black lines. This clearly interferes with the capacitor and voltage regulator, which are circled in red. The simple solution is to soldier these components onto the underside of the PCB as seen in the second picture. Care should be taken to ensure the polarities are correctly maintained. Soldier the components as seen in the second picture and should be fine!


  • Developer
    Venkatesh
    XBee is receiver/transmitter. So you have to buy one for transmitting and another for receiving.
  • Does the xbee transmitter come with the xbee reciver or do i have to buy it separately
  • 3D Robotics
    Brian,

    Why don't you want to install the Arduino IDE? Anyway, the relevant code is this:

    {
    Serial.print("!!!");
    Serial.print("LAT:");
    Serial.print((long)((float)lat*(float)t7));
    Serial.print(",LON:");
    Serial.print((long)((float)lon*(float)t7)); //wp_current_lat
    Serial.print(",WLA:");
    Serial.print((long)((float)wp_current_lat*(float)t7));
    Serial.print(",WLO:");
    Serial.print((long)((float)wp_current_lon*(float)t7));
    Serial.print (",SPD:");
    Serial.print(ground_speed);
    Serial.print(",CRT:");
    Serial.print(climb_rate);
    Serial.print (",ALT:");
    Serial.print(Get_Relative_Altitude());
    Serial.print (",ALH:");
    Serial.print(Hold_Current_Altitude());
    Serial.print (",CRS:");
    Serial.print(ground_course);
    Serial.print (",BER:");
    Serial.print(wp_bearing);
    Serial.print (",WPN:");
    Serial.print((int)current_wp);
    Serial.print (",DST:");
    Serial.print(wp_distance);
    Serial.println(",***");
    counter=0;
    }
  • T3
    Chris,
    I wonder if you would be willing to post a list of the telemetry messages that your ground station receives. If you don't mind, what I'm looking to do is transmit compatible messages from my autopilot and make use of your ground station utility. I was going to pull the messages out of the Labview source code, but I'm running Labview 7.1 and it wont open the source files. I then downloaded the ArduPilot firmware, but it appears to be tokenized and I was trying to avoid having to install the Arduino IDE.
    Thanks,
    Brian
  • 3D Robotics
    Mike,

    I discuss the SuperStar upgrade options, including motor, on the ArduPilot home page.
  • Alejandro,

    The XBee simply acts as a wireless serial cable if you will. You definitely can just take the FTDI cable, plug it in to the serial pins, and receive the same data to your terminal program. Just leave it in after you program the ArduPilot and open up the SerialExplorer, or any number of other free terminal programs out there..
  • 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.
This reply was deleted.