Xbee problem: working one way only

Hi everyone.

First, this is my first post here, i’m glad i discovered this site some month ago. Amasing site & community around it.

I’m new to electronics, but i have a project i’d like to see working one day, so i bought lots of module & things a month ago on sparkfun, and i’m playing with it since then.

But now i’m facing a little annoying problem so i hope you guys can help me !

here it is :

i’ve got one arduino duemilanove

got also a pair of the nice [XBee-PRO® 868 OEM RF Modules (yeah, i’m living in France…). I’ve tested the 2 modules and they’re working fine, talking to each others with Digi’s dev kit. Default settings appart for TX power level set to the minimum since i’m testing indoor. (details : modem:XBP08-DP, function:XBEE-PRO 868 single channel, Version 1027)

In my project, one of them is on the Xbee shield on the Arduino, the other is on a xbee explorer USB.

Both modules (arduino+shield+xbee & xbee explo USB+xbee) are pluged into my laptop.

shield switch is in UART (i tried also with DLINE (pin 2 3), but same pb)

Now my problem is i run a very simple testing program on the arduino :

void setup()  {
  Serial.begin(9600);
}

void loop() {
  
  if (Serial.available() > 0) {
    int inByte = Serial.read();
    Serial.write(inByte);
  }
  
  Serial.println("testing...");
  Serial.write(78); // "N"
  delay(1000);

}

i have the serial monitor monitoring @ COM6 for the arduino

and X-CTU connected to COM7, monitoring the xbee explorer USB

It looks like the “arduino” xbee is sending only “00” byte, each iteration of the loop function, a dot is printed in the terminal of xctu, and this dot is “00” in hexa. (if i unplug/reset arduino, no more 00 byte is sent, so i guess it is really sending something …)

Now if i write something into the XCTU terminal, it sends the data to the arduino through the xbee usb explorer, without any problem, and i can see what i typed into the serial monitor of arduino. (one letter at a time of course)

if i send something into COM6 with serial monitor, nothing happens … ???

am i missing something really obvious here ? i’d like to see both “testing…” and “N” strings into the XCTU terminal. Why is the arduino+xbee sending only a null byte

thanks for the help

chboing](http://www.digi.com/products/wireless/point-multipoint/xbee-pro-868.jsp#docs)

The first test I would do is to pull the XBees off of there boards (shield & explorer) and connect the data lines (and ground) between the boards. This eliminates the radio link. If communication works both ways then start looking at the XBee settings. If not then the problem is not the XBees (yet).

hi, thanks for the good idea.

everything works as expected when i connect the data lines directly without xbee.

So i guess my xbee config isnt working so well, i made a picture containing all parameters, i cant see where is the issue, any advice will be very welcome !

http://chboing.free.fr/params.jpg

the strange thing to me, is that the range test in XCTU works like a charm with the digi’s dev kit boards.

Ok, it works without the XBees.

Being that the range test works with Digi’s dev boards says that the XBee settings are probably correct. There has been some issues with the DIN/DOUT voltages with some combinations of third party interface boards and processors.

Next is the voltage levels. The XBee is a 3.3V device, does it have the correct voltage on pin 1? What is the processor’s voltage levels?

Is the logic levels (data voltage) to/from the XBee, DIN and DOUT correct? See the Electrical Specs in the XBee data sheet for the digital voltage levels.

Is there overvoltage protection (resistors, diodes) on the DIN/DOUT lines on the interface boards? Can you post a link the the schematics for these boards?

waltr:
Next is the voltage levels. The XBee is a 3.3V device, does it have the correct voltage on pin 1?

yes, both have really close to 3.3V values

waltr:
What is the processor’s voltage levels?

mmhh are you talking about the arduino here ? if yes then i checked that 3.3V and 5V pins really have those values and it's good.

waltr:
Is there overvoltage protection (resistors, diodes) on the DIN/DOUT lines on the interface boards? Can you post a link the the schematics for these boards?

There is a diode on the DIN line on the shield ( [http://www.sparkfun.com/datasheets/DevT ... ld-v10.pdf](http://www.sparkfun.com/datasheets/DevTools/Arduino/xbeeshield-v10.pdf) )(edit:this diode is a zener diode isnt it ? mounted inverted on purpose ?)

nothing on the DIN or DOUT on the usb explorer ( http://www.sparkfun.com/datasheets/Wire … plorer.pdf )

waltr:
Is the logic levels (data voltage) to/from the XBee, DIN and DOUT correct? See the Electrical Specs in the XBee data sheet for the digital voltage levels.

from the spec i see :

Input Low Voltage MAX 0.2 * VCC (0.66V)

Input High Voltage MIN 0.8 * VCC ( 2.64V)

Output Low Voltage MAX 0.18*VCC ( 0.59V)

Output High Voltage MIN 0.82*VCC (2.70V)

now,i have no oscilloscope, thus i dont know if my mesures means anything but with my multimeter i get around 3.3 V on the DIN/DOUT of usb explorer and again 3.3V on the DOUT of the xbee shield

BUT only 1.1V or 1.2V on the DIN of xbee shield … ?

this looks like a problem to me ? even more since this xbee on the shield isnt sending correctly my data, but if it is then i have no clue how to solve it :confused:

There is a diode on the DIN line on the shield (edit:this diode is a zener diode isnt it ? mounted inverted on purpose ?)

That is a Schottky diode to block +5V from getting to the XBee DIN pin. In the XBee an internal pull-up resistor is enabled on the DIN pin for a logic high and the external, arduino output, should pull the DIN pin low through the diode.

BUT only 1.1V or 1.2V on the DIN of xbee shield … ?

this looks like a problem to me ? even more since this xbee on the shield isnt sending correctly my data, but if it is then i have no clue how to solve it :confused:

Yep, that is the problem. To be a logic low DIN must be less than: MAX 0.18*VCC ( 0.59V)

If the arduino is 3.3V then the solution is simple, short out the diode on DIN.

But I’ll guess that the arduino is 5V so you can not connect it directly to the XBee. There are several solutions. One is to replace the diode with a voltage divider to get 3.3V at DIN when the arduino is outputting 5V. Another is an active device, bipolar or fet transistor to level shift the 5V to 3.3V (SparkFun has a level shifter board for idea on how to do it).

This has been a problem for several people.

Here is a thread on the subject from the SoR forum:

http://www.societyofrobots.com/robotfor … pic=9790.0

Also check this app note for additional ideas:

3V Tips 'n Tricks (3.3V - 5.0V level shifter etc.): from Microchip

http://search.microchip.com/searchapp/s … 0Microchip

ok so we (you) spotted the problem ! great !

Please, have a look at page 8 on this document

http://ftp1.digi.com/support/documentat … 1020_a.pdf

it says : pin 3 DIN / Input / UART Data In / max voltage 5V

does that mean i can connect it directly my xbee to arduino (which is 5V indeed) by shorting out the diode on DIN ?

:slight_smile:

it says : pin 3 DIN / Input / UART Data In / max voltage 5V

Good find. Yes that does mean you can short out the diode in series with DIN but heed the Design Note below the table:

• Several of the input pull-ups can be configured using the PR command. Disable internal pull

up resistors to lines that will have 5 volts on the input. During reset and power up the internal

pull-ups are enabled and can provide a higher current path for voltages above Vcc.

I would put a series resister on the DIN line (replace the diode), somewhere around 1000 to 50 Ohm, to limit current to the internal clamp diodes.

Maybe you’ll have the XBees working soon.

ok, i’ll think about that a bit to fully understand it, and then i’ll try your solution, and i’ll keep you informed of the result

– update : i had a look into the whole “pull up resistor” thing, and saw that the default param for the xbee was 0x3F7F.

The bit 8 corresponding to DIN, was set to 0. So i activated the pullup resistor for DIN by setting PR to 0x3FFF, and it finally worked !!!

now i’ve got 3.5V on this DIN pin, so i guess the diode is now doing what she was supposed to do.

Waltr ! you’re the man! I dont know how many hours/day i would have spent on this without your advices

thank you very much !!

WooHoo…it works.

Enjoy.

I’ve a Xbee pro modem" XBP08-DPSIT.I try connect it with X-CTU software and cofrig. it like this image http://chboing.free.fr/params.jpg.I did all of ways like this,whereas program X-CTU informs in Con test/Query modem bar “communicating with modem.Please wait”.I wait for a while but nothing happens.Please help me fix it.Thanks a lot :smiley:

Thank you guys, changing PR - Pull-up Resistor Enable to 7FFF fixed the issue. I was looking for an answer for 5 hours. Thank you, thank you!