5
\$\begingroup\$

I want to use an XBee wireless module with my Arduino Uno. How should I go about doing this? Do I need a shield like this one?

\$\endgroup\$
6
\$\begingroup\$

Xbee modules have a slightly non-standard pin header layout, i.e. two rows of pins with 2 mm pitch (separation between centers of adjacent pins) instead of the more common 2.54 mm pitch used in the Arduino itself.

Therefore directly connecting the XBee to the Arduino such as by plugging it directly in, is not possible even if the header pin rows were spaced sufficiently apart to match the header rows of your flavor of Arduino.

If jumper wires are used, then yes, the Arduino can directly interface with and fully use the XBee module: There is no additional electronics required to interface with the hardware of the module.

The pin connections required are:

XBee                Arduino
------------        ------------
 VCC or 3.3V         3V3
 TX or DOUT          RX or 0
 RX or DIN           TX or 1
 GND                 GND

The addition of an XBee shield, or more usefully one of the various Sensor Shields with XBee footprint socket, is useful in creating a more robust set-up, not fragile as jumper wires are prone to be.

Notice the XBee headers on this shield for instance:

Sensor Shield with XBee footprint

(source)

An added advantage of using such a shield is that 2mm pitch headers are not as easily available as standard 2.54mm ones, and when they are available, they work out quite expensive. The shield illustrated above, on the other hand, is for under $8 on eBay, and might be available for even less elsewhere.

Small price to pay for convenience, perhaps.

\$\endgroup\$
  • 1
    \$\begingroup\$ Worth noting that the XBee Pros cannot be safely powered through the Arduino's on-board 3.3V regulator as they draw too much current. \$\endgroup\$ – Kevin Mark Apr 16 '13 at 0:54
2
\$\begingroup\$

If you are asking how you use them, you basically have to setup RF network information on them. I provide information below on how you can learn how you setup the hardware to program them. You then can use a shield like the one you linked or just wire the pins as somebody else has suggested.

Did you decide between XBee series 1 or 2? If not, you should first read this article before you buy.

Here is the actual hardware I bought via https://www.adafruit.com/

  • 1 ea. XBee Adapter kit $10.00
  • 2 ea. XBee Module - Series 1 - 1mW with Wire Antenna $45.90
  • 2 ea. Shield stacking headers for Arduino (R3 Compatible) $3.90
  • 1 ea. USB FTDI TTL-232 cable $20.00

You use the USB FTDI cable with the adapter as shown in this picture to program the XBee before connecting it to your Arduino, as it needs information about the radio network it should connect to. FTDI cable to XBee Adapter Kit

Adafruit's learning section has this article with more information.

I would also make sure to read this article on common XBee mistakes.

I also happened across someone using an WiFly (XBee based board) without an adapter. Skip to 0:16 on this video.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy