Arduino + Xbee question

I was wondering is it possible to connect the Xbee to the arduino mega without the Xbee sheild. I am planning on using Xbee to tranmit serial data from PC to teh mega on board a robotics platform. I was curious on the difficulty of connecting it without the sheild. I just think for my application it may be more practical to just breadboard the xbee to the arduino. Just want to make sure it can be done before I start ordering things. Thanks

Yes, you need to identify the DIN, DOUT, 3.3v, and GND pins on the Xbee unit and connect them accordingly to the Arduino mega. You probably would want to wire the DIN to TX and DOUT to RX on a serial port other than the one it programs through.

Something like an Xbee shield basically just does this for you and usually has an integrated voltage regulator that shifts 5v to 3.3v for Xbee.

Thank you. Does the Xbee sheild work with the mage 2560 and if so can someone link a sheild that will work. What I am concerned about is the sheild blocking too many of the io ports so that I wont have enough for my project. thanks

You might want to consider this: Mega protoshield for Arduino : ID 192 : $14.95 : Adafruit Industries, Unique & fun DIY electronics and kits or SparkFun MegaShield Kit - DEV-09346 - SparkFun Electronics and just use a small breadboard to mount the xbee (will have to get low profile female headers)

Also note: (Quote taken from sparkfun's Xbee shield comments)

g33k | December 3, 2010 at 9:44 PMComment Rating1

Is this compatible with Arduino Mega 2650? Thanks.
Demonlove | December 6, 2010 at 7:29 AMComment Rating1

Yes - the Mega 2650 was designed to be able to use existing Arduino shields. I bought one for my Mega 2650 and it works exactly like it would with a Duemilanove.

So yes the shield should be compatible with the mega and should not get in the way of any i/o pins.

Thanks! My last question about the xbee then is this from what I have found the series 1 is for point-to-point ie(2 xbees communicating) and the series 2 is for multiple xbees communicating. Would it be possible to connect 2 xbees to one mega. I want to use an xbee for a wireless controller similar to the arbotix wireless controller () but I am also planning on a xbee wireless serial connection to recieve inputs from a computer hooked too a laptop. Therefore I onlt need 2 xbees commuicating to each other.

Controller xbee >>>>> Arduino xbee
Laptop xbee >>>>>>arduino xbee #2

If this isn't possible would I then need to get the series 2 so that all can talk to each other and the laptop and controller xbees will just ignore each other based on tags but on the signals? Thanks for all the help too I really appreciate it. I have been planning this project for a long time now and since the budget isnt huge I am trying to avoid unnessecary spending by getting components I am sure will be able to work together.

More than 2 series one XBees can talk to each other, if one (the central one) uses broadcast mode. The drawback to broadcast mode is that messages can be delayed. If when the messages are delivered doesn't matter, or the central XBee is a listener only, then use 3 series 1 XBees.

Otherwise, get the series 2 models.

mblackwolf:
Thanks! My last question about the xbee then is this from what I have found the series 1 is for point-to-point ie(2 xbees communicating) and the series 2 is for multiple xbees communicating. Would it be possible to connect 2 xbees to one mega. I want to use an xbee for a wireless controller similar to the arbotix wireless controller () but I am also planning on a xbee wireless serial connection to recieve inputs from a computer hooked too a laptop. Therefore I onlt need 2 xbees commuicating to each other.

Yes this is entirely possible. The Arduino mega board has 3 built in sets of serial communication pins if I remember correctly. You can have the first set of pins for uploading code, the 2nd set for 1 xbee and the last set for the 2nd xbee.

If this isn't possible would I then need to get the series 2 so that all can talk to each other and the laptop and controller xbees will just ignore each other based on tags but on the signals? Thanks for all the help too I really appreciate it. I have been planning this project for a long time now and since the budget isnt huge I am trying to avoid unnessecary spending by getting components I am sure will be able to work together.

You might want to look into the Xbee documentation as there is a good amount of information on fine-tuning Xbee configurations to better suit your needs. Using XCTU you should be able to configure the xbees as such:

laptop xbee with [MY:1/DL:2]
arduino xbee     [MY:2/DL:1]
pc xbee          [MY:1/DL:2]

This would allow your arduino xbee to receive commands from both the laptop and pc and send to both the laptop and pc but the laptop and pc would only communicate with the arduino.

Thanks PaulS and Xenosis . I will get the series 1 then because the megas Xbee will be a listener only as it is just intended to receive the laptop command and move servos for an attachment and receive the controllers command to move the legs/wheels/etc. thanks for the help I appreciate it.