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:
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...
How long can the esp32 run on batteries while remaining connected?
-
- Posts: 33
- Joined: Tue Nov 17, 2015 5:20 am
How long can the esp32 run on batteries while remaining connected?
Last edited by tvoneicken on Wed Dec 12, 2018 4:03 am, edited 1 time in total.
Re: How long can the esp32 run on batteries while remaining connected?
Should be mAh units
Last edited by WiFive on Wed Dec 12, 2018 4:05 am, edited 2 times in total.
-
- Posts: 33
- Joined: Tue Nov 17, 2015 5:20 am
Re: How long can the esp32 run on batteries while remaining connected?
Oops! yes. fixed.
Re: How long can the esp32 run on batteries while remaining connected?
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?
-
- Posts: 33
- Joined: Tue Nov 17, 2015 5:20 am
Re: How long can the esp32 run on batteries while remaining connected?
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...
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...
Re: How long can the esp32 run on batteries while remaining connected?
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.
-
- Posts: 33
- Joined: Tue Nov 17, 2015 5:20 am
Re: How long can the esp32 run on batteries while remaining connected?
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
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: akasaka_spk, Baidu [Spider], Google [Bot] and 112 guests