Output characteristic of Digital pin

Reading this topic made me wonder - has anyone measured the output chartacteristic of an arduino digital pin?

Figures from https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf

But I'd be interested to know how they behave as the current is increased beyond 20mA; basically, is a single pin short-circuit proof (to ground or Vcc)?

1 Like

The outputs are not short circuit proof. Currents above 20mA increase the temperature notably, in conjunction with adjacent outputs, with hard to control effects over time (positive feedback).

The data sheet says running at the maximum rating (40mA) can permanently damage the chip.

At 5V the output drivers' on-resistance is very roughly 40 ohms - the output drivers are just MOSFETs so they behave resistively when on, but as the graphs show this resistance depends strongly on temperature. (And the temperature of the output drivers will depend on the current flowing).

The phenomenon called thermal runaway (a chain reaction). If you operate the pin beyond the prescribed ratings, the junctions of the output transistor undergo thermal runaway and finally the pin gets damaged.

Thermal runaway doesn't apply here, the output drivers' resistance increases with temperature as evident from the graphs.

But the driver is not rated for a short circuit, the abs-max is 40mA, can't be clearer than that.

So that the nearly unaffected current increases the dissipated power more and more.

1 Like

No - Ohm's law - more resistance means less current. :sunglasses:

28.2 DC Characteristics (Continued)
Although each I/O port can source more than the test conditions (20mA at V CC = 5V, 10mA at VCC = 3V) under steady state conditions (non-transient), the following must be observed: --->
---> Pins are not guaranteed to source current greater than the listed test condition.

Therefore, for >20mA:

  • Keep output steady state. I can attest to this, switching activity can latch-up the port.
  • pins are not guaranteed to source >20mA.

Together with the external (dominant) load the current reduction is not so high.

For 20mA @ 5V a total resistance of 250 Ohm is required.
A drop of 0.45V @ 25° equals 9mW and an internal resistance of 22.5 Ohm, external resistance of 227.5 Ohm.
At 125° the drop is 0.65V equivalent to 32.5 Ohm and a total resistance of 260 Ohm. That means 19.2mA @ 5V and 12mW @ 0.62V (see diagram). The power increases by 30% even if the internal resistance increases by nearly 50%.

Thanks, that kind of answers my question. I wondered if the output would saturate, but from this example it seems as @MarkT says, they are working in the resistive region.

image

No, the current drops as the resistance rises given a fixed supply voltage in a short circuit situation, or overload condition. In a dead short the pin is well past its absolute maximum anyway so you know the output driver is cooking itself from the get-go.

Only if the load were constant-current sink would runaway be on the cards, but it would have to be voltage runaway.

Then how does the ouput port finally get damaged -- is it due to overheating or dielectric breakdown being a MOSFET?

It cooks itself - remember the driver transistors' dimensions are measured in microns.

Quotes from net:
mosfet fail

How is that overload produced? See my calculation...

When you overload the pin (i.e. short to power supply) it gets to the saturation region. The maximum current you get from a pin (with supply 5 V) is about 90 mA with direct short to GND. From my experiment it does not increase significantly when you get under 2V. There are traces taken for another thread (I don't remember which one and if I really showed it):
Cap PWM


Yellow trace is pin voltage, blue trace is shunt voltage = current. Pink (purple?) trace is yellow/blue = driver resistance.
At start of the trace the pin is OUTPUT HIGH, cap is fully charged, no current flows. Pin is written LOW, discharging the cap, showing voltage/current dependence. You can see the current is about constant until the pin voltage drops to about 3 V.
EDIT: When rethinking this I noticed the traces don't match the schematic exactly: the blue trace should be inverted. In reality the scope ground was probably where the "Blue" label is on the schematic and blue probe was connected to the circuit ground.

You ignore the cap voltage?

The cap voltage (+ the negligible R1 voltage) = pin driver voltage drop.

The cap voltage reduces the pin driver voltage and heat. When the cap is full the pin driver voltage and the current is zero.

I'd reverse the circuit and measure the pin driver voltage instead of the cap voltage.