Go Down

Topic: Myth Busters 3 – Myth: “You must have a gate resistor” (Read 83231 times) previous topic - next topic

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

BillO

For the most part.  It does everything I need it to do.  I wish the residual noise in the add/subtract math functions was a little bit less but I think I'd have to spend 3x as much to to get an appreciable improvement.  The probes it came with are pretty decent functionally even if their build is not as versatile as the Tek probes.

oric_dan

#167
Jul 17, 2013, 12:51 am Last Edit: Jul 17, 2013, 12:58 am by oric_dan Reason: 1
Hey BillO, very nice. I like it all, :-). Good setup, good results, I think you've pretty much taken the possibility of setup+probing problems out of the picture here. The data might be slightly cleaner if you went to < 1 cm length probe ground leads, but probably not necessary at these frequencies [versus what they talked about in the 2 youtube videos]. There is probably some radiation and pickup due to the inductance in the traces going across the lower board from the 328 pins to the shield headers. But all in all, very nice.

I'm not surprised the channel resistance goes up when the output voltage is close to ground. Probably what's going on is, part of the p-channel has closed down because you no longer have an enhancement field-effect occurring in the lower end of the gate region - ie, on the drain end of the gate, the gate-channel field will be effectively 0V, whereas on the source end of the gate, the field is still -5V. Got it?

Are you game to try 1 more experiment? Ie, connect a 100nF cap directly onto one of the I/O pins, and then measure the voltage and current with your same output pulses, :-).

EDIT: actually, 2 more experiments. it would also be interesting to see the dynamic turn-on/off characteristics of the I/O pin outputs. Eg, connect a 125 ohm R to gnd from an I/O pin [5V/40mA = 125ohms], and just measure the basic turn-on/turn-off times, ie rise/fall times.

TanHadron

I'm gonna add my appreciation to the crowd.  I have been following this entire thread with a lot of interest.  I have done some of my own experiments (some of them accidental) but my knowledge of the Science behind the numbers is limited.

When I read the original post, I was worried that by using the average current numbers, BillO had missed the point of high current spikes that could be damaging the chip.  When I read component datasheets and they give pulsed current tolerances that are a lot higher than continuous currents, I understand that the damage occurs because of heating up the junctions, and that could happen in short time frames if the spikes are high enough.  But you guys covered those concerns pretty well, in addition to other issues.  I hadn't ever heard of electromigration or hot electron injection, so that was some interesting reading.  And the concept that maybe damaging the chip isn't the only issue.  I hadn't even considered chip lockups or malfunctions caused by possible internal voltages out of spec.

So, just to make sure I understood it right...

BillO, what you're saying is that the high spikes (hundreds of milliamps) you were seeing back on page 5 were probably caused by dirty setup, and once you cleaned up the setup the readings settled down to pretty much maxing out at 88 mA?  And that's probably limited by the internal resistance of the output pins?

If so, that's important to me for two reasons.  So I can quit worrying about burning out my chip by shorting the pins, and so I can start worrying about other possible problems due to dirty wiring.

In any case, thanks for your work on this, everyone who contributed.

nickgammon


If so, that's important to me for two reasons.  So I can quit worrying about burning out my chip by shorting the pins, and so I can start worrying about other possible problems due to dirty wiring.


Well, with the proviso that possibly a nanosecond or two is OK.

Putting 88 mA out through the pins continuously is way out of spec for the chip.

However I agree it has been an interesting thread. Probably a lot more practical than the ones I read a few months ago when I was investigating this.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

oric_dan


Data sheet implies 192mA can be drawn from an IO port pin.
page 340 Figure 27-22
https://www.sparkfun.com/datasheets/Components/SMD/ATMega328.pdf

Figure 27-22
.53 volts/20mA = 26 ohms

extrapolated by me...
5v/26 ohm = 0.192 amps
192 mA output current is possible at  25 degrees F.
.....


The above was posted a little ways back. I think he really meant to look at Figure 27-24 rather than 27-22, but it gives about the same value for Rds. Those figures, along with the following

Quote
26.1 Absolute Maximum Ratings*
DC Current per I/O Pin ............................................... 40.0 mA

*NOTICE: Stresses beyond those listed under "Absolute
Maximum Ratings" may cause permanent damage
to the device. This is a stress rating only and
functional operation of the device at these or
other conditions beyond those indicated in the
operational sections of this specification is not
implied. Exposure to absolute maximum rating
conditions for extended periods may affect
device reliability.


indicate to me that you can actually draw much more than 40mA from those pins, but you're NOT SUPPOSED to do it. Eg, the current-voltage characteristics in Figures 27-22 and 27-24 don't suddenly stop where the graphs stop, those points simply represent as far as they measured. If you keep dragging the outputs down with heavier and heavier loads [ie, smaller value load-Rs], the current just keeps going up. Not too surprising.

