Page 1 of 1

Custom PCB + Wroom 32 crashes using Arduino-ESP32 Wifi Library

Posted: Mon Sep 28, 2020 2:37 am
by desyner
I've built a custom PCB designed to use the ESP32 WROOM. During the assembly and validation of the board I've been using example arduino programs to make sure the esp32 is running correctly.

Currently, I'm having a problem with running wifi examples on my board. When I flash the WiFiScan example, I get the following console output. Sometimes it will reboot and display the same messages a few times before it permanently hangs. Occasionally it will cause a kernel panic and crash my mac.

Code: Select all

rst:0x1 (POWERON_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:1216
ho 0 tail 12 room 4
load:0x40078000,len:10864
load:0x40080400,len:6404
entry 0x400806b8
[W][esp32-hal-psram.c:30] psramInit(): PSRAM init failed!
[D][WiFiGeneric.cpp:332] _eventCallback(): Event: 0 - WIFI_READY
[D][WiFiGeneric.cpp:332] _eventCallback(): Event: 2 - STA_START
Here is my schematic. U1 is the ESP32-WROOM, U4 is a CH340C, and IC1 is a HT7833 LDO.
esp32_WROOM_BASIC_SCHEMATIC.jpg
esp32_WROOM_BASIC_SCHEMATIC.jpg (128.56 KiB) Viewed 6566 times

I am able to successfully run basic serial programs such as echoing serial console input, etc...

In searching the web before posting here, it was suggested to measure the logic levels of the bootstrapping pins...
GPIO 0: High
GPIO 2: Low
GPIO 4: High
GPIO 5: High
GPIO 12: Low
GPIO 15: High

At this point I’m really stumped. I would appreciate some help. Thank you.

Re: Custom PCB + Wroom 32 crashes using Arduino-ESP32 Wifi Library

Posted: Mon Sep 28, 2020 8:03 am
by ESP_Sprite
What is IC1? Are you sure your setup can deliver at least 500mA on the 3.3V line?

Re: Custom PCB + Wroom 32 crashes using Arduino-ESP32 Wifi Library

Posted: Mon Sep 28, 2020 5:33 pm
by desyner
IC1 is an HT7833 low drop-out regulator. The datasheet guarantees an output of 500mA: https://www.holtek.com.tw/documents/101 ... 99f2d0f6d7

Re: Custom PCB + Wroom 32 crashes using Arduino-ESP32 Wifi Library

Posted: Mon Sep 28, 2020 9:22 pm
by wevets
It looks like desyner listed the answer to your question right above the schematic. It's an HT7833 LDO. It's spec'ed to handle 500mA.

Re: Custom PCB + Wroom 32 crashes using Arduino-ESP32 Wifi Library

Posted: Tue Sep 29, 2020 1:32 pm
by ESP_Sprite
And are you sure the LDO can get 500mA to the device at all times? For instance, if you feed the device using USB, are you sure the USB cable is nice and thick? Can you try feeding the 5V via a lab power supply instead and see if it still crashes?

Re: Custom PCB + Wroom 32 crashes using Arduino-ESP32 Wifi Library

Posted: Mon Nov 09, 2020 6:46 am
by becorey
You might need .1uF and 1uF closer to the ESP32 VDD supply. Can you share your PCB layout?
Wifi pulls a lot of current, it can cause brownout and the ESP32 will crash or reboot.
Try more output capacitance on your LDO, put a 22uF or 47uF.
You could also try a higher rated 3.3V supply for 600mA~1A

Re: Custom PCB + Wroom 32 crashes using Arduino-ESP32 Wifi Library

Posted: Sun Nov 22, 2020 5:29 am
by desyner
Thanks for all the suggestions. I found adding a 100uF electrolytic capacitor allows the system to work. I have some 600mA LDO's on order, which I am hopeful will allow me to remove the cap.