Are ESP Input Pins 5V Tolerant? The Answer May Surprise You.

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Are ESP Input Pins 5V Tolerant? The Answer May Surprise You.

#1 Post by ThomasB » 11 Nov 2021, 18:37

I've been directly connecting 5V peripherals to ESP8266 GPIO pins. Hmm, you say while your face expression scolds me.

There's been endless online battles against doing this because of a fear of damaging the ESP chip, which is a 3.3V logic device. But I've never experienced a single failure connecting 5V logic signals to its GPIO.

Well, it turns out the ESP8266 is 5V tolerant by design. Mr. Teo Swee Ann (founder and CEO of Espressif) confirmed it in this five year old fartbook posting:
https://www.facebook.com/groups/1499045 ... 5033731442

And guess what? The ESP32 is 5V tolerant too.

See these links for details:
https://www.ridiculously-simple.com/202 ... ially-are/
https://ba0sh1.com/2016/08/03/is-esp826 ... -tolerant/

The online rages about how the ESP chip will be harmed if 5V->3.3V logic level conversion isn't used will probably go on forever. But I'm confident that 5V input signals are safe without level conversion.

Of course NEVER power the ESP with 5V. No argument from me that is a bad idea. FWIW, long ago I did that by mistake and the ESP8266 was fine. But it killed the 1MB FLASH chip. Board was repaired after installing a new 4GB chip. But don't expect my good fortune if you make this mistake.

Edit: I found that @kimot already posted this information on the forum in 2017. So consider my PSA to be a fresh reminder.

- Thomas

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Are ESP Input Pins 5V Tolerant? The Answer May Surprise You.

#2 Post by TD-er » 11 Nov 2021, 21:14

One thing to keep in mind; If you connect 5V logic level devices to the ESP, which use the same bus, you cannot mix 5V and 3V3 level signals.
For example when using old and new I2C devices, you should use an I2C port extender to separate the different logic level signals.

The same for serial devices. Most boards have an I2C to UART chip which may not be 5V tolerant.

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Are ESP Input Pins 5V Tolerant? The Answer May Surprise You.

#3 Post by ThomasB » 11 Nov 2021, 22:08

One thing to keep in mind; If you connect 5V logic level devices to the ESP, which use the same bus, you cannot mix 5V and 3V3 level signals.
For example when using old and new I2C devices, you should use an I2C port extender to separate the different logic level signals.
Good point. Something to look out for.

BTW, 5V I2C bus devices can be mixed with 3.3V if you only install 3.3V pullup resistors. This works because the I2C devices never drive (source) the bus; the logic high is provided by the pull-ups.

Removing the SDA and SCL 5V pull-up resistors on a Chinese module/shield is a one minute task after the soldering iron is hot. The fine print: This workaround requires "5V" I2C devices that are compatible with 3.3V signal levels. So check the IC data sheets.

- Thomas

hmoody
New user
Posts: 2
Joined: 30 Mar 2018, 18:50

Re: Are ESP Input Pins 5V Tolerant? The Answer May Surprise You.

#4 Post by hmoody » 14 Feb 2022, 07:14

That statement by Ceo Ann was back in 2016 and specific to the 8266. Was the Esp32 even released then. The 8266 datasheet says io has over voltage protection but the esp32 does not. You have run 32s with 5v io inputs without a series curr limit resistor with no longterm effects?

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Are ESP Input Pins 5V Tolerant? The Answer May Surprise You.

#5 Post by ThomasB » 15 Feb 2022, 00:47

That statement by Ceo Ann was back in 2016 and specific to the 8266. Was the Esp32 even released then.
Swee-Ann Teo has officially stated the ESP32 digital GPIO pins are 5V Tolerant. Discussed here. https://www.ridiculously-simple.com/202 ... ially-are/

TLDR; According to Swee-Ann, the info is not in the data sheet. Confused users think "5V Tolerant" means you can power the chip with 5V. So the wording is scrubbed from Espressif docs to keep the ESP chips out of harms way.
You have run 32s with 5v io inputs without a series curr limit resistor with no longterm effects?
I have not connected a ESP32 input to a 5V device since my designs are using 3.3V devices. But I would not hesitate to do it.

- Thomas

Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests