ESP32 shutdown without external circuits?

kb3523
Posts: 10
Joined: Thu Mar 08, 2018 11:32 pm

ESP32 shutdown without external circuits?

Postby kb3523 » Sun May 06, 2018 7:35 am

Dear All,
is it possible to shut down the ESP32 programatically without using external circuits?
Thank you!

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: ESP32 shutdown without external circuits?

Postby loboris » Sun May 06, 2018 12:37 pm

kb3523 wrote:Dear All,
is it possible to shut down the ESP32 programatically without using external circuits?
Thank you!
What would be the purpose of shutting it down ?
You can go to deepsleep mode with timeout of couple of years, I think that is the closest thing to shut down.
If you want to cut off the power you must use the external circuit.

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: ESP32 shutdown without external circuits?

Postby ESP_igrr » Sun May 06, 2018 2:34 pm

You can actually put the ESP32 into deep sleep forever (until external reset, that is). To do so, call esp_deep_sleep_start without calling any of the esp_sleep_enable_X_wakeup. The chip should consume around 5uA in this mode. You can reduce that a bit by powering down RTC memories, see http://esp-idf.readthedocs.io/en/latest ... d-memories.

kb3523
Posts: 10
Joined: Thu Mar 08, 2018 11:32 pm

Re: ESP32 shutdown without external circuits?

Postby kb3523 » Sun May 06, 2018 3:53 pm

Thank you very much for the replies. The purpose of "shutting the device down" is to prevent it from draining the lion cell powering it below 2.9V and to make sure that the brown out detection wont get triggered which could put the device in a reset loop.

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

Re: ESP32 shutdown without external circuits?

Postby mzimmers » Wed Sep 09, 2020 9:25 pm

Hi all -

I realize that this thread is a couple years old, but I'm in the same position as the OP, in that deep sleep isn't good enough. So, is there any way to completely shut down the processor programmatically?

Thanks.

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 shutdown without external circuits?

Postby ESP_Sprite » Thu Sep 10, 2020 7:51 am

It depends, why is deep sleep 'not good enough'?

User avatar
mzimmers
Posts: 643
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

Re: ESP32 shutdown without external circuits?

Postby mzimmers » Thu Sep 10, 2020 1:54 pm

Hi Sprite -

The answer to that is a little complicated. Our product is designed so that line power goes through the battery charging system. If the battery voltage goes too low, then re-application of line power won't reset the ESP32. We're concerned about cases of extreme loss of line power resulting in the devices having to be reset locally (manually) instead of automatically recovering when power is restored.

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 shutdown without external circuits?

Postby ESP_Sprite » Fri Sep 11, 2020 8:27 am

Makes sense. However, given that any internal method to turn the ESP32 'off' is dependent on it still receiving enough power to function (as in, you don't want the power to drop low enough for the ESP32 to reset), I'm not sure if there's a software solution to this...

Easiest way may be to add an external voltage supervisor IC that makes sure EN of the ESP32 is pulled low when the voltage is out of spec. This makes the ESP32 only sip a little bit of power, making sure the battery doesn't entirely die, and as soon as the battery is charged a fair bit again, the ESP32 should start right back up.

mancini0
Posts: 1
Joined: Wed Mar 09, 2022 11:21 pm

Re: ESP32 shutdown without external circuits?

Postby mancini0 » Wed Mar 09, 2022 11:35 pm

This would be very useful in sensors that shutdown systems and alert owners that manual intervention is required before the system can become operational again. After the notification is sent, there is no need for the esp32 to remain sleeping because the system will require manual intervention for it to become operational again anyway - that is my use case at least, and it may be several months before the system maintainer is able to do the required maintainance.

Who is online

Users browsing this forum: No registered users and 78 guests