XBee Sleeping Questions

As mentioned here (http://forum.arduino.cc/index.php?topic=222224.msg1613414), I plan on using XBees to have at least one, possibly more, remote Arduinos report their sensors' values to a central base station. In order to conserve power on the remote stations, I plan on putting the Arduinos and XBees to sleep, except when they need to send data. I would also like the setup to be as expandable as possible with minimal effort, meaning that the base station shouldn't need to know about the remote stations beforehand. It should maintain a dynamic list of remote stations that are on its network.

The two methods for doing this that I've come up with are:

A: The remote stations start up and sleep. The base station sends out a Node Discovery command perodically. Upon reception of this command, the remote stations wake up and send their expected response. The base station reads the Node Discovery response and update its list of known remote stations. After all responses are received and/or the discovery timeout period has passed, the base station loops through its list of stations and queries each one which then responds with its sensor readings. The base stores those readings for display on its LCD.

B: The remote stations start up, take their readings, and send them to the base station. If the remote station is new to the base, the base updates its list and the sensor readings for the remote station. The remote station then sleeps for a period of time, and then starts this process over.

I would rather go with idea A. I imagine that I'd run into contention issues with idea B if one or more stations attempt to send at the same time. I'm unsure as to the technical feasibility of A. Can I put the XBee to sleep in such a way that it will wake up when it receives data and then in turn wake up the Arduino?

Thanks, Greg

Option A sounds a bit problematic, in that I presume you want to "sleep" the XBee as well as the Arduino

And devices that are asleep are not normally functioning at all, i.e I doubt the XBee will be receiving at all if its asleep.

If you can keep the power on the XBee, option A would work, but I suspect you are battery powering the remote devices.

BTW. Why did you decide on the XBee, its definatly not the cheapest option. You may like to take a look at the JeeNode (I have no association with them) http://www.digitalsmarties.net/products/jeenode, as they are self contains Arduino + 433Mhz Fm transceiver, and AFIK there has been extensive work done to keep the power requirements as low as possible

Note. using a JeeNode still won't fix your wake from sleep problem

Option B would not be a problem, as you can deal with data collisions in your code. (I'm fairly sure the JeeNode stuff deals with collisions etc)

Checked your other thread, I see you have chosen S1 XBees (XBee 802.15.4), I do not have much experience with those but I have a fair amount with S2 (XBee ZB) and with those node discovery is not necessary. Also, the end devices can use a special address to send to the coordinator, which would be the base station, so no change to the base station would be necessary to add nodes. There are two sleep options for end devices, pin sleep and cyclic sleep. In the former, the microcontroller wakes the XBee by a signal; cyclic sleep is just for a fixed period of time. The XBee ZB modules also provide mesh networking. There is no need for the base station to poll the other nodes, they can just send data when they want.

Recommend going to the digi.com web site, getting the product manuals and giving them a good study.