I thought it might be useful to have a thread on power saving techniques and libraries.
This article about making low power sketches seems like a good starting point -
http://jeelabs.org/2011/12/13/developing-a-low-power-sketch/Basically you save power by transmitting as little as possible and putting the radio and processor to sleep as often as you can.
There are JeeNodes running on a single lithium coin cell for months so it is possible to run a Moteino for a long time on battery power.
These two lines save a lot of power:
radio.Sleep();
LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
The first line puts the radio module to sleep and is part of the Moteino RFM12B and RFM69 libraries. When the radio module is in Receive mode it draws 12 - 16 mA, in Sleep mode it draws 0.1 - 0.3 uA - huge difference.
For the 2nd line you will need the lowpower library -
http://www.rocketscream.com/blog/2011/07/04/lightweight-low-power-arduino-library/This line puts the ATmega processor in Power Down mode for 8 seconds, turns off the Analog to Digital Converter (ADC) and Brown Out Detector (BOD). Basically this shuts down most parts of the processor except the low power watchdog timer which wakes the process up after the given time interval. The maximum the watchdog timer can be set to is 8 seconds. If you need to sleep longer just put this function call in a loop.
For an example, see the Sump Pump Alert sketch -
https://github.com/LowPowerLab/SumpPumpAlert/blob/master/SumpPumpAlert.inoI've been using the above 2 lines for a while but only recently began avoiding the use of the
delay command to save power. If the program needs to wait, it makes sense to power down instead of idling. For example, to blink the Moteino LED (turn the LED on for 60 miliseconds then turn it off):
pinMode(LEDPIN, OUTPUT);
digitalWrite(LEDPIN,HIGH);
LowPower.powerDown(SLEEP_60MS, ADC_CONTROL_OFF, BOD_OFF);
digitalWrite(LEDPIN,LOW);
There are other low power arduino libraries you may want to use. Narcoleptic has some nice features, including sleeping for much longer times and correction for millis() -
https://code.google.com/p/narcoleptic/source/browse/user+guide.txtJee Lab has a function similar to Narcoleptic called Sleepy that is in the ports library -
https://github.com/jcw/jeelib/blob/master/Ports.h#L331-L362The low power sketch pages shows how it's used -
http://jeelabs.org/2011/12/13/developing-a-low-power-sketch/Hopefully this is a good start.