Wake up arduino through xbee

Hi!

I am doing a new project with arduino. In few words I want to have some stations formed by: arduino fio with xbee Pro S1 and some sensors. Arduino will read information from these sensors and send from one station to other (in line: one to one to one to one...) till the last station which upload information to internet.

Every station will be autonomous so I have to use some solar panels or something like that. In that way, I want to use sleep mode untill they have to send data.

I though that first station can get awake at a determined hour, read its sensors and get up the next station through xbee, send info and go to sleep again. The second station, read the info sended and its info, get up the third station and send information (from first and second stations) to the third one and so on.

Is it possible to wake up an arduino by xbee? I have read about differents sleep modes but I just see it can be get awake by an input. I don't know if xbee can do that if arduino is sleeping.

I will use xbee series 1. I don't know if it is important information.

The XBees are microcontrollers like the Arduino. You could have the XBee assert a pin HIGH, and have that pin connected to one of the external interrupt pins on the Arduino, to wake the Arduino up.

However, the XBee uses more power than the Arduino does, so, it seems to me like you are sleeping the wrong device.

But, in case I put to sleep xbee, I can't wake it up from other station, can I? What should I do to can contact from one to other one?

If there are just 3 or 4 stations, I can program all of them to wake up at 17:00 to 17:15 for example, and make all work. But if I have 70 stations... Awake window is so big. If I have no other choice or mine is hard to do, I can do this too.

You think is better put to sleep xbee because consume, what is the difference between arduino and xbee?

Do you have any example of xbee sleep? I just found about arduino sleep... Basic examples, not complete projects I mean. Just to understand it.

Do you have any example of xbee sleep?

I do not. Mine operate off of wall warts.

The Arduino, though, uses about 35 milliamps normally, and the XBee uses 45 just listening.

You could have the Arduino use the watchdog timer to wake up periodically, power up the XBee, if it's time. The problem with this approach, of course, if that all the Arduinos need to wake up their XBees during the same window, which means that each Arduino needs an RTC and the RTCs all need to be in sync.

PaulS:
You could have the Arduino use the watchdog timer to wake up periodically, power up the XBee, if it's time. The problem with this approach, of course, if that all the Arduinos need to wake up their XBees during the same window, which means that each Arduino needs an RTC and the RTCs all need to be in sync.

That's what I thought. Then I have to look for other ideas...

Thanks for your help.

Sorry, I don't speak english very well, what is a RTC?

The XBee can sleep for any amount of time up to 21.2 days. Connect pin 13 from the XBee to pin 2 on the Arduino and have the Arduino sleep until it gets a high on that pin. Tell the XBee to sleep as long as you want it to, and have it wake for whatever period you need it wake for. It will wake up the Arduino for you.

You can probably sync the waking times of the XBees via software on the Arduino, for example by not letting the XBee go back to sleep until its Arduino has received a go-to-sleep message from the coordinator. Have to coordinator only send the sleep command after it has been contacted by all of the end nodes. This way you can keep the awake window fairly small.

Another option is to have the Arduino wake the XBee via pin 9. Then you can use an external device like a Real Time Clock (RTC) to wake up the Arduino.

I like your idea so much. I have to check how to do that in my project.

I have looked for information about rtc. I found DS1307. I think I can use it to make sleep xbee and arduino and wake up both at same time, send information and go to sleep again. I think I can configure all stations in the same way, same window for all of them (instead make sleep when they send information) so they would be all awaked sending information from one to other one and 30 minutes later, go to sleep.

Using this idea, you said I have to set the same time to all stations from the coordinator. I have a problem with that. Just one station talks with coordinator. Each station talks with another similar station. In this way:

Station --> station --> station --> st... --> station which send info to internet. I just thought to send info about sensors reads, so I don't know if I can send info in one way saying time and after in the other way sending reads.

Well, I think I have many things for reading and checking. Thanks about the idea!

Other thing I can try is set up the stations and after, set the time. They will not need to talk with coordinator and all of them will have the correct time...