1

I have an ESP-WROOM-32 and I'm using Arduino IDE to push code on it. My ESP is powered via 2 AA batteries and got one power supply problem.

It works well on new battery but after a bit, I will always get this error repeatedly:

ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:812 load:0x40078000,len:0 load:0x40078000,len:11584 entry 0x40078a60

Brownout detector was triggered

So, I know that it's possible to disable that feature in ESP32. My question is how to do it?

What I have done that didn't work:

Add this code in my Arduino IDE:

#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"
setup(){
    WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector    
}

Change Arduino\hardware\espressif\esp32\tools\sdk\sdkconfig with:

CONFIG_BROWNOUT_DET=                //previous was "=y"
CONFIG_BROWNOUT_DET_LVL_SEL_0=      //previous was "=y"
CONFIG_BROWNOUT_DET_LVL_SEL_1=
CONFIG_BROWNOUT_DET_LVL_SEL_2=
CONFIG_BROWNOUT_DET_LVL_SEL_3=
CONFIG_BROWNOUT_DET_LVL_SEL_4=
CONFIG_BROWNOUT_DET_LVL_SEL_5=
CONFIG_BROWNOUT_DET_LVL_SEL_6=
CONFIG_BROWNOUT_DET_LVL_SEL_7=
CONFIG_BROWNOUT_DET_LVL=           //previous was "=0"
12
  • 2
    Why do you want to disable it? It's there for a reason: Your batteries are too flat to reliably power the ESP-32.
    – Majenko
    Commented Aug 29, 2018 at 15:33
  • Because the manufacturer of the device told me to do it, but he's using ESP-IDF and I prefer to code with Arduino
    – Gazouu
    Commented Aug 29, 2018 at 15:42
  • What kind of batteries are you using?
    – Majenko
    Commented Aug 29, 2018 at 15:44
  • I'm using 2 AA batteries each 1.5V
    – Gazouu
    Commented Aug 29, 2018 at 16:05
  • 1
    I asked what kind, not what size. Alkeline? Zinc Carbon? NiMH?
    – Majenko
    Commented Aug 29, 2018 at 16:06

2 Answers 2

2

For me brownout issue was solved by removing the esp32 from Arduino IDE board manager + removing files from disk and use install procedure "Using Arduino IDE with the development repository" - https://github.com/espressif/arduino-esp32/

I guess it will use newer version of arduino-esp32 that has some brownout protection due to CONFIG_REDUCE_PHY_TX_POWER being activated by default. Also you should probably learn how to decrease wifi power + deep sleep for longer battery usage.

0

Maybe it's silly but I added a delay to my script before I got the error.

Serial.println("Delay 5s Brownout detector was triggered");
delay(5000);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.