Current Limits
Current Limits
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
Thanks,
- Matt
Re: Current Limits
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
See:
https://www.espressif.com/sites/default ... eet_en.pdf
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Current Limits
No it is 12mA. 40mA is for logic signals with capacitive loads.
-
- Posts: 9772
- Joined: Thu Nov 26, 2015 4:08 am
Re: Current Limits
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.
Re: Current Limits
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.
Re: Current Limits
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?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.
Re: Current Limits
Neither 40mA nor 12mA applies to DAC outputs.
-
- Posts: 9772
- Joined: Thu Nov 26, 2015 4:08 am
Re: Current Limits
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.WiFive wrote: 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?
Re: Current Limits
Below shows results of measurement of output voltage v. current for drive strength capabilities 0, 1, 2 and 3 (2 is the default).
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.
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.
-
- Posts: 3
- Joined: Wed Feb 10, 2021 3:27 pm
Re: Current Limits
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.
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: Baidu [Spider] and 52 guests