Shop OBEX P1 Docs P2 Docs Learn Events
XBEE RF Range Testing — Parallax Forums

XBEE RF Range Testing

Mike CookMike Cook Posts: 829
edited 2007-12-18 11:38 in General Discussion
I have seen posts with people using these modules with Basic Stamps, SX, and Propeller chips so I though I would post my preliminary findings with the modules that I'm using. My end use of these will be with the propeller chip.

First off these are extra simple to use once you get past the 2mm header spacing, break out boards are available through several vendors, I'm using the ones from Sparkfun. You can also use some 2mm crimp pins and make jumper wires, only four connections are necessary to communicate; power (1), ground (10), transmit (2), and receive (3). Big bang for the buck for simple wireless RS-232 replacement.

Modules tested were XB24-AWI-001, these are the ones with the small wire 'whip' antenna. The specifications for these modules states 100' indoors. From my testing to get that range you would probably need the XB24-AUI-001's with the RF connector and then an external antenna.

The XB24-AWI-001 placed 5' above ground level, transmitting through 4 walls (normal house construction; dry wall and wood studs + paint) about 50' apart, both transceivers at the same elevation, yields 100% communication at about -85db. Walking in the path of these modules will cause the -db to lower but does not seem to affect their operation. Also turning on/off my 2.4g wireless router seemed to have no effect.

Just ordered some more XBEE/XBEE-PRO with the RF connector and some antennas to do further testing.

Would like to hear from other users to compare my test results. I would suspect the modules with the chip antennas to be 'disappointing' at distance greater than 50' indoors.

Mike

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike

Comments

  • sylvie369sylvie369 Posts: 1,622
    edited 2007-12-15 03:35
    I don't have the kind of precise results that you have, but...

    I placed an XBee Pro module (with the little wire antenna) on my kitchen table, indoors, second floor, near a balcony sliding glass door. I took a second module (also little wire antenna) outside and walked down the street with it watching the reception. I had a good solid signal for at least 200 feet before there were any dropouts. Somewhere between about 300 and 400 feet it became fairly unreliable. Then I held it in a position such that the antenna had the same orientation as the one transmitting, and it became completely reliable again, dropping down to bad reception at a little over 500 feet.

    Indoors? My apartment building is too small for reception to become unreliable in here. I have complete coverage.


    Post Edited (sylvie369) : 12/15/2007 1:50:57 PM GMT
  • bulkheadbulkhead Posts: 405
    edited 2007-12-15 08:39
    I am just curious, what setups are you using? I'm trying to get one propeller to send a byte through an xbee to another propeller with an xbee. The problem is that I can send the same byte multiple times and get different results printed on the receiving end. This is with about 5 feet, line of sight range.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I'm new to the propeller!
  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-15 10:54
    bulkhead
    The xBees do their own error checking and retransmission when necessary. You would not see the kind of unreliable transmission you're describing. There must be something else you're doing. I'd suggest posting your schematic and programs.
  • Mike CookMike Cook Posts: 829
    edited 2007-12-15 10:57

    Sylvie369,

    Good info on the Xbee-Pro modules. Looks like if you want a 'bullet proof' indoor instalation with out having to worry about antenna placement, the Pro modules would be the way to go. When my Xbee-Pro modules arrive I'll do another test with one of those and the lower power Xbee module.



    Bulkhead,

    I have yet to connect them to the Propeller chip, waiting on my breakout adapters from Sparkfun so I can populate a couple of Propeller Protoboards for testing. Right now I'm using a home made (I modified a development board used for another 3.3vdc product) board for testing. Here's a picture of my setup, there are two of these setups:

    http://www.allsurplus.net/xbee/000_0988.jpg

    One board is connected to a PC running the MaxStream X-CTU software, running the range test option. The other board is powered with a battery pack and pins 2 and 3 on the RS-232 interface are looped backed. Have you verified that your modules will do the 'loop back' test? If not I would start there to verify that they are actually working.

    Martin Hebel has posted some code in the Propeller Object exchange and some more information here:

    http://forums.parallax.com/showthread.php?p=660338

    Hopefully the mail man (person) will deliver my Sparkfun package today so I can get them connected to the propeller chip. When that happens I'll post code and photos of my setup.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-12-15 13:43
    I ordered the Development kit from DIGI which includes two XBees... I should get it early next week. Where can I find a good diagram of how to connect it to a Stamp... I understand that the voltage it uses is different than the Stamp, but I'm not quite sure how to buffer the lines between the stamp and the Xbee. Martin Hebel over at Selmaware has some great breakout boards that I will eventually buy to use as a connection and mounting system on my robot. He uses a OCT BUFF/DRVR TRI-ST 20-DIP chip on his board, but I'm not quite sure what it does... any ideas?
  • sylvie369sylvie369 Posts: 1,622
    edited 2007-12-15 13:48
    bulkhead said...
    I am just curious, what setups are you using? I'm trying to get one propeller to send a byte through an xbee to another propeller with an xbee. The problem is that I can send the same byte multiple times and get different results printed on the receiving end. This is with about 5 feet, line of sight range.

    I'm using Basic Stamps. I've got one XBee Pro connected to a BS2pe and a two-axis accelerometer sending out the information and then another XBee Pro connected to a BS2 receiving it and sending it out to a debug window, and also another connected to a 2px sending it to an LCD. Completely reliable out well past the couple of feet you're describing. Right now I'm simply using them in "Transparent Mode". As I understand it, in that mode, there is none of the error checking/retransmission that Mike mentioned (am I right about that?). I've simply got one module sending information and the others receiving it.

    The one twist I have is that I'm sending out a code before the actual data, so the receivers are looking for that code before trying to read received information into my variables (using the "Wait" function on the SERIN command).
    Steve, I'm using Martin Hebel's SIP boards to connect my XBees to the Stamps. I've got three of the boards put together and they all worked fine right away. I've got three more ready to build, but I'm going to have my students build those. They're an easy build, and very easy to use once they're together. The XBees use 3.3V, and so a large part of the SIP boards is a 3.3V power source. He also sells boards that don't have the voltage regulator etc. so you can use an existing 3.3V source (SIP-LV).

    I believe that the octal buffer on the boards is to condition the 5V inputs from the external lines so they will not damage the 3.3V XBee. There's a sticky thread here on using 3.3V Propeller chips with 5V external devices that gets at this:

    http://forums.parallax.com/showthread.php?p=585920

    Post Edited (sylvie369) : 12/15/2007 1:59:23 PM GMT
  • Mike CookMike Cook Posts: 829
    edited 2007-12-15 14:15
    Steve,

    If you ordered a development kit it should have the RS-232 or USB interface boards included. If it's the RS-232 version, then you should be able to connect right up to the stamp and run the Stamp in inverted serial mode.

    Here's a link from Sparkfun that shows how to make these work with +5VDC devices, page 12 has the schematic. Note I have not tried this, but looks like it should work.

    http://www.kronosrobotics.com/Projects/MaxStreamInterface3.pdf

    I just ordered the bare modules with the little whip antennas then made some pluggable 2mm jumpers to connect to a GSM/GPRS development board that I had laying around. I try to re-use stuff like this when possible. You can go broke in a hurry if you purchase everyone's development board that just works with their product!

    Here's another photo of my setup connected to the propeller. I wrote a quick terminal program for this setup. The other side of this setup is another Xbee board connected to a PC running a terminal program. This way you can type back and forth like a 'chat' session. Attached is some *.spin code.

    http://www.allsurplus.net/xbee/000_0989.jpg

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike
  • FranklinFranklin Posts: 4,747
    edited 2007-12-15 19:04
    One note from the kronosrobotics site of interest is the series 1 modules don't support mesh networking so if you plan to use that feature you need to get the series 2 modules

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Mike CookMike Cook Posts: 829
    edited 2007-12-15 19:19
    Well I received my Sparkfun Xbee break out boards and assembled them:

    www.allsurplus.net/xbee/000_0991.jpg



    Then took a 20 pin IC socket and cut it apart and installed it on to a new Parallax Propeller Protoboard:

    www.allsurplus.net/xbee/000_0992.jpg



    After the socket was installed wire the Xbee pin 1 to the Propeller ProtoBoard's +3.3VDC and then grounded the Xbee's pin 10. Next wired up the Xbee's RX & TX pins to the Propeller's I/O pins 4 & 5

    www.allsurplus.net/xbee/000_0994.jpg



    Here's a picture of the finished board:

    www.allsurplus.net/xbee/000_0996.jpg



    Loaded the attached *.spin program and used the setup as describe in the previous post to receive the data packets. Here's a picture of the receiver's output.

    www.allsurplus.net/xbee/000_0997.jpg



    Boy I think this is another one of my favorite I/O options! Need to add a SD card socket and work on that XMODEM protocol so I can remotely load the Propeller!


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike

    Post Edited (Mike Cook) : 12/15/2007 7:25:29 PM GMT
  • bulkheadbulkhead Posts: 405
    edited 2007-12-16 10:17
    To start with, I'm using the Martin's DIY xbee breakout boards, SIP 3.3v (from http://selmaware.com/). I have the regular xbee's with wire antennas.
    Mike Green said...
    bulkhead
    The xBees do their own error checking and retransmission when necessary. You would not see the kind of unreliable transmission you're describing.
    sylvie369 said...
    Right now I'm simply using them in "Transparent Mode". As I understand it, in that mode, there is none of the error checking/retransmission that Mike mentioned (am I right about that?).
    Is this true? I have simply been using this mode (I just connect the xbee's with no init bytes of any kind sent). Could this be why my data is off?
    Mike Cook said...

    Have you verified that your modules will do the 'loop back' test? If not I would start there to verify that they are actually working.
    I had it hooked up to a usb-serial port (with 3.3V regulator) doing this and it exhibited the same behavior (bits appear to be shifted over somewhat, and values fluctuate). However, I was not sure if it was because of the weird/high voltage (I measured -8V on the tx line going from ground, that's right, negative 8), although I did have a series resistor to limit current, or perhaps the fact that I used a usb-serial adapter (I don't have an actual serial port).

    I actually wanted to test it on two propellers to eliminate the whole 5V to 3.3V issue (or ? V to 3.3V, whatever my serial port is). The other strange thing is that sometimes when I transmit, nothing is received (the receive LED doesn't blink). It seems to me like it needs to "warm up" by ignoring the first few transmissions before it starts to receive them (when the LED's blink).

    Another question about the breakout boards (SIP 3.3V), for the tx/rx indicator LED's, does the positive lead (the long one) of the LED go into the square or the circular hole? Is there a convention? I noticed for the electrolytic capacitor, the positive (long) lead went with the square hole, but I remember doing the same for the indicator LED's (long lead into square) and having the xbee not work. After reversing them (which is how I have them now), they work (well, at least I can transmit and receive data, albeit inconsistently). It seems somewhat strange to have the transmit LED on when nothing is being transmitted (is this normal?).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I'm new to the propeller!
  • Mike CookMike Cook Posts: 829
    edited 2007-12-16 12:14
    Bulkhead,

    If your using a USB to serial adapter to try to communicate with the Xbee modules you will still need to invert and level shift the data coming from the serial side of the USB to serial adapter back down to TTL levels.
    If you can to do a test with the propeller, you can use the program attached as a terminal mode. Connect the Xbee to a propeller board as follows:
    Xbee     Propeller
    ------------------
    1 VCC    +3.3VDC
    2 DOUT   PIN 5
    3 DIN    PIN 4
    10 GND   Ground
    
    

    After you power everything up, wait a second and the type three plus signs in one second, this will command the Xbee to AT-Command mode. If you see a 'OK' print to the TV display then you are communicating with the Xbee module.

    I don't have Martin's break out boards so I can't help you there.

    Hope this helps.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike
  • sylvie369sylvie369 Posts: 1,622
    edited 2007-12-16 18:43
    bulkhead said...
    sylvie369 said...
    Right now I'm simply using them in "Transparent Mode". As I understand it, in that mode, there is none of the error checking/retransmission that Mike mentioned (am I right about that?).
    Is this true? I have simply been using this mode (I just connect the xbee's with no init bytes of any kind sent). Could this be why my data is off?

    I actually wanted to test it on two propellers to eliminate the whole 5V to 3.3V issue (or ? V to 3.3V, whatever my serial port is). The other strange thing is that sometimes when I transmit, nothing is received (the receive LED doesn't blink). It seems to me like it needs to "warm up" by ignoring the first few transmissions before it starts to receive them (when the LED's blink).

    Another question about the breakout boards (SIP 3.3V), for the tx/rx indicator LED's, does the positive lead (the long one) of the LED go into the square or the circular hole? Is there a convention? I noticed for the electrolytic capacitor, the positive (long) lead went with the square hole, but I remember doing the same for the indicator LED's (long lead into square) and having the xbee not work. After reversing them (which is how I have them now), they work (well, at least I can transmit and receive data, albeit inconsistently). It seems somewhat strange to have the transmit LED on when nothing is being transmitted (is this normal?).

    I may be wrong about that comment I made about no error checking/retransmission. Section 2.4.1 of the product manual for the XBees says

    "By default, the RF module operates in Unicast Mode. Unicast Mode is the only mode that supports retries. While in this mode, receiving modules send an ACK (acknowledgement) of RF packet reception to the transmitter. If the transmitting module does not receive the ACK, it will re-send the packet up to three times or until the ACK is received".

    I've also noted that "warm up" effect you're talking about - it seems to be normal. When my communications are working well, I still get a couple of seconds of transmissions before any data are received. Note that the sample code for the Parallax 433 MHz RF modules includes a pulseout from the transmitter to synchronize the communications - that may head off that warming up period (?). I have no idea if it would work with the XBees - my applications don't mind a little warm-up time.

    The LEDs should have a slightly flat face that lines up with the slightly flat area in the outline of the LED placements on the SIP board. That flat face is lined up with the shorter lead - the negative one. I see on the SIP boards that means that the negative lead is going into the square hole, which does seem to be the opposite of the other components (the capacitor, the Octal buffer, and the Vin pin of the 6-pin connector). However, I installed my LEDs the way that you currently have them, and my units work properly.

    In short, feel for the flat side on your LEDs, and line that up with the flat side on the PC board's outline.
  • Mike CookMike Cook Posts: 829
    edited 2007-12-16 18:59

    I haven't noticed any 'warm up' period they (Xbee) seem to work as soon as they are powered up, no noticeable delay in transmission or reception. Maybe the XbeePro's are different.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike
  • bulkheadbulkhead Posts: 405
    edited 2007-12-18 05:59
    I found the problem...so apparently I had the mode on 3 "'' mode bit 3 = ignore tx echo on rx ", but looking at Mike's code, it had mode 0 "mode bit 0 = invert rx". I made that change on both the receive and transmit ends, now it works fine!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I'm new to the propeller!
  • sylvie369sylvie369 Posts: 1,622
    edited 2007-12-18 11:38
    Congratulations! Have fun.
Sign In or Register to comment.