IAN LANG ELECTRONICS
XBee is the Marca Registrada for Digi Corporation's zigbee radio transceiver modules. These enable you to create data networks over long distances, or good, reliable point to point networks in which you can make multichannel radio control pairs very easily. There are a number of varieties available, and these are outlined below.
It's a somewhat whimsical name based on the dance that bees do on their return to the hive for a standard of wireless communications for data based on IEEE 802.15.4 for low power Wide Area Networks. Zigbee is a trade-name for the alliance of manufacturers who make modules and not the name of the standard itself.
Zigbee allows the creation of various network topologies from the simple pair to the mesh, and moreover since the network must have a unique co-ordinator only the modules addressed to that co-ordinator will contact it. Multiple networks could in fact run in the same place.
On the left is a series 2 module. There is a series 1 as well. Series 1 and 2 can't be mixed- they do not communicate at all. The series 2 has more functionality than the series 1 and does not cost that much more; the drawback is that the series 2 has a considerable amount of configuring to do before you can do anything really useful with it.
For that reason you will need two things: one is XCTU, a piece of sotware from Digi which is free, and the other is a method of connecting it to the computer, which isn't free. I recommend Sparkfun's XBee USB explorer which is shown below, and in the UK it's available from Protopic (as is the module itself).
Click on their logo to go to their website.
XCTU can be found on Digi's website:
I've not used series 1, and so in this article I'll be banging on exclusively about the series 2 modules. But before that I'm going to blather about topologies.
Topologies are not, as they sound, the study of tops. They are in fact the ways in which networks link together. First of all is the cluster:
Now you can buy all the bits separately if you wish, bear in mind that one on its own is no good and to start you'll need at least two. Protopic sell a kit which is designed to go with Rob Faludi's book Building Wireless Sensor Networks. At £90 it is a bit pricy but you do get a lot of kit to get you up and running. You will need a couple of Arduino boards too. A less pricy option is the retail pack in which you get the modules, an explorer, and the breakout boards and headers you'll need if you're going to mate them to the Arduino.
A newer development is the 2B which can talk to the series 2.
Never fear, all will be explained. Get a big cup of tea and off we go.
In any network using a series 2 module you have to have one and only one co-ordinator. This sends data to all the others, providing they are addressed to it. The others can be one of two kinds; a router or an end device. You'd use a router to extend the range of the network, and an end device at the terminal. A router can do the job of an end device too.
This is a mesh:
And finally a simple pair, which is what we'll be looking at.
This book by Rob Faludi is a work you may find invaluable when you begin to work with XBee.
978 0 596 80773 3
So, I recommend the series 2 modules for this game. They come in 2 kinds. There's the normal one and the PRO. The latter has a much larger range but costs twice as much. There are five different kinds of antenna configuration too. The photo above shows the wire antenna. Wires are omnidirectional and so whereever you are in the transmission distance the signal should come through.
The chip antenna is a flat chip on the board. They aren't as easy to break as a wire but the signal is directional and follows a heart shaped pattern or cardioid. In many directions, the signal will be attenuated. Handy if you want a narrow field.
The PCB antenna is made of conductive traces on the PCB. It behaves like the chip antenna but it's cheaper.
The remaining two are for attaching remote antennae. The U.FL is small and delicate and is attached by a cable. The RPSMA is a sturdier beast screw-threaded to which you can attach an antenna directly.
Most projects will be fine with the wire, but if your finished device is going to be behind metal then you will need an external antenna.
If you are going to be breadboarding you will need a breakout board. Here's the Sparkfun one:
Because of the spacing on the pins of the modules they will not fit in a breadboard. So, if you solder some of the special female pins on the outside of this board, and some standard headers on the inside, you can make it compatible for use with breadboards, stripboard and Arduino proto-shields too. It's a bit of a fiddly solder but it shouldn't take you much above ten minutes to do two boards if you're experienced. If you're not, go slowly and careully and don't use an iron that's too big or too hot; it'll probably take you forty minutes or so to do two boards.
Here's what it should look like assembled. Over the page we look at how to configure our series 2 hardware.
If you are going to do any work with XBees you are I'm afraid going to have to learn about hexadecimals.
Were there any way round it I assure you I would be the first to avoid this rock-hard mathematical monstrosity but there isn't. Handily I've scribbled out a page about it: