Connect XBee Explorer Regulated to Arduino Uno

My current project involves wireless communication between two Xbees. Because I have an Arduino Uno (R3), I though I would use it to set up serial communications, as opposed to buying a separate adapter.

To do this, I connected the Tx Arduino pin to the Dout Xbee pin, and the Rx Arduino pin to the Din Xbee pin. I then connected the 5v from my Arduino to the 5v on my regulated Xbee explorer and the grounds together. I then connected the Arduino to the computer, and opened up the X-CTU software. Also, I connected the Reset with GND on my Arduino to avoid removing the chip. When I go to locate the Xbee, all that appears is the Arduino Uno on COM port 3, and it fails to establish a link with the Xbee, even after navigating through the setup process. Also, I tried to reset the XBee as suggested in many tutorials, but still doesn’t work.

I bought an adapter and it works very well. But since there are so many tutorials on how to connect an XBee on an Xbee regulated with the arduino, the setup described above should work. I am using an Xbee S2 and the following regulated explorer: https://www.sparkfun.com/products/11373.

Why does my Xbee fail to register with the computer and how can I fix the problem?

apalade:

To do this, I connected the Tx Arduino pin to the Dout Xbee pin, and the Rx Arduino pin to the Din Xbee pin…

Have you tried cross-wiring those? I mean, you talk with your mouth to someone’s ears. And someone else does likewise to yours. Mouths do not sense communicative vibrations easily, … unless there is advanced romance involved. :wink:

IOW the Tx pin is an output from the Arduino MCU and you’ve connected that to the Dout pin, an output from the XBee. You need Tx → Din, Dout → Rx.

Even then you have to understand that the Tx/Rx pins are shared (also connected to) with the USB<->serial device on an Uno. So data coming from the USB bus will show up on the Rx pin and go to both the Arduino MCU and compete w/data from the XBee (if connected). Similarly data sent by the Arduino will go to both the USB and XBee. This may/might/possibly cause some problems.

Mee_n_Mac:

Even then you have to understand that the Tx/Rx pins are shared (also connected to) with the USB<->serial device. So data coming from the USB bus will show up on the Rx pin and go to both the Arduino MCU and the XBee (if connected). Similarly data sent by the Arduino will go to both the USB and XBee. This may/might/possibly cause some problems.

But he said he kept the Atmega328 chip in reset to keep it dormant. Effectively he is using the USB interface AVR chip only as USB-to-serial interface to let the pc communicate with the local Xbee. Or that’s what I understood that the purpose was. So I think there is nothing to disturb the communication otherwise.

Valen:
But he said he kept the Atmega328 chip in reset to keep it dormant. Effectively he is using the USB interface AVR chip only as USB-to-serial interface to let the pc communicate with the local Xbee. Or that’s what I understood that the purpose was. So I think there is nothing to disturb the communication otherwise.

I agree.

I was trying to figure out how holding the Uno in reset would work. Looking at the schematic I see there’s a ‘reset’ that goes to the 328 and a ‘reset2’ that goes to the 16U2 (USB bridge). There’s a cap coupling between the ‘reset’ line and a GPIO pin on the 16U2. So I conclude that once held in reset, the 16U2 should still act as a bridge and talk to the Tx/Rx lines … and the XBee … if the OP fixes the connection as you advised.

This is the Arduino adapter hack schematic from Building Wireless Sensor Networks[1]. In that diagram, the Pin 2 on XBee is Out and Pin 3 is In. However, instead of connecting the XBee directly to arduino, I’m using an XBee Explorer Regulated (I believe it is much more elegant). Also, I did the same connections I mentioned in my initial post. The purpose of this is to use Arduino as an adapter in order to configure XBee. Also, in Figure 1-9, I also, connected the Reset to GND on Arduino to avoid removing the Chip. To communicate with XBee in normal exection, I would have to reverse the wires connecting the TX/DX pins. This setup (the one presented in the diagrams) is just to configure XBee.

[1]. http://www.amazon.com/Building-Wireless … 0596807732

Disregard my earlier advice of crossing the Tx/Rx connections. Apparently I wasn’t thinking straight and needed a good night sleep. My apologies for giving wrong advice.

As the Xbee is effectively taking the place of the Atmega328 chip (the brains of the Arduino board) the Xbee needs to have it’s Dout be on the same pin as the Tx/D1 pin, and Din be Rx/D0. On the Uno pcb this is already crosswired to the RX and TX pins of the Atmega8/16 which performs USB-to-serial translation. The tutorial is correct in this sense. There must be another cause for it not functioning.

