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

  • Admin
    Mike W,

    If you order the Minimag/Easy Star Power Pack from Tower Hobbies, you may get an upgrade kit with the wrong motor. I ordered two of the Power Packs and one had the correct motor (HB2815-2000 inrunner) and one had the wrong motor (HC2812-1080 outrunner).

    Multiplex sent me the correct motor to replace the incorrect HC2812-1080.

    Regards,
    TCIII
  • 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?
  • Admin
    Hi Mike,

    Been busy with other projects so have not had time to work with my Xbee modules.

    I am presently using X-CTU to view the module attributes. The firmware version is 1002 and there are no options in the Function Set drop down menu. Do you concur?

    Have you tried Packetization Timeout values other than "0" (ie. 1 or 2) to cure your transmission problem?

    Regards,
    TCIII
  • 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.
  • T3
    Hey Guys,
    There are a lot of questions about range and antennas, so I thought I'd throw out a couple rules of thumb for what its worth.
    Rule 1. You will approximately double your range for every 6dB of gain you get in your antennas. The reason I say approximately is RF is one of those fickle things that can vary with the type of soda your drinking. Antenna patterns aren't uniform and can be severely impacted by nearby objects. This gain can be in the receive antenna or the transmit antenna. It doesn't need to be in both. In other words if you have 6dB of gain in the receive antenna and 6dB of gain in the transmit antenna you would quadruple your range.

    Rule 2. High gain antenna and wide beam width are contradicting terms. The way an antenna increases its gain is by compressing its energy into a tighter beam. This means the more gain the antenna has the more carefully it has to be pointed at the target. One good way to get a little gain but still have a omnidirectional horizontal pattern is with a "collinear" antenna. These antennas are a little taller than a low gain antenna and work by compressing the pattern vertically meaning they can see all around horizontally but can't see up and down as well. This usually works well in our type of application because when the UAV is directly overhead it' tends to be close and as it fly's out the vertical angle gets less and less and into the high gain area of the antenna pattern. I would limit the gain to around 4 to 6 dB otherwise the vertical compression can get to be too much and it can become tricky again to keep it point at the aircraft.

    Rule 3: Raise the base station antenna. If you can get the base station antenna even 8 to 10 feet off the ground you can often double your range. If your radio has an external antenna, you can run coax up a pole and put the antenna on the top. If you have a radio module with a built in antenna, put the whole module on top of the pole and run power and RS232 wires down to the laptop.

    Hope this helps,
    Brian
  • 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.
  • I have reinstalled Labview run-time 8.6 same result no data comming in. No comports that I can select. In Hyperterm everyting fine the Xbee is receivig the data well.

    +++ASP:497,THH:0,RLL:-60,PCH:-43,***
    !!!LAT:51457680,LON:5699239,WLA:51457788,WLO:5699304,SPD:2.77,CRT:-0.13,ALT:0,AL
    H:0,CRS:307.95,BER:20,WPN:0,DST:12,***
    +++ASP:496,THH:0,RLL:-60,PCH:-40,***
    +++ASP:497,THH:0,RLL:-60,PCH:-44,***
    +++ASP:497,THH:0,RLL:-60,PCH:-44,***
    +++ASP:497,THH:0,RLL:-60,PCH:-40,***
    +++ASP:497,THH:0,RLL:-60,PCH:-35,***
    !!!LAT:51457676,LON:5699222,WLA:51457788,WLO:5699304,SPD:2.13,CRT:-0.08,ALT:0,AL
    H:0,CRS:303.38,BER:24,WPN:0,DST:13,***
    +++ASP:497,THH:0,RLL:-60,PCH:-43,***
    +++ASP:497,THH:0,RLL:-60,PCH:-39,***
    +++ASP:497,THH:0,RLL:-60,PCH:-40,***

    enz.
    I do not know wich registry I'll have to edit.
This reply was deleted.