You don't need to do a pulse measurement to show this either, a static load should do. Here's what I measured with a constant HIGH on a digital pin, and 2 different load resistors to gnd:

Vout = 4.96V @ no load
Vout = 1.59V @ 20ohms --> 79.5mA --> Rds(channel) = 42 ohms <-- (4.96-1.59V)/0.0795A
Vout = 0.82V @ 10ohms --> 82mA --> Rds(channel) = 50 ohms <-- (4.96-0.82V)/0.82A


IOW, since it's easy to pull more than 40mA from the pins, using a series-R to protect the pins from short-circuits and over-currents is probably a good idea.

pito

#171
Jul 17, 2013, 08:51 am Last Edit: Jul 17, 2013, 10:24 am by pito Reason: 1
The increase of output "resistance" is caused by temperature dependency of the internal resistance of the  channel (the T is the strongest factor I think). The power dissipation of the internal output structure (based on your measurement) will be

P = 88mA ^2 * 56ohm = 0.43W

that is huge (considering the size of the output transistor), so its temperature rises above 20mA current, definitely.

The power dissipated at 20mA (based on your measurement):

P = 20mA ^2 * 25ohm = 0.01W

So you can estimate the temperature increase of the structure (the thermal resistance Rthermal is the same for both examples):

T = Rthermal * P  +  Tambient

Let us assume the thermal resistance of the "structure on the chip" is 300 degC/Watt (aproximation only, aprox SOT-23A package on a single layer pcb).

T_20 = 300 * 0.01 + 25 = 28 degC

T_88 = 300 * 0.43 + 25 = 154 degC


Let us assume the thermal resistance of the "structure on the chip" is 52 degC/Watt (aproximation only, aprox SOT-89 package soldered to 1 square inch of copper).

T_20 = 52 * 0.01 + 25 = 25.5 degC

T_88 = 52 * 0.43 + 25 = 47.3 degC


So imagine you will short 8 pins:

P = 8 * 0.43W = 3.44W

Let us assume we have the chip in SOT-89 package (used for smd power regulators, soldered to 1 square inch of copper):

T_88 = 52 * 3.44W + 25 = 203.8 degC

BillO


Are you game to try 1 more experiment? Ie, connect a 100nF cap directly onto one of the I/O pins, and then measure the voltage and current with your same output pulses, :-).

EDIT: actually, 2 more experiments. it would also be interesting to see the dynamic turn-on/off characteristics of the I/O pin outputs. Eg, connect a 125 ohm R to gnd from an I/O pin [5V/40mA = 125ohms], and just measure the basic turn-on/turn-off times, ie rise/fall times.


