Page 1 of 1
ESP32 shutdown without external circuits?
Posted: Sun May 06, 2018 7:35 am
by kb3523
Dear All,
is it possible to shut down the ESP32 programatically without using external circuits?
Thank you!
Re: ESP32 shutdown without external circuits?
Posted: Sun May 06, 2018 12:37 pm
by loboris
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.
Re: ESP32 shutdown without external circuits?
Posted: Sun May 06, 2018 2:34 pm
by ESP_igrr
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.
Re: ESP32 shutdown without external circuits?
Posted: Sun May 06, 2018 3:53 pm
by kb3523
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.
Re: ESP32 shutdown without external circuits?
Posted: Wed Sep 09, 2020 9:25 pm
by mzimmers
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.
Re: ESP32 shutdown without external circuits?
Posted: Thu Sep 10, 2020 7:51 am
by ESP_Sprite
It depends, why is deep sleep 'not good enough'?
Re: ESP32 shutdown without external circuits?
Posted: Thu Sep 10, 2020 1:54 pm
by mzimmers
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.
Re: ESP32 shutdown without external circuits?
Posted: Fri Sep 11, 2020 8:27 am
by ESP_Sprite
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.
Re: ESP32 shutdown without external circuits?
Posted: Wed Mar 09, 2022 11:35 pm
by mancini0
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.