Translation missing: en.general.accessibility.skip_to_content
Introduction to XBee

Introduction to XBee

Xbee modules are a family of really nice little radio devices that use the ZigBee or 802.15.4 protocol. They send and receive data via the 2.4GHz or 900Mhz band at a relatively low power and can be used to set up simple point-to-point links or complex self-healing networks spread over quite large areas. The higher power devices can be used as telemetry solutions over long ranges, but really the applications are extremely varied.

Interfacing with an Xbee module is easy. They all have the same pin outs, and you talk to them with simple serial comms, using AT based commands, or an API command set. They can be configured to be very low power, and to wake up very quickly. Crucially, for many applications, Xbee modules do not need to be driven by an external micro-processor. Many have on-board ADCs and digital inputs outside of the normal serial comms in/out meaning that you can interface them directly to sensors, switches and so on.

For the beginner though, things can quickly get confusing. There are several different sub-types of Xbee modules, which have different features. Within each sub-type, you can program modules to have different functions. Quite often, the different sub-types are not compatible with other sub-types, or only partially compatible. Nearly all of the Xbee modules physically look very similar.

So the point of this guide is to look at the different Xbee types, what they can be used for, and suggest which types fit with certain applications. Let's start by looking at a table of the different sub-types, along with a few key features.

Type Network Capability Power Frequency Range (open air) Hardware Type
Series 1 Point-to-Point, Point-to-Multipoint 0dBm/1mW 2.4Ghz 100m I
Series 2.5 (ZNET) Point-to-Point, Point-to-Multipoint, Mesh Network 3dBm/2mW 2.4Ghz 120m II
Series ZB Point-to-Point, Point-to-Multipoint, Mesh Network 3dBm/2mW 2.4Ghz 120m II
Pro Series 2.5 Point-to-Point, Point-to-Multipoint, Mesh Network 17dBm/60mW 2.4Ghz 1000m III
Pro Series ZB Point-to-Point, Point-to-Multipoint, Mesh Network 17dBm/60mW 2.4Ghz 1000m III

Please note - the column 'Hardware Type' just shows a notional type. This is to indicate the possiblity of reflashing a module's firmware to convert it to a different type. We discuss this later.

Network Capability

  • Point-to-Point : Data is sent/received between one device and one other device. This is the simplest type, but also not hugely flexible.
  • Point-to-Multipoint : Data is sent/received between one device and many other devices.
  • Mesh Network : A combination of the P2P and P2M types. The crucial different is that data will often pass through intermediate devices in a manner similar to the way the internet works. Mesh networks are self establishing and self healing. They are the most flexible and powerful solution, but potentially the most complex to set up.

Antenna Types

Whatever sub-type, there is a choice of aerials.

  • Chip : Mounted on the Xbee module, this is a good solution for most people. The chip antenna is a low profile device, and doesn't really take up any space.
  • Whip : A solid, but flexible wire antenna, this sticks up about 20mm above the surface of the Xbee PCB. It can be moved around to maximise signal strength, or to stick out of an enclosure. Correspondingly, because it can be moved, it can also be broken off is care is not taken, of the solder connection becomes stressed.
  • u.FL : This is not an aerial, but a connector for an external aerial. The u.FL format is tiny, and can be plugged / unplugged only a few times before it starts to fail. We do not recommend it for experimentation / prototyping
  • RPSMA : Again - this is a connector for an external aerial. The whole RPSMA / SMA thing can be confusing, but this is a gold screw-threat connector with a solid, pointy pin in the middle. Aerials similar to the type that is used on PC wifi cards can be screwed in (check their type first!), and it's possible to use properly matched aerials on longish coaxial leads. This means that the aerial can be changed or positioned easily.

Module Functions

In the sub-types that use mesh networking, modules can have three main 'functions'. These are related to their network functions.

  • Coordinator : This is the module that establishes the network. Every network must have one (and only one) of these types in it. Think of this device as similar to your wireless internet router. Because this device is constantly administering the network, it consumes more power than other types. It is recommended that this module is not powered by battery
  • Endpoint : This is your common or garden network module. It can be battery powered, and doesn't consume much energy unless it needs to transmit or receive. In some Xbee types (ZB for example) the endpoint can be further configured with a 'profile'. We'll talk more about this later.
  • Router : This device is similar to the Endpoint, but also specialises in passing data around the network. Data sent from one endpoint to another may pass through several routers on it's way to the destination.

Configuring the Xbee

Okay, so there are lots of different types of Xbee module - but how can we set them up in the first place? The answer is a free piece of software called X-CTU, provided by manufacturer Digi. X-CTU allows you to reflash the firmware of different modules, making it easy to configure one module as a coordinator, and one as an endpoint. In addition, X-CTU offers a simple terminal program so that you can test that two different modules are able to send and receive data.

Which Module?

So after all of this, which module type is the most suitable for your application? The answer is, that which module you chose really depends on your application. If you JUST want to send data from A to B with as little configuration as possible, series 1 may be a good choice.

Unfortunately, series 1 only offers one type of communication (P2P) and nothing else. You can't reflash a series 1 as a series ZB because the hardware is different, so once you've bought and used the series 1, you're stuck with it.

For full flexibility, we recommend series ZB. This is the newest range available, and you can, if you want, reflash a ZB module to become a series 2.5 module, because the hardware is the same.

We don't recommend that you buy a high power Pro module if you don't need it. In some countries, above 50mW is not legal for unlicensed use.

Series ZB can be configured (we'll tell you how in later tutorials) to be a point-to-point, point-to-multipoint, or mesh network. In addition, series ZB is compatible with other non-Digi (the manufacturer of Xbee) Zigbee devices. This means your project may be able to talk to someone else's project, even if they haven't used an Xbee devices. Xbee Series 2.5 modules do not have this ability.

Previous article Comparing the BBC Micro:Bit V1 and V2, what is different?