PDA

View Full Version : Understanding a 3-XBEE network?



Pi Robot
09-09-2010, 09:17 AM
I am new to using XBEE radios on my robot and I have a very basic question. So far I have only two radios, one attached to my PC using an XBEE explorer and the other attached to an ArbotiX controller. Everything works perfectly right out of the box.

So now I'm thinking of getting a third radio for my Serializer controller that is on the same robot. Is this all I need? In other words, can the explorer radio talk to the two radios at the same time using just a single serial port on the PC? I'm not sure how that would work so I'm hoping someone can straighten me out.

Thanks!
patrick

GoodRobot
09-09-2010, 10:05 AM
Yes, you can use one xbee radio to broadcast to several others that are all listening to the same "channel" - they call it a Personal Area Network (PAN).

The xbee radios are very flexible. You can create any number of different PANs - radios must be on the same PAN in order to communicate. And, you can also customize them to talk with only a single other radio on your PAN (every radio has a "source" and "destination" address that can be setup for it). Or mix and match "source" and "destination" identifiers in any way that suits your many-to-many interactions.

Out of the box I think the xbee's have a default PAN ID is set to 3332 and I think the "source" and "destination" addresses are both "0". So this makes them able to talk to each other right out of the box. So if you're just broadcasting to two xbees on your robot this should work well. However, if your two robot xbees are also sending data back, then they're also going to receive data from each other. So your setup may or may not work out of the box depending on whether you need your robot xbees to communicate back as well (and if that means they'll get confused by each other's commands).

Your best bet is to spend a bit of time setting up your network PAN ID's and source/destination settings for each radio using the "AT" command set (if you get into a serial/terminal program you can enter it by typing "+++" to get into the command mode and then you do things like set PAN IDs with commands like "ATID1111" (sets your PAN ID to 1111 ), "ATDL01" (to send to radio with ID 01), or "ATMY01" (sets your radio ID to 01). Once you've fiddled with the AT command set then you can also begin to try out other settings like baud rate, signal strength etc. There's a great list of commands available in the manual: http://site.gridconnect.com/docs/MaxStream/XBee_Manual_GC.pdf

If you're looking for a step by step tutorial, I found this one to be pretty good:
http://www.ladyada.net/make/xbee/configure.html

Good luck, I'm sure you'll find the xbees to be extremely useful and lots of fun too.

Alan

GoodRobot

Pi Robot
09-09-2010, 10:50 AM
Thanks Alan--that is very helpful. Following your suggestion, I practiced setting up a custom PAN ID as well as source and destination IDs for my two current XBEEs and everything worked OK. Here's the part I still don't understand: if I only have one radio on the PC (using the USB explorer module), and it is broadcasting all commands to both radios, how does each radio "know" only to accept the commands appropriate for the device it is connected to? In other words, how does the Serializer radio ignore commands meant for the ArbotiX and vice versa? Or do the command packets themselves just get dropped because the instruction doesn't make any sense to that particular device?

Hope I'm making sense.

--patrick

Adrenalynn
09-09-2010, 11:32 AM
If you're promiscuously broadcasting, anything that knows how to interpret a fully formed command will. If it doesn't, it'll just kick back an error, as you surmised.

DresnerRobotics
09-09-2010, 11:54 AM
Another thing to mention is that there is such thing as Digimesh Xbee units. They use a similar protocol to the standard Zigbee protocol that the normal Xbee modules use, but they support native mesh networking capabilities (eg: each unit acts as a repeater/router). No special base units are needed, and they appear to be plug-n-play with current Xbee-compatible hardware. I've got about 6 regular power versions and 4 Pro versions, we've some internal testing with these for our Redbee readers and were pretty impressed. We left a 'breadcrumb' trail using them and got well over a mile away without LOS.

Pi Robot
09-09-2010, 12:00 PM
Is it OK to mix Pro versions of the Xbee radios with the regular version? I have two of the regular one's now but I was thinking of trying the longer range Pro version for the third one.

lnxfergy
09-09-2010, 12:38 PM
Is it OK to mix Pro versions of the Xbee radios with the regular version? I have two of the regular one's now but I was thinking of trying the longer range Pro version for the third one.

You can mix PRO and Regular -- but you can't mix across the Series 1 and Series 2.5.

Also note -- PROs need a lot more juice (around 350mA).

-Fergs

Pi Robot
09-09-2010, 01:27 PM
Thanks--I just ordered another regular one since I probably don't need the extra range right now and that's a fairly significant additional power requirement.

DresnerRobotics
09-09-2010, 01:39 PM
I should clarify on my previous post, Digimesh and 802.15.4 Xbees are not compatible. The reason I bring these up is that, in my opinion, they make more sense for applications such as swarm robotics or multi-Xbee configurations.

lnxfergy
09-09-2010, 01:41 PM
Thanks--I just ordered another regular one since I probably don't need the extra range right now and that's a fairly significant additional power requirement.

Yeah -- they are power hogs, and so I'm not too keen on putting them on the bot. I think that one really good use I've seen so far on this forum is gdubb using a PRO module for his base station at mech warfare -- which lets the XBEE power through other signals and avoids losing the uplink to the robot during a match.

-Fergs

gdubb2
09-09-2010, 03:32 PM
Using a Pro for the PC side is nice, although I have been running mine at half power so I don't bother anyone else..

That may change though..Bwaaahaahaa

Gary

Pi Robot
09-09-2010, 03:45 PM
D'oh! I shoulda thought of that. Oh well, TR was out of stock on the Pros anyway...