Which pins are 5V tolerant?

MrMinecraft97
Posts: 6
Joined: Wed Oct 14, 2020 1:23 am

Which pins are 5V tolerant?

Postby MrMinecraft97 » Sun Nov 29, 2020 8:53 pm

I have looked for a long time on different places and can not find an agreed upon answer to which (if any) GPIO pins on the ESP32 DevkitC V4 are 5V tolerant. Some sources say that the DevkitC V4 added support for 5V pins, but don't say which. Some others say they all always have been 5V tolerant, and some say that none are.

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

Re: Which pins are 5V tolerant?

Postby ESP_Sprite » Mon Nov 30, 2020 1:21 am

I don't think the DevkitC V4 does anything different wrt GPIOs than previous devkits, which is to just lead the IO pins straight to the header. In this case, the *official* answer is that none of the IO-pins are tolerant, as you can read in the ESP32 datasheet, please do not go making products that involve feeding any 5V source into the chip without proper level shifting. *Inofficially*, however, there's not much that seems to go wrong if you use a proper current limiting resistor (10K or something) between the 5V source and the I/O pin, although this still can lead to long-term degradation. Just don't use that trick for production or something you need to depend on.

MrMinecraft97
Posts: 6
Joined: Wed Oct 14, 2020 1:23 am

Re: Which pins are 5V tolerant?

Postby MrMinecraft97 » Mon Nov 30, 2020 2:43 am

Is there any way to "calibrate" the ADC's to 5V instead of 3.3V? Because after a quick test, it goes over the normal max with 3.3V

becorey
Posts: 92
Joined: Sat Mar 28, 2020 4:18 pm

Re: Which pins are 5V tolerant?

Postby becorey » Mon Nov 30, 2020 8:08 am

You can inspect the schematic, there is no 5V level shifting for the GPIO. The only thing taking 5V is the usb connector, the CP21 usb to serial, and the LDO.

https://www.google.com/url?sa=t&source= ... KScKrVIgRg

The ESP32 is not 5v tolerant, you could not use the built in ADC to a 5V range. You could use an external ADC which operates on 5v. Or, you could scale down your inputs with a voltage divider and op amp, to take 5v down to the 3v range.

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

Re: Which pins are 5V tolerant?

Postby ESP_Sprite » Tue Dec 01, 2020 2:07 am

MrMinecraft97 wrote:
Mon Nov 30, 2020 2:43 am
Is there any way to "calibrate" the ADC's to 5V instead of 3.3V? Because after a quick test, it goes over the normal max with 3.3V
No. Anything above 3.3V will get clipped to that by the EMF protection circuits in the GPIO. Use a resistor divider to get the 5V signal in range of the 3.3V power supply instead.

VioletGiraffe
Posts: 2
Joined: Tue Apr 27, 2021 12:11 pm

Re: Which pins are 5V tolerant?

Postby VioletGiraffe » Tue Apr 27, 2021 12:15 pm

becorey wrote:
Mon Nov 30, 2020 8:08 am
You can inspect the schematic, there is no 5V level shifting for the GPIO. The only thing taking 5V is the usb connector, the CP21 usb to serial, and the LDO.
That in itself doesn't mean anything. Atmel SAM3X8E, the chip in the Arduino Due board, is a 3.3V chip and doesn't receive 5 V voltage, nor does the board have any level shifting circuits, but some (and only some) of the chip's GPIO pins are documented as being 5V-tolerant. Very handy, it's a pity ESP32 doesn't have even a single 5V-tolerant pin since some peripherals operate at 5V and won't work with 3.3V power supply.

Who is online

Users browsing this forum: usmat32 and 173 guests