ESP32 on Batteries - your setup

meneldor
Posts: 67
Joined: Mon Dec 25, 2017 7:28 am

Re: ESP32 on Batteries - your setup

Postby meneldor » Fri Apr 13, 2018 9:25 am

Guys, seriously, does ESP32 on battery project(using wifi of course) even exist? I did alot of search and cant find anything usable.

woofy!
Posts: 15
Joined: Tue Oct 03, 2017 12:02 pm

Re: ESP32 on Batteries - your setup

Postby woofy! » Fri Apr 13, 2018 10:09 am

meneldor wrote:Guys, seriously, does ESP32 on battery project(using wifi of course) even exist? I did alot of search and cant find anything usable.
I am using an ESP32 to monitor heating oil level. It takes a reading every hour and transmits that back over WIFI to my MQTT server. It actually sends a data blob consisting of oil level, outside temperature, Battery Voltage, received RSSI and Awake time. It takes a total of around 1.6 seconds to acquire and send the data before going back to deep sleep for an hour. The data is processed with node-red and the image below is from the node-red ui. I calculated the battery (3xAA cells) should last about a year. I implemented it near the end of last year so it has been running for nearly four months now. In that time the battery voltage has gone down from 4.5 to 4.2 volts. It's measured whilst the WIFI is connecting so should be during maximum stress.

Image

meneldor
Posts: 67
Joined: Mon Dec 25, 2017 7:28 am

Re: ESP32 on Batteries - your setup

Postby meneldor » Fri Apr 13, 2018 10:16 am

Unfortunately my project cannot sleep so long. Im measuring temp,humidity and air quality. Those sensors require some time to measure. Also, i need the values at least once per 2 minutes.
Somebody mentioned a back feeding the ldo. I've ordered a bare ESP32-WROOM module and gonna use better ldo.

woofy!
Posts: 15
Joined: Tue Oct 03, 2017 12:02 pm

Re: ESP32 on Batteries - your setup

Postby woofy! » Fri Apr 13, 2018 10:27 am

If you don't really need the data to actually be sent every 2 minutes, you could wake up every 2 minutes and just log the data before going back to deep sleep. Then once per hour send it over WIFI. That would save you a lot of power.

meneldor
Posts: 67
Joined: Mon Dec 25, 2017 7:28 am

Re: ESP32 on Batteries - your setup

Postby meneldor » Fri Apr 13, 2018 10:42 am

woofy! wrote:If you don't really need the data to actually be sent every 2 minutes, you could wake up every 2 minutes and just log the data before going back to deep sleep. Then once per hour send it over WIFI. That would save you a lot of power.
I know, but im using the data asap (not less than 1m) for presence detection.

woofy!
Posts: 15
Joined: Tue Oct 03, 2017 12:02 pm

Re: ESP32 on Batteries - your setup

Postby woofy! » Fri Apr 13, 2018 12:18 pm

Perhaps the ESP could wake up every 2 minutes and check the readings against the last lot sent.
Then it would only need to alert you to a change. Depends on how quickly the data changes though.

rin67630
Posts: 64
Joined: Sun Mar 11, 2018 5:13 pm

Re: ESP32 on Batteries - your setup

Postby rin67630 » Fri Apr 13, 2018 10:31 pm

woofy! wrote:If you don't really need the data to actually be sent every 2 minutes, you could wake up every 2 minutes and just log the data before going back to deep sleep. Then once per hour send it over WIFI. That would save you a lot of power.
I am currently planning to do that. I write a data logger that gathers data every second and light sleeps between for 900mS. Deep sleep is not efficient at that pace.
[Addendum] Sleep is a bad joke on the ESP32: the "RTC" does not desserve its name, it drifts by minutes an hour! you will else need a xtal on GPIO 33,32 and the ESP32 IDE to be able to enable it. :-)

My problem will be to write the Data to SPIFFS and to transmit it via FTP each hour... while continuing to gather data every second.
Normally you use FreeRTOS to run two tasks concurrently, but how does it cope with power and sleep phases?

mega128
Posts: 2
Joined: Tue Oct 24, 2017 12:54 am

Re: ESP32 on Batteries - your setup

Postby mega128 » Mon Nov 19, 2018 6:46 pm

Hi Woofy,

I was wondering if your project is still going strong after four months? Also, did you use a LDO regulator or directly connected 3xAA cells to ESP32? Any electrolytic cap you added after LDO if you used a regulator?

Thanks
woofy! wrote:
Fri Apr 13, 2018 10:09 am
meneldor wrote:Guys, seriously, does ESP32 on battery project(using wifi of course) even exist? I did alot of search and cant find anything usable.
I am using an ESP32 to monitor heating oil level. It takes a reading every hour and transmits that back over WIFI to my MQTT server. It actually sends a data blob consisting of oil level, outside temperature, Battery Voltage, received RSSI and Awake time. It takes a total of around 1.6 seconds to acquire and send the data before going back to deep sleep for an hour. The data is processed with node-red and the image below is from the node-red ui. I calculated the battery (3xAA cells) should last about a year. I implemented it near the end of last year so it has been running for nearly four months now. In that time the battery voltage has gone down from 4.5 to 4.2 volts. It's measured whilst the WIFI is connecting so should be during maximum stress.

Image

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

Re: ESP32 on Batteries - your setup

Postby tvoneicken » Thu Dec 06, 2018 7:16 pm

FYI, I have an almost complete set of posts on using the esp32 (and esp8266) on battery. I believe it does answer a slew of questions. It's not done, 1 or 2 more posts to go... The first post on the esp32 is https://blog.voneicken.com/lp-wifi-esp32-1/ but you may want to go back in the series to read some of the general wifi power save info... Hope this helps!
Spoiler: depending on your battery size and run-time expectations it can be done but it's not easy by a long shot...

Who is online

Users browsing this forum: Google [Bot] and 21 guests