ESP32-S2 reboots when WiFi is used

PNJunction
Posts: 7
Joined: Thu Jun 23, 2022 1:54 am

ESP32-S2 reboots when WiFi is used

Postby PNJunction » Thu Jun 23, 2022 2:10 am

Hi,

When I run the WiFiScan example code, my Lolin S2 Mini seems to reboot during WiFi.scanNetworks(), unless I place the board on an anti-static bag or hold the corner of the board with my fingers (approximately around the 2 pads labeled 1/EN and a big ground pad at the corner). Presumably some pads are contacting, “solving” the problem. What could be the real problem and how do I solve it?

I've tried:
  • 3 different USB-C to USB-A cables (generic, tablet, smartphone).
  • Desktop and laptop USB3 and USB2 ports.
  • A portable power bank that claims output of 5V, 1 Amp.
  • A smartphone charger with built-in cable that claims output of 5V, 3 Amps.
Thanks.

PNJunction
Posts: 7
Joined: Thu Jun 23, 2022 1:54 am

Re: ESP32-S2 reboots when WiFi is used

Postby PNJunction » Fri Jun 24, 2022 7:57 am

I found that if I put a penny coin on the corner of the board (on top of the 1 and EN pads) the device can use WiFi just fine and it does not reboot. What could be causing this problem and how do I solve it? Is this an interference issue with the on-board antenna?

BTW, looking closely at the board, I see that it does not say "WEMOS.CC" which makes me think that this is a clone, not an authentic WEMOS. My board looks like this (though I did not buy it from this site)

Thanks.

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

Re: ESP32-S2 reboots when WiFi is used

Postby ESP_Sprite » Sat Jun 25, 2022 3:05 am

Wondering if there is something wrong with your board... my guess would be a wonky resistor on the EN line. If you have one, you can try adding an 10K between the EN and 3V3 pin, see if that helps.

alanesq
Posts: 84
Joined: Thu Dec 14, 2017 8:38 pm

Re: ESP32-S2 reboots when WiFi is used

Postby alanesq » Sat Jun 25, 2022 7:41 am

I would suspect the power supply to the esp32 as I have had mine do the weirdest things when they are not happy with it.

PNJunction
Posts: 7
Joined: Thu Jun 23, 2022 1:54 am

Re: ESP32-S2 reboots when WiFi is used

Postby PNJunction » Sat Jun 25, 2022 10:41 pm

Thanks for the replies.

I didn't have a 10K resistor handy, so I tried putting a paperclip (<1 Ohm) between the EN and 3V3 pads and WiFi worked fine with no reboots. What could this mean?

I measured the resistance of the 5 resistors on the board and they all seemed approximately correct.

I removed the paperclip and measured the voltage from GND to 3v3 and it was 3.34V. I measured the voltage from GND to EN and it was 3.31V.

I tried temporarily disabling the brownout detector in software and that didn't seem to help.

I also tried several different power supplies, cables, and PCs, but that didn't seem to help.

But directly connecting EN and 3V3 with a paperclip makes WiFi work without reboots. Any idea what this means? Are there more diagnostics that I could try to narrow things down?

Thanks.

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

Re: ESP32-S2 reboots when WiFi is used

Postby ESP_Sprite » Sun Jun 26, 2022 1:32 am

It smells like somehow WiFi is radiating into the EN line, which makes the chip reset; that's most likely if there's an inadequate or no pullup connected there, but it's hard to check that without a schematic. As I said, adding a resistor (anywhere from 30K to 1K will probably work) between EN and 3.3V will probably fix it.

PNJunction
Posts: 7
Joined: Thu Jun 23, 2022 1:54 am

Re: ESP32-S2 reboots when WiFi is used

Postby PNJunction » Sun Jun 26, 2022 3:01 am

Thanks for the reply.

This is the schematic for the genuine Wemos Lolin S2 Mini which shows a 10k pullup resistor connected to EN. I think I may have a clone, but the board looks very similar to this photo of the genuine product:

Image

My board does seem to have a 10k resistor in the upper middle, but I'm not really sure if it's connected or adequate.

Does the schematic help?

Thanks.

PNJunction
Posts: 7
Joined: Thu Jun 23, 2022 1:54 am

Re: ESP32-S2 reboots when WiFi is used

Postby PNJunction » Wed Jun 29, 2022 11:02 pm

I may have found a work-around, does the following make sense?

The original seller of the board said that one capacitor might not be connected to ground. I searched Twitter for "s2 mini" and found a person mentioning the same idea. If this capacitor isn't connected to ground, it's like it isn't part of the circuit, so I connected another capacitor between EN and GND and then WiFi worked fine with no reboots.

The board schematic suggests a 100nF capacitor, but I just used some random 220uF, 16V cylindrical aluminum electrolytic capacitor that I happened to have, with the negative terminal connected to GND and the positive terminal connected to EN.

Thanks.

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

Re: ESP32-S2 reboots when WiFi is used

Postby ESP_Sprite » Thu Jun 30, 2022 3:16 am

It certainly seems an issue with the EN line, and leaving off the cap in that RC network could absolutely lead to the issues you're seeing. 220uF is super-overkill, though: if it works, that's great, but it does mean that it'll take a good while for the ESP32 to start working after it gets power. If you have anything 1uF-10uF, I'd chuck that in instead.

Alternatively, scratch off some of the solder mask from the ground plane close to the unconnected end of the capacitor, and use a small blob of solder to re-connect it to ground.

PNJunction
Posts: 7
Joined: Thu Jun 23, 2022 1:54 am

Re: ESP32-S2 reboots when WiFi is used

Postby PNJunction » Mon Jul 11, 2022 2:11 am

Thanks for the reply. Sorry for my late reply (I never received an email notification from the forum). Since my last reply, I've been using the board with the temporary 220uF capacitor and the board has been working fine.

I haven't noticed a slow startup of the ESP32 with the 220uF capacitor, but I'll try to find a smaller one as you suggest.

I tried to use a multimeter to test the existing disconnected 100nF capacitor, but it didn't seem to respond like the other capacitors on the board. Either I'm not testing it properly or perhaps it does not work.

https://www.ifixit.com/Wiki/Troubleshho ... components
To test the capacitor with a multimeter, set the meter to read in the high ohms range, somewhere above 10k and 1m ohms. Touch the meter leads to the corresponding leads on the capacitor, red to positive and black to negative. The meter should start at zero and then moving slowly toward infinity.

Who is online

Users browsing this forum: Baidu [Spider] and 61 guests