Pages: [1]   Go Down
Author Topic: [SOLVED]Busted/Incompatible XBEE WIFI and Arduino UNO & Leonardo Wireless Shield  (Read 5310 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone.  I'm new to the forum and I'm not a native english speaker so I apologize if I misspell a lot.

I have an Arduino Leonardo and two days ago I purchased an Arduino Wireless SD Shield http://arduino.cc/en/Main/ArduinoWirelessShield and a XBee Wi-Fi module http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/point-multipoint-rfmodules/xbee-wi-fi#overview.

I read all the documentation:
http://ftp1.digi.com/support/documentation/90002133_a.pdf
http://ftp1.digi.com/support/documentation/90002124_B.pdf
http://arduino.cc/en/Main/ArduinoWirelessShield


The problem is when I connect the Wireless shield with the XBee module on the Arduino the XBEE module makes a strange buzzing, it the same noise you would get if two electrical cables are not properly connected. The buzzing is not very low so you need to be al least 1 meter or closer to be able to hear it.
Also the only LED that light up when the shield is connected to the computer is the power LED. When I send any data through the serial port the RX LED on the Leonardo lights up but the RX LED on the shield doesn't

I try with the digi software & putty and I can not establish a connection with the XBEE module through the serial port (The switch in the Shield is in the USB position).

I don't kown if the XBEE module is busted or the Wireless Shield is.
I don't have any other shields or modules to test.

Anyone can give some help on how to tell if the shield or the module are busted?

« Last Edit: July 26, 2012, 04:05:20 am by nismotz » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48556
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I don't kown if the XBEE module is busted or the Wireless Shield is.
The way to determine that would be to put the shield on the Arduino without the WiFi device in place. If it makes noise, it's defective. If not, the WiFi device might, or might not, be. I don't have one, so I don't know if they are supposed to make noise. I rather doubt it.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the quick reply  PaulS   smiley-lol smiley-lol.

I already disconneted the XBEE wifi module from the shield and it doesn't makes any noise.

What I do not know is if the shield could bust the XBEE module(I doubt so). Am I wrong?


Again Thanks PaulS
« Last Edit: July 19, 2012, 07:45:59 am by nismotz » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48556
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What I do not know is if the shield could bust the XBEE module(I doubt so). Am I wrong?
I doubt it, unless the shield was defective. I'd contact the Digi people, and see what they say.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I contacted the store where I purchased the components and I'm waiting for the delivery company to take back the components.

A friend of mine has purchased an arduino Uno and the same XBEE module that I have, the shield is the Wireless shield official from Arduino,(mine was the SD Wireless shield).
The thing is that I  connected the 2 shields with the two XBEE modules, one at a time, on both arduinos and I've got the same problem.

I forgot to mention that the XBEE wifi module has a current peak when powering up of 750mA, the peak takes almost no time (page 17 on the XBEE manual)
Reading again the shield's datasheet I noticed that the maximum current draw is 800mA (voltage regulator).

Could it be that the voltage regulator is causing the problem?

Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48556
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I forgot to mention that the XBEE wifi module has a current peak when powering up of 750mA, the peak takes almost no time (page 17 on the XBEE manual)
Reading again the shield's datasheet I noticed that the maximum current draw is 800mA (voltage regulator).
You can't expect the Arduino to deliver that kind of current.

I don't really think those devices are intended to be used on the XBee shield, and I don't think they are intended to be powered by the Arduino. Remember that just because you can doesn't mean you should.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks again PaulS  smiley-lol smiley-lol smiley-lol

Maybe I explained myself wrong. When I said:
Quote
I forgot to mention that the XBEE wifi module has a current peak when powering up of 750mA, the peak takes almost no time (page 17 on the XBEE manual)
Reading again the shield's datasheet I noticed that the maximum current draw is 800mA (voltage regulator).

What I meant by that is the module just for a milifraction of a sencond draws 750mA, this is just a tiny note on the manual accompanied with a graphic.
On the other hand in the datasheet and manual it states: Operating Current(transmit, max outputpower) 802.11 b 1Mbps 260mA. This is the maximum current draw when operating normal conditions, other wifi modes consumes less power.

Also I connected the XBEE VCC(3.3V) and GND pins to the arduino's VCC(3.3V) and GND pins, and the module doesn't make any noise. By doing that I think the XBEE module maybe fine and probably is not a power issue because there is no buzzing when connected this way.

If anyone has more ideas or knows how to connect an XBEE module to the arduino without a shield I'm all ears.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've solved the problem  smiley-lol smiley-lol smiley-lol smiley-lol smiley-lol smiley-lol.

The main problem were the shields they are not 100% compatible with the XBEE WIFI module but there is a workarround so they can be fully compatible
The workarround varies between the arduino UNO and the Leonardo.

If you want to know why the shield doesn't work read this
One of the problems is the current peak that is produced when the XBEE WIFI module powers up. It is 750mA just for a tiny fraction of a second but this is enought to drain the shield's built-in capacitors. So you need a bigger capacitor, i choose 500uF but I think a smaller capacitor would do nice.

The second problem is how the serial-USB conversion works.
The Leonardo's  serial-USB converter is built-into the microcontroller while the UNO has a separate chip to do the serial-USB conversion.
The leonardo has another serial port called Serial1 which correponds with the digitals pin 0(RX) and 1(TX), this pins are where the XBEE module will send serial data.
The Shield's  switch(USB-MICRO) only bypass the Shield's serial signal into the serial-USB converter(switch in the USB position) or intro the arduino(switch in the MICRO position).
This way the shield relies on a separate serial-USB chip but the Leonardo doesn't have one.
To get the shield working, the leonardo needs to act as a proxy between the XBEE serial port(Serial1) and the arduino microcontroler's serial port(Serial).

If you only want the solution read below

For the UNO:
  • Solder a 500uF between the Shield's  XBEE VCC(3.3)[Pin 1] and GND[Pin 10] pins
  • Put the shield's switch in the USB position
  • use the X-CTU(digi app) to configure the XBEE

For the Leonardo the thing is a bit more complex.
  • Solder a 500uF between the Shield's XBEE VCC(3.3) and GND pins
  • Upload into the arduino this little sketch
Code:
#Redirects input from serial ports: Serial <-> Serial1
#
#define BAUD_RATE 9600
void setup() {
  Serial.begin(BAUD_RATE);
  Serial1.begin(BAUD_RATE);
  while(!Serial){ //required for the Leonardo
  ;
  }
}

void loop() {
  while(Serial.available()>0){
    Serial1.write(Serial.read());// input from Serial to Serial1
  }
  while(Serial1.available()>0){
    Serial.write(Serial1.read()); //input from Serial1 to Serial
  }
}
  • Put the shield's switch in the MICRO, yes you read it right MICRO, position
  • use the X-CTU(digi app) to configure the XBEE and let the magic happen  smiley-grin
Note: If you want to change the baud rate frist change the XBEE baud rate, then change the sketch baud rate and finaly change it in the X-CTU.
« Last Edit: February 05, 2013, 03:51:10 am by nismotz » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for posting this fix. I can confirm add the 100uF cap on the wireless SD shield got my xBee wifi working with an UNO. You just saved me hours of trouble shooting, thanks!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You're very welcome.  smiley
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just for reference, the Digi Manual recommends: 500uF for the cap. 

Here is a link to the information:
http://ftp1.digi.com/support/documentation/90002124_F.pdf

"Due to the fast nature of the current peaks, it is recommended that at least a 500uF
capacitor be placed on the VCC line.  This will enable the XBee to start up with an
acceptable voltage slump in the power supply."
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks a lot geekski for pointing out the recommended capacitance. I forgot to update the thread.

I only used the 100uF for testing purposes, later while rereading the Digi documentation I decided to stick to the recommendation made by Digi and go with the 500uF cap.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am trying to upgrade the firmware of Xbee series 2 modules using wireless sheild and arduino leonardo. I used the method posted above partially - put in the sketch so that leanordo acts as a postman to xbee module. The basic at commands worked fine (like +++ returned OK etc). But when i try to write the firmware using X-CTU, X-CTU fails.
I have followed links which say that a Reset needs to be pressed on the xbee module at varions points of Write( like at the start of write, after write has been initiated etc). But i find that that the action required screen never closes.

I suspect that the leonardo sketch needs to do little more to upgrade firmware that what is posted in the above suggestions.

Kindly check if this is so or do you see any other cause for this.

Thanks
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I too had a lot of problems when upgrading the XBee's firmware, but it wasn't the Arduino's fault, it was the X-CTU/XBee configuration what was causing problems.
Right now I don't have my Arduino with, I would try to recall the steps I've followed:

The first thing you need to do is make sure that your XBee and Leonardo both work at 9600 bauds. If you have set the baud rate to other value, probably the upgrading process would fail because when upgrading the firmware, the XBee's settings return to their default values(9600 bauds). In my case, even if I had marked the "No baud change" check-box on the "PC settings" tab.

To be sure it is better to reset  the XBee to defaults before attemping to upgrade the firmware

RESTORE TO DEFAULTS (first step)
To reset the module to defaults do the following:
  • Make sure that the X-CTU and the XBee can communicate by clicking on the "Test/Query" button. A dialog should pop-up indicating that the communication is successful, if not check your Arduino and XBee baud rate of configuration settings
  • Open the X-CTU, go to the last tab, named "Modem configuration"
  • Click on "Read" button, this should read your XBee's configuration and show you the actual values. If you succeded jump to the next step, if not MANUALLY select your X-Bee model from the "drop-down" list that is located under the "Modem:" label. My XBee is a XB24-WF. Be aware that you MUST select the correct model of your XBee.
  • Once the correct module is selected Click on the "Restore" button, that should write the default values your XBee. Check that the restoration process has been completed successfully by looking at the message at the botton left corner of the X-CTU Window.
  • Close the X-CTU and disconect your Arduino/XBee from the computer, this step is not required but I advise to do that to make sure the XBee load the default values the next time it powers-up.
  • Don't forget to configure the X-CTU with the default settings in the "PC communication" tab. If you don't know the default look in the modules documentation http://ftp1.digi.com/support/documentation/90002124_B.pdf

Note: There are better posts on how to reset the XBee module to defaults, if you have any problems just google "Reset Xbee to defaults"

UPGRADE FIRMWARE (second step)
Connect your Arduino/XBee to the computer. Make sure that the X-CTU and the XBee can communicate by clicking on the "Test/Query" button. A dialog should pop-up indicating that the communication is successful, if not check your Arduino and XBee configuration settings.
ONLY if they are communicating continue reading
  • Go to the "Modem Configuration" tab and click on the "Download new versions..." button, in the pop-up window click on "Web" and wait. Be patient it may take a while. When the download is complete click on "done".
  • Click on the "read" button, this should automatically identify your module's model.
  • In the drop-down list bellow the "Version" label, select the last firmware available. For the XB24-WF is 102D.
  • Mark the "Allways update firmware" checkbox and click on the "Write" button
  • Check that the firmware update was successful at the botton left corner of th X-CTU window

RESET PIN ON THE XBEE BOARD
There is a pin in the XBee module that reset the module's configuration, the process is a little bit tricky but it is very usefull when you can not recall the XBee's configuration values. To do that just follow the steps on the module's documentation http://ftp1.digi.com/support/documentation/90002124_B.pdf BUT BE VERY CAREFUL WHERE YOU CONNECT THE PIN TO BECAUSE YOU COULD FRY THE MODULE IF YOU CONECT IT TO A VOLTAGE SOURCE HIGHER THAN 3.3v

FORCED FIRMWARE UPGRADE (Use this as the last resource)

Sometimes after an attemp to upgrade the firmware the module will stop responding completely. To solve that you need to force a firmware upgrade. To do that just reset the module using the reset pin on the XBee, then using the default comunication values of the X-CTU just do the following:
  • Go to the "Modem Configuration" tab
  • In the drop-down list bellow the "Version" label, select the last firmware available. For the XB24-WF is 102D.
  • Mark the "Allways update firmware" checkbox.
  • Click on the "Write" button
  • Check that the firmware update was successful at the botton left corner of th X-CTU window.




Logged

Pages: [1]   Go Up
Jump to: