Help with XBee wireless link for GPS receiver

I need to build a remote GPS sensor that reports back to the base station wirelessly in real time outdoors up to two miles line of sight. Appreciate any comments on the plan laid out below or directions on how to do it better.

We need a minimum 1hz update rate but 4hz would be optimal.

The GPS receiver that appears to have the right combination of update rate, accuracy, antenna, voltage and price is the LS20031. http://www.sparkfun.com/commerce/produc … ts_id=8975 In the 5hz configuration data output is 57,600bps TTL and I understand that can be dropped if I am willing to go with lower update rates. It would be nice to build this to handle the full 5hz data output.

The radio I am considering is the XBee Pro 900 XSC Wire http://www.sparkfun.com/commerce/produc … ts_id=9085 which apparently can achieve 6 mile range under optimal conditions with the wire antenna provided. Since I only need 2 mile range max this gives me a decent margin of error for sub-optimal conditions, fresnel zone issues, etc.

The first question I have is does the XBee have a “virtual wire” mode so I can run the raw TTL data through the XBee or do I need to use an RS-232 shifter between the GPS receiver and the XBee to get the data into a UART formaT? http://www.sparkfun.com/commerce/produc … ts_id=8780

The second question is can the XBee handle the data rate of the GPS receiver? The specs on the XBee call for a max RF Data Rate of 9.6 kbps, and a max Serial Data Rate of 57.6 kbps. Someone please educate me on the difference between RF Data Rate and Serial Data Rate? I also worry that at longer distances the max data rate will not be achievable. There is no need for duplex communication at a distance, and all we are looking for is a continuous output of the NEMA GGA string at 4hz, there is no need for more information from the receiver.

And now for a really stupid question. I assume that Li-Poly batteries are a good choice to power this unit. Do I need to filter the juice from the Li-Poly battery or can I assume it is uber-clean?

Finally, do I need to worry about RF interference between the XBee and the GPS receiver? Any separation requirements between the antennas, or special shielding?

Thanks everyone for your help with this.

PS - I know the KinetaMap exists and it does all that I want… except for the range limitations of Bluetooth. Anyone know if you can boost the range of a device like the KinetaMap to over 2 miles with a directional Bluetooth antenna on the base station if it is aimed properly?

two miles with XBee in 2.4GHz isn’t viable.

With the 900MHz version of XBee, it is marginally viable with the right antennas.

I suggest you get an amateur radio license and use two meter band equipment.

Alternative: use unlicensed “MURS” band which can do two miles. But this is hundreds of dollars.

Or use cell phone GPS location sharing.

Is this still a “go”? If so, we can further discuss.

usa1169:
The first question I have is does the XBee have a “virtual wire” mode so I can run the raw TTL data through the XBee or do I need to use an RS-232 shifter between the GPS receiver and the XBee to get the data into a UART formaT? http://www.sparkfun.com/commerce/produc … ts_id=8780

An XBee will transmit whatever serial data are fed at 3.3V to its DIN pin. Since your GPS receiver is 3.3V (assuming you’re supplying it with that, of course), you MAY be able to go straight through. However, I’ve noticed that at least some GPS receivers send out their data inverted, which means you need to add an inverter circuit between the GPS TX line and the XBee DIN pin:

http://i282.photobucket.com/albums/kk26 … ircuit.jpg (of course you’ll have 3.3V where I have 5V)

If you breadboard the circuit you can find out whether or not this will be necessary. For all I know, ALL GPS receivers send their data inverted. I’ve asked around a little, but haven’t gotten a definitive answer.

usa1169:
The second question is can the XBee handle the data rate of the GPS receiver? The specs on the XBee call for a max RF Data Rate of 9.6 kbps, and a max Serial Data Rate of 57.6 kbps. Someone please educate me on the difference between RF Data Rate and Serial Data Rate? I also worry that at longer distances the max data rate will not be achievable. There is no need for duplex communication at a distance, and all we are looking for is a continuous output of the NEMA GGA string at 4hz, there is no need for more information from the receiver.

The XBee shouldn’t have any trouble handling all of the data at 1Hz. I’ve been using one without any trouble at that rate. I’d bet that 4Hz wouldn’t be a problem either, but I haven’t done that. You’re not really sending all that much data.

usa1169:
And now for a really stupid question. I assume that Li-Poly batteries are a good choice to power this unit. Do I need to filter the juice from the Li-Poly battery or can I assume it is uber-clean?

