Gunnar Forsgren

My photo
Kista, Stockholm, Sweden

Former Ericsson / Sony Ericsson development engineer.
30 years of engineering experience in telecom and mobile.
See LinkedIn:

December 22, 2010

XBee - versatile wireless network communication modules

XBee is a small hardware module that employ radio technology for communication among a wireless network of two or more XBee modules.

XBee modules have an unusual feature that deserve spreading a gospel about since it allows for a remote capability that not all developers have realized. And if they knew about would add one more design alternative to their toolbox.

An XBee can operate in two distinct modes. Part from the conventional role as a pass-through serial communications link, it can also operate in a command mode where it implements a remote control/access instruction set for sensing and controlling data of its own IO control signals. Commands and data for setting and reading of electrical signal values gets transported back and forth over the wireless link to the initiating node. Thus all decision making takes place at the initiating remote node. Analog and digital values can be read, PWM and digital control lines can be set, all by commands from a remote end.

Controlling an XBee this way from another node has it work as a "remote IO port" where port hardware logic effectively owned/managed by a remote peer becomes distributed out to this other side of a radio link.

This can be feasible in some applications where a quick response decision making logic is not needed locally but can be accomplished from a remote end, thus allowing a more compact and lower cost hardware function at the specific network node.

This opens up for a lot of interesting applications where "a network of bees" implement distributed sensing and control logic in machinery, and where a possibly central control logic can administer overall operation, all run over that local radio network.

So, to summarize, besides simply passing data between nodes for microcontrollers, the XBee has other features that can aid in process monitoring and control.

The modules have digital I/O, analog input and PWM output that may be used in a variety of ways:

Direct digital output control: Through AT commands, the I/O may be set to digital output and controlled as high or low. For example, the command “ATD0 4” would set D0 to be a low output and “ATD0 5” would be a high output.

Digital and Analog input for transmission: The inputs may also be set to be digital inputs or 10-bit analog to digital input. Using sampling, the values of the inputs are sent as data to a receiving XBee in API mode where the ADC data is extracted.

PWM/analog output: The 10-bit PWM value of an output may be set and optionally filtered for analog output of the unit.

Line Passing: The digital inputs can control a digital output on a remote unit, and analog input can control a PWM output on a remote unit.

Remote Configuration

Using AT commands, the configuration of a remote module may be changed by sending the command in an API packet. This could be used to control remote digital or PWM outputs, or change other parameters of the remote XBee.

Some links to XBee material for further study:


Cool norwegian project that shows the power of a Perl library:

1 comment:

  1. Good topic, this is going to help a lot of people get the whole concept. I'd like to know how everything is going with this.

    Digital signage content creation