Most efficient way to use WiFi with ESP32

I would like to build a battery-operated weather station with ESP32. The idea is that the ESP32 reads the weather data and sends it to the web server every 10 minutes.

What is the most efficient way to do this? If I put ESP32 into deep sleep for, say, 9 minutes, it will need more power afterwards to re-establish the WiFi connection, and that could negate any power savings. After all, it takes at least a few seconds to re-establish the connection.

For the largest energy saving possible, consider a power timer, like this one, or its cousin, the TPL5111 Reset Timer.

if you want to collect wind data or rain data, you can't sleep for 9 minutes

You could be establishing the WiFi connection only when you are ready to export the data. (collect for some time, export a batch)

WiFi is nevertheless quite demanding, LoRa will probably be more gentle on your battery needs

Thanks for the reply.

I only read the temperature, relative humidity and pressure. I have found that it takes less than 20 seconds to measure, connect to WiFi and send the data.

So now I connect to the WiFi, update the time with NTP server, take a measurement, post it to the weather server, disconnect from the WiFi, calculate the time until the next measurement and go into deep sleep and it works fine.

Good. Do you power off the sensor ?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.