You’ll want a voltage regulator and the appropriate capacitors, plus a diode for reverse voltage protection. Take the current requirements of the XBee into account - I’ve fried a regulator (and learned something valuable) by ignoring those requirements. Here’s what my unit looks like - since I’m using a 5V GPS, it’s way more involved than yours will need to be, and still not that big a deal:

http://i282.photobucket.com/albums/kk26 … ee-GPS.jpg

usa1169:
Finally, do I need to worry about RF interference between the XBee and the GPS receiver? Any separation requirements between the antennas, or special shielding?

My device (image above) works just fine. However, I’m using 2.4GHz XBees - I don’t know if the 900 MHz ones will be different.

I don’t have any idea how to get a realistic 2 mile range. I’m getting a few thousand feet from a 2.4GHz XBee Pro, but that’s line-of-sight, with the transmitting unit usually hundreds or thousands of feet in the air over me. I’m sure that gives me a big advantage. I did lose contact in under a third of a mile with that unit when there was a hill between the transmitter and the receiver. If you’re not line-of-sight, I would be pretty skeptical about your ability to get two miles of range.

sylvie369,

Thank you, that is all valuable info.

I will test this on a breadboard and try to get the XBee to pass through the TTL data as is, if that fails then I will try inverted, and if that fails I will put an RS-232 shifter in. From the XBee Pro 900 documentation it appeared that it might operate more like a modem and require the RS-232 protocol. But you have encouraged me to give the simple route a try first. Always good to keep it as simple as possible to reduce power consumption and size.

On the remote battery powered unit I had planned to put a diode in for reverse polarity protection. But now I will also add a voltage regulator with the appropriate capacitors like I would for a source that started out AC.

An thank you for the real-world data on range of the 2.4 GHZ PRO units. Was that a 50nW or a 60mW unit?

My remote sensor will be attached to an athlete on the ground so I am going to be dealing with some Fresnel zone interference that you do not get. But it will be clear line of sight. The 900MHZ should deal with the fresnel issues better than 2.4GHz… but since I have a ton of 2.4GHz equipment I may try a 2.4GHz XBee like you used for the remote sensor and then use a high gain parabolic on the base station. I know from past experience that a good directional antenna will allow you to link to a laptop wireless over two miles. That just requires that the antenna track the target. If you are getting a few thousand feet with those tiny omni directional wire antennas I would not be surprised if I can get the range I need with 2.4GHz and a really good directional on one end.

Thanks again for the help.

usa1169:
I will test this on a breadboard and try to get the XBee to pass through the TTL data as is, if that fails then I will try inverted, and if that fails I will put an RS-232 shifter in. From the XBee Pro 900 documentation it appeared that it might operate more like a modem and require the RS-232 protocol. But you have encouraged me to give the simple route a try first. Always good to keep it as simple as possible to reduce power consumption and size.

I am virtually certain that you will not need an RS-232 circuit. Look at the Serial Communications section of the manual, beginning on page 10. You’ll see this:

XBee product manual:
The XBee module interfaces to a host device through a CMOS-level asynchronous serial port.

Through its serial port, the module can communicate with any UART voltage compatible device or

through a level translator to any RS-232/485/422 device.

That’s how the 2.4GHz modules work as well - I’ve been feeding them TTL-level data happily for some time now.

I forgot to answer your earlier question about the RF Data Rate vs. the Serial Data Rate. RF Data Rate is the rate at which two modules communicate with each other, using RF. That rate is fixed at 9600 Baud, and I would assume that if signal conditions are less than ideal, the actual rate will be lower than that (but you won’t need to worry about it). For example, the module supports automatic retries (read the section on the RR setting), and obviously if the module has to send the same data several times your overall throughput will be lower than it otherwise would be.

The Serial Data Rate (or “Interface Data Rate”) is the rate at which your microprocessor (or terminal program) communicates with the XBee. This will default to 9600, and the manual points out that increasing the interface data rate won’t necessarily get you more overall throughput. It’s at least as likely that you’ll just overwhelm the (fixed) RF data rate, and lose data. However, you do need to make certain that the interface data rate matches the output rate of the GPS. It looks like the GPS defaults to 9600 Baud, which is convenient, as that’s the default interface rate of the XBee. It looks to me like you can leave things at the default speed, and expect 9600 Baud throughout, except when the signal deteriorates.

usa1169:
On the remote battery powered unit I had planned to put a diode in for reverse polarity protection. But now I will also add a voltage regulator with the appropriate capacitors like I would for a source that started out AC.

