The problem i am facing while using Xbee communication in my final year engineering project is I am unable to receive data on Xbee Transmitter mounted on Xbee shield on Arduino Uno. The transmitter is connected to laptop via Xbee explorer and receiver is mounted on arduino uno via xbee shield. Data is sent and received normally when both transmitter and receiver are connected via explorer. When we transmit some data while receiver is connected via arduino shield we are unable to receive and monitor it on Arduino’s serial monitor.
While following Sparkfun’s Arduino to Xbee Hookup guide, the tutorial says: 'If you have the shield make sure the SWITCH IS IN THE “DLINE” POSITION. ’ What does it mean and where is the switch of xbee shield ? The switch on our xbee shield has two terminals which say USB and Xbee and we are operating it while keeping it towards xbee.
Urgent help needed and any guidance or advice would be much appreciated !
That switch allows the arduino to only talk to the USB port as normal, or only to the Xbee (and no communication with the PC over USB). So unless you connect another Explorer (USB) to the Dout of the Xbee or the D1/TX pin of the Arduino you will not be able to notice any communication going on between them. Except maybe some flashing RX and TX leds. To figure out what is actually communicated between the Xbee and Arduino you need to eavesdrop on them and show this in another serial terminal program.
Since there are different kinds of Arduino Xbee shield from various manufactorers it’s a bit hard to say exactly what is the cause of failing communication. It’s better if you provided more details on which shield you used exactly and which config settings the Xbees had. Also it is important to know if the Xbees are Series 1 or Series 2/Zigbee.
In the USB switch mode the Xbee Dout (second pin) is connected straight through to Arduino D1/TX. And so also to the RX pin of the USB serial converter chip. Similarly in USB switch mode Xbee Din (3rd pin) is connected to a 10K/15Kohm voltage divider to Arduino D0/RX. That means the USB to serial converter chip can talk to it with 5 volt. The Arduino Atmega328 chip is listening along. There is no level shifting between 3.3v Dout and 5 volt RX. But theoretically the voltage levels should suffice to be registered as highs and lows. Additionally, if there is code running on the Atmega328 then it might conflict with the Xbee responses. So make sure no code is on there (that uses serial).
Other than that, make sure the traces on the board are functional in USB mode. You can use a multi meter in resistance mode (>30 Kohm range) to see if there is a connection between pins. As a side effect reverse engineering the board might learn you something.