Pages: [1]   Go Down
Author Topic: XBEE Communication  (Read 1335 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 31
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is it possible to use a XBEE to have two arduinos communicate wirelessly? If so which XBEE would be the best to use?
Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's like saying 'what car should I buy?'.

Yes it is possible and the XBee modules are probably the most popular way to make an arduino system wireless.

What do you want to do with them?
What range?
Do you need a network or just point to point?

Then I might be able to give you an idea of what module to buy.
Logged

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

I just want point to point.
I want it so when I press a button on one arduino the other arduino gets notified to do something.
The range wouldn' t need to be that far but probably around a mile.
Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just want point to point.
I want it so when I press a button on one arduino the other arduino gets notified to do something.
The range wouldn' t need to be that far but probably around a mile.
Ok, point to point is easy.

A mile is quite a long way - go with the XBee Pro ZB modules - probably with RP-SMA antennas to get maximum range.
With the Pro modules however, the sparkfun breakout boards for example are not really up to the job of controlling them.
Take a look at the adafruit XBee Breakout boards. They should be better but you might want to beef up the 3.3v regulator.

They're easy enough to use and configure with X-CTU, adafruit again has info on this but we/I can help later on with more info.
Logged

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

I'm looking at the XBee Module 802.15.4 protocol - XB24-AWI-001 from adafruit.com. Would I also want to get the XBee Adapter Kit from adafruit also and get one for both arduino's. Thanks
Logged

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

Quote
They're easy enough to use and configure with X-CTU,
Whats X-CTU?
Logged

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

Whats X-CTU?
It's the xbee configuration / control program from digi. It looks handy but I haven't used it because I'm running linux. You can do all the same things through a serial console, it's just a bit more awkward. The thing it took me a while to work out is when you send the '+++' sequence to switch the xbee into AT command mode, you have to turn off line ending characters in your terminal, then turn them on again for sending the AT commands. See the xbee module manual for details of what the commands do.
Logged

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

How would I configure the XBee without the X-CTU since Im running mac?
Logged

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

How would I configure the XBee without the X-CTU since Im running mac?
The first thing is to get some kind of serial connection to the xbee from your computer. One way of doing this is to remove the AT-MEGA chip from your arduino board and use it as a USB-to-serial device to talk to the xbee (in this case you would connect the xbee to pins 0 and 1 on the arduino board.) There are several pages on the web saying how to do this.

The way I did it was to modify the xbee library to use NewSoftSerial instead of the standard hardware serial to talk to the xbee. This lets you talk to the xbee on a different pair of pins at the same time as using the arduino's usb port. You can have my code if you like but it's still beng tested so I can't guarantee its reliability.

Once you have a serial connection,it's fairly easy:
- open the arduino's serial console or a similar console program.
- set up the serial line to the xbee to use the same baud rate as the xbee (9600 by default)
- start by turning off line endings, then type '+++' (and press enter)
- wait for 'OK' to come back.
- within 10 seconds, turn on line endings, and start typing AT commands. e.g. ATSH and ATSL to get the module's serial number. See the xbee manual for details of the commands.
- when you've finished the config, use the commands ATWR and ATFR to write the new config to non-volatile memory and reboot the xbee.
Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm looking at the XBee Module 802.15.4 protocol - XB24-AWI-001 from adafruit.com. Would I also want to get the XBee Adapter Kit from adafruit also and get one for both arduino's. Thanks
The XBee Pro ZB modules are roughly the same price as the old XBee Series one modules and have a much longer range.

That module you are looking at will do roughly 100m LOS so if you might want to do a mile, those modules will not be suitable. The XBee Pro ZB modules will do up to 2 miles LOS.
Logged

Pages: [1]   Go Up
Jump to: