Best techniques for occasional wake-up?

I'm getting into sensor development and am wondering what the best techniques are for designing a battery (or perhaps soloar) powered system that wakes up periodically, samples, and then stores or forwards via RF. For example if I wanted to build a system that is stuck in the ground and measures soil moisture every hour, sends the data via XBee, and then goes to sleep. How do I do this? I've seen discussion like this somewhere and how the main problem is that you can't keep track of time accurately. In a case like my example, I may not care about the time because the receiving system probably knows the time of day.

So what is the Arduino software/hardware design pattern for a very low-power sleep with periodic wakeup? Could I do something like attach an external very low-power timer circuit that pulses the Arduino to wakeup every hour? Or does the Arduino board already have such a capability? Thanks.

You could design a timer circuit to pulse an interrupt line. Another option is a battery backed RTC with alarm. These can run for years off of a coin cell battery. Look at something like the DS1305.

Thanks! That's one piece of the puzzle.

Now (I'm an Arduino newbie) how do you provide regulated battery power to an Arduino with negligible current drain for the regulator while the Arduino is sleeping?

In any situation involving Arduino and XBee, the Arduino is the low current device. Putting the Arduino to sleep, with the XBee awake will do little to prolong the life of the battery.

Be sure to put the XBee to sleep, too, and wake it up as required.

Can anyone tell me how to best power the Arduino by battery? E.g. is an external regulator (or diode?) required if 4 AA cells are used? If so, how does one prevent the regulator from draining appreciable current during sleep?

Never mind, I think I've found a good explanation of sleep modes, power consumption, and the like. And I now understand what can be done with the bare atmega chip.

Using only the internal watchdog, it is not that difficult to wake up every seven or eight seconds (hell, at 16MHz, that's "occasionally" anyone's standards!), take a look around and go back to sleep.

Can the internal watchdog be used over a span of hours? Say once per hour? Thanks.

No, seven or eight seconds each time.

I would use a RTC and have the interrupts trigger a wake-up.

If you are running your board at 3.3V I would use a Li-ion battery. For the boards I make I am about to offer a Li-ion charger (See

Since the Li-ion discharge curve is flat and 3.7V is a common voltage generating a 3.3V regulated output is very efficient. Using a simple charger like the MAX1555 works well.

(* jcl *)