Current Limits

Blade2021
Posts: 1
Joined: Thu May 24, 2018 11:45 am

Current Limits

Postby Blade2021 » Thu May 24, 2018 11:48 am

Hi, I am having trouble finding out how much current the ESP32 output pins can provide and also how much current the whole package can handle at once.

Thanks,
- Matt

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Current Limits

Postby kolban » Fri May 25, 2018 4:11 pm

Looking at the ESP32 data sheet, it seems that the output current (source) on a GPIO should typically be about 40ma.

See:

https://www.espressif.com/sites/default ... eet_en.pdf
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Current Limits

Postby WiFive » Fri May 25, 2018 11:45 pm

No it is 12mA. 40mA is for logic signals with capacitive loads.

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

Re: Current Limits

Postby ESP_Sprite » Sat May 26, 2018 3:40 am

Actually, no. There was some fuzz about the output current handling capacity for a while, but as far as I know, the 40mA number is correct: the 12mA number we used initially was a holdover from the ESP8266, but for the ESP32 we improved the IO-pads, so they can handle a larger current now.

mikemoy
Posts: 627
Joined: Fri Jan 12, 2018 9:10 pm

Re: Current Limits

Postby mikemoy » Sat May 26, 2018 3:49 am

40ma, is very high for an I/O pin. The data sheet does not specify what the total current capacity is. In other words, How may pins sourcing @ 40ma before you exceeded the current for the Vin pin.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Current Limits

Postby WiFive » Sat May 26, 2018 5:26 am

ESP_Sprite wrote:Actually, no. There was some fuzz about the output current handling capacity for a while, but as far as I know, the 40mA number is correct: the 12mA number we used initially was a holdover from the ESP8266, but for the ESP32 we improved the IO-pads, so they can handle a larger current now.
:lol: esp32 keeps us guessing. Do you have to Max out the drive strength setting to get there and what is the max current per domain? And what about rtc I/o mode?

Archibald
Posts: 110
Joined: Mon Mar 05, 2018 12:44 am

Re: Current Limits

Postby Archibald » Sat May 26, 2018 6:18 am

Neither 40mA nor 12mA applies to DAC outputs.

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

Re: Current Limits

Postby ESP_Sprite » Sun May 27, 2018 1:58 am

WiFive wrote: :lol: esp32 keeps us guessing. Do you have to Max out the drive strength setting to get there and what is the max current per domain? And what about rtc I/o mode?
Yes, as the datasheet specifies, this is at max drive strength. RTC I/O is the same, I presume. We indeed also need to specify the current per domain (because as is, the datasheet has nothing indicating it's a bad thing to pull 40mA out of all I/O pins, generating 5W of heat in the poor ESP32) but we need to do more investigation on that first.

Archibald
Posts: 110
Joined: Mon Mar 05, 2018 12:44 am

Re: Current Limits

Postby Archibald » Wed May 30, 2018 11:15 am

Below shows results of measurement of output voltage v. current for drive strength capabilities 0, 1, 2 and 3 (2 is the default).
VIgraph.png
VIgraph.png (56.2 KiB) Viewed 60198 times
The measurements were made with the following resistances: infinite, 2kΩ, 1kΩ, 470Ω, 220Ω, 150Ω, 100Ω, 47Ω and 0Ω. But for strengths 2 and 3 the minimum resistance was 100Ω.

By measuring into a capacitor, I can confirm that the source and sink current limits for drive strength 2 are about 40mA and for drive strength 3 they are about 80mA. Actually source current limits are a little higher than the sink current limits.

The drive capabilities of the digital-to-analogue converters are very different.

Mike.Ochtman
Posts: 3
Joined: Wed Feb 10, 2021 3:27 pm

Re: Current Limits

Postby Mike.Ochtman » Wed Feb 10, 2021 6:28 pm

I'm very late to this party, but the information is still hard to find, buried deep in the datasheets.

The question is "What is the maximum current for the outputs" and the answer is "It depends".

There are three "power domains" on the chip, i.e. three separate power input sections.
Domain VDD3P3_CPU in on pin 37 (NOT GPIO 37) supplies power to GPIO5; GPIO18; GPIO23; GPIO19; GPIO22; GPIO3; GPIO1; and GPIO21.
This domain can SOURCE up to 40mA and SINK up to 28mA on STRENGTH 3

Domain VDD3P3_RTC in on pin 19 (NOT GPIO 19) supplies power to GPIO36; GPIO37; GPIO38; GPIO39 ; GPIO34; GPIO35; GPIO32; GPIO33; GPIO25; GPIO26; GPIO27;GPIO14; GPIO12; GPIO13; GPIO15; GPIO2; GPIO0; and GPIO4.
Remember GPIO34..GPIO39 are inputs only, so cannot be used to source or sink current meaningfully.
This domain can SOURCE 40mA and SINK up to 28mA on STRENGTH 3

Domain VDD_SDIO in on pin 26 (NOT GPIO 26) is a special bidirectional power pin which can be driven by 3.3V externally, route VDD3P3_RTC via an internal network, or supply 1.8V via a LDO regulator. The LDO regulator can only supply 40mA. If using power through VDD3P3_RTC, the internal network will cause a voltage drop; the higher the current drawn, the more voltage will be lost in the chip and more heat generated.
Domain VDD_SDIO supplies power to GPIO16; GPIO17; GPIO9; GPIO10; GPIO11; GPIO6; GPIO7; and GPIO8
This domain can SOURCE up to 20mA and SINK up to 28mA on STRENGTH 3 (Remember the 40mA total limit at 1.8V)

The sum of all the I/O current may not exceed 1200mA

And as a bonus hard-to-find figure, the internal pull-up and pull-down resistors are 45kOhms each.

Who is online

Users browsing this forum: No registered users and 67 guests