Brownout Detection on WiFi start... sometimes
Posted: Fri Sep 25, 2020 8:35 am
I've been developing an IoT sensor around an ESP32 WROOM-32D and with the latest PCB design I've started to get a brownout detection sometimes when the WiFi is started up. I've got a link to the full OSH project in my git repo bellow but I'll include some pictures below for reference.
https://github.com/lloydrichards/mimirOpen
The pseudo code looks like:
Not always, but usually within a couple of hours of the device successfully going through this loop does the brownout detection trigger and the device crashes. Sometimes this results in the device resetting and then it starts back up again, but other times it causes everything to crash or freeze resulting in the device needing to be plugged back in before it can be restored.
My hack solution has been to turn off Brownout Detection right before I turn on the wifi and this seems to work, but there is obviously something wrong with my hardware that I'm just not able to figure out.
Below I've attached the power section of my schematic and the PCB layout. The thick traces are 20mil and the thin ones are 10mil. And the two capacitors after the switch are my power filters (1uF and 100nF) before feeding into the ESP32.
If anyone has any ideas I'm all ears at the moment, as I'm a little lost on what to try next with the next hardware review.
https://github.com/lloydrichards/mimirOpen
The pseudo code looks like:
Code: Select all
RTC_DATA_ATTR int bootCount = 0;
void setup{
mimir.initSensors();
mimir.readSensors();
if(bootCount % 3 == 0){
mimir.logData();
mimir.WiFiON(); //Connects to wifi using saves creds
mimir.sendData(); //http send of data to server
mimir.WiFiOFF(); //Disconnects from wifi to save power
}
bootCount++;
mimir.Sleep(); //turns off everything and goes to deep sleep for 5min
}
Not always, but usually within a couple of hours of the device successfully going through this loop does the brownout detection trigger and the device crashes. Sometimes this results in the device resetting and then it starts back up again, but other times it causes everything to crash or freeze resulting in the device needing to be plugged back in before it can be restored.
My hack solution has been to turn off Brownout Detection right before I turn on the wifi and this seems to work, but there is obviously something wrong with my hardware that I'm just not able to figure out.
Below I've attached the power section of my schematic and the PCB layout. The thick traces are 20mil and the thin ones are 10mil. And the two capacitors after the switch are my power filters (1uF and 100nF) before feeding into the ESP32.
If anyone has any ideas I'm all ears at the moment, as I'm a little lost on what to try next with the next hardware review.