Safe IO pin peak current with capacitive load?

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am wondering what the safe transient peak current is for an Atmel AVR output pin is. Safe meaning long term reliable operation won't damage the microcontroller.

 

In my specific application I am driving a STP16NF06L logic level MOSFET directly from an ATTiny85 output pin with an 8Khz PWM. Without a dedicated gate driver there is a trade off between gate current flow and heat dissipation due to switching time. The Arduino hardware specs (e.g. Uno) suggest a 20mA maximum and the Atmel datasheet suggests an absolute maximum of 40mA sink/source current for an individual IO pin. The total gate charge is 7.3 nC, so there is a transient spike in current when the gate charges and discharges. Some tutorials don't use a gate resistor (theoretical 200mA peak current!), forum posts suggest a 220 ohm gate resistor (theoretical 20mA peak current) - assuming a 25 ohms internal resistance on the pins.

 

I used an oscilloscope to measure voltage drop across a 100 ohm gate resistor which indicated a 25mA peak source and 30mA peak sink currents flowing for 200 nanoseconds. Look here for details.

 

I'd love to understand whether it is safe to expose an Atmel AVR to peak current loads >20mA for less than 200ns and should those loads be under the absolute maximum 40mA or can they be higher.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Would be wise to ask moving to general electronics IMHO.

 

Datasheet has it all; design should ensure not exceeding maximum current of 20 mA. 40 mA refers to absolute max that shall not cause damage.

Logic  gate means only suitable voltage levels for driving. One should use a resistor as bare minimum. Shall switch speed (heat dissipation) be a concern, use gate driver: it's common in industrial designs.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Mark Osborne wrote:

 Without a dedicated gate driver there is a trade off between gate current flow and heat dissipation due to switching time.

There is also a EMC/RFI consideration, that says hard/fastest drive is less ideal.

That means some extra power loss is usually tolerated, to buy better RFI.

ie avoid zero ohms gate Rs, and choose maybe 100~500 ohms

 

Mark Osborne wrote:

The Arduino hardware specs (e.g. Uno) suggest a 20mA maximum and the Atmel datasheet suggests an absolute maximum of 40mA sink/source current for an individual IO pin. ...

I used an oscilloscope to measure voltage drop across a 100 ohm gate resistor which indicated a 25mA peak source and 30mA peak sink currents flowing for 200 nanoseconds. Look here for details.

 

Issue is mostly thermal, and you can work an equivalent : eg 20mA DC may give (say)  0.7V  drop => 14mW of driver PD.

A rough calc of  2 edges of  30mA every 8KHz cycle, is ~120uW

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the replies. I appreciate that a dedicated MOSFET driver would be better design, but learning is a big part of the process for me at the moment, so I really wanted to understand why and when I would need a dedicated driver.

 

I am guessing that sinking 200mA from a microcontroller output pin could potentially pull down the voltage elsewhere in the microcontroller, so even if the duration is short enough not to cause thermal issues it could introduce ripple in the microcontroller VCC.

 

So I my takeaway from this is:

  • Going beyond 20mA is fine as long as the average power dissipation remains low
  • I should stay below absolute maximum
  • I should avoid large fast current spikes at high frequencies as these can generate EMC/RFI issues
  • 100 ohms is a reasonable gate resistor value
  • If I need to drive the MOSFET harder then I should invest in a MOSFET driver

Last Edited: Mon. Nov 2, 2015 - 10:45 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you are sinking current (as in pulling down to 0V), then the current path is through the VDD path of the AVR thus 'ground bounce' is the resultant problem.
With EMC issues, the culprit is the rate of change, not necessarily the frequency. With switchmode supplies, i frequently see energy up around the 100MHz region even though the switching freq might only be 50kHz.

Remember that the output mosfets in the AVR have a finite resistance - supposedly around 40Ohms, so this limits the maximum current available. The bond wires also have finite resistance and can either fuse and kill the part or more likely have a voltage drop that causes a violation of the specs and causes the cpu to crash or otherwise act unpredictably. It can also affect the adc precision.