Society of Robots - Robot Forum

Software => Software => Topic started by: saghi on April 13, 2012, 09:31:13 AM

Title: xbee and send / recive
Post by: saghi on April 13, 2012, 09:31:13 AM
hello
i need to have two way communication with my robot , so i need two xbee module .
my question is :
does xbee  two way communication , if yes , which model can ?
if not how can i send and receive (rx - tx) with my robot ?

im using a Portable PC <> xbee <>............(AIR)...........<>xbee <> microcontroller
thank you
Title: Re: xbee and send / recive
Post by: joe61 on April 13, 2012, 10:14:10 AM
You might want to familiarize yourself with the protocol: http://www.digi.com/technology/rf-articles/wireless-zigbee (http://www.digi.com/technology/rf-articles/wireless-zigbee)

Also, google "zigbee" and you can find lots of other information about it. It's a big topic.

Joe
Title: Re: xbee and send / recive
Post by: KurtEck on April 14, 2012, 07:45:27 AM
It is difficult to give any specific information here as there are no details, like what type of Micro-controller you are using or the like.

But for bi-directional communications you have a couple of different options:

1) XBee - like you mentioned.  I use this to control my robots.  There are tutorials on how to do this up on the web.  If I am not mistaken there may be one on this site.  Likewise there is one up on Trossen and I am pretty sure there is one up on sparkfun as well.

It is easy to start to experiment.  Probably the easiest is to buy a simple starter kit like: http://www.trossenrobotics.com/p/Xbee-Communication-Starter-Kit.aspx (http://www.trossenrobotics.com/p/Xbee-Communication-Starter-Kit.aspx)

Note: these are probably Sparkfun XBee holders.  On many robots they work fine, but I have had issues with the "XBee Explorer Regulated" on some 5V systems and have had better luck with the one from Parallax, such as: http://www.parallax.com/Store/Accessories/CommunicationRF/tabid/161/CategoryID/36/List/0/SortField/0/catpageindex/2/Level/a/ProductID/691/Default.aspx (http://www.parallax.com/Store/Accessories/CommunicationRF/tabid/161/CategoryID/36/List/0/SortField/0/catpageindex/2/Level/a/ProductID/691/Default.aspx) as it has a true 3.3 to 5V signal converter in both directions.

But which ever way you start, you can start simply.  That is once you have the two XBees paired (The DL of one equal to the MY of the other....).  Then on your PC, you can simply send text to the created serial port and it will arrive at the other side and likwise on the robot.  Later if you decide you need to, you can get more advanced in get into what is called packet mode, but my advice is start simple.  Also look for whatever libraries that may be available on your controller...

2) BlueTooth - Your portable may already have this and then you can use something like: http://www.sparkfun.com/products/10268 (http://www.sparkfun.com/products/10268) to connect to your Micro-controller.

3) Wifi - There are several boards/shields out there.  But they are a lot more expensive and lots more work.  But you get a lot more throughput as well as flexibility.

Good Luck.
Kurt
Title: Re: xbee and send / recive
Post by: Gertlex on April 14, 2012, 08:05:52 AM
Yes, Xbees will do what you want.  I think all of the models can do such.  The most straight-forward option is the Series 1 xbees (http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/xbee/List/0/SortField/4/ProductID/639/Default.aspx).  Xbees also come in a Pro flavor, which has a greater transmitting strength (and of course draws more power), but you're unlikely to need this.  I've also used the Series 2 xbee (http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/xbee/List/0/SortField/4/ProductID/679/Default.aspx)s (now called ZB series), which use Zigbee, giving them other features (mesh networks), but they can function just like Series 1, which is what I do with them.

You'll also need to plug these into something, ideally.  You can make your own, but you probably have better uses of your time.  I recommend this board (http://www.trossenrobotics.com/p/uartsbee) for connecting to computer via USB because it has a reset button which is useful for debugging.  At the other end, I've not had problems with either of the boards that I connect to my robot; this one (http://www.trossenrobotics.com/store/p/5977-XBee-Explorer-Regulated.aspx) is the smaller and cheaper.

I'm saying a lot of the same things as Kurt :)... A decent tutorial that I know of can be found here (http://forums.trossenrobotics.com/tutorials/how-to-diy-128/xbee-basics-3259/).  They're pretty foolproof though; I learned to use mine along with the X-Ctu program partly by trial and error.

Side note, KurtEck noted bluetooth... I've found personally and from others' experience that if you're using Windows, bluetooth serial is one-way, not two-way (you choose which).  Supposedly there's a way around this
Title: Re: xbee and send / recive
Post by: Admin on April 20, 2012, 01:44:51 AM
Another option would be my Axon Mote:
http://www.societyofrobots.com/axon_mote/ (http://www.societyofrobots.com/axon_mote/)

It's a microcontroller with a built in Zigbee transmitter and USB adapter.