For my Arduino UNO's Sleep function I am using the Watchdog Timer and it works. During Sleep I also want to turn off several other Arduino functions. I've tried with the ADC, BOD, and power_all_disable() but these don't reduce the power consumption, probably because they aren't being set correctly. With just the Sleep I'm at 20mA with just the UNO. I would like to get this down to < 1mA.
//This is my Sleep code
noInterrupts();
MCUSR = 0; //reset flags
//WDT configuration
WDTCSR |= 0b00011000;
//WDT settings
WDTCSR = 0b01000000 | wdtInterval;
wdt_reset();
// turn off brown-out enable in software
MCUCR = bit (BODS) | bit (BODSE);
MCUCR = bit (BODS);
previousADCSRA = ADCSRA;
ADCSRA = 0;
ADCSRA &= ~(1<<ADEN);
ACSR = (1<<ACD);
DIDR0 = 0x3F; //?
DIDR1 = (1<<AIN1D)|(1<<AIN0D); //?
power_all_disable();
power_twi_disable();
power_spi_disable();
power_usart0_disable(); //Needed for serial.print
power_timer0_disable(); //Needed for delay and millis()
power_timer1_disable();
power_timer2_disable(); //Needed for asynchronous 32kHz operation
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
sleep_enable();
interrupts();
sleep_cpu(); //go to sleep now
I have combined and modifed this code, any suggestions? Really important for me to reduce power consumption.