Getting POWERON_RESET when toggling relay connected to AC voltage

Bashar
Posts: 2
Joined: Wed Jul 28, 2021 1:36 am

Getting POWERON_RESET when toggling relay connected to AC voltage

Postby Bashar » Wed Jul 28, 2021 11:06 am

Hello,
I am in the development of a smart switch, I have made a custom pcb and the esp32 is currently powered from usb. When toggling the relay without ac voltage supplied, everything seems to work fine, however when ac voltage is supplied the esp32 sometimes reboots, and the reboots seem to happen more often when a load is connected like a bulb.

This is the message I get:

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:0x3fff0030,len:6928
load:0x40078000,len:14292
ho 0 tail 12 room 4
load:0x40080400,len:3688
0x40080400: _init at ??:?

entry 0x40080678
I (57) boot: ESP-IDF v4.3-dirty 2nd stage bootloader
I (57) boot: compile time 22:29:59
I (57) boot: chip revision: 1
[Usual booting log...]
This is the circuit used to control the relay:
Image

Do you find something that could be causing the reboot?
Thanks in advance.

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

Re: Getting POWERON_RESET when toggling relay connected to AC voltage

Postby ESP_Sprite » Thu Jul 29, 2021 1:58 am

Probably emc from the relay or switched load getting into your power supply... make sure you have enough decoupling, make sure the power supply lines to your ESP32 are as short as possible.

felmue
Posts: 69
Joined: Mon Nov 16, 2020 2:55 pm

Re: Getting POWERON_RESET when toggling relay connected to AC voltage

Postby felmue » Thu Jul 29, 2021 8:07 am

Hello @Bashar

I had similar issues when building an AC switch - it would work without load but fails a lot with a load attached.

The solution I found and which worked for me was adding a snubber circuit. https://en.wikipedia.org/wiki/Snubber

Thanks
Felix

Who is online

Users browsing this forum: No registered users and 54 guests