Currently I am using the 2nd solution, wake-up occurs via interrupt (Int 1) see below:
(Processor CPU 4MHz, BOD 1.8V, all unused Digital IO set as INPUT_PULLUP and unused Analog pins as INPUT connected to ground), and LED disconnected.
I have read all possible topic about low power configuration, but I don't have an ampermeter allowing me to measure micro ampers, so I have to rely on there theory.
However I am pretty sure that the power consumption is higher than expected, so I wonder if my sleep set-up is correct.
The consuming part is a RFM69W module which consumes max 45ms during 50 ms 10 times a day .
/***********************************************
- Function: Sleep after RF transmission
/***********************************************/
void sleepMode ()
{
attachInterrupt (digitalPinToInterrupt(int1), buttonPressed, FALLING); // attach interrupt handler
radio.sleep(); // Set the radio transceiver in sleep mode
sleep_bod_disable();
LowPower.idle(SLEEP_FOREVER, ADC_OFF, TIMER2_OFF,TIMER1_OFF, TIMER0_OFF,SPI_OFF, USART0_OFF,TWI_OFF );
}
and
/**********************************************
- Function: check button depressed after interrupt
***********************************************/
void buttonPressed ()
{
clic = ((word)PIND & 0xF0)>>4 | ((word)PINB & 0x01)<<4 |(word)(PINC &0x3F)<<5; // Access Port register directly rather than using a digital read
}
buttonFlag = true;
}