Do's and Don'ts regarding the ESP boards

Hello, so I have a long history of frying ESPs. I fried 4 or 5 until now, and I want all the Do's and Don'ts regarding using the usual ESP32 and ESP8622.This is what I frequently use. Also, I think some people will tell me to consult the datasheets , but I want to understand the general logic of the ESP architecture (I think it's the same), especially its 3.3V logic, and preferably some tips to not add another poor ESP to the graveyard.

Hi @jiji_loves_electronics. I think the forum helpers may be able to provide more effective advice if you provide a bit more context for this statement:

Do you know what caused them to be fried? If so, please provide details.

If you don't know the cause, is there anything you suspect was the cause? What exactly were you doing with the boards at the time the "frying" occurred?

Certainly not a complete list, but a few absolute basics immediately come to mind:

  • Never apply more than 3.3V to an ESP GPIO unless the datasheet explicitly says otherwise.
  • Don't drive motors, relays, solenoids or other inductive loads directly from GPIO pins.
  • Use flyback diodes where required.
  • Make sure all devices share a common GND.
  • Don't assume the 3.3V pin can power everything you connect.
  • Be careful with breadboards and jumper wires. Bad connections often look like software or ESP problems.
  • Watch the power supply. WiFi transmission can cause surprisingly high current peaks.
  • Be aware of ESD. Modern MCUs are far less forgiving than many beginners think.

The general mindset I would recommend is:

An ESP is basically a small 3.3V computer. Its GPIO pins are signal pins, not power outputs!

I would also add:

  • always use a current limiting resistor to power LEDs
  • do not apply excessive voltages to the VIN pin!

(Generally, no more than 5V to the VIN of an ESP32. The ESP8266 seems to tolerate a greater range, but I would simply not risk applying 12V to it for example.)

However, yes, a bit of context might help to more specifically tailor the advice.

First one: I still don't know until this day. It just suddenly started giving me the No serial data received famous error (I have trauma of this phrase) and it didn't no matter how many boot and EN combinations I tried and how many USB chargers I used.

Second one: I wasn't aware of the 3.3V logic. I didn't know that some pins didn't support 5V, and some pins were input only etc... summary: 3.3V logic.

Third and forth one: I's still in doubt whether they got fried or not, I'm still testing every possible solution out there. For the third one, it began giving me some weird text about invalid header or whatever, I believe because of some component in my project. Here's what it shows me:

Forth one: This is the weirdest one! So it's like a very moody ESP32. It generally has a boot issue, sometimes it uploads the blink test without any interference, sometimes it doesn't until countless tries of pressing boot and EN in an exact combination, and when I try to upload a bigger, more complicated code, it gets progressively hot and gives me the same error message that it shows if I don't press the boot and EN combination:

WARNING: library LiquidCrystal_I2C claims to run on all architecture(s) and may be incompatible with your current board which runs on esp32 architecture(s).
Sketch uses 982739 bytes (74%) of program storage space. Maximum is 1310720 bytes.
Global variables use 47796 bytes (14%) of dynamic memory, leaving 279884 bytes for local variables. Maximum is 327680 bytes.
"C:\\Users\\HP\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esptool_py\\5.1.0/esptool.exe" --chip esp32 --port "COM6" --baud 921600  --before default-reset --after hard-reset write-flash -e -z --flash-mode keep --flash-freq keep --flash-size keep 0x1000 "C:\\Users\\HP\\AppData\\Local\\arduino\\sketches\\B232BA7EF7481487847922095347AA03/Stage_final_Blynk_no_sensor.ino.bootloader.bin" 0x8000 "C:\\Users\\HP\\AppData\\Local\\arduino\\sketches\\B232BA7EF7481487847922095347AA03/Stage_final_Blynk_no_sensor.ino.partitions.bin" 0xe000 "C:\\Users\\HP\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.3.3/tools/partitions/boot_app0.bin" 0x10000 "C:\\Users\\HP\\AppData\\Local\\arduino\\sketches\\B232BA7EF7481487847922095347AA03/Stage_final_Blynk_no_sensor.ino.bin"
esptool v5.1.0
Serial port COM6:
Connecting......................................
A fatal error occurred: Failed to connect to ESP32: Wrong boot mode detected (0x13)! The chip needs to be in download mode.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html

Failed uploading: uploading error: exit status 2

I also tried connecting a capacitor between EN and GND and it gave me an exit status error 2. Esps are so frustrating for me so if anyone can help me with some tips, I'll be insanely grateful.

Thanks! This really helps with the 3.3 logic! I really suggest for espressif to make it easy to identify the input/output and 5Vtolerant/not tolerant pins.

There are NO 5V tolerant pins!

espressif to make it easy to identify the input/output

As with any Arduino you should always read the documentation before you use a board, don't assume anything.

First of all, I have never heard of this error.
Second, if the board were fried, this would not happen. Show us the code and a wiring diagram, and someone can diagnose why you see this. Most likely, you are reading a serial, and there is nothing queued up.

The ESP8266 (I don't know about the ESP32) has several pins that must be in specific states when power is applied otherwise it won't start up. Getting it wrong doesn't cause damage, but if you don't realise what the problem is it does cause excessive frustration.

Do a search for something like ESP8266 pin functions or maybe getting started with the ESP8266 and, hopefully, you will get lots of references.

Type this into the Google search bar

are all Espressif boards 3.3v

You should see a response that starts as foillows

AI Overview

Yes, all Espressif silicon chips and modules operate strictly at 3.3V logic (with an official operating range of 2.2V to 3.6V). However, the physical development boards you buy are designed to accept 5V power inputs through USB ports or dedicated Vin/5V pins. [1, 2, 3, 4, 5]

Understanding how this separation affects your electronics projects requires looking at the power supply versus the logic level.

Power Input vs. Logic Level

The screen grab you posted looks 'normal', I just uploaded Blink to an esp-32 and see this

13:53:35.304 -> ets Jun  8 2016 00:22:57
13:53:35.304 -> 
13:53:35.304 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
13:53:35.304 -> configsip: 0, SPIWP:0xee
13:53:35.304 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
13:53:35.337 -> mode:DIO, clock div:1
13:53:35.337 -> load:0x3fff0030,len:4640
13:53:35.337 -> load:0x40078000,len:15620
13:53:35.337 -> ho 0 tail 12 room 4
13:53:35.337 -> load:0x40080400,len:3164
13:53:35.337 -> entry 0x4008059c

There will be slight differences board to board. The simple answer is this is the board booting, it happens before youe sketch takes control.

When uploading the b link sketch there are NO buttons that MUST be pressed, but my normal procedure is I always press the reset after I click the Serial monitor button top right of screen soI see all the output from boot up.

That's enough for now.

Neither ESP32 or ESP8266 have a VIN pin.

Most development boards that include an ESP32 or ESP8266 have a VIN or 5V pin. But whatever it's labelled, you need to know what the maximum voltage is, which depends on the voltage regulator on that particular board design.

All of the ESP8266 boards I have used would be fried if connected to 12V, because they use low drop-out regulator chips. These have the advantage of allowing the board to run off 3.7V battery power and maximise the battery life by wasting less of it's capacity. But the disadvantage of this type of regulator is that they can't handle input voltages over around 5V.

Other ESP8266/32 boards can take up to 12V on their VIN pin, enabling them to run off higher voltage power supplies or batteries. But the disadvantage of this type is that the probably wont run off a 3.7V battery, and even if they can, they will waste much of the battery's capacity.

Sorry, poorly worded. I am thinking about the dev boards, not the modules themselves.

Absolutely.

You have to be a lot more specific about which board you are talking about (and responders as well0. There are so many variants that it is hard give proper advice.

I have friend a few ESP-01's but i never managed any of the ESP32's or even esp8266 nodeMCU.

The 3.3v logic is the most important catch. Somehow some executive of Espressif once blurted out while slightly intoxicated on a X-mas party that an ESP8266 GPIO pin is 5v tolerant, and somehow this was posted on social media and the truth is, they are not !

ESP8266 GPIO pins are very much not 5v tolerant, particularly when in OUTPUT mode and HIGH. No matter how much you limit the current. There is one exception though on an ESP8266 nodeMCU, the Rx pin usually has a diode and 3.3v pullup and as such is actually 5v tolerant, but not all of those nodeMCUs have that diode.

ESP32 GPIO pins actually have better protection against accidental 5v application, but they are still not 5v tolerant and the protection, when active, will also impair their function. And there is a good chance you will damage the board, regardless of the protection circuit, anyway.

So basically there aren't any.

It states that in nearly every pinout diagram i have seen that on an ESP32(S) GPIOs 34, 35, 36 & 39 are INPUT only (and don't have pullups !)

Maybe you have used a strapping pin in such a way that the MCU goes into a different boot mode.

ESP8266's have 3 strapping pins, GPIOs 0, 1(Tx) & 2. All three of them change the boot mode from it's default (run app from flash) when pulled LOW at boot. GPIO 15 should always be pulled LOW at boot. GPIO 0 enables the flash upload. On an ESP32 that pin does exactly the same and there are more strapping pins that do things but they are not the same for all variants.

This mean of course that if you connect for instance an 'Active HIGH' LED (GPIO -> LED -> Resistor -> GND) to one of the boards strapping pins, it will register as pulled LOW at boot

I have never had that, but if you fry the GPIO it may no longer work, or you may have damaged the USB to TTL converter that is on the devboard by applying 5v to the GPIO pin. (in case of an ESP32 the GPIO pin may have survived, but the USB to TTL converter has no protection at all and is history for sure.)

The normal devboards usually both have the same (or almost the same) regulator on the board, (Wemos and possibly other specific brands excepted that use a regulator which can take only up to 6v i think) the AMS 1117 3.3 which can regulate down from 12v but requires heatsink from a copper pour on the PCB depending on the level of input voltage and the current draw. Anything above 12v will increase Vout by about the same voltage and that is how i fried the majority of my ESP-01s In short it depends on the regulator that is on there, but also keep in mind that the ESP32 will usually draw more current than an ESP8266.

Do not exceed the maximum current draw of any GPIO pin .. Ever ! Most Atmel processor based boards can source or sink up to 40mA per GPIO, but an ESP has a practical limit of about 12mA, enough to light an LED, but not more than that. Also observe the total current draw of the GPIO pins put together. (if you use transistors or logic gates to drive things, you will probably not exceed the limit)

The 3.3v can power some things when a devboard is powered with 5v (as in USB) but not a lot. I have managed a SD-card and an Ethernet module at the same time, but the board does get warm. I think the AMS1117 does have an overheat protection, but it will still reset the board until it's cooled down enough, and also that protection might fail at some point or other stuff can get damaged just from the heat.

There are currently sooo many ESP32 and dev board variations that it's almost impossible to give general advice.
Don't invest a lot of time in ESP8266. It's a design from 2014 and nearing end_of_life.
And so is the common ESP32 actually (from 2016).
They are all being replaced by newer series with a letter behind it ESP32-C3, -S3, -C6, etc.

If you have doubts about your circuit, upload a connection diagram for inspection.
Skipping design steps gets a lot of beginners in trouble.

That is not generally true. "Low dropout" only describes the minimum voltage difference required between the input and output for proper regulation. It does not define the maximum input voltage.

The maximum input voltage depends on the specific regulator being used. For example, many common LDO regulators have maximum input ratings of 6V, 12V, 16V, 20V, or even higher.

The advantage of an LDO is that it can continue to regulate with only a small voltage difference between the input and output, which makes it useful in battery-powered applications where maximizing battery utilization is important.

Whether a board can accept more than 5V depends on the regulator chosen by the designer, the power dissipation, and the board layout. You need to consult the schematic or regulator data sheet rather than assume all LDO regulators are limited to approximately 5V input.

It is always important to examine the data sheet for the item and not to make assumptions that can cause problems and damage. The manufacturer guarantees what they put on the data sheet, not what is assumed.

In my (admittedly limited) experience it is generally true in practice. I agree it may not be and probably isn't universally true and isn't what defines "low drop-out". But I haven't seen regulators with both a low drop-out and a high input voltage range which are commonly available. Can you think of any examples?

I am thinking about MCP17xx series regulators as an example. The 1700-33 has a low drop-out of around 0.2~0.3V but can't accept much over 5V input. Other models like 1702 can accept a higher input voltage but also have higher voltage drop-out.

Of course, terms like "low drop-out" are open to interpretation. I've seen AMS1117-33 described as "low drop-out" for example. I wouldn't call it that!

Because that's when you need to switch to a buck converter.
This one has a low dropout and an input of 36volt.

The 5V output version certainly has an impressively low drop-out and quiescent current. That's much better than I have seen elsewhere.

Unfortunately the 3.3V output version isn't quite so good, having a 700mV drop-out and minimum 4V input, which means you can't really use it with a li-ion battery.

I wonder if a product exists with similar efficiently, low quiescent current and small size which can boost/buck anything between around 2.8V and 4.2V and output 3.3V?

Unfortunately, all of these new variations have abandoned the Ole Classic Bluetooth...

There are a lot of regulators available, but one thing all of the linear regulators have in common is they need to dissipate heat.
Examples:

Vin Vout Efficiency
12 V 5 V 42%
24 V 5 V 21%
36 V 5 V 14%
12 V 3.3 V 28%
24 V 3.3 V 14%
36 V 3.3 V 9%

For 3V MCP1799-3302 — fixed 3.3 V, 45 V max input, 80 mA, SOT-23/SOT-223. Good simple choice for CAN nodes, RTC, logic bias.

LT3011 adjustable, 3 V to 80 V input, 50 mA. More expensive, very rugged.

LT3013 adjustable, 4 V to 80 V input, up to 250 mA depending version/package. Good if you need more current.

TPS7A4001 adjustable, 100 V input, 50 mA. Good for very high surge margin.

For 5V
MCP1799-5002 fixed 5 V, 45 V input max, 80 mA. It comes in 3.3 V and 5.0 V versions.

LT3010-5 fixed 5 V, 80 V input max, 50 mA. Better surge margin.

LT3012B adjustable/fixed family, 80 V input, 250 mA, but watch heat carefully.

TPS7A4001 adjustable, 100 V input, 50 mA. Good if your 24 V bus can see nasty spikes.

Heat generated at 36 V input:
5 mA: (36 - 5) x .005 = 0.155 W
20 mA: 0.62 W
50 mA: 1.55 W
80 mA: 2.48 W

Here are some automotive rated devices:
NCV2931
60 V load dump protection
100 mA output
Very low quiescent current
AEC-qualified automotive version of the LM2931
Available fixed 5 V versions.

LM2931-5.0
Old but proven automotive part
Designed specifically for reverse battery, jump-start, and load dump environments
100 mA output.

LM2940CT-5.0
1 A output
Reverse battery protection
Load dump protection
Common TO-220 package
Often used as a direct automotive 5 V supply.