Have you tried to use the older XCTU program version? The latest XCTU version seems to be a complete rewrite which means there could be bugs in it. At least it couldn’t hurt to make a step back and try.

Things you have not mentioned is the baudrate settings of the serial connection. By default it must be 9600 Baud, 8 databits, no paritybit, 1 stopbit, no flow control. How did you have these set up? Did you at any time change the baudrate setting in the Xbee and stored it to non-volatile memory?

I suspect problems with the latest images you posted of the bare Xbee connected to the Arduino Uno board. First, the Xbee Dout/Din pins are not tolerant to the 5 volt signals of the Uno board. Even if you supply it with 3.3 volt. It may work a while, but sooner or later it’s Din/Dout serial port pins might die of over-voltage.

Second, according to the official Arduino specifications page (http://arduino.cc/en/Main/arduinoBoardUno) the 3.3 volt output can only supply upto 50 ma. This is barely enough to supply the Xbee, which needs as much when it is transmitting and receiving. Which it does as soon as it boots up. However, the Uno Rev 3 should have the LP2985-33DBVR voltage regulator, which can output upto 150 ma. So if you have the genuine Uno R3 then it is probably no issue in terms of power supplied.

Because of these 2 issues I do think the Xbee Regulator is a better solution to interface with the Xbee, compared to just sticking it in a breadboard naked. However, updating the firmware is not going to work this way, since it also needs the RTS and DTR line.

Have you tried to use the older XCTU program version? The latest XCTU version seems to be a complete rewrite which means there could be bugs in it. At least it couldn’t hurt to make a step back and try.

Yes! This is was my first thought. Since my background is in Software Engineering rather than Electrical and Electronic Engineering. Usually, there are many problems with the new release software and I thought maybe a legacy one (old stable version) will work. However it didn’t.

Things you have not mentioned is the baudrate settings of the serial connection. By default it must be 9600 Baud, 8 databits, no paritybit, 1 stopbit, no flow control. How did you have these set up? Did you at any time change the baudrate setting in the Xbee and stored it to non-volatile memory?

After I tried countless configurations with XCTU ver. 5.2.8.6 (old version in this case), I went back to Next Generation XCTU (the new version). The reason behind this was to try all the possible configurations (including the one that you mentioned - 9600 Baud, 8 databits, no paritybit, 1 stopbit, no flow control). Many posts on forums/blong comments mentioned that they managed to fix the problem by selecting a different configuration. The new X-CTU offers the possibility to select all the possible configurations and run them (takes about 50 minutes). The last attempt was to increase the response time which was set to 1 second by default. Many mentioned that increasing this to 5 - 10 seconds gives enough time to XBee to reply. To use this technique I used the old X-CTU with multiple configurations (including 9600 Baud, 8 databits, no paritybit, 1 stopbit, no flow control). No luck again.

I suspect problems with the latest images you posted of the bare Xbee connected to the Arduino Uno board. First, the Xbee Dout/Din pins are not tolerant to the 5 volt signals of the Uno board. Even if you supply it with 3.3 volt. It may work a while, but sooner or later it’s Din/Dout serial port pins might die of over-voltage.

The images that I attached is just for orientation purposes. Those images explain the connections I made and what I aim to achieve. Also between the XBee and Arduino it is the XBee Explorer Regulated. This is the only difference to that image. Also, I’m connecting 5v from Arduino to 5V on XBee Explorer Regulated which should be fine as the Explorer takes care of the rest.

Second, according to the official Arduino specifications page (http://arduino.cc/en/Main/arduinoBoardUno) the 3.3 volt output can only supply upto 50 ma. This is barely enough to supply the Xbee, which needs as much when it is transmitting and receiving. Which it does as soon as it boots up. However, the Uno Rev 3 should have the LP2985-33DBVR voltage regulator, which can output upto 150 ma. So if you have the genuine Uno R3 then it is probably no issue in terms of power supplied.

I haven’t check the intensity of current from Arduino @5V. It is a nobbie mistake I know. However, I assume to be fine since this example of using Arduino as an adapter is referenced in many books/blogs/forums.

This is the error I usually get. I tried to reset the XBee by connecting reset on XBee with GND in order to reset the XBee but the window didn’t go away.

Lastly, guys please ask me questions or let me know what am I missing here. I can take a few pictures of my device. Soldering is done correctly I used a multimeter to check the connections.

I am running into the same issue. Did you find a solution to this?

Bought an adapter and all my problems went away. Last time I’m using XBees.