So I read about watchdog timer sleep modes and interrupts. I also investigated about ultra low power Arduino versions such as Pro mini. But one thing I don’t understand.
In order to wake Arduino up from a deep sleep state we need to set up an interrupt right? But how can we set up an interrupt in a project like… let’s say weather logging station. It needs to record weather data every hour or so. As far as I know interrupts only work when a pin state changes from low to high or high to low.
But there’s isn’t anything that changes the pin status in this example project. A weather logger would probably has a timer ticking and when it reaches certain threasholds it logs the data and uses the delay command to wait for the next threshold. If you put it into sleep it can’t keep track of time since the microcontroller won’t be working… So how can one attach interrupts in a project like weather logger?
This may not be the answer to your question still it is a very good reader about sleep modes - Gammon Forum : Electronics : Microprocessors : Power saving techniques for microprocessors -
Use a DS3231 RTC. It has an alarm feature that you can use to trigger an interrupt, and used in conjunction with the code from Nick Gammon can wake up the processor.
Note that the Pro Mini may not be ultra-low power - it depends on the particular
voltage regulator used, some waste 5mA, some < 1uA, for long battery life you
ideally want quiescent current consumptio < 10uA.
Put another way if the device wakes up for a few seconds every hour to take
readings its probably spending about 0.1% of the time using 30mA or so,
99.9% of the time in sleep mode. The power drawn during sleep will be less,
on average, than the power drawn awake if its < 30uA.
If your voltage regulator happens to drain 500uA when quiescent, then sleep
mode will be draining 17 times more power on average than when awake!
Also check the quiescent current draw of each sensor, and be prepared to add
some power-switching if needed (many sensors already have a power-down