How long can the esp32 run on batteries while remaining connected?

tvoneicken
Posts: 33
Joined: Tue Nov 17, 2015 5:20 am

How long can the esp32 run on batteries while remaining connected?

Postby tvoneicken » Wed Dec 12, 2018 2:52 am

I've working quite a bit on answering that question for the esp32 and the esp8266. Using both deep-sleep and automatic light-sleep. I ended up writing a pretty long and in-depth blog post series that looks at both microcontrollers. The series starts at https://blog.voneicken.com/projects/low ... ifi-intro/ and you can see from the TOC where the esp32-specific posts start.

As a teaser the final chart is:
ESP8266 vs. ESP32 in Light-Sleep and Deep-Sleep.png
ESP8266 vs. ESP32 in Light-Sleep and Deep-Sleep.png (36.83 KiB) Viewed 9105 times
That's both uC's compared, deep-sleep and automatic light-sleep, open and secure access points, TCP and MQTT/TLS. Plus some dotted lines for what could be achieved if Espressif fixed some issues in the Wifi binary blobs...

The X axis shows the period at which the app sends a message to a server on the local network. In the esp8266 case it's just a simple TCP message, in the esp32 case it's MQTT/TLS pub+sub.

There are so many knobs and so many corner cases in Wifi that I may well have made a mistake or overlooked something. Please let me know if you spot an inaccuracy. Also, questions & comments appreciated...
Last edited by tvoneicken on Wed Dec 12, 2018 4:03 am, edited 1 time in total.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: How long can the esp32 run on batteries while remaining connected?

Postby WiFive » Wed Dec 12, 2018 3:56 am

Should be mAh units
Last edited by WiFive on Wed Dec 12, 2018 4:05 am, edited 2 times in total.

tvoneicken
Posts: 33
Joined: Tue Nov 17, 2015 5:20 am

Re: How long can the esp32 run on batteries while remaining connected?

Postby tvoneicken » Wed Dec 12, 2018 4:00 am

Oops! yes. fixed.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: How long can the esp32 run on batteries while remaining connected?

Postby WiFive » Wed Dec 12, 2018 4:05 am

That is interesting. Have you attempted to characterize where the time is spent? What effect would using an esp-now or mesp-mesh gateway have?

tvoneicken
Posts: 33
Joined: Tue Nov 17, 2015 5:20 am

Re: How long can the esp32 run on batteries while remaining connected?

Postby tvoneicken » Wed Dec 12, 2018 4:13 am

Yes, if you look at the 13-post series I go into pretty great detail what is happening and where the power is going...
I have not tried mesh or esp-now. They're both cool but for me the interest lies in being able to connect to the ubiquitous wifi infrastructure...

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: How long can the esp32 run on batteries while remaining connected?

Postby WiFive » Wed Dec 12, 2018 6:24 am

Ah ok i see it now. Well hopefully you get some answers on your other posted questions and maybe you can investigate custom bootloader and skip Arduino framework for faster startup. And of course connecting to standard infrastructure is best but if you could double your battery life by using a gateway it could be worth it.

tvoneicken
Posts: 33
Joined: Tue Nov 17, 2015 5:20 am

Re: How long can the esp32 run on batteries while remaining connected?

Postby tvoneicken » Wed Dec 12, 2018 7:16 am

Thanks for the suggestions! :-)
The arduino start-up doesn't add anything significant that I can detect. When I use the ESP-IDF example deep sleep app the scope traces look identical.
One of my top uses for the esp32 is as a gateway, so it doesn't make much sense to build a battery operated gateway that then needs another gateway ;-)

Who is online

Users browsing this forum: Google [Bot], Vilius and 109 guests