The Adafruit Feather ESP32-S3 is a little powerhouse of a module. It has a neopixel, LiPo charger and monitor, your ESP32 reset and boot buttons, and a nice little isolated I2C power line with a Stemma QT connector.
I recently implemented a deep sleep program with the ULP co-processor (see also, Using the ESP32-S3 ULP Coprocessor with the Arduino IDE) and couldn’t track down the extra ~300µA. If you run Ohm’s Law, that’s just about what a 10kΩ pull-up or pull-down resistor would draw if you’re fighting it (330µA to be exact). The hunt was on.
Application Details
My application requires that I2C lines stay active during deep sleep. I’m using a PIR sensor that hijacks the SDA line to provide LOW-going pulses that I want to sense in deep sleep.
Looking at the Feather’s schematic, you will find a VSENSOR net that controls the I2C power and pull-ups. This is no problem since the I2C pull-ups are not contesting ground (my I2C devices stay powered in deep sleep).
However, if you wander over to the RT9080-3.3—the LDO making the 3.3V possible—there is a 10kΩ pulldown on the enable line. That’s not a bad idea since you don’t want that line floating if its control line is not explicitly made an output.
However, if you bring the RT9080-3.3 line HIGH, you are contesting 3.3V, and the current will flow through the resistor. Found it.
The Fix
If you are using a custom board and not using the Stemma QT port (or the optional BME280 sensor) in deep sleep you could just put in your own I2C pull-ups and always keep the PIN_I2C_POWER
GPIO (the I2C_PWR net) at logic LOW.
But let’s see where that 10kΩ resistor is on the Feather PCB itself.
The bad news is that a resistor array is being used for the RT9080-3.3 enable line along with the I2C pull-ups. The lifesaver: that enable line is on the lower-most pads of the array. We can shift the resistor array up by one pad and poof!—no more pull-down.
Conclusion
This little modification allows you to maintain your I2C line states during deep sleep without incurring the extra 330µA of current draw.