AdamWelchUK / PWM85

An ATTiny version of Julian Iletts PWM5 Solar Charge Controller
GNU General Public License v3.0
47 stars 15 forks source link

Sleep Mode IDLE error correction & improvements #2

Closed couin3 closed 4 years ago

couin3 commented 4 years ago

Hi,

I discovered Timer0 interrupt (used in micros()/millis() functions) was causing a nearly immediate wakeup from idle sleep, limiting power reduction. Best solution is to change ATTinyCore option to simply disable those two functions.

image

I had to remove delay() call in setup. Also added another wdt_int(), needed for very first use.

Hampered version was giving a 100µA gain. I now notice a 300µA reduction with this change. Charge pump is still working OK.

Moreover, I now shutdown ADC during sleep. This gives another 300µA. My basic check on vBAT is OK, more extensive tests may be done here.

To conclude, my ATtiny85, is running PWM85 with 400µA (1MHz@3.3v) ;)

couin3 commented 4 years ago

Superseded by next pull (#3). I'm closing this one.