This is a low power experiment. So I am looking for the lowest power I can get. Much of what I have done has come from Nick Gammons work. Since I have functionality I am just looking for lower current draw.
Summary: This experiment has a basic Atmel328 chip in deep sleep with a powered off DS3231 providing an interrupt... all working.
My Arduino is the breadboard Atmel328 chip with xtal, pull up on reset, LED on pin 13, etc. I am running it on a battery at about 3.4 volts. Also, I am using FTDI converter for programming. This all works great.
Case #1 I load my Arduino with with a <lowPower.h> and execute a SLEEP_FOREVER and trigger an interrupt by shorting pin D2 to ground. Works great and the Arduino wakes up and flashes a LED. When powered down it draws less than my microAmp meter can read (<1uA). Great! this makes sense.
Case #2 I connect a DS3231 RTC (Modified with the classic low power mods of: no LED, no on board battery recharge, CR battery replacement and resistor trace cut for SQ wave.) The power for the DS2331 is supplied by a p-channel Mosfet driven from the Arduino. In the void setup() the DS2331 is programmed to interrupt and then the power to the DS3231 is cut. This works great the Arduino wakes up each minute and at 20 seconds and flashes the LED.
So at this point the DS3231 has No power on VCC, and 10K pullups on SDA, SCL and SQwv. And it interrupts the Arduino just fine.
My issue is that that this setup now draws 89uA when asleep. A huge jump from the <1uA for the Arduino by itself.
Things I have tried:
- removing the VCC lead directly to the DS3231 - no change. So the Mosfet is working okay.
- pull the DS3231 out of the breadboard - the power drops to <1uA and goes back to 89uA when the DS3231 is reinserted. (system keeps working after the DS3231 is reinserted)
- Removing the 2 10K pullups from the SDA and SCL - caused the current to go up to 132uA and system to stop working
- removed the pullup from SQwv - went from 89 to 88 uA
- increased the 10K pullups to 30K - system stopped working.
- Tried the power_twi_disable at the end of setup() but this caused the interrupts to stop.
So, while 89uA is not much I would like to get it a lot lower. Any Ideas or suggestions are most welcome.