Surge current rating of a digital I/O pin

Thread Starter

mikewax

Joined Apr 11, 2016
184
I'm not tryin to offend anybody, but this is a legitimate question.
i got a DIO pin with rated capacity of 40mA, and i'm tryin to figure out if it's kosher to connect a 1uF cap straight from pin to ground and safely charge it without a series resistor.
i know mathematically and mechanically that there is a certain wattage limit, or more precisely, a certain "surge capacitance" limit, that it can comfortably handle if it only does it once on power up. And if it was a generally useful thing to know, then there would exist a standard measurement protocol and a clearly defined rating for digital output pins.
But it's not and there ain't. So does anyone have any experience with this?
 

dl324

Joined Mar 30, 2015
16,917
i got a DIO pin with rated capacity of 40mA, and i'm tryin to figure out if it's kosher to connect a 1uF cap straight from pin to ground and safely charge it without a series resistor.
That's an absolute maximum specification that isn't to be exceeded. The realistic max current is 20mA and you need to consider overall power dissipation.

I wouldn't worry about charging a 1uF cap without a current limiting resistor.
 

Thread Starter

mikewax

Joined Apr 11, 2016
184
That's an absolute maximum specification that isn't to be exceeded. The realistic max current is 20mA and you need to consider overall power dissipation.

I wouldn't worry about charging a 1uF cap without a current limiting resistor.
i don't understand. if i connect a cap of any size to the pin then it will exceed the current at the moment of connection.
 

jpanhalt

Joined Jan 18, 2008
11,087
Voltage ratings, IMHO, are not to be violated. You can puncture a mos gate. Current ratings are related to the heat produced. One nanosecond is different than a microsecond and so forth. I do not ignore capacitor charging currents, but I am not a slave to them either.
 

Thread Starter

mikewax

Joined Apr 11, 2016
184
What Device is it??
A Microchip powers up as inputs, and outputs have weak pull ups.
Max.
it's an ATMEGA16u2. And yeah it has optional pull ups. hmmm... in fact, that's a good idea, perhaps i could set it to input with pull up and charge the cap that way. gotta look up the PU resistors..... Ok with 50k resistor then a 1uF cap would charge in about 120mS. That might be my solution. THANX :)
 

dl324

Joined Mar 30, 2015
16,917
i don't understand. if i connect a cap of any size to the pin then it will exceed the current at the moment of connection.
And I wouldn't worry about it. There all sorts of parasitic resistances that will limit current and the devices themselves will typically tolerate shorts for a limited amount of time.
 

sagor

Joined Mar 10, 2019
909
If really worried about the surge current, put in a small inductor in series with the capacitor. That will limit the surge pulse. However, if toggling that pin for some function, the inductance and capacitance will form some type of filter/resonance.
 

eetech00

Joined Jun 8, 2013
3,949
it's an ATMEGA16u2. And yeah it has optional pull ups. hmmm... in fact, that's a good idea, perhaps i could set it to input with pull up and charge the cap that way. gotta look up the PU resistors..... Ok with 50k resistor then a 1uF cap would charge in about 120mS. That might be my solution. THANX :)
no...
1T =50ms
5T= 250mS

also...

arduino gpio go tristate on reset/boot-up
 
Top