My moteino project (
https://lowpowerlab.com/forum/index.php/topic,1832.msg13253.html#msg13253) is running off a 3V lithium coincell, internal oscillator, BOD=1.8V, no regulator, and uses the listenmode scheme.
When running off my lab supply with a 10Ohm shunt resistor (to mimic IR of the coin cell) all of this works fine, and current consumption within listenmode is a healthy 5uA or so. When running off the (brand new) coin cell however, the internal resistance kills things immediately upon the moteino waking from listenmode.
Something in the following code block is drawing more current than the cell (
https://www.digikey.ca/product-detail/en/panasonic-bsg/BR-2477A-VAN/P030-ND/273650)can handle:
Serial.println("Woke up!");
uint8_t from = 0;
long burstRemaining = 0;
if (radio.DATALEN > 0) {
Serial.println("Received a message in listen mode");
Serial.println((char*)radio.DATA);
Serial.flush();
from = radio.SENDERID;
burstRemaining = radio.LISTEN_BURST_REMAINING_MS;
}
// Radio goes back to standby, ready for normal operations
radio.listenModeEnd();
if (from) {
while (burstRemaining > 0) {
LowPower.powerDown(SLEEP_60MS, ADC_OFF, BOD_OFF);
burstRemaining -= 60;
}
LowPower.powerDown(SLEEP_30MS, ADC_OFF, BOD_OFF);
radio.send(from, "woke", 4);
}
I'm guessing the culprit is the "woke" transmission, so tomorrow I'm going to try commenting it out and see if the crash gets averted. I'm also going to capture the current consumption during wake with a scope to see what's happening. I'll post here when I have it.
I'm pretty sure I've read that coin cell users are using listenmode succesfully, so I'm curious as to how their implementation differs from the library example.