ESP32 resets when modem connects to GSM network

viktak
Posts: 8
Joined: Thu Jul 30, 2020 5:37 pm

ESP32 resets when modem connects to GSM network

Postby viktak » Sun Oct 18, 2020 12:06 pm

Dear All,

I have built a GPS tracker based on the ESP32.

The circuit is powered from a 12V car battery.
I use a buck converter to produce 4V for the GSM modem. I use another buck converter to provide 5V for the rest of the circuit. I use an LM117-3.3 to provide 3.3V for the ESP32 and the GPS module.

All works perfectly on breadboard. However, when I built a custom PCB of it, the ESP32 keeps resetting every time the GSM modem tries to connect to the GSM network.

This is the layout of the PCB:
D03_011567.jpg
D03_011567.jpg (112.48 KiB) Viewed 2877 times
This is the log from the ESP32:

Code: Select all

rst:0x10 (RTCWDT_RTC_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:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac



Booting ESP node 13894044...
Hardware ID:      ESP32-WROOM-32 BB
Hardware version: 1.0
Software ID:      GPS tracker
Software version: 1.0 @ 21:23:10 - Oct 14 2020

==========================App settings==========================
Boot attempts           1
App name                GPS Tracker/Logger
Admin password          admin
SSID
Password
AP SSID                 TRACKER-9C01D4D108F0
AP Password             12345678
Timezone                2
MQTT Server             test.mosquitto.org
MQTT Port               1883
MQTT TOPIC              tracker-9C01D4D108F0
Log2SDCard interval     5
Log2Server interval     60
Max GSM attempts        3
Hearbeat interval       300
Required GPS accuracy:  30
GPRS AP name            internet
GPRS user name
GPRS password
SIM card PIN            1747
====================================================================
Initializing SD Card...
SD Card Type: SD
SD Card Size: 120MB
Total space: 116MB
Used space: 2MB
Free space: 114MB
Scanning for I2C devices...
Device 0:       0x38

====================================
Mode of operation: Data logging
====================================

Restarting modem...
[9334] ### TinyGSM Version: 0.10.7
[9334] ### TinyGSM Compiled Module:  TinyGsmClientSIM800
[9649] ### Modem: SIMCOM SIM800L
[9649] ### Modem: SIMCOM SIM800L
Modem Info: SIM800 R14.18
SIM card unlocked successfully.
[13749] ### Unhandled: Call Ready
ets Jun  8 2016 00:22:57

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:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
ets Jun  8 2016 00:22:57

rst:0x1 ▒ets Jun  8 2016 00:22:57

rst:0x1 ▒ets Jun  8 2016 00:22:57

rst:0x1 ▒ets Jun  8 2016 00:22:57

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:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
ets Jun  8 2016 00:22:57

rst:0x1 ▒ets Jun  8 2016 00:22:57

rst:0x1 ▒ets Jun  8 2016 00:22:57

rst:0x1 ▒ets Jun  8 2016 00:22:57

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:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
ets Jun  8 2016 00:22:57

rst:0x1 ▒ets Jun  8 2016 00:22:57

rst:0x1 ▒ets Jun  8 2016 00:22:57

rst:0x1 ▒ets Jun  8 2016 00:22:57

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:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
ets Jun  8 2016 00:22:57

rst:0x1 ▒ets Jun  8 2016 00:22:57

rst:0x1 ▒ets Jun  8 2016 00:22:57

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,lPuTTY
The code running on the ESP32 is not relevant as the problem happens even if I upload an empty loop.

I hope somebody has some relevant experience and could help me out here, because I am in a dead end....

Thank you for any pointers in advance!

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

Re: ESP32 resets when modem connects to GSM network

Postby ESP_Sprite » Mon Oct 19, 2020 1:31 am

That looks like a power supply issue... a GSM modem can use lots of power for a little while while communicating with the network, and if the impedance to your power supply is too high, it can drop the power supply line to a level that's so low that the ESP32 reboots. You should be able to catch that by putting a scope on the 3.3V line.

viktak
Posts: 8
Joined: Thu Jul 30, 2020 5:37 pm

Re: ESP32 resets when modem connects to GSM network

Postby viktak » Mon Oct 19, 2020 7:38 am

That's what I thought too at the beginning, because it took me a while to decide on the power supply for the thing on the breadboard.

I checked it with the scope and I can't see any dip on the 3.3V line.

Since then I have been experimenting with it and now I found that if I remove the DC-DC converter (for the modem) from the PCB but still use the same one to power the modem (using small wires) then the issue is gone.
This leads me to believe it is some (high frequency) noise the converter generates that messes up the ESP. Or a combination of both...

Now I'm going to try to shield the converter from the rest of the circuit with some aluminum foil and see what happens. Or is there a "standard"/proper way of doing the same?

Who is online

Users browsing this forum: No registered users and 68 guests