Moteino coin cell battery tests

I ran some quick tests on the Moteino using a CR1225 coin cell. These cells are tiny, just 12.5mm in diameter, yet they handle the Moteino running low power sketches, or rather, the Moteino can handle running on this tiny cell.The CR1225 I have is rated a decent 48mAh, will have an open voltage of ~3.3V.
I hooked the battery to the output voltage of the Moteino, which is the “3.3V” rail, behind the voltage regulator. This is OK, but normally you’d want to supply at least 3.3V from a lipo battery or 3xAAAs, otherwise bypassing the regulator will actually have a side effect on power consumption, but won’t hurt too much as we’ll see.

The first test I ran was to blink the onboard LED and take 10 ADC readings, then sleep for 1 second and repeat. This gives an average of 57uA. Let’s round that to 0.06mA. That means 48mAhrs/0.06mA=800hrs, or roughly 33.33 days. Pretty impressive.

The second test was to use transmit a message through the RFM12B radio (at max transmit power), once a second. The average is now a whopping 300uA (compared to the blinker). Even so, you get 48mAhrs/0.3mA=160hrs or 6.66days. That’s IF you transmit a reading every second.

Just for fun I increased the cycle from 1 second to 8 seconds. The average is now just 70uA. That’s 48mAh/0.07mA=685.7Hrs or 28.5days. Not too bad eh?

Theoretically, for the last test, if we were to replace the battery with a 2xAAA pack with 2000mAh rated cells, the figure goes up to about 3 years. I really don’t expect that long but who knows, I haven’t ran the Moteino for that long yet.

While these figures are theoretical, there are many factors that can influence battery life, especially in these small cells that cannot deliver more than a few milliamps at a low duty cycle. The more you draw the faster it will drain. Datasheets of coin cells actually show that the claimed mAh rating is tested at a very low current load (1-2mA max, depending on the cell). Then there’s the self drain of these batteries, temperature changes, voltage drop, etc., etc. And also, you will want such battery operated nodes to have the brown-out detector turned on to prevent the MCU from jumping around at random memory locations when voltage drops too low. Turns out the BOD uses quite a bit of power when turned on (something like 0.25mA). The BOD doesn’t seem to use so much power but it’s a good tradeoff for the protection it gives. Turning off the ADCs will yield much more significant power savings – you can do it with this code on ATMega328: ADCSRA &= ~(1 << ADEN).

Here’s the code I used for these tests:

#include <LowPower.h>
#include <RFM12B.h>

#define NODEID     5
#define GATEWAYID  1
#define GROUPID   77
#define LED        13
#define AVR_SLEEP_IDLE  1

void setup() {
  RFM12B.Initialize(NODEID, RF12_433MHZ, GROUPID);
  RFM12B.Sleep(RF12_SLEEP);
}

String str;
byte sendLen;
char sendBuf[RF12_MAXDATA];

void loop() {
  //"SENSOR READINGS"...
  for(byte i=0; i<10; i++) analogRead(0);

  //PREPARE TRANSMIT BUFFER
  str = String("NODE_");
  str += NODEID;
  str += " ****** TEST TEST TEST ***** ";
  str.toCharArray(sendBuf, RF12_MAXDATA);
  sendLen = str.length();

  //TRANSMIT DATA
  byte header = RF12_HDR_DST | GATEWAYID;
  RFM12B.Sleep(RF12_WAKEUP);
  while (!RFM12B.CanSend()) RFM12B.ReceiveComplete();
  RFM12B.SendStart(header, sendBuf, sendLen);
  RFM12B.SendWait(AVR_SLEEP_IDLE);
  RFM12B.Sleep(RF12_SLEEP);

  //BLINK & SLEEP
  Blink(LED, 3);
  LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
}

void Blink(byte PIN, int DELAY_MS)
{
  pinMode(PIN, OUTPUT);
  digitalWrite(PIN,HIGH);
  delay(DELAY_MS);
  digitalWrite(PIN,LOW);
}