Power saving ESP32 + LoRa + HX711 + DHT + BS18B20

Hi

My code starts to be ready, a bee hive measuring system.

One complete code run takes ca 1.8 sec to execute, from wakeup to sleep, it then sleeps for 15 min. The system runs a week or so on a 2A li-Ion.
No BLE or WiFi needed.

To save battery I uses deep sleep for ESP32, but I ask for some input to save more power than per today.

One idea, the code for initializing the HX711 is done in setup, can this initialization be skipped after first boot (from first power on), and avfer esp_deep_sleep_start(); the initialization is not necessary? (this will save some time and power, and also for LoRa+DHT+BS18B20

Any tip/examples you can give me to sleep not only ESP but other peripherals?

Peripherals:

  • HX711 from Sparkfun,
  • 2 x temp sensors BS18B20
  • 1 x DHT22 for temp and humidity
  • 1x Ai Thinker RA01H, 868Mhz,

See other post here for more details: Drifting Load cell in a stable environment - #121 by Modesty

Pr. today I use following to sleep

WiFi.disconnect(true);                 // Disable Wi-Fi
WiFi.mode(WIFI_OFF);                   // Disable Wi-Fi
BLEDevice::deinit(true);               // Disable BLE

sp_deep_sleep_start();

Thanks up front!

M

So the obvious question really, what is the current 'deep sleep' current ?

Of the ESP32 itself, then when you add the HX711, then when the DHT is added, etc, etc.

1 Like

Hi,

I don't know... My multimeter struggles to do proper measurements when in sleep mode, also the 1,8 sec it runs my meter don't respond fast enough.

I was more hoping to get "smart" coding and libraries as tip.

Also the hardware is made so no more changes to my PCB per now.

The 'smart tips' might be a complete waste of time, if for instance the majority of the high 'deep sleep' current is caused by the ESP32 module itself.

Remove all the external components and write a program that say blinks an LED and puts the ESP32 into 'deep sleep' for say a minute.

Put a multimeter in series with the battery and see what the 'deep sleep' current is.

If a 2Ahr battery lasts a week, then the average current is close to 12mA. Now if the deep sleep current of the bare ESP32 is about that, you need to address that as an issue, there would be little point in looking elsewhere for power savings.

1 Like

Good point :slight_smile:

Google tells around 19 mA for ESP32, so I will use your tip, "waste of time".

I will look a bit more into code, try to execute quicker that todays 1.8 sec.

Thats not quite correct though.

A bare bones ESP32 has a deep sleep of circa 10uA.

But most ESP32 modules contain other components, regulator, USB to serial IC etc, which dont have deep sleep capability.

There are complete ESP32 modules that have a deep sleep of circa 25uA.

A SEEED XIAO ESP32S3 when running from battery has a deep sleep of circa 10uA.

Use a TPL5110 or a TPL5110 to cut power to everything.

1 Like

Might not make much differnance, do the sums.

I suspect the current during that 1.8secs is maybe average 100mA. So over the week thats about 34mAhr. So even if you got rid of the stuff you need that takes 1.8secs, battery life would only increase by around 3 hours.

Indeed so.

And since the sleep period is a fixed 15mins its easy to setup.

I do have a RTC powered sleep board that goes in series with a lithium battery. Via I2C from the host you can set deep sleep from seconds up to a month. Sleep current is 2uA.

Interesting this discussion.
I will take a look at this for my v3, v2 is already made:
image

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