I need to communicate between two Arduinos using XBee. I am new to XBee and hardware. The two Arduino Unos need to send a message (number) to each other and light an LED or play a sound, when they come close within a 10 meter distance.

So my doubt is which XBee shield and XBee module I need to purchase. I read about XBee series 2, XB24 etc.

  • 2
    Welcome to Arduino! Could you add more details like what is your application? What do you intend to do? What are your requirements? What have you found? Whats confusing you? We can help only if you give us information which can enable us to do so.
    – asheeshr
    Commented Mar 11, 2014 at 14:36
  • 3
    Check out the XBee Buying Guide: sparkfun.com/pages/xbee_guide
    – sachleen
    Commented Mar 11, 2014 at 16:59
  • Please add more details to your question, there are a lot of XBee modules and each is good a different purpose. Take a look at the link in my previous comment and learn about the different kinds of modules available and then update your question with specific details.
    – sachleen
    Commented Mar 11, 2014 at 17:00
  • 1
    You lay want to give the following details to your question: the environment in which your 2 Arduinos will need to operate, the maximum distance between them, the quantity of information you need to exchange, the exchange frequency, the exchange direction (in case it might be unilateral)...
    – jfpoilpret
    Commented Mar 11, 2014 at 18:23
  • thanks guys for your reply. My question has been updated with my requirement. Please check
    – ramesh
    Commented Mar 12, 2014 at 4:13

3 Answers 3


The only way I can think of accomplishing this without some sort of proximity sensor is to measure the signal strength of the XBees.

From page 41 of the datasheet:

DB (Received Signal Strength) Command

AT Command: ATDB

Parameter Range [read-only]: 0x17-0x5C (XBee), 0x24-0x64 (XBee-PRO)

DB parameter is used to read the received signal strength (in dBm) of the last RF packet received. Reported values are accurate between -40 dBm and the RF module's receiver sensitivity. Absolute values are reported. For example: 0x58 = -88 dBm (decimal). If no packets have been received (since last reset, power cycle or sleep event), “0” will be reported.

You can use this as a rough estimate of the distance between two sensors. You will have to correlate signal strength to actual distance and obstructions and other factors will cause the reported value to be off.

How to measure XBee signal strength?

This page has an example using Processing (on the computer): XBee Signal Strength

  • Using a single RF signal that may be on a moving object (which has its own RF absorbing and/or amplifying capability) as a proximity measurement sounds dodgy to me. Ten meters with clear line of sight, ten meters with a steel framed wall between the stations, and ten meters with a wood frame wall with electrical wires running through it will all cause unwanted variance in the measurement.
    – WineSoaked
    Commented Mar 13, 2014 at 2:13
  • hi thanks for your reply. I am trying to communicate between these. Can you suggest a tutorial or something for this ? Its ruining my time.
    – ramesh
    Commented Mar 13, 2014 at 9:33

The "XBee" brand has two major types. Series 1 are the original ones, and are often NOT referred to by their series number. Series 2 are the newer mesh network brethren.

Most XBee's and their clones are pin compatible (there is even a Bluetooth replacement 'Bee), thus any XBee shield or adapter can be used for either series.

The difference is largely in their communication protocols. The Series 2 allow more robust mesh networking options. But for a beginner - the original (S1) provide simpler out-of-the-box networking.

There are retail packages available that include a pair of S1 XBees, an Arduino compatible breakout board, and a USB adapter to program them. This allows you to get "on the air" and setup the XBees quickly. For communication between two arduinos, a pair of shields will make physical connectivity much easier.


Adding to Ron's answer, the Series 1 is a lot easier to use, because you have to flash firmware onto Series 2s and do all kinds of setup. The S1s work out of the box.

Another thing to keep in mind is that Xbees use 3.3v I/O pins, while the Arduino uses 5v. Most Xbee shields have a Logic Level Converter to handle this, but there are some that don't, and those could damage your Xbee.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.