First, the background: I’m working on a home automation project that will use a “master” XBee module (probably connected to a PC) talking with a dozen of other XBee remote modules. These remote modules will be made each one of Arduino + XBee shield in order to be able to receive commands (push buttons) and control devices (relay actuator).
Now, the problem: I need to realize a way to communicate (on a bi directional way) the master and remotes but avoiding transmit collisions. I could use an approach based on server connecting to each remote, one at time, asking for something to transmit and, of course, sending any command for it as needed. This will solve the collision problem, since only the master will start the communication with the remotes, one at a time, but this also will insert a delay on the system because it will be necessary to wait to communicate with all remotes, in some specific order, before ask to the same remote again. Let’s suppose I just finished to ask the remote number 12 and start again to talk with remote number 1 and, at this exact time, an user push a button at remote 12 and so, it will take some time to talk to remote 12 again (the system will ask remote 1, 2, …, 11, 12). I’m not sure if this time will be short enough to avoid a unexpected delay sensation from the user perspective.
I hope the “case” was well explained!
Could you please send me your comments and suggestions about this problem?
Xbees have IO pins that can be set-up as analog ADC, Digital outputs or digital inputs. If you only need a push button this can be done directly to an XBee pin without a uController. The digital inputs can also be set-up for a transmission on pin change so a remote unit can stay quite until a user pushes a button, then it will transmit the IO pin states.
XBees do their own collision detection, Acknowledgments (ACKs) and retransmissions. There isn’t a real need to provide an external method of collision avoidance.
Xbees have IO pins that can be set-up as analog ADC, Digital outputs or digital inputs. If you only need a push button this can be done directly to an XBee pin without a uController. The digital inputs can also be set-up for a transmission on pin change so a remote unit can stay quite until a user pushes a button, then it will transmit the IO pin states.
XBees do their own collision detection, Acknowledgments (ACKs) and retransmissions. There isn’t a real need to provide an external method of collision avoidance.
First of all, thanks a lot for your response!
Now, the questions: if I understood, you’re saying that I don’t need to care about collisions since the XBees will handle any retransmission needs. So, I can send messages from master and/or remotes just like there is just a point to point network (I mean just one master talking - duplex, of course - with one remote) and the Xbees will take care of “dirty job”?
In this scenario, the master just need to to identify the remote (by address, I think) in order to decide what kind of operation need to be carried out. So, I just need to put the intelligence of automation at master side and the remotes will be simple actuators / sensors.
Now you do need to read up in detail about the different XBees. There are two different hardware versions and each has two run two different network protocols. I believe any would do want you need but do research them before making a decision.
There is a thread titled "Better XBee Documents’ in this forum with links to XBee info and Digi Int has the data sheets available for downloading. So get them and read carefully. Also, go through the Sparkfun forums to read peoples experiences and read the threads on the Digi user’s forum. Many question you will have from reading the data sheets are answered in those forums.
Now you do need to read up in detail about the different XBees. There are two different hardware versions and each has two run two different network protocols. I believe any would do want you need but do research them before making a decision.
There is a thread titled "Better XBee Documents’ in this forum with links to XBee info and Digi Int has the data sheets available for downloading. So get them and read carefully. Also, go through the Sparkfun forums to read peoples experiences and read the threads on the Digi user’s forum. Many question you will have from reading the data sheets are answered in those forums.