It is possible to do much better. But it requires work to get there.
I'm newbie in the electronics and my knowledges are ending with the using of 7805 as 5 volts voltage regulator. I think there is nothing more that I have to do with the arduino. If I have to do something better I have to work on 7805 regulator high power consumption.
I did a little program to measure the WDT overflow period with prescaler set for 8 seconds:
void loop()
{
if (resetTimeWDT == 0) {
wdt_reset();
resetTimeWDT = micros();
}
if (overflowWDT > 0) {
Serial.println(overflowWDT - resetTimeWDT);
overflowWDT = 0;
resetTimeWDT = 0;
}
}
ISR(WDT_vect)
{
overflowWDT = micros();
}
Here are some of the results:
8690588
8690084
8689688
8690220
8689876
8689576
So you are right. WDT accuracy is really bad. Maybe I have to calibrate it somehow in each 10 or 30 minutes.