I own an old clock with claves inside, but without the original striking mechanism. It was sold some years ago and replaced by a AA-powered clock that doesn't strike. I build a small device from LEGO that can strike the rods and is powered by a 3.3V DC-Motor.
Now I want to the atmega to power the motor every hour for a few seconds to strike the claves. The atmega328 is set on a breadboard with a 16MHz quartz and powered by a step-up-converter from an AA battery at around 3.3V.
When I measured the power consumption without the step-up-converter (3.3V from an Arduino Uno), it took around 6 mA (~8d in an AA-battery). This is why I spend some effort into learning about the sleep mode and watchdog mechanics.
So, at the moment I let the Atmega sleep for 1s, increase a counter, check if the counter is above 60*60s (=1h) and power the motor for 3s if it is, otherwise send it back to sleep. This seems to reduce the power consumption below 0.1mA. However, I already noticed that 1s sleep mode is not exactly 1s. When I let it trigger the motor every minute, I noticed a 6s deviation.
Now I let the device run over a day, log the motor-triggers in putty with a timestamp and plan to add/subtract the delay in the software.
Is this a reasonable approach, or should I, for example, invest in an RTC-chip, like DS3231, and instead of increasing a counter check the time there?
Here is the sketch-code: https://pastebin.com/v03Gm92N