I'm running a Python program on an ESP32 (MicroPython firmware) that fetches online data to save it locally every 5 hours, and then goes into deep sleep mode. The board is powered with a 3.7V lipo battery. The whole HTTP request takes at most 10s to get a response.

I'm tracking the battery voltage as well, and I get a 0.1V daily voltage drop, going from a 3.8V output when fully charged to 3.3V when battery is running low (under that level, the board doesn't seem to be able to send HTTP requests anymore).

I also connected a button to one of the GPIOs that I use to wake up the board (via the wake_on_ext0 method).

I don't understand why the voltage output drops that fast. I thought that in deep sleep mode, an ESP32 drew 10uA to 150uA of current.

Am I missing something? Could it be that the pull-up resistance that I programmatically set for the wake-up button is drawing current even in deep sleep?

Any suggestion to keep power consumption low would be appreciated.

  • 1
    \$\begingroup\$ This is a challenging subject, you're going to have to provide far more detail starting with a full schematic (not just one with a big abstract box in the middle) and what you've done to verify sleep mode is even achieved. You should also carefully study existing guides to low power usage of the ESP32. \$\endgroup\$ – Chris Stratton Sep 8 at 20:37
  • \$\begingroup\$ First two places to investigate - 1) voltage regulator you have 2) wifi & other equipment disabled before going to deep sleep. I have achieved 10uA with firebeetle esp32 board. \$\endgroup\$ – Andis Sep 8 at 20:40
  • \$\begingroup\$ Also some way of accurately measuring the sleep current is helpful, such as Dave Jones's µCurrent. Most hand-held meters can't measure well at those ranges (check your meter specs to be sure.) \$\endgroup\$ – rdtsc Sep 8 at 20:41
  • \$\begingroup\$ @Andis I thought triggering the deep_sleep() method would implicitly deactivate the wifi chip. Is it enough to do sta_if.active(False) then? Re: the voltage regulator, I use the one that's on the esp32 board. Could you please provide more details on how you achieved 10uA? \$\endgroup\$ – garys Sep 8 at 22:47
  • 1
    \$\begingroup\$ You can google around (github.com/espressif/arduino-esp32/issues/1113) but basically for best results wifi/bluetooth/adc must be explicitly disabled. Also I am talking about DFRobot Firebeetle esp32 board, which is quite expensive (~20USD) but has great regulator. \$\endgroup\$ – Andis Sep 10 at 6:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.