Go Down

Topic: Configuring XBee ZB S2 modules? (Read 6997 times) previous topic - next topic

tt_tony

Ok, i have both modules with firmware installed and programmed. now i am checking to see how this shield is wired. 

so according to the tutorial, the xbee manual:

3.3v positive -> pin 1 on Xbee
ground -> pin 10 on xbee
TX1 pin on shield/arduino -> pin 3 DIN on xbee
RX0 on arduino/shield to pin 2 on xbee

ignoring the rest of the pins on the xbee for now, this should allow for wireless serial comm, right?

Or do i have to tell the arduino (via the sketch) to look at these pins for data?

PaulS

Quote
ignoring the rest of the pins on the xbee for now, this should allow for wireless serial comm, right?

Yes.

The rest of the pins are similar to the analog and digital pins on the Arduino. Sensors can be directly connected to the other pins, and, if the XBee is configured to read them, the pin states/values will be transmitted, too.

tt_tony

Wow, I wasnt aware of that ability to directly send data from other inputs, although i see it on the pinout now.  I see there are 12 I/O's on the xbee, that is pretty cool.  But you could potentially send even more signals than that by using the I/O's on the arduino too right?  man that is sweet.  so much potential, just have to come up with a project that uses all of it's capability.

one last question.  :) 

I don't expect anyone to be familiar with this shield in particular, and I can't find a schematic for it, but is there supposed to be any resistors or diodes between the arduino tx, rx pins and the xbee? 

Because there is actually NO connection from xbee pin 3 to arduino pin 1.  xbee pin 3 is connected to ground by what looks like a resistor with a "103" written on it.  Anyway, as of now i'm planning on soldering in a jumper and breaking that other connection unless someone can tell me why i shouldnt. 

By "break the connection" i plan on scratching out the printed circuit in a place that is easily repairable, just in case it causes problems.

maybe one more question.

is there some reference that will help me identify these tiny components on the shield and arduino?

Jack Christensen


ok thanks.  I was able to do all that.  I was confused because I thought when you select the modem type you had to put in the model that you have.  I guess you can pick whatever you want.  anyway, I think I have to go through the "unbrick" process because when I finished the second programming and "wrote" when it reset I lost ability to communicate with it.  suck.  Am I right about unbricking it?  i havent tried again today but last night i tried everything i knew.  unplugged, tried different baud rates, actually that's all i know to try.  :)

thanks for the help, this is great stuff


Not sure about picking whatever you want. In X-CTU, the S2 modules are called XB24-ZB. XB24 is the first part of the model number. ZB for ZigBee. I've been lucky enough not to have to unbrick any, so cannot comment there, sorry.  I think 9600 should be the default baud rate though.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

tt_tony

Thanks, i was able to get that problem straightened out a couple hours ago.  It seems i have at least one more obstacle to get past concerning the shield I bought.  I mentioned it in an earlier post if you have any insight.

thanks

Jack Christensen

Can you post a link to the shield? XBee inputs are not 5V tolerant, so the shield may (should) have some level-shifting circuitry to allow operation with 5V MCUs. I might not go re-designing the shield's circuitry before understanding it first.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

tt_tony

#21
Jan 17, 2012, 11:11 pm Last Edit: Jan 18, 2012, 03:28 am by tt_tony Reason: 1
Here is the link to the shield but there is not much info.  I already emailed them for schematics, they said they dont have one, they just build it.  that's not encouraging.
http://www.geeetech.com/arduino-mega-io-expansionxbeeshield-v5-p-230.html

Actually, I traced every circuit coming from pin one to see if it ever made it to xbee pin 3 and I also traced the circuit from the xbee, there is only that connection to ground through a resistor(?).  i could post pics of it...

Jack Christensen

#22
Jan 18, 2012, 01:28 am Last Edit: Jan 18, 2012, 01:31 am by Jack Christensen Reason: 1
Yeah, not a good sign. Not even sure I see a place for the XBee. Does it have a 3.3V supply for the XBee, or does that come from the Mega? FWIW, below is the typical circuit I use to connect an XBee to a 5V MCU. Actually all that is needed is to level-shift the TXD line from the MCU to the DIN pin on the XBee, which is done simply with a diode and a resistor. The DOUT signal from the XBee is compatible with the MCU's 5V logic levels. JP3 is just a 3-pin header with a shorting block that I can move so that the XBee doesn't interfere with FTDI programming.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

tt_tony

here are some better pics if the link works it's pretty long:

http://www.ebay.com/itm/Arduino-Mega-Compatible-V5-IO-Expansion-Xbee-Shield-/270693823724?_trksid=p5197.m7&_trkparms=algo%3DLVI%26itu%3DUCI%26otn%3D5%26po%3DLVI%26ps%3D63%26clkid%3D5686584173766159707

if it doesnt just do a search for this on ebay:

Arduino-Mega-Compatible-V5-IO-Expansion-Xbee-Shield

i'm not sure where the 3.3v is coming from, the shield or the arduino, but it is there.   

Anyway, thanks for the help, from that schematic and the tutorial i will just try it without the shield.  Why do they not use the resistor/diode setup in the tutorial?  because the arduino is in reset?

Jack Christensen

That is a better pic, thanks. Looks like maybe a regulator on board directly under the XBee. Also LEDs for Assoc and (I assume) RSSI. Didn't watch the whole tutorial, I don't use that method, and I believe he may be subjecting the XBee to 5V logic levels. Digi says that XBees are not 5V tolerant.

Reset just has the effect of halting the MCU, basically the tutorial is just using the USB-to-serial conversion chip on the Arduino to talk to the XBee, and is powering the XBee from the Arduino's rather modest 3.3V supply (barely sufficient for a low-power XBee, but not for a Pro model).

I prefer a more direct approach. I use these adapters, which have a 3.3V regulator to power the XBee and proper level-shifting circuitry. They can be plugged directly into a breadboard. To configure the XBee, I pull the adapter and XBee from the breadboard and plug the adapter directly into one of these FTDI interface boards, to communicate directly to X-CTU. Much more straightforward if I need to make XBee configuration changes.

HTH.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

tt_tony

so these two products together are similar to an explorer except you can plug the adapter into a bb? 

i was encouraged to see that the router now has an MY - 16 bit network address after messing around with it last night. 

i like the shield b/c i want to use the xbee AND i want to run a lot of servos, both of which it was (supposedly) built for.  so i want to try to get it to work.  i guess that is going to mean setting it up according to your schematic. 

once the xbees are communicating as they should be, i should be able to connect to the arduino the same as before, using the serial com port, whichever the explorer is connected to right?  no changes need to be made to sketch? 


Jack Christensen


so these two products together are similar to an explorer except you can plug the adapter into a bb? 


Correct.

Quote

i like the shield b/c i want to use the xbee AND i want to run a lot of servos, both of which it was (supposedly) built for.  so i want to try to get it to work.  i guess that is going to mean setting it up according to your schematic. 


Not at all, I wouldn't rule out the shield. But for configuring XBees, I'd prefer to not have cobbled-up Arduinos and shields as middle-men. Put the XBee into the adapter, configure it with X-CTU, then disconnect it and pop it into the shield. Just seems like a cleaner approach.

Quote

once the xbees are communicating as they should be, i should be able to connect to the arduino the same as before, using the serial com port, whichever the explorer is connected to right?  no changes need to be made to sketch? 


Yes.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

tt_tony

ok, i omitted the shield and rigged up the mcu to the xbee according to the tutorial and I am now at least able to connect to it through the mcu. the only reason i wanted to do this is so that i could do the range test and make sure they will communicate at that level at least.  the range test doesnt work. 

so once i have the correct information written to the xbee (serial #'s, baud rate, scan channels, etc.) i should be able to do a range test and confirm wireless comm right? 

Is there a simple way to test wireless comm once they have been configured and installed? 

Quote
Put the XBee into the adapter, configure it with X-CTU, then disconnect it and pop it into the shield. Just seems like a cleaner approach.


so, similarly, I just write it and drop it onto the shield (as long as the shield works)?

FYI the "MY - 16 bit network address" on the router has a number but not the coordinator

tt_tony

#28
Jan 21, 2012, 05:22 am Last Edit: Jan 21, 2012, 05:53 am by tt_tony Reason: 1
ok, i got the range test to work!  that's encouraging....

awesome.  it's working as it should now. 

thanks for the help.  i think the range test always wouldve worked, i just wasnt using it right.  I had a few things mixed up. 

anyway, there is still nothing hooked up to the DIN pin 3 on the xbee but i guess it doesnt need it for this.  eventually im sure I'll need two way comm for something, like telemetry data on the mcu.

thanks again for all the help.  i learned a lot!

Jack Christensen

Good deal, sounds like you're on the right track. I actually haven't played with the range test all that much! The 16-bit network address (MY) will always be zero for the coordinator, and will have the value 0xFFFE if the device hasn't joined a network. There must be something hooked to DIN, that's the serial input to the XBee.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Go Up