Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: bilals on March 06, 2010, 10:02:07 AM

Title: Problem with the Xbee. Please help.
Post by: bilals on March 06, 2010, 10:02:07 AM
I received Axon II and Xbee starter kit a couple of hours ago. They are now connected along with 2 servos. I wrote a small program and then Flashed the Axon. I then used hyperterminal to control the servos.

When controlling the servos through a cable it works fine where i can send commands and receive back data using rprintf (UART1).

When i use a modified program where i set the rprintf to UART0 (Xbee), i can send commands however data is not sent back to hyperterminal. When pressing 1 for example servo one rotates and the data that should be sent back is "1 Pressed". I looked at the Xbee Explorer Regulated (connected to Axon) , Din and Dout seem to be working as they both light (red and green) when i press 1. The other Xbee connected to the PC through USB cable, Only Tx lights indicating that it is sending. Rx is always off.

I used this tutorial to set up the Xbees:
http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=122#Step1 (http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=122#Step1)

I really appreciate your help.
Title: Re: Problem with the Xbee. Please help.
Post by: madsci1016 on March 06, 2010, 10:14:27 AM
What model / series Xbee's do you have?
Title: Re: Problem with the Xbee. Please help.
Post by: bilals on March 06, 2010, 10:18:26 AM
What model / series Xbee's do you have?

When using XCTU : This is what is shown
XB24

Here is the link where i bought my Xbee Starter Kit:
http://www.trossenrobotics.com/p/Xbee-Communication-Starter-Kit.aspx (http://www.trossenrobotics.com/p/Xbee-Communication-Starter-Kit.aspx)
Title: Re: Problem with the Xbee. Please help.
Post by: RKM83 on March 06, 2010, 10:23:03 AM
I don't think any one has had success with XBee Explorer Regulated (starter kit) and Axon2-

http://www.societyofrobots.com/robotforum/index.php?topic=9790.0 (http://www.societyofrobots.com/robotforum/index.php?topic=9790.0)
Title: Re: Problem with the Xbee. Please help.
Post by: waltr on March 06, 2010, 10:23:55 AM
What model / series Xbee's do you have?

That is an important piece of information as there are several flavors of the XBees. However, must likely they are the Series 1 modules running the 802.15.4 protocol, Firmware v1xEx. Do download the Digi documents on the modules you have.

As to returning data to the PC. Check the DL & DH parameters on the remote unit. They need to match the SL & SH parameters of the unit on the PC.
Title: Re: Problem with the Xbee. Please help.
Post by: bilals on March 06, 2010, 10:41:59 AM
As to returning data to the PC. Check the DL & DH parameters on the remote unit. They need to match the SL & SH parameters of the unit on the PC.

The SL & SH were 405C40A0 & 13A200 for the PC unit. For the remote unit , the DL & DH were 0 & 0 but i changed them to 405C40A0 & 13A200 but still didnt work.
Shall i set the DL & DH for the PC unit to be equal to the SL and SH of the remote unit, also.

What are the digi documents?
Title: Re: Problem with the Xbee. Please help.
Post by: madsci1016 on March 06, 2010, 11:06:25 AM
I don't think any one has had success with XBee Explorer Regulated (starter kit) and Axon2-

I use a Sparkfun Xbee Explorer Regulated and Axon1 with no problems at all. Is the starter kit one different?
Title: Re: Problem with the Xbee. Please help.
Post by: bilals on March 06, 2010, 11:09:55 AM
I use a Sparkfun Xbee Explorer Regulated and Axon1 with no problems at all. Is the starter kit one different?

No, its the same (correct me guys if i am wrong). The only thing different her is that i use Axon II. Can you please tell me how did you set up your Xbee's (PC and microcontroller side). Did you use the XCTU software ?
Title: Re: Problem with the Xbee. Please help.
Post by: KurtEck on March 06, 2010, 11:23:03 AM
As I mentioned in a few other threads I had problems with the sparkfun regulated explorer with my Axon2, which is why I went to the Selmaware one and have had no problems.

It was only a couple of days ago and I remember that you could update the sparkfun one to work if you could solder SMD devices...

Kurt
Title: Re: Problem with the Xbee. Please help.
Post by: bilals on March 06, 2010, 11:25:44 AM

It was only a couple of days ago and I remember that you could update the sparkfun one to work if you could solder SMD devices...

Kurt

Everything seems to work fine except the receiving process in the Xbee on the PC side. (Connected using Xbee USB Explorer).
Title: Re: Problem with the Xbee. Please help.
Post by: madsci1016 on March 06, 2010, 12:01:40 PM


No, its the same (correct me guys if i am wrong). The only thing different her is that i use Axon II. Can you please tell me how did you set up your Xbee's (PC and microcontroller side). Did you use the XCTU software ?

I did use XCTU, however i used series 2.0 and 2.5 Xbee's which are configured differently then 1.0, which is what you have (i think).

Like someone else said, you have to make sure the addresses are correct. In both radios, Your destination address should be the address of your other Xbee. It seems like you didn't configure the radio on your robot to send to the address of the Xbee connected to your computer. Try swaping radios and have your AXON print something out continuously, I bet you will see it on your computer, but not be able to control the robot.
Title: Re: Problem with the Xbee. Please help.
Post by: madsci1016 on March 06, 2010, 12:03:11 PM
As I mentioned in a few other threads I had problems with the sparkfun regulated explorer with my Axon2, which is why I went to the Selmaware one and have had no problems.

It was only a couple of days ago and I remember that you could update the sparkfun one to work if you could solder SMD devices...

Kurt

Do you have a link to this? I'm still don't know why I would have NO problems with the Sparkfun regulator in stock condition, but other people have had problems.
Title: Re: Problem with the Xbee. Please help.
Post by: bilals on March 06, 2010, 12:14:18 PM
I did configure the addresses, maybe i did it wrong.

Try swaping radios and have your AXON print something out continuously, I bet you will see it on your computer, but not be able to control the robot.

I swapped them, surprisingly still exactly the same problem, although the xbees have different settings.
Title: Re: Problem with the Xbee. Please help.
Post by: madsci1016 on March 06, 2010, 12:21:29 PM
Well, swamping them and same result rules out configuration issues, so it must be electrical. check your wires, try new wires, etc. Any chance you have an oscilloscope?
Title: Re: Problem with the Xbee. Please help.
Post by: bilals on March 06, 2010, 12:30:24 PM
Well, swamping them and same result rules out configuration issues, so it must be electrical. check your wires, try new wires, etc. Any chance you have an oscilloscope?

The Xbee , the one not receiving data is connected through the USB cable to the PC. Nothing i can check in here.
Do you mean check the wiring on the 2nd Xbee (Connected to MCU). Im not sure if the the problem is there as it seems to be receiving and transmitting data.

We have at the university, how can it help ?
Title: Re: Problem with the Xbee. Please help.
Post by: madsci1016 on March 06, 2010, 12:42:52 PM
Just because the TX led on the regulator blinks, doesn't mean it's getting a clear data signal. The o-scope would tell you if the waveform was getting interference from something.

Edit here: nevermind, i'm crazy


Try this, (and it's random, i know). Add a 1k resistor in series of the Axon's TX line on that Uart, in-between the Axon and the Xbee board.
Title: Re: Problem with the Xbee. Please help.
Post by: bilals on March 06, 2010, 12:47:40 PM

Try this, (and it's random, i know). Add a 1k resistor in series of the Axon's TX line on that Uart, in-between the Axon and the Xbee board.

I'll try this tomorrow in the university. Thanks, hope it works.
Title: Re: Problem with the Xbee. Please help.
Post by: waltr on March 06, 2010, 01:02:56 PM
There has been issues with the Sparkfun regulated explorer board and the Axon processor on the XBee Din line.
From previous discussions (search for the thread in the electronics or software forums) the problem seems to be that the Axon can't pull the XBee's DIN  low enough due to the series protection diode.

This is complicated due to there isn't any good way to tell if the XBee received the Axon's data. One could probe the XBee DIN pin (not the explored bd DIN connection) and see if the signal is within the XBee spec.

It may be necessary to modify the Explorer board. There are several methods available to level shift a 5V signal to a 3.3V signal.
The first is a simple voltage divider. The others use diodes, transistors or FETs. A good document on doing level shifting is from Microchip:

  "3V Tips 'n Tricks" can be found on this page:
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en536113 (http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en536113)
It's near the bottom.

The Digi documents are on their web site.