XIAO ESP32S3 Deep Sleep high power consumption

Hi everyone,

I’m making a datalogger using a XIAO ESP32S3. For my application, I want to put the XIAO into deep sleep to save power, as it’s battery-powered.

When the XIAO ESP32S3 goes into deep sleep alone, it draws about 9µA, which is fantastic. However, when the XIAO goes into deep sleep while connected to an IMU breakout board, SD card breakout, and a Hall effect sensor at its 3.3V pin, they collectively draw 2.4mA.

Is there a way to fully shut down these breakout boards or other means to prevent them from drawing current from the 3.3V pin when the XIAO is in deep sleep?


TIA!

When the port is HIGH, I think it can supply current for about 5mA. If you connect the power supply of the breakout boards to the port (HIGH), you can turn it on and off. However, SD cards require a large current when writing, so you need to check if the port can supply the current.
See “4.4 DC Characteristivs, Table 4-4. DC Characteristics” in the data sheet.

Thanks for the reply.

I’ve looked up the ESP32S3 datasheet, and the output current for GPIO pins is rated at 40mA, which is more than enough for what I need. I connected the power supply of all breakout boards to D7, and they draw about 7-9mA collectively. However, the current drawn sometimes drops to 3.4mA, and then the IMU starts returning 0. Do you know what the potential cause could be?

The port may drop to HIGH=2.4V when 40mA is output. Therefore the port cannot supply 40mA. I wrote about 5mA as the current value that would be able to be supplied without HIGH dropping much below 3.3V.
I know that SD cards consume a large instantaneous current when writing to Flash memory, but I have no information about your SD card, so I cannot determine this. I doubt you would be able to supply it from the port as the voltage would drop, so you would need to consider a PMOS load switch or something similar.
Depending on the amount of data, you could record the data to the ESP32S3’s Flash instead of using an SD card.

Hi

The D7 port drops to about 3.2V when outputting ~9mA. I’m using an Adafruit micro SD breakout board. It draws about 2mA when not writing data and ~3mA when writing. My IMU breakout board draws about 5mA when it’s working; however, it sometimes only draws 1mA (I suspect it’s the LED) but the chip itself is just not drawing any power. I’ve measured the voltage at its VIN, SDA, and SCL, and they are at ~3.2V.

Do you have any clue why this is happening? If GPIO pins aren’t suitable for providing power, I guess I will add an N-channel MOSFET to make a low-side power switch then.

Since I don’t have the actual device, here’s my imagination.
Both the current and voltage values you measure with the multimeter are averages, and I suspect that when the SD card is writing, a large current is supplied for a short period of time (like 30mA for 10mS, totally imaginary, for example), causing the voltage on the ports to dip and reset IMU breakout board.
To check,

  1. If you don’t connect only the SD card, does the IMU work as you want it to?
  2. What happens if you connect a capacitor (say 100uF) to the power pins of the SD card so that the capacitor can supply the short term current?

I observed the current during the write period of my SD card breakout board. It requires nearly 80mA peak current.
For reference!

Thank you so much! I was wanting to add a capacitor at the SD card’s Vdd and GND pin. But it looks like using a low side power switch is a much safer practice.

Thanks for your assistance!

Capacitor had little effect.
When selecting FETs, choose GateThresholdVoltage<1V as much as possible.

1 Like

Thank you so much for your generous help!