Pages: [1]   Go Down
Author Topic: Starting a talk between two arduinos using xbee.  (Read 567 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi friends,
I have two arduino boards (one arduino Uno and another one is a 100% compatible clone which has some switch and light peripherals.) And recently, I bought two Xbee series two radios (digi branded). Now, I dont have any xbee explorer or xbee breakout boards, I am just connecting relimate connectors to take the four pins from the xbees.
This is my setup:
One xbee connected to arduino Uno (2nd pin for tx and 4th pin for rx using the SoftwareSerial library)  - the four pins of xbee are connected as power to 3v3 of arduino, GND to GND of arduino and tx and rx to respective pins (2nd and 4th pin).
Another xbee is connected to the clone (here I used the default tx and rx pins - 0 and 1).
Now, what I need to start a talk between the two boards wirelessly?
I tried many example programs over the Internet. But nothing is of use.
All I want to do is that, When I press a button on the clone, some character must be transmitted and displayed on the serial monitor (The arduino Uno is connected to the computer with the default tx and rx pins (this is the reason i used duplicate tx and rx for the radio on the UNO). I have been trying this for 4 days....

Please Help..... smiley-small
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27357
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

First, add some resistor dividers so the 5V output TX pin from the Arduino does not damage the 3.3V Rx input pin on the Xbee.

"Series two" - how much power do they need? I think the 3.3v regulator on the arduino is only good for 150mA, and "series two" might need more than that.

I searched the www.digi.com website and did not see Series two there, so not quite sure what you're referring to.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

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

Quote
And recently, I bought two Xbee series two radios (digi branded).
How did you configure them? Digi claims that no configuration is required. That's bulls**t.

Quote
Now, what I need to start a talk between the two boards wirelessly?
Serial.print() on the one connected to the hardware serial port, and mySerial.print() (or whatever instance name you use for the software serial instance) on the other to send, and the corresponding available() and read() methods to read the data.
Logged

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

@PaulS and CrossRoads: Thanks for your valuable replies. smiley
@CrossRoads : I am referring to this module to be in particular - xb24-z7wit-004
@PaulS: I didnt configure them coz, i just bought only the bare modules (I mean no breakouts or pc to xbee interfacing boards)
           and tried that Serial.print and myserial.print etc commands.. but of no use.
Could anyone of you post the sample code to test the communication and the wiring setup b/w the arduinos and xbees? That would be of great help and starting for me!

TIA.
Logged

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

Quote
I didnt configure them coz, i just bought only the bare modules (I mean no breakouts or pc to xbee interfacing boards)
It isn't the breakout board that needs to be configured.

Your XBees will not talk to each other until you configure them properly.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27357
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Do the parts say XBee Pro or XBee Pro S2B on them?

http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/zigbee-mesh-module/xbee-zb-module#overview

Those need 205 & 220 mA to transmit. More than the Uno regulator can provide.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

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

Hi PaulS,
Do I need a xbee explorer to configure the xbees or we can still configure it by codding to the arduino?

and CrossRoads,
I didnt buy the pro type... bought the ordinary one.. these are the things written on the xbee:
digi international
Xbee
S2
Its the first one which states, the transmit and receive currents are 35/45mA and 38/40mA respectively.
Is there any coding to initialize the xbee using only the microcontroller? coz, I dont have a serial to usb adapter to make xbee directly talk to my laptop computer via X-CTU.
Logged

Pages: [1]   Go Up
Jump to: