setting up Xbee Pro S2B with Arduino

Hi guys, newbie here. I thought I was making good progress as I got my arduino set up with LCD and IR sensor to display different weather and stock prices at the press of TV remote. Being ambitions, I would like to do this wirelessly through xbee. I ended up getting two xbee pro S2B since the store ran out of series1. Now I got a bunch of questions.

  1. I can not find any tutorials on setting up two xbee pro S2B to confirm that they talk to each other. Any guidance on this would be helpful on what gotchas I need to be aware of that is different from series 1 xbee
  2. I run into a lot of confusion of how to connect this up to an arduino. Do I need the USB xbee adaptor or can i directly connect the xbee to the arduino? I also read a lot of warnings about making sure it powers the xbee with 3.3V with the use of some voltage stepdown and regulator and warnings about connecting to 5v controllers. Can't I just use the 3.3v output on the arduino power to power the xbee?
    3)since I got the IR receiver connected to pin 13 on arduino and LCD on pins 7-12, where would I wire the xbee i/o to on the arduino? I am little confused as to how to let the arduino know the different serial I/O among the 3 devices and on which pins.

I know these may be very general questions, but any guidance and insight would be greatly appreciated.

Happy New year..

1 Like

I ended up getting two xbee pro S2B since the store ran out of series1.

Series 1 models are point to point. Series 2 are for mesh networks. Getting 2 radios to talk to each other is much simpler with the Series 1 models. If possible, I'd take the Series 2 back and get the Series 1 models, instead.

I run into a lot of confusion of how to connect this up to an arduino. Do I need the USB xbee adaptor or can i directly connect the xbee to the arduino?

The XBee adapter comes with a voltage regulator so that it can be connected to the 5V supply, which can supply the necessary current. Series 2 models, especially the Pro versions draw a lot of current. The 3.3V on the Arduino is not capable of supplying the necessary current.

where would I wire the xbee i/o to on the arduino?

If you get the shield or adapter, connect 5V, Gnd, and any two digital pins, and use NewSoftSerial (0023 or earlier) or SoftwareSerial (1.0 or later) to talk to those pins. Do not use SoftwareSerial on 0023 or earlier. It is obsolete.

HI Paul, you are not kidding when you said the series 1 is much easier. As I am pulling out my hair on trying to setup the Series2. I would return mine if possible. But I am in a foreign country right now and there is only one distributor selling it here and he ran out of series 1. So if I return it, that would need me with nothing to try for a while. So I guess I will continue to pull out my hair for a little before returning to the States.

Also, There is a 3.3v output on my adaptor. Can I use this to power the secondary xbee just to see if the two are communicating?

I don't know what adapter you have, so I don't know what the current delivery capabilities of the regulator are.

I'm also not sure exactly which XBees you have, so I don't know how much current they require.

So, I can't advise running two off of one regulator. Typically, a board will use the smallest (cheapest) regulator that just barely performs the job. No need to put a 5A regulator on a board that only uses 300 mA.

for those others having problems setting up two series2 xbee with arduino, i finally figured it out with the book Amazon.com: Customer reviews: Building Wireless Sensor Networks: with ZigBee, XBee, Arduino, and Processing

later i found a link that basically says it in simple few steps. Not a Rocket Surgeon: Connection XBee Series 2 (AKA ZB Pro/ZNet) to an arduino

However, I highly recommend the book if you are interested in understanding how xbees works.

PAUL, I also was able to use the 3.3v power on the arduino on my board. But like you I can not guarantee this to work for others as I do not know what boards they are using. But since it is 3.3v there is no risk of blowing the xbee and worth a try.

3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.

http://www.digi.com/pdf/ds_xbeezbmodules.pdf
Shows that current requirements range from 35mA to 220mA, depending on model. Even at the low end, you are nearing the limits of the 3.3V regulator on the Arduino.

thanks Paul for the clarification. Looks like I am probably running against the limit. I will get a xbee shield when I can find one locally.

If you get the shield or adapter, connect 5V, Gnd, and any two digital pins, and use NewSoftSerial (0023 or earlier) or SoftwareSerial (1.0 or later) to talk to those pins. Do not use SoftwareSerial on 0023 or earlier. It is obsolete.

Paul, looking at NewSoft vs Software serial. I found numerous post saying that the latest newsoftserial corrects problems of earlier softwareserial. Your last statement "Do not use SoftwareSerial on 0023 or earlier. It is obsolete." did you mean to not use NewsoftSerial 0023 or earlier? Bottomline. Which one is the best one for xbee should I be using?

Prior to 1.0, the Arduino software ships with something called SoftwareSerial that is obsolete. There is NewSoftSerial that is far better.

Starting with Arduino 1.0, NewSoftSerial is included in the Arduino distribution as SoftwareSerial. (Another dumb decision to repurpose a name, in my opinion, bound to cause just this kind of confusion).

So, you should not use SoftwareSerial on 0023 or earlier versions, but you should use it on 1.0. You should use NewSoftSerial on 0023 and earlier.

prior to your post, I realized and was further confused that they are essentially the same software with different versions, but could not figure out what was what. your post clarified it perfectly. Thanks