ESP32 WiFi goes OFF when output pin is continuously toggled

chuxyz
Posts: 5
Joined: Sun Oct 17, 2021 3:35 pm

ESP32 WiFi goes OFF when output pin is continuously toggled

Postby chuxyz » Sun Oct 17, 2021 3:50 pm

I'm having challenge with my ESP32 Dev board. Whenever I connect to wifi and try to trigger the output pin, everything seems to work fine except that the WiFi goes OFF at some point and does not come ON until I switch OFF and then ON the power supply. Anyone know what the problem is?

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

Re: ESP32 WiFi goes OFF when output pin is continuously toggled

Postby ESP_Sprite » Mon Oct 18, 2021 12:48 am

Can you share code? What do you mean with 'wifi goes OFF', can you share serial logs when that happens?

chuxyz
Posts: 5
Joined: Sun Oct 17, 2021 3:35 pm

Re: ESP32 WiFi goes OFF when output pin is continuously toggled

Postby chuxyz » Mon Oct 18, 2021 9:27 am

I don't think the problem is with my code because everything works fine when plug ESP board to my PC. The problem only happens when I connect ESP board to my circuit to switch load. What I mean by WiFi goes OFF is that the WiFi network disappears completely and only reappears when I switch OFF and ON power supply.

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

Re: ESP32 WiFi goes OFF when output pin is continuously toggled

Postby ESP_Sprite » Tue Oct 19, 2021 12:53 am

chuxyz wrote:
Mon Oct 18, 2021 9:27 am
to switch load.
Ah, you didn't mention that before. What circuit are you using, can you post a schematic, or at least tell us what components are involved?

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

Re: ESP32 WiFi goes OFF when output pin is continuously toggled

Postby felmue » Tue Oct 19, 2021 8:06 am

Hello @chuxyz

you might need something like a snubber (https://en.wikipedia.org/wiki/Snubber) to reduce EMI. I had a similar issue where I could switch a relay by itself just fine, but some weird stuff started to happen when I attached a light bulb to the relay. Adding a snubber fixed the issue for me.

Thanks
Felix

chuxyz
Posts: 5
Joined: Sun Oct 17, 2021 3:35 pm

Re: ESP32 WiFi goes OFF when output pin is continuously toggled

Postby chuxyz » Wed Oct 20, 2021 9:18 pm

ESP_Sprite wrote:
Tue Oct 19, 2021 12:53 am
chuxyz wrote:
Mon Oct 18, 2021 9:27 am
to switch load.
Ah, you didn't mention that before. What circuit are you using, can you post a schematic, or at least tell us what components are involved?
My circuit is a very simple one. Output pin of ESP circuit triggers a 5Vdc relay which in turn triggers a 220Vac relay that powers a single phase electric motor. I used a linear power supply to power ESP board

chuxyz
Posts: 5
Joined: Sun Oct 17, 2021 3:35 pm

Re: ESP32 WiFi goes OFF when output pin is continuously toggled

Postby chuxyz » Wed Oct 20, 2021 9:19 pm

ESP_Sprite wrote:
Tue Oct 19, 2021 12:53 am
chuxyz wrote:
Mon Oct 18, 2021 9:27 am
to switch load.
Ah, you didn't mention that before. What circuit are you using, can you post a schematic, or at least tell us what components are involved?
Output pin of ESP circuit triggers a 5Vdc relay which in turn triggers a 220Vac relay that powers a single phase electric motor. I used a linear power supply to power ESP board.

chuxyz
Posts: 5
Joined: Sun Oct 17, 2021 3:35 pm

Re: ESP32 WiFi goes OFF when output pin is continuously toggled

Postby chuxyz » Wed Oct 20, 2021 9:34 pm

felmue wrote:
Tue Oct 19, 2021 8:06 am
Hello @chuxyz

you might need something like a snubber (https://en.wikipedia.org/wiki/Snubber) to reduce EMI. I had a similar issue where I could switch a relay by itself just fine, but some weird stuff started to happen when I attached a light bulb to the relay. Adding a snubber fixed the issue for me.

Thanks
Felix
Thank you Felix.

Should the snubber be in parallel with relay contact or with the load?

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

Re: ESP32 WiFi goes OFF when output pin is continuously toggled

Postby felmue » Thu Oct 21, 2021 8:17 am

Hello @chuxyz

In my case I used an RC snubber with is in parallel to the relay contact.

Please be careful when doing experiments with mains voltages.

Thanks
Felix

Who is online

Users browsing this forum: No registered users and 83 guests