xbee vs bluetooth

I am running Firmata (standard that comes with arduino 0017) on an Arduino BT to report the state of microswitches (connected to its digital and analog inputs) to MAX/MSP 5.0.

For footprint reasons I want to switch to an Arduino Nano, but am wondering what wireless solution to use.

I need reporting from the Nano's inputs at high temporal resolution, over a short distance (7-10 meters), and with the lowest power consumption possible. Being able to program the Nano wirelessly is not necessary.

I am considering class 2 bluetooth modules (as I am assuming they are always less power-hungry than class 1 modules), but I am wondering if xbee might be a better option.

I am thinking this might be a good xbee setup:

Connecting this to the computer (with an xbee on board): http://www.sparkfun.com/commerce/product_info.php?products_id=8687

and wiring this up to the Nano (with an xbee on board): http://www.sparkfun.com/commerce/product_info.php?products_id=9132

This is the lowest power xbee I found: http://www.sparkfun.com/commerce/product_info.php?products_id=8664

Is xbee hard to get going for this kind of project? Are there any obvious problems in this xbee setup? Might it perform better than bluetooth in terms of power consumption?

I also found this class 2 bluetooth solution for arduino:


Is anyone aware of other arduino-compatible class 2 bluetooth modules?

The asynchronous data rate on the bluetooth device is 2.1 Mbps, whereas the xbee has a max rate of 250 kbps. Is 250 kbps sufficient bandwidth to report all the Nano's inputs with high temporal resolution?

If anyone has any thoughts on the above I would be grateful for your opinions.

What is the definition of "high temporal resolution"? I haven't looked at the XBee spec in a while but I thought the bandwidth was 50-50Kbs.

I think that the BlueGiga BT module and the XBee are in the 30-40mA range when transmitting. If you are transmitting continuously then you will be at 30-40mA. If you can cache your data and then transmit in bursts you could save some power.

(* jcl *)

Thanks for your reply.

To be more specific, when I say "high temporal resolution" what I want is input from sensors attached to the arduino to be relayed to the computer with the smallest achievable delay. Ideal would be that a person activating a sensor would perceive no delay prior to the computer responding to that activation. The firmata script I am using appears to query the digital pins every 19 ms. I would like to pass input on to the computer from all the available arduino pins simultaneously, so I am curious as to whether the band with of the xbee is sufficient (250kbps is apparently its maximum).

Like you say, the xbee spec here states a current of around 50mA: http://www.sparkfun.com/commerce/product_info.php?products_id=8664

The Bluegiga WT11 states a current of 20-170mA: http://www.bluegiga.com/files/bluegiga/Pub%20files/WT11_datasheet.pdf

Perhaps the bluetooth protocol is more energy efficient, but I assume that being a class 1 device (with a greater range than this xbee model) the Bluegiga WT11 would be more power hungry.

It sounds like 2 bytes every 20mS. Correct? This is 2 * 8 / 0.02 = 800Kb/S. Either radio is fine for this.

I have been using WT12A which I believe is lower current. I do not know the differences between the WT12A and WT11.

Are you sure the WT11 is a longer range than the XBee? The standard series one XBee is apx 300ft at 1mW, outdoors, line-of-site. I believe the XBee-pro is over 1500ft. Both of these values are with chip antennas. With a whip antenna the distances are two or three times more.

(* jcl *)

Thanks for the tip, I will check out the WT12A.

Do you mean that the state of each digital pin is being coded as one bit (so if we had 16 digital pins, 2 bytes would be sufficient)?

At the moment I am also using the analog inputs, and I don't know how firmata encodes their states. If it were possible to threshold the analog inputs in Firmata and send their data as on/off signals, this would also suit my purpose.

As you say, the xbee manual states an outdoor range of ~100m (1mW Xbee, page 4): http://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Manual.pdf

The Bluegiga WT11 datasheet states a range of ~300m (see page 6): http://www.bluegiga.com/files/bluegiga/Pub%20files/WT11_datasheet.pdf

The xbee manual lists the RX and TX currents for the 1mW xbee as being ~50mA, while the bluegiga datasheet lists the WT11's peak RX and TX currents as 170mA.

I am not sure these numbers are comparable, but class 1 devices are described as having a transmission power of ~100mW: http://en.wikipedia.org/wiki/Bluetooth#Uses while the low-power xbee is supposed to be only ~1mW.

For digital lines encode them as bits. You will decrease the bandwidth requirement by a factor of 8. The ADC would be one or two bytes per reading. If you can encode this as on/off you would again save a lot of bandwidth.

I do not have much experience with the WT12A -- just that the currents are in the 40-50mA range. Also I believe there are newer versions in that series.

It sounds like the WT11 is more in line with XBee Pro. I am not sure the current required for the XBee Pro. But it is a fair amount more than the 40-50mA of the XBee. You can change the transmission power levels if you do not need the distance.

(* jcl *)

I will have a closer look at the signal coding in Firmata, and see if there is room for more efficiency as you have suggested.

I looked up the WT12A, it is class 2 (~2.5mW transmission power), so it makes sense that you say its power consumption is in the range of the xbee 1mW:


Maybe I will try out the WT12A if the xbee 1mW units don't do what I need them to.

Thanks very much for your posts, I learned a lot from them.

You're welcome.

If you are doing a PCB layout with the WT12A be careful not place any copper underneath the radio on the side that the WT12A is mounted. There are a number of vias that are on the underside of that radio that can short to the PCB.

The layout is a little tricky if you are trying to get this in a small package using only two layers. If the WT12A is on its own board or you use four layers you will not have a problem.

(* jcl *)