void loop ()
{
..........
//sleep MCU for 8seconds
LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
//after awake turn on flash and radio
radio.initialize(FREQUENCY,NODEID,NETWORKID);
radio.encrypt(ENCRYPTKEY);
radio.sendWithRetry(GATEWAYID, buff, buffLen)[/color]
//turn radio off again?
}
...any data which needs to persist would either need to be stored in EEPROM or in the TPL5110's 256bytes of RAM which is retained with the scant 38-39nA of my circuit.I suspect you're confusing the TPL5110 (which has no RAM and no interface to access it if if did) with the AM18x5 RTC chip which does have 256bytes of RAM and it has about the same power consumption, but necessarily more complex interface and software to control it.
That is correct, the TPL5110 cuts all power to the microcontroller so any data which needs to persist would either need to be stored in EEPROM or in the TPL5110's 256bytes of RAM which is retained with the scant 38-39nA of my circuit. One of several advantages of the lithium batteries that I am using is they have a higher voltage than do rechargables and alkalines. Virtually all of their power is available between 1.7V and 1.4V which means you can skip any LDO and BOD since you are guaranteed to have safe voltages until they die totally. Two AA or AAA lithiums seem to be tailor made to run a Moteino. They also have such a low self discharge rate that they should last 20 years as long as your circuit doesn't consume too much. Moteninos with the RFM69W are happy to run down to 1.8V. The RFM69HW's have a switch which needs 2.4V but either way, two L91s or L92s will satisfy the voltage needed until end of life.
Regarding the boot sequence, I am going to start fooling with using a 328p with no bootloader so that delay is eliminated and I also plan to mess with the fuse settings to try to get the chip up as quickly as possible. I don't have an oscilloscope so I cannot measure the duration/current during this period. I should also note that I've adjusted my program so that the processor asks for a no hold temperature reading and then sleeps for 15ms and then wakes, reads the result, asks for a no hold humidity reading and sleeps another 15ms. This increased my projected battery life to 900 years. Now the processor is only awake for 300 microseconds + the radio transmission which is very brief being 3 bytes of data at 300kHz.
Thanks Tom, I've been spending too much time in datasheets lately it seems!I here ya! Easy to get lost when you're looking dozens of different devices. You know that ONE of them has this key feature, but which one was it??? :)
I have not measured that b/c I don't have an oscilloscope. I've searched rather extensively online and cannot turn up this missing information either.
I agree. The crossover point for 328P & RFM69 is around a 30 minute duty cycle and, in either case, the currents are so insanely low that you're more likely to have some other failure rather than battery discharge.QuoteI have not measured that b/c I don't have an oscilloscope. I've searched rather extensively online and cannot turn up this missing information either.
I measured this once:
https://lowpowerlab.com/forum/low-power-techniques/a-new-sleep-mode-using-225-na/msg11200/#msg11200
Took about 20ms for full radio initialization. When you sleep the radio instead it can be very quick (see post). I think overall whitehare is correct that 250nA in sleep for radio and 328p are hard to beat for most cases. Just use the tpl to wake the 328p instead of as load switch.