We compare XBee, 433MHz, and 2.4GHz modules as used for wireless serial communication between two Arduino boards. Distance, data rate, and power consumption are compared.
The Digi XBee S2 (XB24-Z7WIT) is the most expensive option, both for the part and for the other things required to get it online. It starts with the module, which would be enough if you were building boards, but not if you are using the Arduino. Arduino requires a shield to hold the XBee and translate the Arduino 5V power and interface into the 3.3V required by the XBee. You can't use the 3.3V from Arduino Uno because it can't supply enough current. The XBee does the job, though, and without any fooling around. It just works.
This is the little 433/330/315MHz model you see on eBay that has the transmitter data pin labeled "atad". They use 5V to 12V for the transmitter, which has a huge effect on the distance (20m to 200m). They are amplitude modulated, so there is a noise problem - they will walk on each other - unlike the frequency modulated XBee and Nordic.
The Nordic chip is on a module manufactured in China, and sold by everyone on eBay. It is a very comprehensive hardware solution, like the XBee, and very much unlike the 433MHz ASK/OOK modules. The modules run at 3.3V, but the I/O is 5V tolerant. Since the current requirement is under 50mA, they will run off of the 3.3V output of the Arduino Uno.
The documentation on mine was wrong. It had the even and odd pins backwards on the connector. That puts 3.3V on the ground pin and ground on the 3.3V pin. The chip gets extremely hot, but the thing did not fry on me. All the modules work, even though two spent some 2 or 3 minutes hooked up backwards. I found the correct documentation on a multi-purpose shield for these modules and others. I have reproduced it here, in case anyone gets theirs from the same supplier I used.
|Cost for one end||$42.006||$2.00||$2.50|
Testing required some software that would work with all of the modules. The XBee accepts simple serial data, and handles all radio communication protocol internally. The NRF24L01+ module required the RF24 library. The 433MHz modules used the VirtualWire library.
The XBee was tested using one Sparkfun XBee shield connected to an Arduino Uno R3, and one Sparkfun XBee USB Explorer connected to a Macbook Pro. No special library was used on the Arduino, other than the software serial library. The Mac was the master in the ping-pong test. The XBee modules were configured earlier, and are completely setup before this test.
The test found no problems in the 100 ft open area. It didn't appear to matter what distance I was at as far as throughput. I don't think I reached far enough into the fringe to cause any disruption.
These modules were tested using Arduinos only, with one connected to a Mac Mini and the other standalone. The modules had 7 inch wire antennae soldered to the antenna terminal. The antennae were oriented vertically on transmit and receive on both Arduinos.
The modules seemed error free for the first 15 feet at 2kbps. By 20 feet the error rate caused the throughput to drop to about half the regular speed. At 30 feet, they didn't work at all. I suspect the problem was tuning, because I got much better results by switching the two transmitters. If I stood in front of the receiver the error rate went up. The best I could get error free was just under 30 feet. I suppose, and this is just a guess, that if you had the equipment to tune these things, or if you tried enough modules, you could find pairs that would work as advertised.
The NRF24L01+ modules are connected via the SPI port, with the RF24 library driving the communication. The library examples default to 2Mbps on the radio. Throughput is actually much less, around 60kbps, but still. These things are not as simple as the XBee, but it's all in the library.
I couldn't find a place inside the house where they wouldn't work, but at 50 feet through metal-reinforced stucco walls they don't. Out in the open, they become directional at a distance. I couldn't figure out if it was that they had to face each other, or they just had to face the same direction. In any case, they work great. They may work even better with a dedicated 3.3V supply, but I couldn't test that at any distance. One was run off of the USB, and the other on batteries. I'll be using them in places I would have used the XBee, and I'll be saving the XBee for something more demanding.