TCB13, (edited )
@TCB13@lemmy.world avatar

Talking about this board: www.wemos.cc/en/latest/s2/s2_mini.html. High-res board pintout poster here. Details here.

There are different versions of of the board on Aliexpress and some have a design issue that causes random reboots when the wifi is in use. Here is an analysis of the defective boards:

https://lemmy.world/pictrs/image/2483d9c3-4fc6-41dc-bb6b-3d3ae93f6b59.jpeg

Those boards are tricky to flash the first time. You’ll have to use the ESP32 Flash Tool + CP210x drivers in order to burn the first firmware, then you can upgrade as always via wifi.

web.esphome.io fails because of an issue with esptool-js described here. To get around this download the generic ESPHome firmware from github.com/esphome/firmware/actions/…/7443385432 > esphome-web artifact > extract the esphome-web-esp32s2.bin and flash the board using the tool bellow with the address 0x0 and DoNotChgBin checked:

https://lemmy.world/pictrs/image/500a2cf4-97d2-42ed-bc8a-517967f3ffa2.jpeg

In order to get the the board into “download mode” you need to 1) connect the board to the computer; 2) press/hold the button labeled as 0; 3) press and release the RST button; 4) release the 0 button. After this sequence a new serial port should come up in your computer that you’ve to select on the bottom of the tool. After flashing remove the power and plug it back in and it will be done.

In your ESPHome yaml you’ll want to use this:


<span style="color:#323232;">esp32:
</span><span style="color:#323232;">  board: lolin_s2_mini
</span><span style="color:#323232;">  variant: ESP32S2
</span><span style="color:#323232;">  framework:
</span><span style="color:#323232;">    type: arduino
</span>

Those boards will run hot and disabling logging, web server etc. will help but won’t fix the issue completely.

I’ve bought dozens of those boards from Aliexpress and the only reliable store seems to be this one. The others seem to ship mixes batches of good and poorly designed boards and you never know what you’ll get.

I consider this to be a good ESP32 board when a lot of I/O and a fast chip is required. However, if you’re looking for a small board to run a single sensor or a relay with ESPHome then the ESP32-C3 Super Mini (seller here) is most likely a better option as it can be flashed much faster with web.esphome.io from any browser.

calmluck9349,
@calmluck9349@infosec.pub avatar

This is great! I knew they were tricky to flash! But this is very detailed in the process. Looking forward to trying this when I get home from the office today!! Thank you!!

TCB13,
@TCB13@lemmy.world avatar

You’re welcome. I just hope you get a board with working wifi.

calmluck9349,
@calmluck9349@infosec.pub avatar

Looks like I got the bad wifi ones… trash can! Thank you for assistance! Very informative!

TCB13,
@TCB13@lemmy.world avatar

Oh well, before you trash it there a couple of potencial solutions that may fix the issue.

Solution 1: routing problem on the C14 ground pad (…) the fix is straightforward. Scratch the ground plane a put a blob between the C14 cap and the ground plane.

https://lemmy.world/pictrs/image/818c178b-3162-41f1-bb3c-5928be0b335d.png

I personally applied this fix to multiple boards and one of them actually became more stable.

Solution 2: add a 100uF (or more) capacitor between EN and GND. I personally applied this and I got some success, a few boards became stable, one of them never failed again, the others fail once a month or so.

Solution 3: Adding a small 22uF 6.3V cap along the edge of the reset switch is an easier place to tack on a cap as one side is ground and the other is the EN line.

Another person says:

I added a larger cap between EN and GND by the RST switch which did work. I verified that the EN line voltage was very choppy before this mod using a scope, afterwards it was smooth and no more random resets while using wifi.

Solution 4: Add a 10k resistor between 3.3v and EN pins to “increase” the EN signal voltage. Never used it, from the schematic it may make sense, there’s a pull up there and the resistor will essentially force it up.

Here’s a comment from another person that is also interesting:

After some experiments with my dad we came to the conclusion that this is a noise/interference problem, most likely related to the WIFI antenna, because covering it with fingers also fixed the issue. So we tried the next logical thing: lower the WIFI tx power, and amazingly it did fix all issues instantly! The funny part is that no additional caps are needed in this case at all!

I’ve read about this potencial wifi leaking into some GPIO / EN from multiple people but I’m not sure I’m convinced. By covering the antenna with a finger the person can be grounding the entire thing thus diverging the power that would’ve leaked into the EN/GPIO into their body.

v1605,

It’s possible these don’t enter boot mode by default. Try grounding gpio pin 0.

TCB13,
@TCB13@lemmy.world avatar

No need to ground it by wire. In order to get the the board into “download mode” you need to 1) connect the board to the computer; 2) press/hold the button labeled as 0; 3) press and release the RST button; 4) release the 0 button. After this sequence a new serial port should come up in your computer. After flashing the board just remove the power and plug it back and it will be done.

moritz,

From the ESPHome documentation:

Support for ESP32 variants such as the S2, S3 and C3 is still in development and there could be issues.

TCB13,
@TCB13@lemmy.world avatar

Yes, but there’s a lot more about a board than the ESP chip itself. Read this: lemmy.world/comment/8814913

  • All
  • Subscribed
  • Moderated
  • Favorites
  • homeassistant@lemmy.world
  • GTA5RPClips
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • ethstaker
  • osvaldo12
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • ngwrru68w68
  • kavyap
  • normalnudes
  • cisconetworking
  • JUstTest
  • InstantRegret
  • khanakhh
  • cubers
  • everett
  • Durango
  • tacticalgear
  • anitta
  • modclub
  • Leos
  • tester
  • megavids
  • provamag3
  • lostlight
  • All magazines