Why is it using so much power while deep-sleeping?

I measured the power consumption on my ESP32 while in deep sleep, because it used up the battery way faster than I expected. It turns out that it is using 0,04 amps while it is supposed to be in deep sleep. That is the same as the idle power usage for most ESP32s. I measured it while disconnecting all the sensors etc for the thing I am working on, and it is in fact the board itself that is using all that power.

It goes offline when (supposedly) sleeping and there is a change in lights on the board. It also stops the routines until it’s wakeup-time so going to deep sleep does something. Everything else (about 250 lines of yaml works just exept is sometimes looses connection while wake with an error saying “socket operation failed”. I don’t think it’s related, but now you know…

I use deep sleep like this:

deep_sleep:
  run_duration: 10h
  id: deep_sleep1
  wakeup_pin:
    number: GPIO00
    inverted: true

# ....a lot of code...

#some condition...
        then:
          - logger.log: "enter long sleep"
          - deep_sleep.enter:
              id: deep_sleep1
              sleep_duration: ${short_sleep}

where the line ${short_sleep} is substituted with a duration from the top of the code.

Why does my ESP drain my battery so fast?
Btw. it says ESP32 Wrover B on the chip. I installed ESPHome for a generic ESP32
The board I am using is this one: https://www.amazon.de/-/en/gp/product/B07RXTSZRC/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

0.04A measured where?

Hi Nick :slight_smile:

Measured by putting the multimeter on the positive side of the USB power supply in a serial connectioin without the battery connected to ensure I didn’t just measure the charging power.

I’ve had similar experiences when using development boards and batteries. I assume it’s from the voltage regulator burning power regardless of whether the ESP is drawing power, at least in my cases. I had AC voltage nearby and ultimately gave up on using batteries.

Oh, okay.

That theory is confirmable. I’ll try to see if I can find an Arduino-based example code for deep sleep. I assumed it was an issue related to ESPHome. If it is a poorly designed board, the issue should be there when running Arduino or micropython as well.

The thing is, my board was designed specifically to run on batteries. If it doesn’t support deep sleep, then it really doesn’t support using batteries very well either.

2 Likes

You might find Andreas’s video on the topic useful. I did.

Thank you, but I’ve seen it before.

The power consumption I am seeing on my board matches what most boards use while idling.

1 Like

It looks like you were right @brooksben11

I found an Arduino example code for deep sleep, and installed it and the board is using way too much power while in deep sleep. So my initial thought that I was using ESPHome wrong or it somehow did not properly support my board was wrong. It is just using too much power.

1 Like

Yes its not the esp32 that is using power, its the board’s surrounding circuitry.

1 Like

Here’s a few random things that may or may not help.

When you are testing are you powering via USB or battery? I seem to recall some boards have power optimization circuitry that only kicks in when powered by battery. Not 100% on that though.

Removing the led also had a big effect for one of my boards. I just crushed mine. But yeah your idle current is massive so it may not put a dint in that.

The uses 23 milliamps when on a 3.6v battery. The lists of various ESP32 boards I’ve been able to find, and amongst them the video you linked to says it should use around 50-100 microamps. So it’s off by at least a factor of 230. How much did you gain by removing the led?

1 Like

I didn’t properly measure, but it was one of the Lilygo boards on his list that Adreas recommended removing the led.

For my project battery life at least doubled. But it’s also solar power so I didn’t systematically test.

Yeah your power draw is through the roof.

I need to watch this thread. I built a Lilygo EPD that has the 18650 in it. For the first few weeks the battery dropped very little. Sat in the 90% range. Then I saw there was an update for esphome so I ran it and now the battery goes down to 60% within a week. I haven’t had a chance to throw a meter in the circuit to measure the draw yet though. Just ran the most recent update 4/19 to see if something reverted back.