The XBee manual also clearly specifies “3.0-3.6 VDC regulated” as the power supply. I think you’ll find that the voltage of a Lipo cell is all over the place, depending on the cell and its charge state, and may easily exceed 3.6V. You’ll want to use a good low dropout voltage regulator capable of providing a comfortable overhead over the 265 mA transmit current required by the XBee. Be careful in choosing the regulator. I see that many low dropout 3.3V regulators require more than 4V to supply 3.3V, and you’re not going to get that from a single Lipo. Read the dropout voltage part of the datasheet. I see that none of the regulators I’ve been using would do what you’re asking for, and a quick look at Digikey suggests that using a Lipo cell to power a 3.3V device requiring over 250 mA might be a little difficult. There are some regulators that say they can do that, but you have to look carefully for them. You’d make life a lot easier if you went to a somewhat higher voltage supply (5V+).

usa1169:
An thank you for the real-world data on range of the 2.4 GHZ PRO units. Was that a 50nW or a 60mW unit?

60mW. This unit:

http://www.sparkfun.com/commerce/produc … ts_id=8742

usa1169:
My remote sensor will be attached to an athlete on the ground so I am going to be dealing with some Fresnel zone interference that you do not get. But it will be clear line of sight. The 900MHZ should deal with the fresnel issues better than 2.4GHz… but since I have a ton of 2.4GHz equipment I may try a 2.4GHz XBee like you used for the remote sensor and then use a high gain parabolic on the base station. I know from past experience that a good directional antenna will allow you to link to a laptop wireless over two miles. That just requires that the antenna track the target. If you are getting a few thousand feet with those tiny omni directional wire antennas I would not be surprised if I can get the range I need with 2.4GHz and a really good directional on one end. Thanks again for the help.

Now you’re out of my range of expertise (grin), but if you can use a good directional antenna I’m sure that your odds will improve a lot.

Remember again that in my situation, the transmitter is located free and clear in the air over my head, which also makes a HUGE difference. If you already have the 2.4GHz XBees, though, yeah, trying them is a good idea. I’ve been pleasantly surprised so far: I believe that I just might get the full 1 mile line-of-sight range they advertise in the manual. I’m already getting around 4000 feet of range, and that’s with that little wire antenna, and a transmitter that’s mounted inside a phenolic tube. And I haven’t lost data even right up to landing (though again, if it’s behind a hill, that’s another story), so it’s not entirely the altitude that’s doing it for me.

non-line-of-sight (urban clutter, trees, terrain) at 2.4GHz is a no-go unless both antennas are elevated above tree canopies and have Fresnel zone clearance, and the antenna gain is adequate to make the link budget (google that) work. The PRO modules are about 60mW. The non-PRO are about 1 mW. (Series 1 modules).

air to ground is often line of sight.

sylvie369:
I forgot to answer your earlier question about the RF Data Rate vs. the Serial Data Rate. RF Data Rate is the rate at which two modules communicate with each other, using RF. That rate is fixed at 9600 Baud, and I would assume that if signal conditions are less than ideal, the actual rate will be lower than that (but you won’t need to worry about it). For example, the module supports automatic retries (read the section on the RR setting), and obviously if the module has to send the same data several times your overall throughput will be lower than it otherwise would be.

The Serial Data Rate (or “Interface Data Rate”) is the rate at which your microprocessor (or terminal program) communicates with the XBee. This will default to 9600, and the manual points out that increasing the interface data rate won’t necessarily get you more overall throughput. It’s at least as likely that you’ll just overwhelm the (fixed) RF data rate, and lose data. However, you do need to make certain that the interface data rate matches the output rate of the GPS. It looks like the GPS defaults to 9600 Baud, which is convenient, as that’s the default interface rate of the XBee. It looks to me like you can leave things at the default speed, and expect 9600 Baud throughout, except when the signal deteriorates.

So it sounds like the RF Data Rate is the limiting factor on throughput. Based on my experience with 2.4GHz equipment I agree that at the extreme end of the distance range I will be lucky to get 50% of the 9600 Baud through the 900MHz XBee. I will have to do some math to see if that will support my application.

The good news is that farther the target is away from the tracking station the less angular movement the tracker has to make for a given distance the target moves. So if my position data rate drops to .5hz it won’t be that critical.

Thanks everyone for the good advice. Time for me to dive into the shop for a while. I will report back any significant findings.