I could, but it won't be for a few days.  I've got a ton of boring stuff to keep me busy for now.  :-(

BillO


BillO, what you're saying is that the high spikes (hundreds of milliamps) you were seeing back on page 5 were probably caused by dirty setup, and once you cleaned up the setup the readings settled down to pretty much maxing out at 88 mA?  And that's probably limited by the internal resistance of the output pins?


Yes, that appears to be the case.

Quote
If so, that's important to me for two reasons.  So I can quit worrying about burning out my chip by shorting the pins, and so I can start worrying about other possible problems due to dirty wiring.


Start worrying about the dirty wiring, yes.  But 88mA is not sustainable.  It will likely damage your chip in short order.  If I gets shorted once or twice for a fleeting instant (like accidentally brushing against it with a ground wire, or slipping while taking a measurement with DMM or scope) it will likely survive.  However, you still cannot draw 40mA or over for more than a few nS, and even then the duty cycle, in my estimation, would need to be less than 0.02% 

Quote
In any case, thanks for your work on this, everyone who contributed.
You're welcome.

BillO


The increase of output "resistance" is caused by temperature dependency of the internal resistance of the  channel (the T is the strongest factor I think). The power dissipation of the internal output structure (based on your measurement) will be

P = 88mA ^2 * 56ohm = 0.43W

that is huge (considering the size of the output transistor), so its temperature rises above 20mA current, definitely.


I'm not sure about this pito.  I did make some other observations but was not going to mention them as they involve a lot of physics.  I know how people tend to react when they feel you are trying to "blind them with science".  So rather than have to sustain the reactionary comments, I was just going to let them slide.  However, you seem to be going down this path anyway, so at the risk...

0.43W is high, but I was not drawing it for any longer than about 7.8x10-6 seconds at a time.  So that is about 3.4x10-6 wattseconds.  That is not a lot of energy so I do not think heat was the issue.  Besides, heat will cause semi-conductors to conduct more, not less.

I spent some time trying to model the the resistance curve and it closely follows something like:

RI(x)=a(mx+b)+e(dx+g)+h, where a, m, b, d, g and h are constants yet to be determined and x is the current.

The linear term (mx+b) suggests a fixed resistance (probably in the interconnect wiring or an actual resistor), the exponential term e(dx+g) suggests the overloading of a MOSFET conduction band (probably the outpout MOSFET).

If you look at the graph I made (I only used one set of measurements. More, of course,  would have made it better) you can see that the exponential component begins to dominate shortly after 40mA indicating that the output MOSFET is actually going into to overload at that point.  I think this is where the 40mA absolute maximum specification comes from.

oric_dan

#175
Jul 17, 2013, 08:15 pm Last Edit: Jul 17, 2013, 08:25 pm by oric_dan Reason: 1

The increase of output "resistance" is caused by temperature dependency of the internal resistance of the  channel (the T is the strongest factor I think). The power dissipation of the internal output structure (based on your measurement) will be

P = 88mA ^2 * 56ohm = 0.43W

that is huge (considering the size of the output transistor), so its temperature rises above 20mA current, definitely.

The power dissipated at 20mA (based on your measurement):

P = 20mA ^2 * 25ohm = 0.01W

Yeah, this is the best observation yet for rounding out all the aspects, as it's likely people will be putting static loads on the pins much more often than 1-usec pulses.

P = 88mA ^2 * 56ohm = 0.43W  <-- disaster (heavy loading/short circuit)
P = 20mA ^2 * 25ohm = 0.01W  <-- acceptable

As everyone knows, exponential functions (ie, I^2) are deadly. Also,

P = 40mA ^2 * 27ohm = 0.04W  <-- edge of (Atmel) acceptability

The last is based upon my measurement this morning with a 100R load on the output pin:
Vout = 3.9V @ 100ohms --> 39mA --> Rds(channel) = 27 ohms <-- (4.96-3.9V)/0.039A

So, for good "general" protection, the series-R should not be less than 100 ohms.

oric_dan

#176
Jul 17, 2013, 08:16 pm Last Edit: Jul 17, 2013, 08:18 pm by oric_dan Reason: 1
Quote
0.43W is high, but I was not drawing it for any longer than about 7.8x10-6 seconds at a time.

Yeah, heating shouldn't be the problem with short pulses.

Quote
you can see that the exponential component begins to dominate shortly after 40mA indicating that the output MOSFET is actually going into to overload at that point.

Exactly so.

pito

#177
Jul 17, 2013, 09:48 pm Last Edit: Jul 17, 2013, 09:50 pm by pito Reason: 1
@BillO: of course I am not saying you heat up the structures to 150degC with a 10ns pulse in your setup..
I did that effort to show newbies (with some simple and for them useful math) that permanent shorting the pins may create a lot of smoke :)
Btw, all the "models" related to the modeling of the mosfet devices are available, googling sometimes helps. Unless you mess with 5-10nm technology, the behavior of the devices is known fairly well today..  ;)

Boardburner2

#178
Jan 23, 2017, 05:42 pm Last Edit: Jan 23, 2017, 05:52 pm by Boardburner2
Bit late i know.
Billo , can you say what the bandwidth of the scope and probes used was ?I cannot seem to select previous pages.

krupski

So there we have it, the myth is just that, a myth and totally ungrounded in fact.  Even if all the measurements were off by a factor of two, the fact is, you can run any reasonably sane logic level MOSFET directly off the pin of and Arduino till the cows come home, PWM or not.  Where this myth came from is anyone's guess, but if you believe in it, you have my pity.
Most everyone here thinks a gate resistor is needed because they work out the peak current that results when trying to charge the mosfet gate, see that it's above the manufacturer's spec and panic.

The fact that the overcurrent lasts only nanoseconds and, in that time, the output pin driver mosfets will not even rise in temperature enough to measure, is irrelevant (and it is heat that destroys semiconductors... and no, geniuses, a few nanoseconds of over current will not cause metal migration on the die either).

It's like those green EE kids fresh out of school. They want to power an LED, run the numbers through Ohm's law and then start searching for the proper resistor... to three decimal places, then wonder why they can't seem to find a 121.294 ohm resistor (and if an old timer tells them that it's not so critical and that a 120, a 100 or even a 150 will work just fine), they don't want to hear it. After all, what can a guy who knows what a 5U4 is possibly know about those "silicon thingies"?

I don't waste my time trying to help anyone anymore. All I get is insults, irrelevant "facts" and complaints about how what I said "won't work" (even though I've been doing it for eons).

Quit banging your head against the wall. All it does is hurt, and nobody appreciates the effort anyway.


Gentlemen may prefer Blondes, but Real Men prefer Redheads!

Go Up