Arduino Forum

Using Arduino => General Electronics => Topic started by: BillO on Jul 11, 2013, 09:19 pm

Title: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 11, 2013, 09:19 pm
I see it all the time, especially on this site, those "in the know" telling people they must always use a gate resistor when driving a MOSFET from an Arduino.  The reason they give is that you need to do this to prevent more than 40mA being sourced by the ATmega328.

This has always seemed very odd to me.  I mean, it's been painfully obvious to me that those "in the know" have never tried to verify this, because in my experience it's simply just not been true.  The really troubling thing is, who started this myth?  Where did it come from?  Did anyone ever actually do an experiment to see if it is true?  Or are all those "in the know" just a bunch of lemmings?

I get called out a lot on this site for crossing sacred boundaries.  Yeah, I guess I'm a rogue, but my background as an experimental physicist does not allow me to just believe everything I hear or see written down.  I tend to actually do the math, or where facts and formulas are not available, do the experiment.

Up until now, I have to admit, I have not really put this myth to the test myself, but today I did.  Let's see what I found.

First a little background.  Take note of two things taken from the latest version of the AtmegaXX8 datasheet on the Atmel web site, section 31.  The opening page states the following:

"The current drawn from capacitive loaded pins may be estimated (for one pin) as CL*VCC*f where CL = load capacitance, VCC = operating voltage and f = average switching frequency of I/O pin."

This formula should actually come as no surprise to anyone that knows even a little electronics, but I'm not convinced it's going to work well with pulses.  There is also a graph labeled "Figure 31-355" in that section that is entitled "I/O Pin Output Voltage vs. Source Current (VCC = 5V)".  This is far more pertinent.  We'll use these two snippets in our investigation with the minor adjustment to the graph for our actual Vcc.

What I did:
I got 4 MOSFETs, 3  logic level - 2N7000, IRLZ24N, FDP8880, and 1 non-logic level - IRFZ20.  I drove each of these directly off pin 9 of a ATmega328P without a gate resistor via PWM using the following code:

Code: [Select]

/*
 PWM
 Drive the gate of a MOSFET directly off OutPin.
*/
int OutPin=9;

void setup() {                
 // initialize the pin as an output.
 pinMode(OutPin, OUTPUT);
}

void loop() {
 analogWrite(OutPin, 1);
}


Each of the large MOSFETs were subject to both 16 ohm and 6 ohm drain loads and different pulse widths were tested.  The 2N7000 was subject to a 47ohm drain load.

Let's take a look at the biggest of these MOSFETs and use that first snippet to estimate the load in driving its gate to see if that might be where the myth came from.  Qg(tot) is given as a fairly hefty 29nC.  At 5V that's roughly equivalent to 5.8nF.  The PWM frequency of the Arduino is normally 500Hz, so with 50% duty cycle the average current draw can be estimated at 5*500*5.8nF = 0.015mA.  Well, that's certainly not a lot is it?  It doesn't sound like it would hurt a flea, let alone an ATmega328.  It's pretty obvious that those "in the know" never did that calculation, eh? Well, it doesn't look right to me either and would only work with a sinusoidal wave form anyway, which we don't got here.  Okay, rules of thumb be dammed.  Let's see what really happened.

Our Vcc measured at 4.96V

VGSon and VDSon are measured during the pulse.  Timings are to 90% of final value.

2N7000 - RL= 47 ohms
Code: [Select]
PW Vgson Rise Time Vdson Ton
8uS 4.92V 52nS 244mV 48ns
256uS 4.92V 52nS 240mV 48nS
1024uS 4.92V 52nS 224mv 48nS
2000us 4.96V 52nS 216mV 48nS
100% 4.96V 216mV


Worst case was VGSon = 4.92 which is a drop of .04V from Vcc, according to the graph.  This relates to about 1mA according to the graph, or about .5mA at 50% duty cycle.  The myth is totally busted when it comes to a little 2N7000.  No gate resistor needed!!!

IRLZ24N - RL = 6 ohms
Code: [Select]
PW Vgson Rise Time Vdson Ton
8uS 4.80V 128nS 400mv 118nS
256uS 4.80V 128nS 400mv 118nS
1024uS 4.84V 128nS 398mV 118nS
2000uS 4.88V 128nS 395mV 118nS


RL=16 ohms
Code: [Select]
PW Vgson Rise Time Vdson Ton
8uS 4.84V 108nS 280mV 86nS
256uS 4.84V 108nS 280mV 86nS


Worst case VGSon = 4.8V, implies a drop of .16V from Vcc, implies a peak current of about 5ma.  At 50% duty cycle we are little better and would have an average of about 2.4mA.  Again, the myth is totally busted.  You don't need any gate resistor with this one either, not even with PWM!!!

Okay, now for a pretty big MOSFET, the FDP8880
RL=6 ohms
Code: [Select]
PW Vgson Rise Time Vdson Ton
8uS 4.84V 260nS 168mV 232nS
256uS 4.84V 260nS 168mV 232nS
1024uS 4.84V 260nS 168mV 232nS


RL=16 ohms
Code: [Select]
PW Vgson Rise Time Vdson Ton
8uS 4.88V 232nS 108mV 152nS
256uS 4.88V 232nS 108mV 152nS
1024uS 4.88V 232nS 108mV 152nS


Worst case VGSon = 4.84V, implies a drop of .12V from Vcc, implies a peak current of about 4.5ma.  At 50% duty cycle we would have an average of about 2.5mA.  Yet again, the myth is totally busted.  You don't need any gate resistor with this one either!!!

I even tried (quickly) a non-logic level MOSFET a IRFZ20, and it worked surprisingly well!
RL=6 ohms
Code: [Select]
PW Vgson Rise Time Vdson Ton
256uS 4.80V 244nS 400mV 200nS


RL=16 ohms
Code: [Select]
PW Vgson Rise Time Vdson Ton
256uS 4.82V 212nS 240mV 156nS


You guessed it, busted again.

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.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Tom Carpenter on Jul 11, 2013, 09:37 pm
For small mosfets it is not really necessary, especially if you are switching at low speeds.

However...

I designed a data transfer circuit at one point in which a single output had to drive 30 input CMOS gates with a combined gate capacitance of around 200pF (measured, not theoretical). The switching frequency was around 8MHz.

(the following is muchly simplified math to show a point).

Given Xc = 1/(2Pi * f * C)

Then Xc in this case was: 100Ohms.

I = V/Xc = 5/100 = 50mA


So on average a current of 50mA was required to drive the circuit

So attempting to drive this just resulted in a noisy impossible to use signal. It took a buffer capable of sourcing up to 1A to be able to get nice square clock edges. You will notice that a square wave is made of many harmonics, with really up to the seventh being required to see a square wave, so actually the frequency is more like 60MHz which yields Xc=13Ohm, or I = 400mA being required.
Attached are some oscilloscope traces of the same signal on the same line being driven with and without a buffer.

In power applications, gate capacitances of >100pF are not uncommon, nor are high switching speeds. Clearly you can't just connect an unbuffered/unprotected output in these situations.

You tested 4 MOSFETs, in a small handful of tests with a PWM frequency of 500Hz. There are THOUSANDS of MOSFETs out there, and 500Hz is nothing for switching.
Perhaps in more hobby/arduino type applications, the resistor is unnecessary. But in much larger applications such resistors and even separate buffers become a must. Good practice can hardly be considered "Busted"
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 11, 2013, 09:49 pm
I used pulse widths as low as 8uS, that represents an extremely high frequency.  In fact, not int the tables was a run on the FDP880 using 62,500 Hz with 50% duty cycle, the results were the same as the 8uS pulse.

The MOSFETs used are representative of the spectrum of logic level MOSFETs from small to fairly large.

Yes, I only drove 1 MOSFET at a time, not 30.

Your calculation for current is wrong.  The ATmega328 has a minimal internal resistance of 25 ohms and it goes up from there to about 40 ohms at 40ma.  The most current you can draw from the pin of an ATmega328P is about 88mA into a short.

Why don't you find yourself a logic level MOSFET, do the experiment.  Bring back some results that refute mine.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 11, 2013, 09:53 pm

Perhaps in more hobby/arduino type applications, the resistor is unnecessary. But in much larger applications such resistors and even separate buffers become a must. Good practice can hardly be considered "Busted"


This was more my point.  In any case, if you going to drive 30 MOSFETs at 8mHz, you'd better off with an active driver, not a resistor.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: KeithRB on Jul 11, 2013, 09:56 pm
I just did a simulation, and with a 0-5 V 1nS step, and a Ciss of 1000 pF a 1 ohm resistor causes a peak current of 3A! 150 ohms tames that to 33 mA, so it looks to me that the resistor is a good idea.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Tom Carpenter on Jul 11, 2013, 10:03 pm

This was more my point.  In any case, if you going to drive 30 MOSFETs at 8mHz, you'd better off with an active driver, not a resistor.


You're right of course that an active buffer is required in this case, but it was just an extreme example. Even with single transistors switch much slower (say the 100kHz region as in many switching regulator circuits) you will find there are large peak currents when switching even if the average current is tiny.
I think my point in the end was, it can't hurt to use one. If you are sure in your application it is not needed, then of course don't use one, but if in any doubt, put one there and you won't find any nasty surprises. An in switching circuits always remember that the peak current is much higher than average (I=CVf is a highly unhelpful formula if not a tad inaccurate).
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: mirith on Jul 11, 2013, 10:11 pm
I had actually wondered why whenever I saw someone post "Hey, you should install a series resistor with that MOSFET" I was wondering why.  Thanks for your explanation.  Can someone explain to me exactly what the danger is beyond "Drawing more than 40mA from the uC?"  What condition is producing this relatively large current?

The reason I ask is when I was in school, we worked with MOSFETs as having an enormous impedance on their gates.  However, as I have learned, this is only the case at DC.  I've been working with high power electronics (Though I am in no means an authority on the subject), where we use high power MOSFETS and IGBTs (Basically think of it as a MOSFET that drives a BJT and giving a lot of the benefits of both), and we do add a gate resistor on those (also in part due to the driving chip).  However, that is because we are driving our circuit in the 100kHz range, and it is even more a concern if you are working in the MHz or GHz ranges, as the gate becomes a capacitor to ground (When Frequency goes Up, impedance goes down for Caps).  So I understand why you would want to do it there, as well as some topology issues with power electronics needing to balance out internal currents.

However, the Arduino is generally NOT driving signals at MHz, nor are you using "large" FETs where power distribution can be an issue.  There is some issue of wasting energy and heating up the FET due to slow transition times (Staying too long in the linear region), but not from overloading the driving chip.  Is the concern shorting out the Gate if it fails (Fair enough concern considering hobbyists and electricity)?  Is there some other concern?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Tom Carpenter on Jul 11, 2013, 10:19 pm
High currents damage the tiny interconnects and transistors inside microcontrollers. Sure you can draw 80mA from an Arduino pin, but boy does it get hot, and will undoubtedly shorten the lifespan of the uC.

When switching a speeds even in the 100kHz ranges, the gates of MOSFETS are nothing but a small capacitor. At steady state they are high impedance, but at transitions between states, they get charged and discharged. This charging and discharging can result in short but high peak currents. These current surges if done repeatedly, such as 100000 times a second for a prolonged period, will inevitably lead to degradation of the uC pin driver circuits. 100kHz may not sound like much but a square edge is made up of many high frequency harmonics, so you will find the frequency is much higher than you think.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: pito on Jul 11, 2013, 10:23 pm
I like the "Myth Busters" series, indeed :)
1. 40mA myth - the atmel says clearly in the datasheet the maximum current they guarantee as safe is 20mA
2. output resistance myth - the output resistance of a pin is not XYZ ohms, but it depends on many factors
3. your measurement myth - the only way how to measure the gate inrush current is with oscope during the rising/falling edges, voltage drops are not much relevant
4. 8us extremely high frequency myth - it does not matter how is the frequency of the pwm signal, but it matters how steep are the rising/falling edges, as the inrush current is largest during that time..

You may try to simulate the stuff with spice, I did it already in an another topic, but I will do it for you again..
(edges are 10ns):
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: CrossRoads on Jul 11, 2013, 10:26 pm
Many reasonably priced N-channel, logic level, low Rds MOSFETs have a decent amount of input gate capacitance
http://www.digikey.com/product-detail/en/NTD5867NL-1G/NTD5867NL-1GOS-ND/2401422  675pF
http://www.digikey.com/product-detail/en/AOI518/785-1569-5-ND/3152481  951pF
http://www.digikey.com/product-detail/en/AOI516/785-1568-5-ND/3152480 1229 pF
http://www.digikey.com/product-detail/en/PSMN022-30PL,127/568-7512-5-ND/2606361 447pF

I'd like to see some scope measurements on those.

Input capacitancen on 74CH595 is 10pF.
I don't see it listed for TPIC6B595;
I have driven 20 of them in parallel (SCK, SS) across two boards with no noted operational problem.  Didn't look at the signals with a scope tho.
I regularly drive TPIC6B595s at 4 MHz clock speeds & get expected results as long as 0.1uF decoupling caps are installed on their Vcc pin.
Same with MAX7219, they work fine at 4 MHz clock.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 11, 2013, 10:54 pm

I just did a simulation, and with a 0-5 V 1nS step, and a Ciss of 1000 pF a 1 ohm resistor causes a peak current of 3A! 150 ohms tames that to 33 mA, so it looks to me that the resistor is a good idea.


Do the experiment, not a simulation.  The Arduino will not pass 3A.  Ever!
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 11, 2013, 10:58 pm


This was more my point.  In any case, if you going to drive 30 MOSFETs at 8mHz, you'd better off with an active driver, not a resistor.


You're right of course that an active buffer is required in this case, but it was just an extreme example. Even with single transistors switch much slower (say the 100kHz region as in many switching regulator circuits) you will find there are large peak currents when switching even if the average current is tiny.
I think my point in the end was, it can't hurt to use one. If you are sure in your application it is not needed, then of course don't use one, but if in any doubt, put one there and you won't find any nasty surprises. An in switching circuits always remember that the peak current is much higher than average (I=CVf is a highly unhelpful formula if not a tad inaccurate).


First, the ATmega328 can never pass more than 88ma.  The rise times I measured were in the range of about 100ns to 300ns.  I will bet my last ATmega328 that it will sustain 88ma for 300nS until something else breaks.  Averages are important.  There is time for whatever heat can build up with 88ma for 300ns to go away.  Even the thermal mass will be in effect.

Putting 100ohm resistor in the gate will only increase the turn on time.  This is most likely where people will experience problems at higher frequencies.  Their MOSFETs will over heat.

An active buffer, or diver is the real solution.  Not a resistor.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: pito on Jul 11, 2013, 10:58 pm
5. "The Arduino will not pass 3A.  Ever!" myth - why do you think it is not possible? A capacitor (quality one) charged to 5V and discharged quickly can produce a 3A current easily (in a short pulse)..
6. " I will bet my last ATmega328 that it will sustain 88ma for 300nS until something else breaks." myth - maybe yes, maybe not, however it is not a good engineering practice. You have to design the stuff such it never exceeds any parameter under any conditions..
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 11, 2013, 11:02 pm

High currents damage the tiny interconnects and transistors inside microcontrollers. Sure you can draw 80mA from an Arduino pin, but boy does it get hot, and will undoubtedly shorten the lifespan of the uC.

When switching a speeds even in the 100kHz ranges, the gates of MOSFETS are nothing but a small capacitor. At steady state they are high impedance, but at transitions between states, they get charged and discharged. This charging and discharging can result in short but high peak currents. These current surges if done repeatedly, such as 100000 times a second for a prolonged period, will inevitably lead to degradation of the uC pin driver circuits. 100kHz may not sound like much but a square edge is made up of many high frequency harmonics, so you will find the frequency is much higher than you think.


Steady state yes, but for 300nS while you turn your MOSFET on, nothing bad will happen.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 11, 2013, 11:08 pm

I like the "Myth Busters" series, indeed :)
1. 40mA myth - the atmel says clearly in the datasheet the maximum current they guarantee as safe is 20mA


No.  they say 40mA

Quote
2. output resistance myth - the output resistance of a pin is not XYZ ohms, but it depends on many factors
Yeah, that what I said.  Many times in the last few weeks
.
Quote
3. your measurement myth - the only way how to measure the gate inrush current is with oscope during the rising/falling edges, voltage drops are not much relevant
Yup, measurements were done with a scope.  Rise times on input, and fall time on output are shown.  The other times were comparable so were not shown.  You can do you own calculations given the facts.  If you have an issue, get to work.

Quote
4. 8us extremely high frequency myth - it does not matter how is the frequency of the pwm signal, but it matters how steep are the rising/falling edges, as the inrush current is largest during that time..
Again, times were provided.  Do the math.

Quote
You may try to simulate the stuff with spice, I did it already in an another topic, but I will do it for you again..
(edges are 10ns):
Well, that's cute, but unless your models are correct, it ain't worth snail turds.  Sorry.  Do the experiment.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: pito on Jul 11, 2013, 11:11 pm
Quote
No.  they say 40mA

Where did they say 40?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 11, 2013, 11:13 pm

Many reasonably priced N-channel, logic level, low Rds MOSFETs have a decent amount of input gate capacitance
http://www.digikey.com/product-detail/en/NTD5867NL-1G/NTD5867NL-1GOS-ND/2401422  675pF
http://www.digikey.com/product-detail/en/AOI518/785-1569-5-ND/3152481  951pF
http://www.digikey.com/product-detail/en/AOI516/785-1568-5-ND/3152480 1229 pF
http://www.digikey.com/product-detail/en/PSMN022-30PL,127/568-7512-5-ND/2606361 447pF

I'd like to see some scope measurements on those.


Don't let me stop you.  This was silly easy to do.

Quote
Input capacitance on 74CH595 is 10pF.
It's not just the input capacitance, it's the total gate charge.  The equivalent capacitance will depend on the drive voltage and the VDS, which is a time dependent function.

Quote
I don't see it listed for TPIC6B595;
I have driven 20 of them in parallel (SCK, SS) across two boards with no noted operational problem.  Didn't look at the signals with a scope tho.
I regularly drive TPIC6B595s at 4 MHz clock speeds & get expected results as long as 0.1uF decoupling caps are installed on their Vcc pin.
Same with MAX7219, they work fine at 4 MHz clock.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 11, 2013, 11:16 pm

5. "The Arduino will not pass 3A.  Ever!" myth - why do you think it is not possible? A capacitor (quality one) charged to 5V and discharged quickly can produce a 3A current easily (in a short pulse)..

Because I shorted one out and measured the current.  

Quote
6. " I will bet my last ATmega328 that it will sustain 88ma for 300nS until something else breaks." myth - maybe yes, maybe not, however it is not a good engineering practice. You have to design the stuff such it never exceeds any parameter under any conditions..
That is just preposterous.  Where did you get that gem?

Ahhh..., I don't even want to go there.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 11, 2013, 11:19 pm

Quote
No.  they say 40mA

Where did they say 40?
Really?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 11, 2013, 11:30 pm
Interesting thread. Especially as I was trying to work out what value gate resistors were required a while back.

As suggested above, I set up an actual test. Unless I misread his post the OP has not actually measured current, but rather voltages.

Surely the relevant test is: does the output pin have to supply more than 20 mA (or 40 mA if you don't mind the absolute maximum rating) at any time?

Here is my test circuit:

(http://www.gammon.com.au/images/Arduino/Arduino_forum_176968a.png)

I put the scope leads on A and B and set up the maths "difference" to find the current through the 0.2 ohm resistor.

Results:

(http://www.gammon.com.au/images/Arduino/Arduino_forum_176968b.png)

(http://www.gammon.com.au/images/Arduino/Arduino_forum_176968c.png)

So, a 140 mV pulse for 10 nS.

Using Ohms Law:

Code: [Select]

I  = 0.140 / 0.2 = 0.7


Thus unless I have made a mistake somewhere, that is a pulse of 700 mA. This is well out of spec for the output port.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 11, 2013, 11:32 pm
Interesting Nick.  What was your signal source?

Also, I see your large pulse width is something like 10nS. 
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 11, 2013, 11:34 pm
Function generator.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 11, 2013, 11:35 pm

Function generator.


How is that relevant Nick?  I thought I made it clear that I was using an ATmega328.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: pito on Jul 11, 2013, 11:36 pm
@Nick - you have to connect something to the drain, as the input capacitance consists from Miller capacitance as well, which depends on Vds.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 11, 2013, 11:37 pm
Quote
What was your signal source?


It's a good question because I understand perhaps the Atmega won't put out 700 mA, but by using the function generator:



Quote
I thought I made it clear that I was using an ATmega328.


Yes that is clear. However see my two points above.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 11, 2013, 11:42 pm

Quote
What was your signal source?


It's a good question because I understand perhaps the Atmega won't put out 700 mA, but by using the function generator:


  • I don't damage my ATmega328 chip

  • I see what current could potentially be drawn



Quote
I thought I made it clear that I was using an ATmega328.


Yes that is clear. However see my two points above.


You won't damage your ATmega328.  PM me your address.  I'll send you a brand new one all the way to Oz and you can try it out all you like.  I know they cost all of $4 and that might be a burden on some.

BTW, the whole point is, do you need to use a gate resistor with an Adruino, not your function generator.  I am sure, if you used a 27,000uF, LOW ESR capacitor as a single shot signal source, you could get the gate current up to several amps.  However, that is an entirely different discussion.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: mirith on Jul 11, 2013, 11:51 pm
There is actually a relatively simple way to test this.  Take a decent AC/DC Current sensor (preferably with as low a resistance as possible, as we are testing this, but I imagine even 200mOhms could be too high).  Connect said Current sensor between an arduino and a few common MOSFETs.  Run at various pulse lengths, and measure with a scope.

That being said, I don't have a good current measurement tool.

If I'm following this thread correctly, the concern is that the system is generating large current spikes when you switch, due to the harmonics of a square wave.  Overtime, and especially if you are driving it at 100kHz level, this could damage your Arduino since the spikes can exceed the absolute limits of the device.  Adding my own input, adding a gate resistor acts both as a current limit, and along with the gate capacitance, a simple Low-pass filter, rolling off the high frequency.
Is this a decent summary so far?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 11, 2013, 11:52 pm

@Nick - you have to connect something to the drain, as the input capacitance consists from Miller capacitance as well, which depends on Vds.


OK then, I connected up an LED, and resistor in series, to a 5V power supply. Now:

(http://www.gammon.com.au/images/Arduino/Arduino_forum_176968d.png)

440 mA.




Quote
BTW, the whole point is, do you need to use a gate resistor with an Adruino, not your function generator.


Yes, hmmm. But is your argument then that the Arduino must have a series resistor on the output pin?

Just out of curiosity, why don't you measure the current?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 11, 2013, 11:52 pm
@mirith.  It's more the current draw from the I/O pin of the Arduino.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: jroorda on Jul 11, 2013, 11:53 pm
On the original topic...  I have never used a gate resistor myself, but when I draw schematics for fellow students I ALWAYS include a gate resistor so that when they inevitably insert the MOSFET backwards, upsidedown, sideways, crisscross, or short all of the pins to the internal ground plane (happened the last time I didn't include the gate resistor) it won't fry the chip (328, the FET's a goner).  

Considering that many of the people asking advise here have even less electronics experience that my classmates, I think including a gate resistor on schematics posted here is not a bad practice.  In most every design it is nothing more that a little bit of cheap insurance.  
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: pito on Jul 12, 2013, 12:00 am
@Nick: a good match..
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 12, 2013, 12:01 am

Yes, hmmm. But is your argument then that the Arduino must have a series resistor on the output pin?


No, I think you might be confusing me with someone else.

Quote
Just out of curiosity, why don't you measure the current?


Well, I can give it a shot tomorrow if you like.  But what will it prove?  That the ATmega will need to pass 88mA for a few hundred nS?  I sm sure of that anyway.  I showed the ATmega will not pass more than 88ma the other day.  If it needs to do it for 1/3 of one millionth of a second, do you seriously believe that represents a hazard to the device?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: mirith on Jul 12, 2013, 12:04 am

@mirith.  It's more the current draw from the I/O pin of the Arduino.

Current in = Current out.  Measure the current through the wire to the gate, then you get the current being drawn from the Arduino.

I think we can all agree that the MOSFET will only be drawing significant current during switching.

Nick's results are also telling.  440mA is a bit high, though the input impedance could matter.  I believe FG's are intentionally low impedance.

I agree completely with Jroorda on the whole "Bad things happen and it is insurance" but I'm still curious if there was some other reason.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 12, 2013, 12:05 am

@Nick: a good match..


Nice!

So...., what exactly does this have to do with the discussion?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: pito on Jul 12, 2013, 12:08 am
:)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: KeithRB on Jul 12, 2013, 12:15 am
"If it needs to do it for 1/3 of one millionth of a second, do you seriously believe that represents a hazard to the device?"

Now you get to do another experiment: how long does it take to fuse a 1 micron aluminum trace on SiO2?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 12, 2013, 12:21 am

BTW, the whole point is, do you need to use a gate resistor with an Adruino, not your function generator.


OK, this is with my Uno and your exact sketch on page 1:

(http://www.gammon.com.au/images/Arduino/Arduino_forum_176968e.png)

(http://www.gammon.com.au/images/Arduino/Arduino_forum_176968f.png)

840 mA there.




I just want to clarify what your real point is, BillO.

Quote

Worst case VGSon = 4.84V, implies a drop of .12V from Vcc, implies a peak current of about 4.5ma.  At 50% duty cycle we would have an average of about 2.5mA.  Yet again, the myth is totally busted.  You don't need any gate resistor with this one either!!!


You initially seemed to be claiming that the MOSFET will not actually draw more than the rated 20 mA. You quote there, 4.5 mA.

But now:

Quote

But what will it prove?  That the ATmega will need to pass 88mA for a few hundred nS?  I sm sure of that anyway.


Now you are "sure" that it will have to pass 88 mA (this is not actually measured by you).

So your position is either:



Which is it?

Quote

If it needs to do it for 1/3 of one millionth of a second, do you seriously believe that represents a hazard to the device?


I better get Grumpy_Mike to comment on that.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 12, 2013, 12:27 am

@Nick: a good match..


Thanks. It's always gratifying when theory and practice match up. :)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Erdin on Jul 12, 2013, 12:41 am
May I conclude this:

If you are a student or new to Arduino and mosfets, use 1k series resistor to the gate for safety.

If you don't care about peak currents, and use de standard PWM of analogWrite and normal mosfets, you don't need a resistor. It might be beyond the specificiations, but no one has damaged an avr chip this way.

If a lot is going on (analog inputs, standalone avr chip, and so on), you want to avoid the current spikes. Use 150 ohm resistor.

If you want super blasting speed or when using heavy duty mosfets, use a mosfet driver.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Coding Badly on Jul 12, 2013, 12:45 am
There is also a graph labeled "Figure 31-355" in that section that is entitled "I/O Pin Output Voltage vs. Source Current (VCC = 5V)".  This is far more pertinent.


I assume the chart indicates the lower limit; that Atmel guarantees a voltage drop from 5V of no more than 0.3V at 10 mA and 85°C.  In order to make such a guarantee, they have to produce processors that consistently perform as well or better than what is indicated on that chart.

I believe you are basing your argument on that chart.  What if I'm correct, that the chart depicts the lower limit?  What if processors typically exceed that limit?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: DVDdoug on Jul 12, 2013, 12:45 am
Quote
Yeah, I guess I'm a rogue, but my background as an experimental physicist does not allow me to just believe everything I hear or see written down.  I tend to actually do the math, or where facts and formulas are not available, do the experiment.


- You buy a bolt rated at 10,000 lbs.
- You pull-test to 20,000 lbs and it doesn't break.

- Do you design that bolt into a structure that puts 20,000 lbs of stress on the bolt?
- The next time you buy that same bolt, do you trust it to hold 20,000 lbs?
- If you design 1000 of those bolts into your bridge and stress them all to 20,000 lbs, how long 'till the bridge falls down?

A good engineer is going to design the structure to put no more than 5000 lbs on the bolt.   And, a good bolt manufacturer is going to make sure that all bolts can exceed the 10,000 lb rating.


- Did you design the new San Francisdc Bay Bridge? (http://sanfrancisco.cbslocal.com/2013/05/24/busted-bay-bridge-bolts-manufacturer-denies-blame/) :D :D :D
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 12, 2013, 12:46 am
Better read this related thread:

http://forum.arduino.cc/index.php?topic=176659.0

I liked this quote:


Phew. This reminds me of discussions about ESD damage.

Q1: What's the first sign that ESD has damaged a CMOS gate?

A1: Nothing at all. (IE, nothing visible)

Q2: What is the second sign that ESD has damag... hey, it quit working for no visible reason!


Exactly. First everything seems to work fine. You "proved" you didn't need a gate resistor. Then, three months later, the chip stops working. You then "proved" (to yourself) that the Atmel chips are unreliable.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 12, 2013, 01:21 am
Well,

There it is.  The only one that has claimed to actually try anything is Nick.  I will attempt to corroborate his results tomorrow.

In the mean time.  Yes Nick, if you need the simple statement put a different way, I am saying that you can exceed steady state absolute maximum ratings if it is done for short enough times.  Most manufactures of components provide pulse ratings and the conditions under which absolute maximums are in effect.  Atmel do not.  We don't really know if 40mA is truly steady state, or for 10s, or 1ms or 6nS.  (Just as an aside, why does this seem so unreasonable to y'all?)

It is just not required to put this fine a point on it.  My original statement holds, and it is what I mean.

Everyone keeps trying to re-interpret it, and re-state it in other terms, or theorize their way around it, or use a completely different situation.  There is no need.

Here it is once more, plain and all by itself.

You don't always need a gate resistor when you drive a MOSFET with an Arduino.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 12, 2013, 01:25 am


840 mA there.



Really?

So Nick,

How is your test circuit grounded?  Through the scope leads?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 12, 2013, 01:40 am
The scope leads are grounded, and the MOSFET is grounded at the Source. Ground is of course connected to the Arduino ground. So it's a common ground, basically. I wouldn't say that the test circuit is grounded through the scope exactly. It is grounded via its own wire.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: AmbiLobe on Jul 12, 2013, 02:08 am
Clarifications related to this Myth
The 40mA spec is for DC, see Table 26.1 on page 313...
https://www.sparkfun.com/datasheets/Components/SMD/ATMega328.pdf

Risks of using high transient currents on a Port pin :

#1 The analog input accuracy may be disturbed by transient currents. The ADC Analog to Digital Converter can be characterized by hobbyists to fill in the specifications which Atmel prefers not to make promises about. The ADC results can be recorded when a 2nF capacitance of a MOSFET is loading a port pin. Several 2nF loads can switch at once.

#2 IR drops on internal wires of the microprocessor  may exceed simulated voltages. Those IR drops can cause malfunctions if they occur at critical times of a clock cycle. Sweeping the timings of  the 2nF load charging may find a weak time when a problem occurs.

#3 Electromigration will be accelerated so that the IC fails after a shorter time than if small currents are used. Ten year reliability could degrade to less reliability.

#4 Hot electron injection will be increased when the IC's FETs are in the saturation region. This results in a shift in the Vt threshold voltages of FETs. As time goes on , rapid aging can occur that causes timing violations for internal logic gates. Higher currents produce more hot electrons. Avoid high currents by using the series resistor which is wisely recommended by non-cheaters for driving power MOSFET gates that have a high capacitance, like 2nF.

#5 Substrate currents increase when the port drivers pass through the saturation region. Latch-up is made more likely when cheating on the specs which Atmel has provided concerning the 20mA test current and the 40mA absolute maximum DC.

Practice Safe Specs !
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: newbeWanKenobi on Jul 12, 2013, 02:30 am
@Billo
You are so wise, please can you tell me why you are so much cleverer that the people who made the ATmega. They must have been so stupid to say that 40mA was a stress rating only. So please tell us what do you know that they do not?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 12, 2013, 02:34 am

The scope leads are grounded, and the MOSFET is grounded at the Source. Ground is of course connected to the Arduino ground. So it's a common ground, basically. I wouldn't say that the test circuit is grounded through the scope exactly. It is grounded via its own wire.


Good answer Nick.  Just checking.  I will attempt to repeat your results tomorrow.  I'll need to parallel 5 1 ohm resistors to get to the .2 ohms.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 12, 2013, 02:38 am
Excellent. The basis of scientific method is to have repeatable results. If yours don't agree reasonably closely with mine, show what you get and we can investigate the reasons for the differences.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 12, 2013, 02:48 am

@Billo
You are so wise, please can you tell me why you are so much cleverer that the people who made the ATmega. They must have been so stupid to say that 40mA was a stress rating only. So please tell us what do you know that they do not?


Hey dude, aren't you sweet.

Tell me, what could I tell you that you would feel obliged to believe?

BTW, how do you know I'm not just getting people to do some critical thinking rather than just following the same old doctrine.  Most people just follow something they were told to do by someone that heard it some place from someone that claims they herd it from an expert, that...

How many people on this site actually check things out?

You know, it really does not matter to me if you end up believing me or not.  I'll continue to do things the way I do them and you'll likely keep following the crowd.  I just presented a different idea.  the Gist?  Rather than spewing back more hearsay crap, why not try to verify what it is you are doing.  The only one here so far that has taken that step is Nick.  His advice on this, going forward, will be the only advice I will feel merits being given.  once all is said and done he and I may still disagree on the interpretation of the results we find, but at least he will be able to speak from a position of real authority based on real work and real results.  Not just quoting some gibberish handed down from lord knows where.

BTW, I have no idea where your comments come from.  Well, yeah, on second thought I guess I do...
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: newbeWanKenobi on Jul 12, 2013, 03:13 am
Oh Bill O, I am so disappointing in your response.

Quote
Tell me, what could I tell you that you would feel obliged to believe?

Well the nice people who make the ATmega chip will have taken several hundred chips and subjected them to various currents for a month or so. Then they would have decapsulated them all and examined them with a scanning electron microscope to assess any damage. They then would have come to a conclusion and included it in the data sheet. This is part of what they call qualification. But you know all this being so smart and all.

You are surely not saying that you did not examine the chips after your special stress tests, on what tens of devices, that proved you can't blow up the chip with excess current are you?  As you yourself say in your signature
Quote
Facts just don't care if you ignore them

Don't be a false prophet and ignore facts please your ideas are so revolutionary.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: polymorph on Jul 12, 2013, 05:51 am
I am new here, but I don't think sarcasm helps get a meeting-of-the-minds.

And being new hear and having just read the rules, one of them is "be polite".

It is nice to see a few people actually doing some testing of their assertions.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 12, 2013, 06:03 am
Yes, keep it polite please.

Some claims have been made, they are being tested. That is the scientific way.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 12, 2013, 07:03 am

Good answer Nick.  Just checking.  I will attempt to repeat your results tomorrow.  I'll need to parallel 5 1 ohm resistors to get to the .2 ohms.


To save you the trouble I retested with 1 ohm:

(http://www.gammon.com.au/images/Arduino/Arduino_forum_176968g.png)

(http://www.gammon.com.au/images/Arduino/Arduino_forum_176968h.png)

To be honest, I don't quite believe the results. Perhaps someone with a greater grasp of RC theory can comment.

The only explanation I can think of for the apparent greater current draw is that with the 0.2R resistor my wires may have added extra resistance which was not measured by the scope probes (because they were just across the resistor).

(edit) That was with the function generator, not the Arduino pin.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 12, 2013, 07:10 am
Below is with the Arduino output pin:

(http://www.gammon.com.au/images/Arduino/Arduino_forum_176968i.png)

(http://www.gammon.com.au/images/Arduino/Arduino_forum_176968j.png)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: fungus on Jul 12, 2013, 08:54 am

BTW, how do you know I'm not just getting people to do some critical thinking rather than just following the same old doctrine.


"Doctrine"? LOL!


Most people just follow something they were told to do by someone that heard it some place from someone that claims they herd it from an expert, that...


That's not the same as reading the actual datasheet written by the maker himself.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: oric_dan on Jul 12, 2013, 08:58 am
Nick, why is there so much ringing on your measurements? And why didn't OP show some of his own recorded results? Did he have ringing too? It's very hard to base any conclusions on bald statements alone.

In your case, you might move the scope probe ground and see if the ringing is reduced. (1) at those frequencies, the probe ground should be as close to the point of measurement as possible,  not several inches away, and (2) you should not be ginning this thing up on a whiteboard, or using those silly male jumper pins that plug into the Arduino female headers. You need good cktry at high frequencies.

Also, I believe it was Pito mentioned Miller Effects. Besides the gate-source capacitance, there are large drain-gate capacitances that can feedback signals from the drain to the gate, and effect the driver operation [ie, the Arduino pin]. OP hasn't really busted much of anything unless he tries putting some nice inductive loads/whatever on the drain, and not just passive Rs. And also show some actual data. Like you did.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 12, 2013, 09:13 am

Nick, why is there so much ringing on your measurements?


I'm not sure, to be honest. I haven't tried very hard to do short, tight cable runs. Plus even moving the wires around changes the effect somewhat. I am guessing that there is some inductance/capacitance in my setup.

With the sorts of figures we are talking about (like a 6 nS spike) there is an element of doubt in my mind about various aspects of this. For one thing, the oscilloscope probably is at its limits. Plus the cabling will be adding capacitance.

I would guess that manufacturers such as Atmel do very tightly controlled tests with very expensive equipment. Then they can make claims based on measurements (and probably also theoretical predictions). For example, from the datasheet page 316:

Quote

4. Maximum values are characterized values and not test limits in production.


I'll be happy if I come out of this exercise with greater knowledge about gate capacitors, measuring brief current spikes, and the limitations of my equipment.

I haven't seen anything yet which contradicts the datasheets.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: oric_dan on Jul 12, 2013, 09:39 am
If I had the proper equipment, I would do the following:

1. use a MOSFET with large Cgs, probably an IRLZ44N, etc.
2. solder up some good ckts and robust connections with short wires, rather than use a
    whiteboard, jumpers, etc.
3. try 0,  10, and 100 ohms for the gate R.
4. try both passives Rs and also inductors for the drain load, or even something more
    complicated, like a pullup R and a cap or inductor to ground on the drain. Ie, something
    to instill some high-frequency ringing on the drain.
5. take some pains to ensure the scope probe is positioned optimally to reduce ringing.

Then, I might learn something about how these things actually work.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: pito on Jul 12, 2013, 09:39 am
That is not a rocket science to understand a capacitor charged/discharged from a voltage source (for example with low impedance) produces a high inrush current. Just in this moment I am ordering a new diode (UF600D, 6A, 200V) as a replacement because the one in my linear power source died after few years of operation (I assume too big inrush current into the ~15mF filtering cap, no limiting circuitry for the inrush current when switched on). The max diode current during operation of the power source is about 2A, max rev voltage 25V.
As a responsible designer of a certain equipment sold to the customers in volumes, with a warranty, you will certainly deal with such details as the max peak current (even when 300ns long)..  ;) Arduino world is different.

@Nick: the output pin structures of an mcu (ie 328p) are complex, including protection clamping diodes etc. With large current pulses you may get some glitches out of the pin.

Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Tom Carpenter on Jul 12, 2013, 10:24 am
I'll take some readings when I get home this evening. I'll see what MOSFETs I have lying about. Also, what resistor values would you like me to try, I have one of each E48 series value between 0.1 and 2 Ohms.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: fungus on Jul 12, 2013, 10:26 am

Then, I might learn something about how these things actually work.


Which part of 'charging a capacitor' is likely to be unique to MOSFETs?

At the start of a charge cycle a capacitor's resistance is close to zero, more than 40mA will come out of the Arduino pin.

No amount of messing about with resistors and 'scopes will tell you what that's doing to the AVR chip's internals. The people who know the most about that are the people who wrote the datasheet.

Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: pito on Jul 12, 2013, 10:47 am
Quote
No amount of messing about with resistors and 'scopes will tell you what that's doing to the AVR chip's internals. The people who know the most about that are the people who wrote the datasheet.

That is a very good point. There is a lot of stuff around the output pin on the chip, moreover with maybe 180nm fab process. At these scales the heat (the heat peak at a specific structure on the chip, with maybe 1um x 1um of size), emag fields, currents, voltage drops on the internal wiring (the wires in maybe XY layers made of aluminum are maybe 200-400nm in width), etc. play a significant role. I would say even the designers of the chip did not elaborate all the situations, as they simply do not have time for that (I am sure about that, as I did it looong time back :) ). Therefore they do not guarantee anything over 20mA. There is a lot of effects which may disturb a proper operation when exceeding recommended values, especially output currents.
PS: "300ns" - that is arduino's 5 clock cycles or max 5 instructions I guess..
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 12, 2013, 01:24 pm

I'll take some readings when I get home this evening. I'll see what MOSFETs I have lying about. Also, what resistor values would you like me to try, I have one of each E48 series value between 0.1 and 2 Ohms.


To reproduce my tests try 0.2 and 1 ohms, however it probably isn't critical. Anything that reproduces the general idea should help. Anything really low (like 0.1 ohms) is likely to be thrown out a bit by the resistance in the connecting wires.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 12, 2013, 01:26 pm



That's not the same as reading the actual datasheet written by the maker himself.



There seems to be a lot this sort of nonesense in this thread.  No where did I say the datasheet was wrong.  It is, in fact the source of my information.

The only assertion I made about the datasheet was that there specification of a 40mA maximum I/O current is not accompanied with a time factor.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 12, 2013, 01:57 pm
And why didn't OP show some of his own recorded results? Did he have ringing too? It's very hard to base any conclusions on bald statements alone.


There was no significant ringing the the gate of the MOSFET, but I was doing my measurements differently and looking for something different.  I was measuring the voltage across the gate in order to determine the loading of the Arduino during the pulse.  I re-run one of the tests and take images.

The ringing seen here would be occurring during the "rise" of the trace on my recording.

So, this brings up some questions to me.

First, according to the data sheet (page 512, section 31, figure 31-155) the typical output has a minimum resistance of 25 ohms.  This would seem to indicate that large current could never be drawn from an I/O pin.

Second, according to the data sheet (page 76, section 14: "I/O ports") the ATmega output is represented as having an associated capacitance and that this capacitance (at least as shown) appears after the logic and drive.  The only reference to a capacitance value I can find in the data sheet is for the 2-wire interface pins where a value of 10pF is given (page 315, section 29.7, table 29-19).

So, is this capacitance in conjunction with capacitance and inductance introduced by the test setup a possible explanation for the ringing and higher than expected currents for very short periods?  After all, the typical scope probe puts 10pF or more across the test point.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 12, 2013, 02:02 pm

There is also a graph labeled "Figure 31-355" in that section that is entitled "I/O Pin Output Voltage vs. Source Current (VCC = 5V)".  This is far more pertinent.


I assume the chart indicates the lower limit; that Atmel guarantees a voltage drop from 5V of no more than 0.3V at 10 mA and 85°C.  In order to make such a guarantee, they have to produce processors that consistently perform as well or better than what is indicated on that chart.

I believe you are basing your argument on that chart.  What if I'm correct, that the chart depicts the lower limit?  What if processors typically exceed that limit?



That section is entitled "Typical Characteristics"
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: alnath on Jul 12, 2013, 02:07 pm




That's not the same as reading the actual datasheet written by the maker himself.



There seems to be a lot this sort of nonesense in this thread.  No where did I say the datasheet was wrong.  It is, in fact the source of my information.

The only assertion I made about the datasheet was that there specification of a 40mA maximum I/O current is not accompanied with a time factor.


Hi,
I agree with you, they don't give a precise time limit, but they clearly say that these are "absolute maximum ratings" .
You assume that you cant let the output deliver 80mA  (the limit you say arduino will stay in, but no datasheet says that, and looking at the schematics, I can't see anything that could make that limit ;) ) as long as it doesn't last too long .
What is "too long" for a 328 ??
Sure you can go far beyond the absolute max. without seeing any damage, but, especially if you do that often, the chip won't like it, and one day, you'll wonder why it behaves that weird way and you'll spend hours to find out...when suddenly you'll remember the choice you made that famous day, about the resistor .... "not really needed"  ;)
I also agree with you about the fact that most users, especially beginners, rely too much on the "answers" they get on the net and that, each time it is possible, it is better to try than to believe what is not clearly explained and proved to be true, but, as far as I'm concerned, I trust the datasheet, and try to stay as far as I can under the limits given in the absolute maximum ratings ...
anyway, I've read this thread with a real interest, and I really like the Nick Gammon approach  8)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 12, 2013, 02:28 pm
This question has come up several times in this thread.  Where did the 88ma max come from?

Well, I took an ATmega328 and, in turn, I shorted every I/O pin and measured the current.  Every pin produced a current of 88mA into a the short.  I took 2 other ATmega328s and tired a couple of pins on each.  They also produced 88mA.

I measured the actual resistance of the short at 0.3 ohms.

That is where the figure 88mA comes from.  This was done a few days ago and appears in another thread around here.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: JB_AU on Jul 12, 2013, 02:34 pm
Quote
specification of a 40mA maximum I/O current is not accompanied with a time factor


Nor will it ever be, unless the manufacturer can guarantee the grade of silicon in every chip.

[Trivial Fact #1]
Intel, Samsung & Texas Instruments are the people who produce the highest of quality & strictest QA of silicon ingot production.

[Trivial Fact #2]
Many Semi-conductor companies do not produce there own silicon.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: alnath on Jul 12, 2013, 02:41 pm
Yes, I remember that, but I've also seen Nick's results, showing more than 1V on a 2 Ohms resistor ....  :smiley-roll:
and nothing in the datasheet says anything about internal limiting devices
and...anyway, 80mA is twice the absolute maximum limit !!
Sure I wouldn't let my arduino work in these conditions, even for short periods of time

maybe you've already stressed your arduinos too much, and they can't deliver more than 88mA per output  :D   ;)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: cypherrage on Jul 12, 2013, 04:05 pm
I use resistors to bias my gate voltage,  not to limit the current. There's also a thing called a current source which you can build to easily control the current you want. Usually I put a capacitor on the gate but if I'm not biasing my voltage, that's about it.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 12, 2013, 07:05 pm
Here is an example of the signal I was using in my original post.  This is measured at the gate of the MOSFET with no gate resistor:

(http://users.vianet.ca/omegamic/ArdForumFiles/MAP001.BMP)

I was taking the pulse amplitude and comparing it to the graph 31-155 from the datasheet, adjusting for my actual Vcc.



Here is an example of the slope the leading edge.  You can see the Miller effect shelf.  Again, with no resistor.

(http://users.vianet.ca/omegamic/ArdForumFiles/MAP003.BMP)



These next two images are my experimental set-up to reproduce Nick's results.  I tried to keep things a tight as possible:

(http://users.vianet.ca/omegamic/ArdForumFiles/IMGP0260.JPG)

(http://users.vianet.ca/omegamic/ArdForumFiles/IMGP0256.JPG)


Here is a plot of Ch2 - Ch1 where Ch2 is connected to the ATmega328 side of a 1 ohm resistor and Ch1 is connected to the MOSFET gate side of the same resistor as shown above.  Sorry about the noise,  My digital scope is placed right over another piece of equipment that radiates enough RF to upset things at times.  Could not turn it off right now.  You can see we are getting 440mV above the 0V line:

(http://users.vianet.ca/omegamic/ArdForumFiles/MAP005.BMP)


As well as 136mV below 0V during the ringing.  This does not exactly match Nick's results, however  I think the differences may be due to differences in our experimental set-up.

(http://users.vianet.ca/omegamic/ArdForumFiles/MAP006.BMP)


Here is a measurement of the time of the largest swing.  About 84nS.

(http://users.vianet.ca/omegamic/ArdForumFiles/MAP007.BMP)


For a lark, I looked at this on a analog scope too.  ChA-ChB this time.  It's a bit different still, so it seems the scope effects the results too.  We can see the peak to peak amplitude is a bit smaller (200mV / div) and we seem to get significant ringing for a bit longer time (2.5 cycles vs. 1.5 cycles), but pretty much the same frequency.  Horizontal is set a 100nS / div.

(http://users.vianet.ca/omegamic/ArdForumFiles/IMGP0259.JPG)


In this shot you can see both inputs and the difference.  The major peak of the difference seems to coincide with the Miller effect shelf.  On the Atmega side, it actually dips indicating (to me anyway) that there is possibly more capacitance and impedance on that side of the resistor than on the gate of the MOSFET (which is an FDP8880).

(http://users.vianet.ca/omegamic/ArdForumFiles/MAP008.BMP)


For this shot here I added a 2.9nF capacitor across the gate of the MOSFET, essentially doubling the capacitance.   I got one expected result and one unexpected result.  I had expected an increase in current and a doubling of the rise time.  We can clearly see the rise time doubled, however, the P-P current amplitude dropped to less than half!  i do not quite know what to make of this other than it seems to agree a bit with your result Nick, when you saw greater current across a higher resistance.

(http://users.vianet.ca/omegamic/ArdForumFiles/MAP009.BMP)


This last one is very telling.  After seeing the previous result, I thought that the capacitive loading might be having some unexpected effect on the entire system, so I tried resistive loading.  I put a 10 ohm resistor across the gate.  Here again I got an expected result and an unexpected result.  Since my previous experiments showed that the ATmega's internal resistance rises to about 40 ohms at 40 ma, I did expect that VGS would fall considerably, and that is exactly what happened.  However, I also expected that the current trough the 1 ohm resistor would increase due to the additional load.  As in the previous test, it is actually reduced!  Why would greater loads reduce current?

(http://users.vianet.ca/omegamic/ArdForumFiles/MAP012.BMP)


Right now I'm a bit stumped.  Does anyone have a reasonable explanation for these results?  Unfortunately, it will be quite some time before i can dig into this again
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: alnath on Jul 12, 2013, 07:22 pm
interesting tests, I'll have a closer look later, and sure will read the upcoming posts  :)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: dc42 on Jul 12, 2013, 07:37 pm
Quote
This last one is very telling.  After seeing the previous result, I thought that the capacitive loading might be having some unexpected effect on the entire system, so I tried resistive loading.  I put a 10 ohm resistor across the gate.  Here again I got an expected result and an unexpected result.  Since my previous experiments showed that the ATmega's internal resistance rises to about 40 ohms at 40 ma, I did expect that VGS would fall considerably, and that is exactly what happened.  However, I also expected that the current trough the 1 ohm resistor work increase due to the additional load.  As in the previous test, it is actually reduced!  Why would greater loads reduce current?


Increasing the capacitance while keeping the resistance (mostly the output resistance of the atmega pin) has increased the damping factor, so there is less ringing. That is why the peak output current has decreased.

This theme of whether or not a series resistor should be used between an Arduino output and mosfet gate comes up with monotonous regularity. The conclusion I draw is:

1. If you don't use a series resistor, this will not prevent your circuit from working, probably for quite a long time.

2. If you don't use a series resistor, then this may reduce the life of the atmega chip due to exceeding the rated output current for short periods. Nobody really knows how much it will be reduced, and in any case it will depend on the mosfet, the voltage and current being switched, and the switching frequency.

Based on your results, I could add:

3. If you don't use a series resistor, then depending on your circuit layout, there may be significant ringing in the mosfet gate drive, which might cause an increase in the mosfet power dissipation. The ringing can be reduced by using a series resistor, or by careful layout (especially if using a pcb).

I never use a series resistor when driving small mosfets such as 2N7000. I always use a 100 ohm series resistor when driving power mosfets. Maybe it's not necessary, but I don't want to have to run several examples of the design for several years to prove it, and I don't want to risk the inconvenience of the system failing after a few months or years.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 12, 2013, 07:58 pm
Since I still had some time before the weekend I decided to try 100ohms on the gate.  Here is the result:

(http://users.vianet.ca/omegamic/ArdForumFiles/MAP014.BMP)

3.56 Volts across the 100 ohm resistor -> 35.6 mA.  Which is expected.  That's at least nice to see.  So, it does seem that this practice certainly keeps the current under 40mA.  Even if it does significantly slow down the MOSFET turn-on time.

@dc42.
Reasonable statements.  I have seen your posts often and your obviously a practicing professional.  Would you not agree that the kind of damage one would expect from over-current conditions would be heat related?  That is at least the behavior my background would lead me to expect from the materials (semi-conductors and metals) used in chip fabrication.  If so, would it not be the watt/seconds wattseconds that would be pertinent, rather than absolute maximums of current flow as to whether or not an event is sustainable?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Tom Carpenter on Jul 12, 2013, 08:05 pm
I've just done the experiment with a 1Ohm resistor and two MOSFETs:

An IRF630 power MOSFET
and a BS170 small signal MOSFET.

Attached are the scope traces for rising and falling edges for each using the same PWM sketch and an Arduino Uno. Also attached is a picture of the setup. I tried to eliminate any stray capacitance from breadboards and elected instead to solder components together and plug them directly into the Uno pin headers.

For the IRF630 as you can see there isn't much of anything, it just seems to be noise.

For the BS170 there is clearly something on the rising edge. According the scope there is ~0.3V across the resistor for around 5nS, and a period of ringing (?) for 30nS over the course of the transistion. On the falling edge there is a similar 240mV spike.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: dc42 on Jul 12, 2013, 08:15 pm

@dc42.
Reasonable statements.  I have seen your posts often and your obviously a practicing professional.  Would you not agree that the kind of damage one would expect from over-current conditions would be heat related?  That is at least the behavior my background would lead me to expect from the materials (semi-conductors and metals) used in chip fabrication.  If so, would it not be the watt/seconds that would be pertinent, rather than absolute maximums of current flow as to whether or not an event is sustainable?


As well as being heat-related, there is electromigration to consider. I don't know enough about this phenomenon to give an informed opinion. Regarding the heat-related aspects, my guess is that local heating of the aluminium interconnects might be a weak point. If that is that case, then it might be possible in principle to estimate an I^2*t rating, given sufficient knowledge of the interconnect dimensions.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 12, 2013, 08:23 pm
Yes, that's what I thought and it seems reasonable.

I'm not sure electromigration would be an issue at such low currents.  I'll have to look into that one more.

Does anyone know the dimensions of the interconnects used by Atmel for these chips?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: CrossRoads on Jul 12, 2013, 08:37 pm
I don't see any die description on the datasheet.
You'd have to poke around in here
http://www.atmel.com/products/microcontrollers/avr/megaAVR.aspx?tab=documents
or contact them and ask.
We know they were changing form gold interconnect wire (legs to die) last summer I think, I had posted a change notice that Mouser had sent me.
Don't know if leadless parts use wires like that, or if die connects directly to the external contacts.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: CrossRoads on Jul 12, 2013, 08:39 pm
Are these pics  helpful?
https://www.sparkfun.com/news/350
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: fungus on Jul 12, 2013, 08:40 pm

These next two images are my experimental set-up to reproduce Nick's results.  I tried to keep things a tight as possible:

(http://users.vianet.ca/omegamic/ArdForumFiles/IMGP0260.JPG)

(http://users.vianet.ca/omegamic/ArdForumFiles/IMGP0256.JPG)


Is doing it on a breadboard a good idea? Those things introduce all sorts of capacitances and other unwanted stuff.

Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 12, 2013, 08:41 pm

We know they were changing form gold interconnect wire (legs to die) last summer I think, I had posted a change notice


Did they say what material they would be using instead?  Aluminum, Aluminum-copper, pure copper?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: CrossRoads on Jul 12, 2013, 08:45 pm
I think copper. I'd have to find the notice to be sure.  I think I have it at home.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 12, 2013, 08:52 pm

Is doing it on a breadboard a good idea? Those things introduce all sorts of capacitances and other unwanted stuff.


These little ones don't seem to be too bad if you keep stuff spaced  out.  The real problem with solderless breadboards seems to be that the contacts eventually wear, get dirty and become unreliable.  I used a new one for this, but I could solder everything to a proto-board and do a re-run.  Maybe next week.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Tom Carpenter on Jul 12, 2013, 08:53 pm
Oh, by the way, attached are photos of the setup I used. Couldn't attach them to my last post as only 4 attachments are allowed.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 12, 2013, 09:17 pm

Are these pics  helpful?
https://www.sparkfun.com/news/350


From the x-ray of the genuine ATmeg328, I'd hate to bet my life on it, but it looks like all the interconnect wires are the same size.  Including the power ones.  But I can't give any estimate on what their actual size is.

Electromigration, it seems, does not occur in copper until Ampere densities exceed about 107A/cm2.  That's a lot of amps.  If the interconnects were 0.1mm in diameter, that would mean their area would be about 7.85x10-8 cm2 so that electromigration would not be a major factor until over 700mA.  But that is all just speculation as I don't know the actual diameter.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: oric_dan on Jul 12, 2013, 09:22 pm
@BillO, now we're seeing some interesting stuff. I assume that's the 328 chip in the zipf socket - probably not the best rig, nor the "whiteboard" either [colored red, here].

How about trying it with the scope probe ground connected right at the MOSFET gnd pin, rather than 3" away. Also, use a ground lead on the 2nd probe. See if either or both affects ringing in any way.
http://www.google.com/webhp?source=search_app#output=search&sclient=psy-ab&q=proper+scope+probe+grounding+techniques

For my part, I ALWAYS use small-valued series-Rs on the I/O pins, as a general rule and for a multitude of reasons, including output shorts and overvoltages. Also, in regards possible capacitive and inductive loads, and high-speed stuff [read as --> most output "transitions"], the series-R acts as a "source series termination".
http://www.google.com/webhp?source=search_app#output=search&sclient=psy-ab&q=source+series+termination

Series-Rs are like a Swiss Army Knife = many uses, and pretty much all advantageous.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: CrossRoads on Jul 12, 2013, 09:24 pm
VCC & GND pins are only spec'ed for 200mA each on any of the AVRs (direct from Atmel).
So ATmega2560 with 4 Vcc pins is only rated to be switching 800mA total. Does that offer any more insight?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: larryd on Jul 12, 2013, 09:26 pm
Quote
For my part, I ALWAYS use small-valued series-Rs on the I/O pins


It makes it more possible to make a single sided PCB also.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: pito on Jul 12, 2013, 09:41 pm
Quote
Electromigration, it seems, does not occur in copper until Ampere densities exceed about 107A/cm2.

Electromigration is not related to bonding wires (chip->pin, that is the wire which is now made of copper as Crossroads announced, otherwise made of 100u gold) but aluminum wires on the chip. From pictures I saw I would estimate the wire around pad could be for example 300nm x 20nm x 2000nm 5um x 20nm x 20um (w x h x l) and 2-3 in parallel (see picture below). Material Al. Without doing calculation my guess is the current in such wire for elmigration would be 200-300 mA (bad guess)..
PS: with similar density for AL (10^7) it seems the naive approach gives ~1 20-30mA current for elmigration, what is quite low number, maybe for a thin film calculation it differs.
Edit: @dc42 - we know that therefore we use resistors :)


Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: dc42 on Jul 12, 2013, 09:45 pm

If the interconnects were 0.1mm in diameter, that would mean their area would be about 7.85x10-8 cm2 so that electromigration would not be a major factor until over 700mA.  But that is all just speculation as I don't know the actual diameter.


I was talking about the interconnects on the surface of the silicon, not the wires connecting the chip to the leadframe. The on-chip interconnects will be very much narrower and thinner than 0.1mm.

[EDIT: pito beat me to it]
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: larryd on Jul 12, 2013, 09:48 pm
I think we may be verifying "A cheap probe always gives you the correct answer".

May be we should be using a P6202A FET scope probe.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 12, 2013, 10:35 pm
Hmm, I didn't think my Tecktronics 100mHz probes were all that cheap.

Anyway, on the ZIF socket, I would not expect it to add much to the problem, perhaps fractions of a pF.  Probe ground, sure there may be some issue there, the little beadboard the way it's laid out, not so much.  But like I said, I'll get a chance next week some time to address these.

We're not exactly working a 4gHz here, but I'll do my best to run out the gremlins for you all.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: oric_dan on Jul 12, 2013, 10:58 pm
"I" didn't get the impression you were using a cheap probe, but the ground lead placement business is always an issue.

A few years ago, I measured [ie, tried to measure] the capacitance coupling [cross-talk] between adjacent rows on a whiteboard, and decided it was in the range of 10-15 pF, although someone here recently posted a much lower number. But I'd think 10pF or so would be about right - given that pins on DIP chips are typically around 10-20 pF range.

To me, the best way to do this job, with an Arduino, would be to use a prototyping shield with real square male pins, and solder the parts into a nice clean setup with short leads.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Tom Carpenter on Jul 12, 2013, 11:00 pm

To me, the best way to do this job, with an Arduino, would be to use a prototyping shield with real square male pins, and solder the parts into a nice clean setup with short leads.


Reply 85 perhaps? Although I wasn't using pin header.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: oric_dan on Jul 12, 2013, 11:11 pm


To me, the best way to do this job, with an Arduino, would be to use a prototyping shield with real square male pins, and solder the parts into a nice clean setup with short leads.


Reply 85 perhaps? Although I wasn't using pin header.

Better than a whiteboard, but still don't like round pins stuck in spade terminals [which is what's inside those female headers], :-).
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: JB_AU on Jul 12, 2013, 11:43 pm
Quote
Product Change Notification Number: WC120404              Notification Date: February 7, 2012
Title:  Change from Gold to Copper Bonding Wire
ATMEGA328P-MMH
ATMEGA328P-MMHR
ATMEGA328P-MN
ATMEGA328P-MU
ATMEGA328P-MUR
ATMEGA328PV-10AU
ATMEGA328PV-10MU
ATMEGA328-AU
ATMEGA328-AUR
ATMEGA328-MMH
ATMEGA328-MMHR
ATMEGA328-MU
ATMEGA328P-20AU
ATMEGA328P-20MU
ATMEGA328P-AN
ATMEGA328P-ANR
ATMEGA328P-AU
ATMEGA328P-AUR

Change Description: 
To adapt to new industry standard and to ensure future long term stable supply of products, copper bonding
wire will be introduced for assembly of all devices mentioned above. The change will not impact reliability,
soldering profiles or electrical characteristics
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 12, 2013, 11:56 pm

To me, the best way to do this job, with an Arduino, would be to use a prototyping shield with real square male pins, and solder the parts into a nice clean setup with short leads.


Agreed, for test purposes, if we are to do this right, things need to be as clean as possible.  I intend to solder everything to a single proto-board, including the Ameag328, and try some other tricks.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 13, 2013, 12:16 am
A gratifying lot of results appeared while I slept. :)

It appears that BillO has reproduced my results at least within the same order of magnitude. His setup is a lot less messy than mine, and the results of 440 mV in reply #72 are pretty much in line with my results in reply #27 where I got 440 mA. Oh wait, exactly the same! <grin>

As for the ringing, my 1 ohm resistor was a wirewound one. Would that affect the result?

I understand where BillO is coming from with the talk of short transients, and a while back I designed a display that did PWM to LEDs with no resistors "because the average current would be in spec". However as others pointed out, the average current is only part of the equation. After all, where does averaging become acceptable? Can you put 80 mA through a pin for half a second and claim that, over an average of one second, it is 40 mA and thus OK? I think not.

I don't know for sure whether 400 or 800 mA through the output pin will cause one molecule to break away and drift off each time, and thus maybe a year later the pin fails, but since they recommend a maximum of 40 mA it could be possible, right?

@BillO: in reply #72 you measured around a 80 nS rise time and then in reply #75 you get a slower turn-on time, but the peak of the current draw was in the first 100 nS. I wonder if that was enough for the FET to turn on sufficiently then to not get too hot? If so, the resistor didn't slow it down that much.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: larryd on Jul 13, 2013, 12:23 am
Quote
As for the ringing, my 1 ohm resistor was a wirewound one. Would that affect the result?

This was the reason why I made the comment on using quality scope probes. (should have said so).
There is also the potential of reflection/transmission line problems.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: pito on Jul 13, 2013, 12:28 am
PS: FYI - two I/O pads of one very popular mcu you know well, 350nm fab node, 20 or 25um Au bonding wire (depends on production date), you may see the output structures, the output transistors from lower layers are wired via vias (small dots) to the upper pad, the output buffer's interconnect wires sizes could be derived from the bonding wire size, mind the number of paralleled wires led to the pad (click to enlarge):
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 13, 2013, 01:08 am

@BillO: in reply #72 you measured around a 80 nS rise time and then in reply #75 you get a slower turn-on time, but the peak of the current draw was in the first 100 nS. I wonder if that was enough for the FET to turn on sufficiently then to not get too hot? If so, the resistor didn't slow it down that much.


Not sure Nick, but I think it's possible.  I guess if the MOSFET has reached IDSMAX by then it should be okay, right?  I also think if the rise time is a small part of the over all cycle and the MOSFET is not being wrung out at its limit and has time to dissipate any heat it's not likely to be  problem in any case.  Someone here mentioned using a 1K resistor.  That could be a different matter.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: oric_dan on Jul 13, 2013, 03:20 am
As long as the risetime is less than 10% of the half-period or so, and the drain current isn't too enormous, I wouldn't think heating [due to operation in the transition zone] will be much of a problem. When do you ever even need to do this? Eg, if PWMing a motor at relatively high freq of 20-Khz [half-period = 25-usec] and the risetime = 100nsec, this should be no problem. Heating will mostly be related to Id^2 *  Rds(on). No? You can always use a smaller series-R if problems arise.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 13, 2013, 03:38 am

Not sure Nick, but I think it's possible.  I guess if the MOSFET has reached IDSMAX by then it should be okay, right?  I also think if the rise time is a small part of the over all cycle and the MOSFET is not being wrung out at its limit and has time to dissipate any heat it's not likely to be  problem in any case.  Someone here mentioned using a 1K resistor.  That could be a different matter.


I thought it would be when VGS reached a suitable level for it to be mainly or fully on (say, 4V in the case of a logic-level device).

I would have thought that a 270 ? resistor would be plenty as that would limit current (even for a full short) to 18.5 mA. Even 150 ? still puts the current below the absolute maximum.

The IRLZ34N that I tested quotes a rise time of 100 nS at 5V, with a 6.5 ? gate resistor (why 6.5 I wonder?).
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 13, 2013, 03:40 am

Heating will mostly be related to Id^2 *  Rds(on). No?


Sounds right to me.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: oric_dan on Jul 13, 2013, 08:39 am
Nick, you'll notice that the tr measurement shown in fig. 10 is actually for Vd and not Vg, plus Vdd and Id are rather large. It's not at all clear what effect changing the Rg value would have, without measuring.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 13, 2013, 08:55 am
Oh yeah, good point. That is measuring the time for the VDS to change which I suppose is something else. Hmm, their diagram 10b isn't exactly to scale is it?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Docedison on Jul 13, 2013, 01:47 pm
I use small resistor in the gates of any fet's that I use Not because as has been mentioned it will save something, It won't protect anything But the resistor will require less bypassing on the controller to keep the Vcc noise at an acceptable level. The current to charge that gate capacitor has to come from somewhere and unless special efforts are taken to reduce the power supply impedance that gate current transient will show on the power supply rail and it has (this is where I found the issue about 10 years ago with another microcontroller) and in my case interfere with an A/D conversion, a 47 ohm resistor in the gate cured the slightly higher than normal temperature when I was driving the heating element I was measuring. When the mosfet was on the temperature was off by about 5 deg in 200 when off the temperature measurement was normal or the calibrated temperature. My final design solution was to both use a small value resistor and to switch off the heating for a mS and measure temperature.

Doc
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: oric_dan on Jul 13, 2013, 08:47 pm
BTW, I found this youtube on scope probe grounding which is very informative. In the last half, he shows how outputs from digital devices are a lot worse than from signal generators. At the very end he mentions the problems with whiteboards, but unfortunately doesn't show any measurements, but you can surmise what it would be like, given the rest of the video.
youtube.com/watch?v=zodpCuxwn_o (http://youtube.com/watch?v=zodpCuxwn_o)

Also, Bob Pease, the master of analog,
youtube.com/watch?v=2vzvWUqUtb8 (http://youtube.com/watch?v=2vzvWUqUtb8)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: fungus on Jul 13, 2013, 09:23 pm

I use small resistor in the gates of any fet's that I use Not because as has been mentioned it will save something, It won't protect anything


According to the people who design the transistors it will...


But the resistor will require less bypassing on the controller to keep the Vcc noise at an acceptable level.


But that is another good reason for doing it.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Docedison on Jul 14, 2013, 01:00 am
@ Fungus... (Great Handle) It won't save anything because the Arduino can't really 'destroy' a mosfet nor can the Mosfet 'destroy' the Arduino. If properly wired.. Obviously, there are many different possible topologies that can be used. Btw Nick Gammon has some comments about the available short circuit pin current in another thread and it was a deal more than the ?88 mA (I don't remember exactly) quoted earlier in this thread and I would tend to put a lot of credence in his comments, He's "been around for a couple of days"..
So Yes use the resistor and understand why it's a good thing to do. It''s NOT a requirement But you'll be happier when you do.
It's kinda like pull-up's and pull-downs, Not exactly required.. But not exactly optional either.
There was some commentary about the composition of a square wave, The cogent point was that 'only' up to the 7th harmonic was required do display a good square wave and the point is correct BUT look at the implications.. 7 X 500 (approx native PWM frequency) is 3.5 KHz and an approximation of it's relative power is directly related to the order of the harmonic. THe higher the order the less power in the total energy spectrum generated by the parts. I have a 1.8" TFT display that is SPI driven and I have a taste for a local low power college FM radio station. The two didn't mix until I added 47 ohm resistors in the leads to pins 10, 11, 12, 13 on the Arduino. Not big enough to cause any degradation of the control signals to the display but more than enough to slightly slow the rise time and mainly remove the "sideband"power from the radiated signals. The required capacitor for that simple one pole filter is the stray capacitance of the wiring.
If you look at a square wave and the rise time and the power involved to generate it you will see that a zero rise time would require infinite power to generate it. This is also most hard to simulate accurately.
Quote
Re: Myth Busters 3 - Myth: "You must have a gate resistor"
... IS one of those things that is poorly understood and often "Filtered" through a bad understanding of the realities involved..
If only... People could understand what they read instead of People only reading what they understand..
Use a small value gate resistor to slightly limit the power involved in generating fast rise and fall times. Because the power comes back as digital noise and like the energy required to heat up the regulator, wasted energy.

Doc
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: fungus on Jul 14, 2013, 01:17 am

It's kinda like pull-up's and pull-downs, Not exactly required.. But not exactly optional either.


I can give you dozens of examples where pullups are required - the circuit will not work without them.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 14, 2013, 06:55 am
Btw Nick Gammon has some comments about the available short circuit pin current in another thread and it was a deal more than the ?88 mA (I don't remember exactly) quoted earlier in this thread and I would tend to put a lot of credence in his comments, He's "been around for a couple of days"..


Yes Doc, it was 88mA.

I measured this by actually shorting out every single pin of an ATmega328, then several pins each on two others.  How many did you try?????

What do you need me to provide to you so that you are convinced???

I 'm not aware of what Nick did, but I know he does actually do things.  Do you?  Did you try to drive an ATmega328 I/O into a sort to support your idea, or do you just rely on the hearsay of the effort others?  Can you think of a convincing experiment that you yourself are afraid to try that I could perhaps do for you?

Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 14, 2013, 07:05 am
Quote

Nick Gammon has some comments about the available short circuit pin current in another thread and it was a deal more than the ?88 mA (I don't remember exactly)


I don't recall saying or testing short circuits exactly. I don't usually test short circuits except, heh, by mistake. :)

I think I said that 270 ? would protect a pin from a short circuit because that would limit current to 18.5 mA, but of course if you put current through a 270 ? resistor it isn't a short circuit.

I agree it's important to test things, but even then to be aware of possible errors in your test procedures. That's why I am happy if my tests can be reproduced. And even happier if they are backed up by the theory behind the test.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Docedison on Jul 14, 2013, 09:07 am
@ BillQ it was many years ago with a solenoid driver and a 3 inch trace on a PCB that was allowing the reset line to be pulled low and would about 1 in 1000 tries latch up the processor. There were 3 repairs applied, separately. The first was a cap on the processor Vcc, a much larger cap and then the failure became 1 in 5000. The second was a 47 ohm resistor in the gate circuit of the solenoid driver (A 12V latching solenoid of the type used to control irrigation valves) and it went 50K times W/O failure. The third 'fix' was simply to double the width of the trace from the regulator/main filter to the processor. It moved the failure rate to 1 in 5000 tries. all testing was without a load so as to remove all but a possible spike from the relay coil and for the final testing the relay driver was pulled so that the only load was the Fet. I was fortunate in that I had originated with a bi-polar transistor that worked well, But... the Fet's were surplus and 1/10th the cost of the D44H11 I was using as the solenoid driver so i tested well enough to make a board and I made one and this showed up in final testing. Any of the repairs was almost enough and I'm sure that the resistor was all that was required, really to fix my issue... But doing due diligence, I made all three modifications. I finally borrowed a storage scope (this was in 1993 or 4) and found the pulse on the reset line where it was because of the elevated impedance of the supply lead to the processor. Bypassing that impedance showed a sensitivity but not a cause.. unfortunately not all of the testing was under identical circumstances but the record of the design was perfect after. No more latch-up's. In thinking about it the current pulse from the port originated from the controller Vcc and the resistor controls that noise by limiting the surge current that can be drawn. All that 'stuff' about damaging the leads or thermally damaging the IC with an 'overload' is just that.. Stuff. But the current that is killing <BFG> that processor has to come from somewhere and it needn't really come from anywhere, It should be a driver IC and not a port on a processor... but this is a less than perfect world.. So I add resistors to the gates of Mosfets just to remove an unnecessary load from the controller and board power supply and in so doing I measurably lower the noise on the controller Vcc line and it's good with me, Your milage may vary.

Doc
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: fungus on Jul 14, 2013, 10:37 am

Yes Doc, it was 88mA.

I measured this by actually shorting out every single pin of an ATmega328, then several pins each on two others.  How many did you try?????

What do you need me to provide to you so that you are convinced???


A written garantee from Atmel that every chip past, present and future will perform like the one you had that day, that they'll never change their production process.


Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 14, 2013, 02:17 pm

According to the people who design the transistors it will...


Limits to MOSFET gate currents?  I may not always see everything in a datasheet, do you have a reference to help me out?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 14, 2013, 02:26 pm
https://www.fairchildsemi.com/an/AN/AN-9068.pdf?

From that:

Quote

One of critical control parameters in gate-drive design is external series gate resistor (Rg). ... As too small Rg results in excessive dv/dt across drain and source of the MOSFET during switching-off, low limit is a value that makes switching dv/dt within the specification in the datasheets.


The reference in that document to "critical control parameters" suggests to me that this is not an optional resistor.

That datasheet may not necessarily be relevant to the particular MOSFETs we are testing, however I can't help hearing warning bells there when I read it.

Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 14, 2013, 02:40 pm


Yes Doc, it was 88mA.

I measured this by actually shorting out every single pin of an ATmega328, then several pins each on two others.  How many did you try?????

What do you need me to provide to you so that you are convinced???


A written garantee from Atmel that every chip past, present and future will perform like the one you had that day, that they'll never change their production process.





It was actually 3 I tried, but I'll get right on it.  After all, that seems like a real reasonable request.

Anyway,   there is no spec for steady state short circuit current, so If you don't believe my tests, and you have not done your own tests, whatever information you do have is based on what?  Speculation?  Hearsay?  Goody!  If you're okay with that, then that suits me just fine so I'll ask you to refrain from further comment on it.  Thanks.

@All, I have two more tests to perform before I'm done on this.

1) Repeat Nicks experiment with a cleaner circuit and a calibrated set of probes and scope.  I think a lot o what we say was ringing in the system and I think I can eliminate a lot that based on research I've been dong this weekend.  That being said, while I believe the results will be much better I stll think we will see currents way, way over the 40mA.  Even over the 88mA.

2) That last point has me thinking.  I will also need to re-do my "short circuit" test.  There is a lot of evidence been presented here that demands that I do his.  Even if I reproduce the 88mA limit for a "long term" short, I think there is ample reason to believe that the initial current can be much higher.  For this test I won't be using a dead short as it is impossible for me to directly test the current into a dead short as anything I have that I can put into the circuit to measure it directly will effect the measurement.  So I will do it using a similar differential measurement across a small resistor and try to get the current profile in over nS, uS and then mS.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 14, 2013, 02:52 pm

https://www.fairchildsemi.com/an/AN/AN-9068.pdf?

From that:

Quote

One of critical control parameters in gate-drive design is external series gate resistor (Rg). ... As too small Rg results in excessive dv/dt across drain and source of the MOSFET during switching-off, low limit is a value that makes switching dv/dt within the specification in the datasheets.


The reference in that document to "critical control parameters" suggests to me that this is not an optional resistor.

That datasheet may not necessarily be relevant to the particular MOSFETs we are testing, however I can't help hearing warning bells there when I read it.


Hi Nick,

I'm not saying that limiting IGS is not sometimes a good thing with some MOSFETS.  After all, there does have to be a limit.  It only makes sense.

I was more trying to get a spec jockey to come up with a reason for their statement given that I have never seen a spec for absolute maximum gate current in a MOSFET datasheet.  The person in question has, at least indirectly, admitted that they will only believe manufacturers datasheets.  I just find it odd that that same person is continually commenting on others findings for parameters that are not in a datasheet.  I wonder where they get their information.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: fungus on Jul 14, 2013, 03:00 pm

whatever information you do have is based on what?  Speculation?  Hearsay?


You're the one basing his argument on some particular chip samples and a whole lot of speculation.

I prefer to rely on the written information provided by the people who designed/made the chip. We've already seen that they do change their production processes every now and again. Maybe the "250mA" figure that you so eagerly dismiss was for a chip from an older production process.

Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 14, 2013, 03:09 pm

... some particular chip samples and a whole lot of speculation.


Actually doing tests is speculation?  Hmmm...


Quote
Maybe the "250mA" figure that you so eagerly dismiss was for a chip from an older production process.


1) Where did that value come from and does it come with other parameters, like time?

2) How is that pertinent today?

3) I eagerly dismiss it because I did not find it in actual tests

4) How do you deal with parameters that are not in datasheets?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: fungus on Jul 14, 2013, 03:23 pm


... some particular chip samples and a whole lot of speculation.


Actually doing tests is speculation?  Hmmm...

[/quote]

The datasheet clearly says that pin/chip damage may occur above 40mA (and that 40mA is a stress rating only and not recommended for long term use).

The famous "pin output voltage drop vs. current" graphs only go up to 20mA. Beyond that, it's 100% pure speculation, yes.


4) How do you deal with parameters that are not in datasheets?


Maybe they're left out for a reason, ie. to allow them to change their production processes without breaking the designs of people who follow the datasheet.

What you're doing is equivalent to using undocumented APIs in an operating system. Your experimental data may show that the functions work perfectly, but there's a reason they're left undocumented.

PS: Why aren't you experimenting with running it at 9V? That's just as valid, right...?

Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 14, 2013, 04:52 pm


The famous "pin output voltage drop vs. current" graphs only go up to 20mA. Beyond that, it's 100% pure speculation, yes.


They used to go to 40mA in the early (pre-328) days.  BTW, do you understand what these graphs tell you?  Have ever taken the time to do some analysis?  The physics behind these curves is real, well understood and predictable, not speculatory.  I will be presenting more on this in a few days but I do not expect you will understand it more then than you do now.

Quote
Maybe they're left out for a reason, ie. to allow them to change their production processes without breaking the designs of people who follow the datasheet.

What you're doing is equivalent to using undocumented APIs in an operating system. Your experimental data may show that the functions work perfectly, but there's a reason they're left undocumented.


While this does seem to be a well thought out answer to a question, it's not the answer to the question I asked.  But thanks anyway.

Quote

PS: Why aren't you experimenting with running it at 9V? That's just as valid, right...?

Now who's speculating?  Who said I haven't?  In any case, over voltage and over current are two entirely different beasts.  I'm not sure every one knows what happens when you use too high a voltage on semi-conductor devises, but I do and it's an experiment I actually had to do many years ago when I worked for the University of Toronto.  I have no need to repeat it at this time.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 14, 2013, 05:19 pm

The datasheet clearly says that pin/chip damage may occur above 40mA (and that 40mA is a stress rating only and not recommended for long term use).


What I want to know and want what the data sheet does not specifically tell us includes, but is not limited to, the following:

1) How long 40mA is safe for?  (They tell use it's not safe for a long time, but how long is that, specifically. 1s, 10s, 1ms, 1us?.  Most device datasheets give this kind of information.  It is useful information.)

2) They do not tell us what the recommended long term maximum output current is.  (Is it 15mA, 20mA, 25mA, 30mA, 35mA)?

3) Rise and fall times of all outputs and under what test conditions.

4) Inherent internal capacitance of each pin under the various possible configurations and under what test conditions.

...

In fact, the datasheet is splendidly uncluttered with many specifications of interest to the applications these device are put.  I note that the specifications in these areas supplied by Microchip are better.  Not great, but definitely better.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: alnath on Jul 14, 2013, 06:28 pm


What I want to know and want what the data sheet does not specifically tell us includes, but is not limited to, the following:

1) How long 40mA is safe for?  (They tell use it's not safe for a long time, but how long is that, specifically. 1s, 10s, 1ms, 1us?.  Most device datasheets give this kind of information.  It is useful information.)

2) They do not tell us what the recommended long term maximum output current is.  (Is it 15mA, 20mA, 25mA, 30mA, 35mA)?




Sure we'd like to know but..... it is impossible for them to give these informations. They would do the tests at 25°C, which is not really the every day T°  .... and users wouldn't notice that, they would only see the values they are interested in...you can easily imagine the consequences  ;)
When they give safe values, even if the test conditions were 25°C ... , they know that +/- 15° won't destroy the chip, which is not true when approaching the limits  ;)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: pito on Jul 14, 2013, 09:53 pm
@BillO: you have to understand the atmega328p is a cheap mcu for general use. You will not get any more information than you may see in the datasheet. And you have to accept the messages there.

If you need devices for heavy duty applications, where the chip maker will share with you the parameters you want to know (and will provide all possible measurements and tests for you), just ask for military or space grade mcus (IBM, Sandia Labs, etc.).  FYI - such a device costs $50k - $200k a piece.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 14, 2013, 10:04 pm
@pito and alnath

Well, that's why I do these tests.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Grumpy_Mike on Jul 14, 2013, 10:13 pm
Quote
1) How long 40mA is safe for?

It is not, the term absolute means absolute. You can read, it says 40mA is a stress rating only.
Quote
Most device datasheets give this kind of information.

No they don't. The ones that do are for components designed to take high pulsed currents.

Quote
They do not tell us what the recommended long term maximum output current is.

Yes they do, all the ratings are for 20mA.

Quote
Rise and fall times of all outputs and under what test conditions

Your right they don't say that. Do you understand why?
You are very keen on telling other people they will not understand stuff, have a word with yourself.

Quote
Inherent internal capacitance of each pin under the various possible configurations and under what test conditions.

Please try and live in the real world.

Quote
I note that the specifications in these areas supplied by Microchip are better.

So use their chips and stop beefing.

Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: pito on Jul 14, 2013, 10:20 pm
I think nobody in this discussion has something against your tests. I am also happy to know the 328p survived shorts and that it draws 88mA when shorted. I would guess the chip could work at 8Volts Vcc and 130degC :)

You asked primarily whether the gate resistor is necessary when driving a power mosfets from the atmega328p chip. The answer from people with experience is Yes, because:
1. it limits the inrush current into the mosfet's gate to the 20mA output limit according to the atmega328p datasheet
2. it blocks gate ringing with poor wiring
3. it protects atmega328p when the mosfet's gate shorts.

PS: In addition, I always use a pull-down resistor from the gate to ground. When the atmegas output pin floats (ie. after reset or because of a sw bug) the mosfet might be switching the load erratically, or the mosfet could overheat itself when gate floats in linear region).

Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Docedison on Jul 14, 2013, 10:23 pm
It has.. @BillO, been my Experience that the data sheets are right more often that the interpretations of them are.
Your quest for absolute numbers smacks of OCD. Further there is a large body of evidence that exceeding the extremely loose specifications will lead to grief, Are you attempting to delineate grief?
I for one choose not to heat up a processor any more than required so I keep the port loading down to the median of what the port is specified to supply. This is because good design is NOT a top down process only. The tasks assigned to the processor must be evaluated from both ends. Can the port and code provide the correct waveforms and what is the total impact of the actions controlled by the port on both the port and the controlled circuit?.
This consideration led me to the gate resistor to fix an unreasonable load on the power supply. analysis found the clock on the processor stopped and it required a reset to restart the clock. The circuitry involved including the processor had a quiescent current of 1.95 mA and for a few microseconds there was a short circuit on that port. Limiting the current to ~50 times that current or (5V/47R = 106 mA vs 1.95 mA..), allowed the 1uF cap that was the Vcc pin bypass to supply the current and not through the loss of the series inductance of the supply trace. This was proven when I increased the cap to 10 uF and had the failure rate go from it's initial 1 in 1000  to 1 in 5000. An increase in the resistor size caused the Fet to stay in the ohmic region for too long thus limiting the available current from a 4700uF capacitor used to control the solenoid and charged to 12V DC. 47 Ohms was my initial choice because that was the first resistor I found 'in the ballpark' and close to hand. Values to 470 ohms were evaluated and the 47 ohm resistor was found to be appropriate. Basically it worked and I could no longer see the spike on the Vcc supply at the controller Vcc pin. Testing proved the evaluation in that the device worked far beyond it's design specification. Similar testing was applied to 10 units total and no further failures were noted. End of story... This was the first time I had used a mosfet to control a heavy inductive load especially one with a widely varying inductance (bobbin out vs bobbin in) and with 300 meters of wire in series with it. The design worked well and I kept the solenoid activated for 100 mS after the initial pulse to control the Back Emf pulse by dumping it (what didn't get sloughed off by the snubber) back into the capacitor used as the current source for the load.
In closing I have to quote Nick Gammon:
Quote
I agree it's important to test things, but even then to be aware of possible errors in your test procedures. That's why I am happy if my tests can be reproduced. And even happier if they are backed up by the theory behind the test.
.
All of my initial testing was very carefully evaluated in the testing of the other 9 devices, all were within acceptable norms.

Doc
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 14, 2013, 11:20 pm
Quote
I will also need to re-do my "short circuit" test.


I think you would need to repeat the above general idea but have a short instead of the MOSFET. Then the scope trace (on the triggered point) should show you the instantaneous current during the "short" cycle.

I don't really want to make predictions, but my guess is that you might find it exceeds 88 mA for some nanoseconds and then drops back to 88 mA.

My guess is based on the fact that we have both measured more like 440 mA into the MOSFET for a short time. So it is reasonable to suppose we would see a similar if not greater amount into a short. How long before that drops back to (around) 88 mA would need to be experimentally verified.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 14, 2013, 11:33 pm

It is not, the term absolute means absolute. You can read, it says 40mA is a stress rating only.

Yeah, I think I can read. So, then 38mA should be fine, right?

Quote

No they don't. The ones that do are for components designed to take high pulsed currents.

OK. If you say so.

Quote

Yes they do, all the ratings are for 20mA.

Well, I'm not going to accuse the famous Grumpy_Mike of not being able to read a datasheet.  Far be it from me.  However, I'd like to point out that they are operating conditions for the specific specification quote, plus they go on to say:
Quote
Although each I/O port can sink more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state conditions (non-transient), the following must be observed:
ATmega48A/PA/88A/PA/168A/PA/328/P:
1] The sum of all IOL, for ports C0 - C5, ADC7, ADC6 should not exceed 100mA.
2] The sum of all IOL, for ports B0 - B5, D5 - D7, XTAL1, XTAL2 should not exceed 100mA.
3] The sum of all IOL, for ports D0 - D4, RESET should not exceed 100mA.



Quote

Your right they don't say that. Do you understand why?

No, illuminate please.

Quote
Please try and live in the real world.

There is no need to be a horses behind.  I fail to see where this might a difficult thing for them to test and include in section 31.

Quote
So use their chips and stop beefing.

I do and I'm not.  Just stating some observations.  Oh, but that's right, I remember now.  I'm not allowed my own perspective on things.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 14, 2013, 11:39 pm

I think you would need to repeat the above general idea but have a short instead of the MOSFET. Then the scope trace (on the triggered point) should show you the instantaneous current during the "short" cycle.

That's the plan.

Quote
I don't really want to make predictions, but my guess is that you might find it exceeds 88 mA for some nanoseconds and then drops back to 88 mA.

I agree.  That's what I'm expecting too.

Quote
My guess is based on the fact that we have both measured more like 440 mA into the MOSFET for a short time. So it is reasonable to suppose we would see a similar if not greater amount into a short. How long before that drops back to (around) 88 mA would need to be experimentally verified.

My initial glance at the "cleaned up" test rig (no breadboard, shorter wiring, proper grounding, ...) has promised much lower current than the 440, but to be honest, I did not get  more than a few minutes at it before I had to bail.

(See, time matters!)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Tom Carpenter on Jul 14, 2013, 11:39 pm

I think you would need to repeat the above general idea but have a short instead of the MOSFET. Then the scope trace (on the triggered point) should show you the instantaneous current during the "short" cycle.



Just tested a short of the pin to ground (no MOSFET) through a 0.47Ohm resistor using the PWM sketch from the early posts.

Results:

Steady State voltage: 40mV
Peak voltage: 150mV

So Steady State current sourced through resistor is:
I = 0.04/0.47 = 85mA, this is pretty much dead on the 88mA short circuit current I have measured in the past. A second test I did yielded 42mV at steady state which equates to 89mA, so that's a great sign.

And the peak current:
I = 0.15/0.47 = 319mA which is quite a lot! >_<
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 14, 2013, 11:50 pm

@BillO, been my Experience that the data sheets are right more often that the interpretations of them are.

Agreed.  I've got no real problem with what's there (with one exception.  There is a big error in the datasheet, but it's easy to see, so I ignore it).  It's what is not there.

Quote

Your quest for absolute numbers smacks of OCD.
Well, that's a little unfair.

Really, I just want to know.  It's one of the ways I get my enjoyment from this hobby,  I do design and build projects, and I actually do keep my designs to "within spec".  However, sometimes I just want to investigate something.  I find it mildly entertaining though, how others can get so upset by it.  Blasphemy, I tell you!  Burn him at the stake!
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 14, 2013, 11:57 pm

Your quest for absolute numbers smacks of OCD.


I would like to keep this thread on the topic of whether or not the gate resistor is required, and if so, what value. Please avoid personal insults.

Quote
And the peak current:
I = 0.15/0.47 = 319mA which is quite a lot! >_<


These measurements appear to be in the ball-park of earlier observations. What was the length of that peak pulse?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Tom Carpenter on Jul 15, 2013, 12:08 am
Forgot to measure the period, so repeated the test and zoomed right in.

This time the spike was around 135mV, though over several periods it varied, with several being around 145mV, another being 150mV as before. The transient period lasted around 40nS, with the first and largest spike lasting around 8nS
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: oric_dan on Jul 15, 2013, 12:57 am
Quote
And the peak current: I = 0.15/0.47 = 319mA which is quite a lot! >_<

Why do those transients look so much like the stuff that the guys in the 2 youtube videos mentioned earlier said one needs to be extremely careful to determine whether they're:

(a) from your setup, or
(b) from your scope and probe, or
(c) extraneous pickup, or
(d) are actual valid measurements on the system being measured?

Why is there so much multi-cycle ringing in the last picture especially, right at the start of the pulse response? That's the sort of thing the guy in the first video immediately pointed a finger at, and said "hmmmm...".

(a), (b), (c), or (d)?

And why is there so much noise [ringing] at exactly the same frequency as the major ringing present even before the response begins?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Tom Carpenter on Jul 15, 2013, 01:19 am
Good question. I think the answer is most likely that the bandwidth of the scope is 70MHz (Software limited, the hardware is capable of 300MHz, one of the amusing things about Agilent scopes and licenses). Trying to measure 10-30ns transients is right on the edge and beyond the software limit, perhaps that is resulting in some of the ringing?
I measured the frequency of the oscillation and it comes up at about 45MHz. Not sure if that is significant.
Perhaps some is noise from the USB power line?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: pito on Jul 15, 2013, 02:03 am
What you may measure (see below):

1. the "real" signal at the output of the 4050 CMOS buffer (aprox the equivalent of the 328p output), the output current when "shorted" with the 0.47ohm resistor is 38.5mV/0.47ohm = 82mA (so the same current you measure as well)

2. signal you may see on an ideal oscope (unlimited bandwidth), the 100nH inductance is your 10cm long oscope probe grounding wire (straight wire, when bended it will be much more - that will result in probably higher ringing peak and lower ringing frequency)

3. and the detail of the ringing after the rising edge - the period is 7ns here, you will see lower amplitudes because of your limited oscope bandwidth..

If you want to see the signal as depicted on the picture n.1 you must match the impedance of your oscope probe to the impedance as seen on the 0.47ohm shorting resistor (and no inductive reactancies in the gnd paths)..
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: polymorph on Jul 15, 2013, 02:49 am

"I" didn't get the impression you were using a cheap probe, but the ground lead placement business is always an issue.

A few years ago, I measured [ie, tried to measure] the capacitance coupling [cross-talk] between adjacent rows on a whiteboard, and decided it was in the range of 10-15 pF, although someone here recently posted a much lower number. But I'd think 10pF or so would be about right - given that pins on DIP chips are typically around 10-20 pF range.

To me, the best way to do this job, with an Arduino, would be to use a prototyping shield with real square male pins, and solder the parts into a nice clean setup with short leads.


I recall watching some Tektronics videos showing how even a very short ground lead can throw pulse width and height readings way off. And even for longer pulses, I have seen a lot of noise and ringing on scopes turn out to be bad ground lead placement. Dave of EEVBlog even has a video where he has the scope ground lead connected directly to the probe, and the static from his getting in and out of a chair is enough to be picked up as a noise pulse.

I measured the capacitance between two adjacent rows on my white protoboard, and got 2.0pF. I set up a monostable RC circuit, and measure the difference in pulse width with and without the protoboard rows attached.

Where did you get a number like 10 to 20pF for capacitance between DIP chips? Considering the area facing each other is much smaller and edge-on, I'd expect a lot less than 2pF, even.

If you really want to know the behavior of the 328p itself, get the Arduino PCB out of the equation.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: CrossRoads on Jul 15, 2013, 03:46 am
Someone mentioned 8V and 130C.
I'm pretty sure 8V will blow the chip. I know from experience that 12V kills it immediately.
If you want to run at 130C, I suggest you try an automotive part and cross your fingers as you pass the Absolute Maximum:
0 - 16 MHz @ 4.5 - 5.5V (Automotive Temp. Range: -40°C to +125°C)
http://www.atmel.com/Images/doc7810.pdf
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 15, 2013, 06:58 am
I retested with a 330 ? resistor just to make sure that the spike was indeed gone (otherwise we are just getting measurement errors).

It peaked at 4.48 V, which given that was across 330 ? means you had a current of 13.6 mA which is certainly within specs.

I'm not totally sure if this proves anything or not.

(http://www.gammon.com.au/images/Arduino/Arduino_forum_176968k.png)

Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: pito on Jul 15, 2013, 09:42 am
Here maybe a better simulation: Nick's 330ohm experiment and the previous 0.47ohm one. There is a simple low pass added after the probe to simulate oscope 80MHz bandwidth. It seems Nick grounds his probe well (or his BW is lower) :)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: fungus on Jul 15, 2013, 05:32 pm
While we're testing...

Could somebody connect up 8 MOSFETs to the 8 pins of (eg.) PORTB without resistors then do:

while (true) {
 PORTB = 0;
 PORTB = 255;
}

On a similar vein, we could short out all the 'digital' pins then set then all to OUTPUT+HIGH. Let's see if an Arduino can really output 88mA on I/O pins without damage.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: oric_dan on Jul 15, 2013, 05:34 pm
@Nick, in reply #137 you were talking about 318 mA being the value, and in reply #144 you're talking about 13.6mA. What changed?

@polymorph:
Quote
I recall watching some Tektronics videos showing how even a very short ground lead can throw pulse width and height readings way off. And even for longer pulses, I have seen a lot of noise and ringing on scopes turn out to be bad ground lead placement.

I referenced videos like this back in reply #109, but it's not clear how many people took a look. Likely NIck and BillO, and Pito probably already knew it.
youtube.com/watch?v=zodpCuxwn_o (http://youtube.com/watch?v=zodpCuxwn_o)
youtube.com/watch?v=2vzvWUqUtb8 (http://youtube.com/watch?v=2vzvWUqUtb8)

Quote
I measured the capacitance between two adjacent rows on my white protoboard, and got 2.0pF. I set up a monostable RC circuit, and measure the difference in pulse width with and without the protoboard rows attached.

Where did you get a number like 10 to 20pF for capacitance between DIP chips? Considering the area facing each other is much smaller and edge-on, I'd expect a lot less than 2pF, even.

Info is scarce, but in the ATmega data sheets in the I2C section, it mentions pin capacitance being 10 pF. This would be to ground, not between adjacent pins. A/D channels indicate 5pF, but there is probably less miscellaneous circuitry tied to those pins inside the chips too, in order to limit the stray capacitance.

For the whiteboard/breadboards, I did a similar measurement to yours many years ago, but don't remember the exact details. Probably connected a 0.1K or 1K R from one row to gnd, and measured the RC rise-time using a 50ohm pulse generator tied to the adjacent row. Could probably use re-doing in a more controlled manner.

Another way might be to connect the signal generator to one row and ground the 2 adjacent rows, and do a Bode Plot at the center row, but these things are fraught with stray capacitance and inductance problems.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Tom Carpenter on Jul 15, 2013, 07:02 pm
I have a pair of smart tweezers which can measure capacitance amongst other things. I checked the input capacitance of a couple of Arduino pins (from pin to ground). I measure between 9.2pF and 9.8pF.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: oric_dan on Jul 15, 2013, 07:14 pm

I have a pair of smart tweezers which can measure capacitance amongst other things. I checked the input capacitance of a couple of Arduino pins (from pin to ground). I measure between 9.2pF and 9.8pF.
Sounds about right. How about connecting between adjacent rows on a whiteboard/breadboard.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Tom Carpenter on Jul 15, 2013, 07:31 pm

How about connecting between adjacent rows on a whiteboard/breadboard.

Too small to trigger the tweezers to start measuring unfortunately.

However to get a reading, I found a 33pF capacitor and used that.

Unconnected, C = 33.68pF
Connected to adjacent rows, C = 36.27pF

Take the difference, you get ~2.6pF between adjacent breadboard traces.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: pito on Jul 15, 2013, 07:37 pm
I've seen somewhere the capacitance between the adjacent rows is 3pF (or 3.5pF when there is a metal base underneath the breadboard) so 2.6pF is a good result.
Try to use the method with the 33pF capacitor when you measure the arduino's pins capacitance - but use the 33pF in Series with your tweezers such you do not touch the arduino's pins with the tweezers directly but via the serial 33pF..
Vss_gnd->Pinx->33pF->tweezers->Vss_gnd
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Tom Carpenter on Jul 15, 2013, 07:55 pm
I've just repeated the experiment, using the capacitor for both tests. I've made sure I am nowhere near the capacitor with my hands during the test so as not to skew the results. I get the following:

Unconnected: C = 34.15pF (I retested this several times, between each test with the breadboard and Arduino, and all tests were within ~0.02pF of this number).

Connected to Breadboard: C = 36.37pF (matches my last test approximately)

Connected between D12 and GND of Arduino: C = 50.88pF

Connected between A0 and GND of Arduino: C = 44.31pF

So that gives:

Cbreadboard= 36.37-34.15 = 2.22pF (about the same as before)
CarduinoD12= 50.88-34.15 = 16.73pF
CarduinoA0= 44.31-34.15 = 10.16pF (agrees with my first pin test)


D12 is a different port from my previous test. Initially I was testing one of the Analog pins (because it is next to GND on the chip so I could easily connect the tweezers), I used the same pin again, this time measuring the capacitor on the pin header rather than directly testing the chip. In the second test I used D12 as it is near the GND on the header so I can plug in the capacitor (I couldn't use D13 as there is an LED attached).


(1111th post, LOL)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 15, 2013, 09:01 pm
I seem to have a bit of a problem.

Can one of you that have done the experiment with the MOSFET and the 1 ohm gate resistor try something?  Place both probes on the same side of the resistor and see what you get?

I get exactly the same thing whether I have both probes on the ATmega side, both probes on the MOSFET side, or ch1 on the mosfet side and ch2 on the ATmega side, or even switched around.  Exactly the same thing each and every way.

There seems to be a slight difference in the response of my channel 1 and channel 2 accounting for ALL the difference I'm seeing.



Update:
Okay, never mind.  Problem solved.  Doh!  Sometimes you really can't see the forest for the trees.  I should have some 'final' results tomorrow about this time.

BTW, thanks everyone for getting involved.  I think we a getting some good data points.  Pending any astonishing results from tomorrow I think I'm prepared to update my outcome from "Busted" to "Plausible".
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: oric_dan on Jul 15, 2013, 09:29 pm
Quote
Okay, never mind.  Problem solved.

Great, guess we'll have to guess at how it was solved - even after 153 posts on this thread.

Quote
update my outcome from "Busted" to "Plausible".

:-)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 15, 2013, 10:58 pm

Great, guess we'll have to guess at how it was solved - even after 153 posts on this thread.


Not at all.  I wasn't referring to the resolution of the thread, just the problem I was having earlier.  Scope was not set up right as I had been using it for something else over the weekend, but had completely forgotten and had assumed  it was left.... well anyway.... put it down to a brain glitch...  Can someone have "elder moments" at 56?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 15, 2013, 11:17 pm

@Nick, in reply #137 you were talking about 318 mA being the value, and in reply #144 you're talking about 13.6mA. What changed?


The 318 mA value referred to Tom Carpenter's test through 0.47 ?. The 13.6 mA referred to my test through 330 ?. So the difference was the current-limiting resistor.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 15, 2013, 11:30 pm

I referenced videos like this back in reply #109, but it's not clear how many people took a look. Likely NIck and BillO, and Pito probably already knew it.
youtube.com/watch?v=zodpCuxwn_o (http://youtube.com/watch?v=zodpCuxwn_o)
youtube.com/watch?v=2vzvWUqUtb8 (http://youtube.com/watch?v=2vzvWUqUtb8)


I watched them, very interesting. Unfortunately the first one (that I watched) was about the importance of short ground leads, which whilst it is obvious he is right, didn't really apply to me because of the differential measurement I was taking.

The second video made some pointed references to the "poor man's differential measurements" (ie. the sort I was taking) as not very accurate.

It seems clear that there is scope* for measurement error here, and if so, it is possible that the "high current" overshoots we are seeing is an artifact of the measurement, which, if so, would tend to support BillO's original hypothesis, at least to an extent.

Here's one theory: shoot it down in flames if you want. The output drivers on the Atmega don't turn on instantly, but take (say) 10 nS. Meanwhile the MOSFET we are interested in also doesn't turn on instantly but is gradually turning on due to the capacitance effect we are discussing. Now if the MOSFET turns on in 10 nS then by the time the output pin is fully on the MOSFET is also on and thus is no longer drawing current. Thus the output pin is not driven past its design limits. Plausible?

* = sorry about the pun.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Tom Carpenter on Jul 15, 2013, 11:58 pm
If it helps, I have access to a differential scope probe at Uni, so will repeat the experiment tomorrow using that.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 16, 2013, 12:24 am

If it helps, I have access to a differential scope probe at Uni, so will repeat the experiment tomorrow using that.


That should make a big difference.  It will not only help eliminate 'ringing' but will also eliminate any issues caused by differences in the channels.

I've spent most of my available time for this today in calibrating equipment and making physical adjustments to the 'cleaned up' experiment to reduce ringing.  In the gate resistor experiment I have it down to what looks like a 1/2 cycle.  In the current into a short experiment there seems to be ringing at about 33mHz, but it appears to be associated with the ATmega clock.  It never quite goes away.  I'll do my last runs tomorrow and take scope screen shots as well as photos of the experimental set-up.  In the initial look, I am still seeing more current in the gate resistor experiment than at any point in the shorting experiment which just seems odd.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 16, 2013, 12:30 am

Here's one theory: shoot it down in flames if you want. The output drivers on the Atmega don't turn on instantly, but take (say) 10 nS. Meanwhile the MOSFET we are interested in also doesn't turn on instantly but is gradually turning on due to the capacitance effect we are discussing. Now if the MOSFET turns on in 10 nS then by the time the output pin is fully on the MOSFET is also on and thus is no longer drawing current. Thus the output pin is not driven past its design limits. Plausible?


Maybe.  We've had multiple concurrences on the 80+ mA maximum current theory.  Let me put on my physicist hat and do a little thinking and calculations on this.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: AmbiLobe on Jul 16, 2013, 01:21 am
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.

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

If a power MOSFET gate uses that current, here is my calculation of fall time RC time constant when no series resistor is added:
RC = 26ohms x 6nF = 156ns

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

If a series resistor limits the current to 20mA ...
R = 5v/.02A = 250 ohms = 26 ohms + 224 ohms
RC = 250 x 6nF = 1.5us

$$$$$$$$$$$$$$$$$$$$$$$$$$$

Conclusion : use a 220 ohms resistor between Arduino and any large capacitive load to limit the current to 20mA.

Example MOSFET... IRF7805PbF
Threshold 2 volts
gate charge 31 nC at Vgs = 5v
c = q/v = 6nF
with no series resistor i = c dv/dt

i = 192mA
dv = 5 volts
dt = c dv/i = 6nF x 5v / .192 Amp = 156 ns

Conclusion : without the series resistor, 192 mA can flow at the beginning  of the gate switching time.
DO NOT DO THIS !!!!!!!!!!!!!!!!!!!!! VIOLATION.... VIOLATION !!!!!!!!!!!!!!!!!!! WARNING...WARNING...
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 16, 2013, 09:51 pm
Here are my measurements using a 'cleaned up' experimental set-up to reduce ringing as much as possible.

First, here is the board I built.  I was going to mount a ATmega328 to the same board, but tried this and found it was pretty effective.
(http://users.vianet.ca/omegamic/ArdForumFiles/IMGP0268.JPG)
For the MOSFET experiment the gate resistor is 1 ohm, the drain resistor is 47 ohms.  For the "short circuit" experiment you can see the 2 x 1 ohm resistors paralleled on to the left of the large cap.  1000uF and .1uF caps were place across the Vcc bus to the ground bus.

Here is the connection for the MOSFET experiment.  The scope ground leads are 8cm long.  Both leads are grounded at within 1cm of the MOSFET source.
(http://users.vianet.ca/omegamic/ArdForumFiles/IMGP0269.JPG)

Here are the measurements.  As you can see there is about +/- 25mV of random noise.  This first one is both scope leads attached to the ATmega328 side of the resistor.  I did this to try to determine if there was an influence in the measurements caused by differences in the scope channels.  There does seem to be a net difference of a constant 40mV which will be subtracted from all following results.  If there is a response difference, it is less than the noise.
(http://users.vianet.ca/omegamic/ArdForumFiles/MAP022.BMP)

For the next 3 shots Ch1 is on the ATmega side and Ch2 is on the gate side.  I made my measurements so that the cursors were placed roughly in the middle of the noise as it was being displayed.  I get approximately 68mV +/- 25mV falling away to 0mV +/- 25mV across the 1 ohm indicating a peak of about 68mA +/- 25mA.  Pin 9 of the chip was used for this experiment.
(http://users.vianet.ca/omegamic/ArdForumFiles/MAP013.BMP)

Here is the time measurement.  I read it as 300nS +/- 20nS.
(http://users.vianet.ca/omegamic/ArdForumFiles/MAP024.BMP)

Here is a shot of the rising edge of the pulse from the ATmega with the cursors set at the same 300nS for comparison.
(http://users.vianet.ca/omegamic/ArdForumFiles/MAP015.BMP)

Here is the connection for the "short circuit" experiment.
(http://users.vianet.ca/omegamic/ArdForumFiles/IMGP0270.JPG)

And here is the measurement.  I am seeing about 43.6mV into .5 ohms giving a current of about  87mA.  The ringing here seems to be related to Atmega clock and is twice the frequency of the crystal.  Pin 11 was used for this experiment.
(http://users.vianet.ca/omegamic/ArdForumFiles/MAP011.BMP)

Finally, since a lot of folk do not believe the internal resistance of the ATmega rises as the current increases I measured that too, using the following set-up.  Various resistors and a 500 ohm trim pot were used to create an adjustable load.  The ATmega was loaded so that the output voltage was at various levels (4.8, 4.6. 4.4...) then the value of the load resistance was measured.  From that data the output current and internal resistance were calculated.  Pin 10 was used.
(http://users.vianet.ca/omegamic/ArdForumFiles/IMGP0267.JPG)
(http://users.vianet.ca/omegamic/ArdForumFiles/VxI.JPG)
(http://users.vianet.ca/omegamic/ArdForumFiles/RxI.JPG)
At no point in making these measurements did I witness large voltage swings indicating huge amounts of current.  The least amount of current measured was about 10mA with a 477 ohm load the.  The most measured during this experiment was about 86mA into 2.3 ohms.



So here are my final conclusions on this:

1)  An ATmega328 will not source more than about 88mA through an I/O pin.  This current is achieved within a few nS (<20nS) of the pin going high.

2) The ATmega328 I/O pin has an internal resistance that varies from about 25 ohms at the least to about 54 ohms at the maximum current it will pass.

3) As for needing a gate resistor on a MOSFET.  I feel these results demostrate that a gate resistor is not always required, depending on the total gate charge and gate capacitance of the MOSFET.  However, if having the ATmega328 pass as much as 30mA beyond the 40mA limit for about 0.02% of the PWM cycle is considered intolerable, you will most likely need a gate resistor for larger MOSFETs.  I therefore rescind my previous judgement on the myth and call it Plausible.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: CrossRoads on Jul 16, 2013, 10:13 pm
Nice work BillO. I appreciate the meticulousness you and the others put into all the measurements. The 11 pages of discussion have been interesting to follow.
I have been recommending to folks that a 150 ohm resistor should provide ~33mA for fast MOSFET gate transitions and as a good fit for standard value resistors.
I guess 120 would work also, only overstressing the IO pin by a mA or 2 for a very brief time.

On a separate note, what kind of scope is that? I have been looking for a higher bandwidth scope than my USB interfaced DPscope.  The Rigol DS1102E 100MHz scope would seem quite adequate for 8MHz signals, $399 http://www.saelig.com/product/PSPC017.htm.
Hard to justify tons more money than that for playing with 16 MHz clock based signals. 200 MHz would be nice, but not twice the cost nice for Arduino based stuff. Not with the kid starting college in 4-5 few weeks and the first bill already here!
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 16, 2013, 10:53 pm
@CrossRoads


It's a UNI-T UT2102CEL.  I think I paid $365 for it complete.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: CrossRoads on Jul 17, 2013, 12:02 am
So, another China manufacturer.
http://www.uni-trend.com/aboutus.html

Specs look similar to Rigol - but wider screen, perhaps deeper memory?
http://www.saelig.com/PSBE1002/PSPC017.htm
http://www.uni-trend.com/UTD2102CEL.html

You pretty happy with it?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 17, 2013, 12:17 am
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.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: oric_dan on Jul 17, 2013, 12:51 am
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.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: TanHadron on Jul 17, 2013, 02:11 am
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.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: nickgammon on Jul 17, 2013, 05:20 am

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.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: oric_dan on Jul 17, 2013, 07:32 am

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.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: pito on Jul 17, 2013, 08:51 am
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
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 17, 2013, 03:06 pm

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.  :-(
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 17, 2013, 03:17 pm

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.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: BillO on Jul 17, 2013, 03:54 pm

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.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: oric_dan on Jul 17, 2013, 08:15 pm

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.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: oric_dan on Jul 17, 2013, 08:16 pm
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.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: pito on Jul 17, 2013, 09:48 pm
@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..  ;)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Boardburner2 on Jan 23, 2017, 05:42 pm
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.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: krupski on Jan 25, 2017, 08:03 am
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.


Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: charliesixpack on Jan 25, 2017, 02:45 pm
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).
I've argued your point on this one.  I have designed off chip drivers on ICs and had to consider this very problem for reliability on systems selling hundreds of million dollars.  I can't get upset when some kid living in his mom's basement tells me his intuition proves me wrong.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: gpsmikey on Jan 25, 2017, 05:34 pm
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'm so old not only do I know what a 5U4 is, I have an adapter downstairs I built years ago that adapts an 80 to a 5U4 socket !!   :o

And yes, your comment about a limiting resistor to 3 decimal places is right on.

mikey
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: groundFungus on Jan 25, 2017, 05:57 pm
We had a 7 seg display that showed the integer temperature for a process.  A new engineer came on board and wanted the temperature displayed to 3 decimal places.  We told him that the measurement was not that accurate.  He replied that his model calculated temperature to 3 places.  We added 3 digits to the display and rigged a random number generator to the 3 places.  He was happy.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Boardburner2 on Jan 25, 2017, 09:36 pm
Krupski, its an old thread

I only revived it to discover what bandwidth scope was used.

I have the chance to play with a 2GHz scope over the next couple of weeks and wondered if it is worth repeating some of the experiments.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: larryd on Jan 25, 2017, 11:49 pm
It's always worthy if it is free.

Make sure the scope probe has good band width too.


.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Boardburner2 on Jan 26, 2017, 12:17 am
It's always worthy if it is free.

Make sure the scope probe has good band width too.


.
It is a rental. We needed a 1 GHz scope for a month.
Got a 2 GHz for the same price (what they had available) with 1 GHz probes, they seem to be missing or locked up though.
Lunchime job i think. Is it worth doing  ?

IT is a tek scope with the funny connectors though.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: larryd on Jan 26, 2017, 12:33 am
Personally, I have used ccts. with and without a series resistor over quite a few years.
I wouldn't jump up and down saying a resistor is needed, but if it makes someone feel better to do it their way, all the power to them.

It's always nice to compare things.
Having a high and low quality scope looking at the same signal might be interesting.

OTH a series resistor is dirt cheap, oh what to do?  ;)

.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: krupski on Jan 26, 2017, 01:49 am
Krupski, its an old thread

I only revived it to discover what bandwidth scope was used.

I have the chance to play with a 2GHz scope over the next couple of weeks and wondered if it is worth repeating some of the experiments.
Why repeat the experiments? I think they showed reasonable data. In fact, they proved "the point"... yes there is an overcurrent, but it is of such short duration that it simply does not matter.

In fact, adding a gate resistor only serves to slow down the switching time of the power mosfet, leading to extra power dissipation (i.e. heat) which kinda defeats the purpose of using a mosfet.

Also, what nobody seemed to mention (although I may have just missed it) is that the output drivers for the AVR pins, every time they switch, go through a very short period where they are BOTH conducting and placing virtually a short circuit across the Vdd supply (hence the need for bypass capacitors).  Nobody seems to worry about THOSE short duration, high current spikes, but OMG a current spike caused by not using a gate resistor will ruin, degrade or smoke the AVR.

Really???  (http://www.hobbytent.com/images/smilies/rolleyes.gif)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: krupski on Jan 26, 2017, 01:51 am
Personally, I have used ccts. with and without a series resistor over quite a few years.
I wouldn't jump up and down saying a resistor is needed, but if it makes someone feel better to do it their way, all the power to them.

It's always nice to compare things.
Having a high and low quality scope looking at the same signal might be interesting.

OTH a series resistor is dirt cheap, oh what to do?  ;)

.
True for the hobbyist, but no engineer will spec a useless component for a mass produced product where the extra 1 cent is multiplied by millions of devices.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: larryd on Jan 26, 2017, 02:12 am
"True for the hobbyist, but no engineer will spec a useless component for a mass produced product where the extra 1 cent is multiplied by millions of devices."

A SMD resistor is 0.2 of a cent at 10,000 pieces. ;)

You are correct with this, but we are a home brew kind of place.

Didn't think you were concerned about comerial manufacturing numbers.


Engineers: allow vehicle ignition switches to fail resulting in death, allow faulty air bags manufacture causing death, allow software to circumvent pollution laws, allow a bridge to fall down.  ;)


I just don't care about this damn resistor thing and I think you are there too.
.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Boardburner2 on Jan 26, 2017, 08:16 am
Why repeat the experiments? I think they showed reasonable data. In fact, they proved "the point"... yes there is an

Us mortals do not get to play with this sort of equipment normally. :)

Also, what nobody seemed to mention (although I may have just missed it) is that the output drivers for the AVR pins, every time they switch, go through a very short period where they are BOTH conducting and placing virtually a short circuit across the Vdd supply (hence the need for bypass capacitors).

Shoot through ?
Also spice models would suggest a short high current pulse on the transition.
I suspect breadboard layout problems will make a nonsense of the measurement results anyway.

Resistor may slow down switching but around here i think it best to suggest it as it gives some protection to the outputs from the inevitable silly mistake that the newbies (and others) make.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: gpsmikey on Jan 26, 2017, 05:33 pm
Us mortals do not get to play with this sort of equipment normally. :)

Resistor may slow down switching but around here i think it best to suggest it as it gives some protection to the outputs from the inevitable silly mistake that the newbies (and others) make.
Agreed - another point I have not seen discussed is RFI from the switching transients.  Depending on the switching frequency, slowing the rise/fall times does increase the time the FET is in the middle or "linear" region, however, if you are using a low switching frequency (like I have for a heater I control - 2,5 second cycle time), slight heating is not an issue, but by rounding off the edges of the switching, you drop the RFI way down (I hate "tic .. tic .. tic" on a nearby radio on the AM band).  Same thing applies with RS-232 etc - slowing the rise/fall times can give you better distance, but you have to trade that with what baud rate you can work with.  Fast rise/fall times can give all sorts of unwanted ringing depending on the antenna ... I mean wiring  :)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: alka on Jan 26, 2017, 05:59 pm
Agreed - another point I have not seen discussed is RFI from the switching transients. 
This is key..

This is the reason that every single chinese speed controller using atmega's built to the lowest possible price point has gate resistors. To slow down the rise /fall time and reduce the voltage spike /  EMI. The resistances used are in the range of 50-100 Ohms so I don't think they care about the current limit.

V(stray) = L * di/dt.

For three phase brushless controllers in a small footprint they are essential.

One other thing .. the gate resistor needs to be large enough to be compatible with the reverse recovery time of the free wheel diode otherwise this can cause overvoltage stress on the mosfet/igbt.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Smajdalf on Jan 30, 2017, 06:35 pm
Hi, thanks to reviving this old topic - it was very interesting to read.

But I don't understand one thing: why is everybody so afraid about driving (MOS)FET without gate resistor but does not care about other capacitive loads - such as pins of any other ICs, piezospeakers, long wires...? For example when I connect 10 of anything to SPI bus the CLK will be loaded with similar (or even greater) capacitance than single discrete MOSFET has and is switching with much higher frequency than typical Arduino PWM.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: krupski on Jan 30, 2017, 09:04 pm
"True for the hobbyist, but no engineer will spec a useless component for a mass produced product where the extra 1 cent is multiplied by millions of devices."

A SMD resistor is 0.2 of a cent at 10,000 pieces. ;)

You are correct with this, but we are a home brew kind of place.

Didn't think you were concerned about comerial manufacturing numbers.


Engineers: allow vehicle ignition switches to fail resulting in death, allow faulty air bags manufacture causing death, allow software to circumvent pollution laws, allow a bridge to fall down.  ;)


I just don't care about this damn resistor thing and I think you are there too.
.
Even at the hobbyist level, I would not use a gate resistor because:


With regard to the part of your quote that I bolded... agree completely. We're beating a dead (and now decomposing) horse to death.

As of this post, I'm done with this thread. :)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: MrAl on Jan 31, 2017, 01:29 am
Hi,

Couldnt help noticing this thread.  I wasnt able to read each and every post, but i see that the argument pro or con for having a gate resistor is based on the application of using an Arduino (like the Uno) to drive a MOSFET.  That makes the argument a little different than usual, because the usual argument is for a different reason.

The usual argument centers on the use of a series gate resistor in order to reduce oscillations that cause the MOSFET to turn on and off repeatedly while the source inductance path combined with various capacitances oscillates as an RLC circuit would when presented with a step input drive signal.  It oscillates for a time, then depending on the R value, starts to damp out toward steady state  Once steady state is reached, the circuit switch time period is considered over.
With no series R, we are left to the circuit's innate resistance that comes from a number of sources like the wire resistance.  This is often kept low in order to get high switching speed and high efficiency.  This in turn means that the RLC has low R to start with, and so oscillation is very very possible and in fact likely.
Adding a gate resistor increases the resistance and therefore the damping factor, and thus the oscillation becomes more damped and that means less oscillations.  The down side is slower switching speed, but that is a tradeoff that is often acceptable if not down right necessary.

With the Arduino pin drive application however the focus seems to be on the power dissipation of the internal Arduino pin circuit and since the chip already has some internal resistance the oscillation probably is not as much of a concern as long as the circuit is wired in a reasonable way.  But first and foremost we want to distinguish these two very different scenarios so that when we read about a gate resistor elsewhere we can be aware of what the context is, uC pin drive or concerns about problematic oscillations.

For the Arduino chip or any other uC chip, the signal at the gate will look like an exponential followed by a plateau, followed by another exponential.  During this time the internal pin circuit dissipates power.  The current is limited by the internal resistance, so the instantaneous power is always limited.   That means we can calculate the internal power dissipation and think about whether or not it would be damaging.

The two very different scenarios we would then encounter would be a slow PWM vs a high frequency PWM.  With the gate signal being repeated over and over again, the average power becomes a concern.  As the frequency goes up, the average power goes up, so there would be a limit on the frequency that could be used and still keep power dissipation in the pin circuit low enough to not damage the uC chip.  The local max power dissipation could be estimated as the specified max pin current times the measured voltage drop.  The chip has to be able to survive that or else it wont meet the pin specs.  Using that as a limit, we then calculate the total average power due to the switching waveform itself at the pin and then compare.  The power calculation would probably come from three intervals, the first exponential, the plateau, and the second exponential.  The total power can then be compared to the known max power and if it is lower than it should work, but if higher then there is a risk of damage over time.

 
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Boardburner2 on Jan 31, 2017, 03:30 am
Hi,


The usual argument centers on the use of a series gate resistor in order to reduce oscillations that cause the MOSFET to turn on and off repeatedly while the source inductance path combined with various capacitances oscillates as an RLC circuit would when presented with a step input drive signal.  It oscillates for a time, then depending on the R value, starts to damp out toward steady state  Once steady state is reached, the circuit

 

Yes.
I am currently using a borrowed 2 GHz scope to do some tests.
Plenty of ringing on a breadboard circuit.
Not so on a soldered board with some thought to layout.

Many here are capable of building aerospace and medical equipment and doing the sums themselves.
Most i suspect are beginners who really only need advice on how to prevent destroying their (fairly expensive toys).
A 3 cent resistor would appear to be a reasonable solution. Bit of a generalisation though.
Semantics may be the problem. Stating that a gate resistor is required can fly in the face of a professional engineer but is possibly good advice for a beginner.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: MrAl on Jan 31, 2017, 06:52 am
Yes.
I am currently using a borrowed 2 GHz scope to do some tests.
Plenty of ringing on a breadboard circuit.
Not so on a soldered board with some thought to layout.

Many here are capable of building aerospace and medical equipment and doing the sums themselves.
Most i suspect are beginners who really only need advice on how to prevent destroying their (fairly expensive toys).
A 3 cent resistor would appear to be a reasonable solution. Bit of a generalisation though.
Semantics may be the problem. Stating that a gate resistor is required can fly in the face of a professional engineer but is possibly good advice for a beginner.
Hi,

That's great to hear, and i was also thinking we could estimate the chip pin wave as a ramp followed by a plateau followed by another ramp most likely.

But my post also mentioned how a gate resistor is OFTEN required for the purpose of reducing the ringing effect, and any good engineer who works on converters of any type that use mosfets would know this like the back of his/her hand :-)

International Rectifier gave a really good talk on this in one of their data books on HexFets, but i am not sure where that document is online anymore, or if it is online anymore.  I suspect it can be found on their website irf.com.

Do we have any consensus on what the equivalent series resistance of say the Uno chip pin has when going high?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Boardburner2 on Jan 31, 2017, 07:43 am
Do we have any consensus on what the equivalent series resistance of say the Uno chip pin has when going high?
Reading the thread i think the ESR is between 20 to 40 ohms.
Not had the chance to set up a suitable experiment though, BILLO i think tried it.
I have limited time with equipment , any suitable suggestions for experimentation ?

Hi,

That's great to hear, and i was also thinking we could estimate the chip pin wave as a ramp followed by a plateau followed by another ramp most likely.

Even if i understood that proprerly, it will probably take me a month to learn how to drive the machine. :)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: MrAl on Jan 31, 2017, 11:53 am
Reading the thread i think the ESR is between 20 to 40 ohms.
Not had the chance to set up a suitable experiment though, BILLO i think tried it.
I have limited time with equipment , any suitable suggestions for experimentation ?

Even if i understood that proprerly, it will probably take me a month to learn how to drive the machine. :)
Hi again,


Well now that you mention it an experiment would not be hard to do.
Ideally we would shoot for the whole load curve, but i think a four point test would suffice.

For example, load the high level logic state pin to 10ma, 20ma, 30ma, and 40ma, and read the voltage from pin to ground for each of those four current levels.  That would allow us to predict the response when the pin met up with a capacitor.  The internal resistance would then be:
R=(Vcc-Vpin)/i

where 'i' is the current at that point.

That test would give us four resistance values and we can see if it is nearly linear or not for one thing, and if not, just fit a curve to that data, then we can calculate a bunch of stuff with more certainty.

We also need to measure Vcc for each test point, or just measure the drop between Vcc and the pin.  Then R=Vdrop/i which is actually simpler.
I thought it would be good to know the output voltage at that point too though, and also the Vcc line at that point.  That would tell us a lot.


Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: krupski on Jan 31, 2017, 06:02 pm
For the Arduino chip or any other uC chip, the signal at the gate will look like an exponential followed by a plateau, followed by another exponential.
I know I wasn't going to post in this thread anymore, but what you mentioned is worth a comment.

The two "exponentials" that you see have different causes.

The first one is due to the Miller effect combined with the inherent gate capacitance of the MOSFET. The "plateau" you see is when the drain is pulled as low as it's going to go, then finally the second exponential is the gate capacitance alone charging to Vgs equilibrium.

I don't think most people really know what the Miller effect is. Anywhere you look it up online, there are all kinds of formulas and hokey-pokey, but no clear explanation of the actual mechanism.

Imagine any 3 terminal (triode) device such as a BJT, a MOSFET and even a vacuum tube triode.

There is inherent capacitance that exists between each terminal and every other terminal, but the one that causes the Miller effect is the drain to gate capacitance (or collector to base, or plate to grid).

Imagine a MOSFET with the drain is being used to switch an LED on through the appropriate resistor.

Initially, the drain is at Vdd (minus the drop across the LED) and the gate is at 0.

Therefore, the inherent capacitor between the drain and gate is charged to Vdd - V-LED.

Now, begin to raise the gate voltage. As the MOSFET begins to turn on, the drain begins to lower, beginning to turn on the LED and also lowering the drain side of the inherent capacitor.

Of course, the gate side of the capacitor will also start to lower, which is FIGHTING the thing trying to drive the gate high.

The gate ends up looking like a LARGER capacitor which takes a lot of current to charge.

Once the MOSFET is saturated (that is, Vgs is at it's minimum), the "capacitance amplifying effect" stops and you get the plateau. Finally, you get another, less "severe" exponential as the gate (and it's inherent capacitance alone) is charged past the Vgs threshold and ends when Vgs is equal to the voltage of the gate driver.

As you can see, if the MOSFET were not connected to a load and the drain instead tied to ground, there would be virtually no Miller effect since the drain can't "push against" the gate. It's already at minimum and won't move any further.

Make sense?

Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: polymorph on Jan 31, 2017, 06:13 pm
The Miller effect being the reason for the Cascode amplifier configuration. The collector voltage stays relatively constant, so no Miller effect amplification of the Base-Collector capacitance.

http://www.allaboutcircuits.com/textbook/semiconductors/chpt-4/cascode-amplifier/ (http://www.allaboutcircuits.com/textbook/semiconductors/chpt-4/cascode-amplifier/)
(http://sub.allaboutcircuits.com/images/03502.png)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Jiggy-Ninja on Jan 31, 2017, 07:35 pm
International Rectifier gave a really good talk on this in one of their data books on HexFets, but i am not sure where that document is online anymore, or if it is online anymore.  I suspect it can be found on their website irf.com.

Do we have any consensus on what the equivalent series resistance of say the Uno chip pin has when going high?
International Recitifier is now owned by Infineon.

That databook wouldn't happen to be Understanding HEXFET Switching Performance (http://www.infineon.com/dgdl/an-947.pdf?fileId=5546d462533600a40153559ecb9011ae), would it?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: MarkT on Jan 31, 2017, 10:32 pm
MOSFET designers do a lot to reduce the Miller capacitance in devices, its not that important at low voltages.

The plateau is where the channel is formed, basically - the charge in the gate mirrors the charges forming
the gate.  Most of the channel area is protected from the drain voltage since the substrate is electrically
connected to the source.

There is, of course, still some drain-gate capacitance, but the total charge on the gate is much larger
than the charge on this capacitance in a good device.

I did some experiments switching 3A with a drain voltage of 0.5V, 9V and about 25V on an STP3020L
logic-level StripFET, and the fall in drain voltage (blue) happens basically before the bulk of the gate
charge.  The gate drive is an Arduino pin (so about 30 or 40 ohm source impedance)

(http://sphinx.mythic-beasts.com/~markt/MOSFET-0.5V.jpg)
(http://sphinx.mythic-beasts.com/~markt/MOSFET-9V.jpg)
(http://sphinx.mythic-beasts.com/~markt/MOSFET-25V.jpg)

Note the horizontal scale is 25ns/div, vertical is 1V/div for yellow (gate voltage), 5V/div for drain(blue).
The time taken to charge the plateau is extended for larger drain voltages, which suggests some sort
of delayed Miller effect, but note the plateau is present even at a 0.5V drain voltage, when the Miller
effect is for all purposes absent.

Note also the sudden onset of drain voltage falling at the moment the plateau starts - clearly this
is when a channel first forms (the inversion layer)

[ Note that due to the bench power supply and long leads I didn't get meaningful switch-off waveforms, and thinking about it I suspect the change of charge in the drift region is probably responsible for the delayed second part of the plateau - that change is proportional to the drain delta-V... ]
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: MrAl on Feb 01, 2017, 03:09 am
I know I wasn't going to post in this thread anymore, but what you mentioned is worth a comment.

The two "exponentials" that you see have different causes.

The first one is due to the Miller effect combined with the inherent gate capacitance of the MOSFET. The "plateau" you see is when the drain is pulled as low as it's going to go, then finally the second exponential is the gate capacitance alone charging to Vgs equilibrium.

I don't think most people really know what the Miller effect is. Anywhere you look it up online, there are all kinds of formulas and hokey-pokey, but no clear explanation of the actual mechanism.

Imagine any 3 terminal (triode) device such as a BJT, a MOSFET and even a vacuum tube triode.

There is inherent capacitance that exists between each terminal and every other terminal, but the one that causes the Miller effect is the drain to gate capacitance (or collector to base, or plate to grid).

Imagine a MOSFET with the drain is being used to switch an LED on through the appropriate resistor.

Initially, the drain is at Vdd (minus the drop across the LED) and the gate is at 0.

Therefore, the inherent capacitor between the drain and gate is charged to Vdd - V-LED.

Now, begin to raise the gate voltage. As the MOSFET begins to turn on, the drain begins to lower, beginning to turn on the LED and also lowering the drain side of the inherent capacitor.

Of course, the gate side of the capacitor will also start to lower, which is FIGHTING the thing trying to drive the gate high.

The gate ends up looking like a LARGER capacitor which takes a lot of current to charge.

Once the MOSFET is saturated (that is, Vgs is at it's minimum), the "capacitance amplifying effect" stops and you get the plateau. Finally, you get another, less "severe" exponential as the gate (and it's inherent capacitance alone) is charged past the Vgs threshold and ends when Vgs is equal to the voltage of the gate driver.

As you can see, if the MOSFET were not connected to a load and the drain instead tied to ground, there would be virtually no Miller effect since the drain can't "push against" the gate. It's already at minimum and won't move any further.

Make sense?


Hi,

Well that's an interesting read.

I do have to disagree slightly though, and i think it is only because you probably mis-spoke that's all.  The part is here:

StartQuote
Once the MOSFET is saturated (that is, Vgs is at it's minimum), the "capacitance amplifying effect" stops and you get the plateau. Finally, you get another, less "severe" exponential as the gate (and it's inherent capacitance alone) is charged past the Vgs threshold and ends when Vgs is equal to the voltage of the gate driver.
EndQuote

I agree that the Miller effect stops when Vds (not Vgs but that's probably a typo) is at it's minimum, but that is also when the plateau should end.  That's because the reason for the plateau in the first place is because the the Vds is falling and that provides feedback to the gate which ends up being held somewhat constant.

The way i like to explain the plateau is like a DC voltage regulator.  Imagine you want to hold the gate voltage perfectly constant for a short time, and you had to use the drain of the mosfet to do that.  The mosfet drain and associated capacitance acts like negative feedback, so when the drain voltage is falling you get feedback to the gate which holds it constant.  Of course once Vds falls completely you loose the negative feedback and so the gate is no longer regulated, so the plateau time is over and the gate voltage can start to rise again.

However, after taking a second look at the equivalent circuit, i see we mainly have to understand what happens at the drain rather than the gate, because the drain is what we see at the Arduino pin.  That's the main power consumer so we should turn our attention to that instead i think, and see what we can find.
I see some other posts now with some waveforms so i am going to take a look at that next.  If we get an Arduino scope pic we should be able to tell a lot about what is happening.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: MrAl on Feb 01, 2017, 03:10 am
The Miller effect being the reason for the Cascode amplifier configuration. The collector voltage stays relatively constant, so no Miller effect amplification of the Base-Collector capacitance.

http://www.allaboutcircuits.com/textbook/semiconductors/chpt-4/cascode-amplifier/ (http://www.allaboutcircuits.com/textbook/semiconductors/chpt-4/cascode-amplifier/)
(http://sub.allaboutcircuits.com/images/03502.png)
Hi,

Arent we talking about mosfets here though?
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: MrAl on Feb 01, 2017, 03:11 am
International Recitifier is now owned by Infineon.

That databook wouldn't happen to be Understanding HEXFET Switching Performance (http://www.infineon.com/dgdl/an-947.pdf?fileId=5546d462533600a40153559ecb9011ae), would it?
Hi,

Well the book i have is just the Hexfet data book, with blue cover.  It could very well be in that book too though.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: MrAl on Feb 01, 2017, 03:19 am
MOSFET designers do a lot to reduce the Miller capacitance in devices, its not that important at low voltages.

The plateau is where the channel is formed, basically - the charge in the gate mirrors the charges forming
the gate.  Most of the channel area is protected from the drain voltage since the substrate is electrically
connected to the source.

There is, of course, still some drain-gate capacitance, but the total charge on the gate is much larger
than the charge on this capacitance in a good device.

I did some experiments switching 3A with a drain voltage of 0.5V, 9V and about 25V on an STP3020L
logic-level StripFET, and the fall in drain voltage (blue) happens basically before the bulk of the gate
charge.  The gate drive is an Arduino pin (so about 30 or 40 ohm source impedance)

(http://sphinx.mythic-beasts.com/~markt/MOSFET-0.5V.jpg)
(http://sphinx.mythic-beasts.com/~markt/MOSFET-9V.jpg)
(http://sphinx.mythic-beasts.com/~markt/MOSFET-25V.jpg)

Note the horizontal scale is 25ns/div, vertical is 1V/div for yellow (gate voltage), 5V/div for drain(blue).
The time taken to charge the plateau is extended for larger drain voltages, which suggests some sort
of delayed Miller effect, but note the plateau is present even at a 0.5V drain voltage, when the Miller
effect is for all purposes absent.

Note also the sudden onset of drain voltage falling at the moment the plateau starts - clearly this
is when a channel first forms (the inversion layer)

[ Note that due to the bench power supply and long leads I didn't get meaningful switch-off waveforms, and thinking about it I suspect the change of charge in the drift region is probably responsible for the delayed second part of the plateau - that change is proportional to the drain delta-V... ]
Hi there,

Well the plateau (flat portion of the wave) will get more feedback from the drain for higher drain voltages, so that makes sense.

However as i was noting in another post, i think we should turn our attention to the drain circuit because that's really what we get at the Arduino pin, while the gate circuit probably does not consume as much power.  So understanding the drain vs load would probably be better.

Thus, testing with some resistors and if you want to use the scope and catch some turn on periods that might help too.  Once we know the voltage drop for various loads, that would tell us a lot.  I might be able to get to try this myself also.  In this way we should be able to tell what will happen with a capacitive load or mosfet gate load.

Oh i see what you did was use the Arduino to drive the mosfet.  That's good too, and if we can get the current flow at the time of turn on (and turn off) that would help calculate the internal power dissipation.
Any chance you could display the current out of the pin with those traces, especially the last one?


Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: MarkT on Feb 01, 2017, 03:17 pm
I couldn't figure out an easy way to do that without a current probe, I can try adding a small series
resistance in the source, and I could engineer a better power source/load combination than flying leads
from a bench supply - or someone else can have a go.  Currently I have a cluster of croc-clips on the leads
of the TO220 package and its a bit of a crude lash-up, not impedance-controlled that's for sure!
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: IamFof on Feb 01, 2017, 09:32 pm
Hi guys

Thoroughly enjoyed this very informative thread.

Here are a couple of thoughts I've had.  In my professional career, I spent most of my time in development labs, working directly and in parallel with lots of very  clever EEs.  They, invariably, like me, tended to include a small gate resistor.  This thread has got me thinking as to where the gate resistor requirement came from.

Very many of you will never have come across the situation where it was obligatory to attach heat shunts to the legs of transistors, before applying a soldering iron.  Yes, when transistors first started to appear in commercial devices, this is what we had to do.  Ever hear of the expression "the fastest fuse on three legs"?  This is what transistors were commonly called, as they would die, just by looking at them the wrong way.  We used to joke that they were only there to protect the main fuse.

In these sort of scenarios, if I was a design engineer, I would use each and every form of insurance I could incorporate.  Don't forget that the development of transistors took quite a few years before one could (almost) guarantee many of the stated characteristics and parameters required for the design.

As FETs have always been the 'delicate' flower compared to BJT, due to potential for static damage, I suspect that the need for a gate resistor, might be a "folk memory", passed down by 'generations' of old farts like me, who have never had any need or reason to doubt the accepted wisdom.

Thanks for a great, educational read.

Fof
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Boardburner2 on Feb 02, 2017, 05:41 am
I couldn't figure out an easy way to do that without a current probe, I can try adding a small series

I think we had one in the kit.
If it is still here friday i will have a go.

The spike i was looking for on the transitions did not appear although poking around a robomower drive showed some spikes the usual scopes do not see.

Hi guys


 I suspect that the need for a gate resistor, might be a "folk memory", passed down by 'generations' of old farts like me, who have never had any need or reason to doubt the accepted wisdom.


Fof
[/quote]

I was wondering the same having read this thread.
Not particularly involved in design though so knowledge/experience of the detail is rusty to say the least.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: MrAl on Feb 02, 2017, 12:20 pm
Hi guys

Thoroughly enjoyed this very informative thread.

Here are a couple of thoughts I've had.  In my professional career, I spent most of my time in development labs, working directly and in parallel with lots of very  clever EEs.  They, invariably, like me, tended to include a small gate resistor.  This thread has got me thinking as to where the gate resistor requirement came from.

Very many of you will never have come across the situation where it was obligatory to attach heat shunts to the legs of transistors, before applying a soldering iron.  Yes, when transistors first started to appear in commercial devices, this is what we had to do.  Ever hear of the expression "the fastest fuse on three legs"?  This is what transistors were commonly called, as they would die, just by looking at them the wrong way.  We used to joke that they were only there to protect the main fuse.

In these sort of scenarios, if I was a design engineer, I would use each and every form of insurance I could incorporate.  Don't forget that the development of transistors took quite a few years before one could (almost) guarantee many of the stated characteristics and parameters required for the design.

As FETs have always been the 'delicate' flower compared to BJT, due to potential for static damage, I suspect that the need for a gate resistor, might be a "folk memory", passed down by 'generations' of old farts like me, who have never had any need or reason to doubt the accepted wisdom.

Thanks for a great, educational read.

Fof
Hi again,

The original gate resistor requirement came from the oscillation due to there being some inductance in every mosfet source circuit.  What we are talking about here though sort of ignores that and we were focusing on what the Arduino pin can handle from a typical Uno pin for example.  If the pin is worked too hard the dissipation in the chip could rise too much, and we were also worried about burning out the pin itself due to repeated high currents.

What i found out from the scope pics is first of all that mosfet was acting like a typical mosfet when turning it on.  Also, the dissipation comes out to a formula like:
P=K/Tp

where K is some constant based on the driver and Tp is the total period and P is the total power dissipated by the microcontroller chip.

This of course simply means that the frequency is limited because as frequency goes up Tp goes down, and when Tp goes down P goes up.  The chip can only handle so much power because of it's surface area, and the local effects are probably more strict because we cant assume that the heat distributes perfectly.
I was thinking maybe a rule of thumb would be, assuming only one pin being used, one-half the power allowed for the whole chip, which i think would then be 0.5 watts because the total power of the chip is about 1 watt max probably at 25 degree C ambient.

For a very rough and crude estimate, this seems to be around 100kHz.  That should be proved though by experiment, and of course different mosfets could possibly limit this more.  From what i remember from the 1980's, that was a typical limit anyway.

The other interesting thing is that when we add a gate resistor to the Arduino we also slow the mosfet down, which would tend to increase the turn on time.  The difference is some of the power would be moved out of the chip then.

With all the variables here it is starting to look like the best way to test for resistor or no resistor is to run it in the application and see if the chip gets hot.  If the chip gets hot then either lower the frequency or add a gate resistor.  Of course if the efficiency goes down too much it could be a fight to find the right combination.

BTW another application that requires a gate resistor is when connecting mosfets in parallel to obtain a higher current and lower Rds.  One gate resistor per device is the common scheme.  That is to help with oscillations as well as help to get the mosfets all switching at nearly the same time.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: polymorph on Feb 02, 2017, 06:13 pm
The cascode configuration works with BJT, JFETs, MOSFETs, and a mixture of them. It also means you can stack transistors to get a higher voltage than any individual rating.

(http://electronicdesign.com/site-files/electronicdesign.com/files/archive/electronicdesign.com/content/content/73917/73917_f1_0.gif)

(http://www.circuitstoday.com/wp-content/uploads/2012/03/cascode-amplifier-circuit.png)

(https://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/Cascode-voltage-ladder.png/220px-Cascode-voltage-ladder.png)

(https://upload.wikimedia.org/wikipedia/commons/thumb/2/27/MOSFET_Cascode.png/200px-MOSFET_Cascode.png)

(http://wps.prenhall.com/wps/media/objects/416/426185/13fig11.gif)

(http://electronicdesign.com/site-files/electronicdesign.com/files/archive/electronicdesign.com/content/content/73917/73917_f2_0.gif)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: MarkT on Feb 02, 2017, 07:53 pm
The resistor stack circuit is a signal level shifter, it cannot pull the output down to ground
without requiring the top device to handle the full voltage (which makes the other devices
redundant).  

C1 is wrong.  The ratio between R6 and R7 sets the voltage gain, the output would be expected to
stay near 1000V, and you'd probably add a capacitor chain to the resistor chain to ensure the
base voltages are evenly spaced during power-up transients.

Alternatively it may be done that way purely to spread the heat dissipation between several devices,
in which case I'm talking out of my, erm, drain terminal...
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: polymorph on Feb 02, 2017, 11:14 pm
That'll be news to a lot of EEs.

I suggest building it in Spice and trying it out.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: stuart0 on Feb 03, 2017, 03:59 am
Quote
The cascode configuration works with BJT, JFETs, MOSFETs, and a mixture of them. It also means you can stack transistors to get a higher voltage than any individual rating.
Some interesting looking circuits there polymorph. I'm not trying to be rude or anything, but perhaps you could start another thread to discuss them, as they seem quite a bit off topic in this one.

I understand that the cascode configuration somewhat isolates the driving device from the Miller effect, but that's the only tenuous connection I can see to this topic.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: stuart0 on Feb 03, 2017, 04:41 am
Hi again,The original gate resistor requirement came from the oscillation due to there being some inductance in every mosfet source circuit.
Yes this was my understanding as well MrAl. I've certainly seen this oscillation effect occur, and it can quite drastically increase the switching losses. Reducing the source inductance (the length and layout of wiring from source to common ground point with gate drive) and/or increasing the gate series resistance is the cure.

Regarding the other issue of transient pin power dissipation and the danger of overloading the pin without the resistor, I very much doubt that this is an issue with small mosfets as per the OP's example (2n7000).

Of course it depends on what voltage you're switching, but the typical value of total gate charge for that mosfet is only around 1nC. So we have about 1nC * 5V = 5nJ of energy loss per switching cycle. Even at 100 kHz that only amounts to 0.0005 Watts of additional dissipation in the micro controller.

Regarding the instantaneous power dissipation that may occur while switching, consider the pin output characteristics (taken from 328P datasheet) below. Note that the output resistance is about 25 ohms (20mA at 0.5V drop). Also note the slight curvature of the characteristics, showing increasing resistance with increased voltage drop as is typical for a mos output.

So we could estimate that the maximum instantaneous power dissipation would be somewhat less than 100mA * 2.5 V = 0.25 Watts, albeit very briefly.

Personally I would be very surprised if the power dissipation (instantaneous or otherwise) would be an issue. Even for larger mosfets I suspect that the need for an external driver (to achieve snappier switching and reduce switching losses in the mosfet) would arise well before damaging power losses occurred in the MPU pins.

Having said that however. Not everyone has an oscilloscope to detect unwanted oscillations, or the ability to layout the gate drive to avoid it, so guidelines like adding the series gate resistance really aren't a bad idea in any case. :)

(http://forum.arduino.cc/index.php?action=dlattach;topic=176968.0;attach=197309)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: MrAl on Feb 03, 2017, 08:43 am
Yes this was my understanding as well MrAl. I've certainly seen this oscillation effect occur, and it can quite drastically increase the switching losses. Reducing the source inductance (the length and layout of wiring from source to common ground point with gate drive) and/or increasing the gate series resistance is the cure.

Regarding the other issue of transient pin power dissipation and the danger of overloading the pin without the resistor, I very much doubt that this is an issue with small mosfets as per the OP's example (2n7000).

Of course it depends on what voltage you're switching, but the typical value of total gate charge for that mosfet is only around 1nC. So we have about 1nC * 5V = 5nJ of energy loss per switching cycle. Even at 100 kHz that only amounts to 0.0005 Watts of additional dissipation in the micro controller.

Regarding the instantaneous power dissipation that may occur while switching, consider the pin output characteristics (taken from 328P datasheet) below. Note that the output resistance is about 25 ohms (20mA at 0.5V drop). Also note the slight curvature of the characteristics, showing increasing resistance with increased voltage drop as is typical for a mos output.

So we could estimate that the maximum instantaneous power dissipation would be somewhat less than 100mA * 2.5 V = 0.25 Watts, albeit very briefly.

Personally I would be very surprised if the power dissipation (instantaneous or otherwise) would be an issue. Even for larger mosfets I suspect that the need for an external driver (to achieve snappier switching and reduce switching losses in the mosfet) would arise well before damaging power losses occurred in the MPU pins.

Having said that however. Not everyone has an oscilloscope to detect unwanted oscillations, or the ability to layout the gate drive to avoid it, so guidelines like adding the series gate resistance really aren't a bad idea in any case. :)

(http://forum.arduino.cc/index.php?action=dlattach;topic=176968.0;attach=197309)
Hi,

Now that you mention it, i dont know what the internal power dissipation would be for a direct short to ground for a long time period.  If the pin current is limited then the power cant be that high.  For example, with 50ma output with 5v the internal dissipation can only be 0.050*5=250mw also.  If 100ma, then 500mw of course.  That would be with an infinitely large capacitor or equivalent gate capacitance.  I guess i would have to test the pin to see what the max current could ever be assuming a 5v drop and constant short to ground.  A 50 ohm resistor would immediately limit this to 100ma if in fact the pin could actually put out that much current.  If it cant, then maybe the resistor does not help for this particular issue.
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: krupski on Feb 03, 2017, 04:29 pm
MOSFET designers do a lot to reduce the Miller capacitance in devices, its not that important at low voltages.

The plateau is where the channel is formed, basically - the charge in the gate mirrors the charges forming
the gate.  Most of the channel area is protected from the drain voltage since the substrate is electrically
connected to the source.

There is, of course, still some drain-gate capacitance, but the total charge on the gate is much larger
than the charge on this capacitance in a good device.

I did some experiments switching 3A with a drain voltage of 0.5V, 9V and about 25V on an STP3020L
logic-level StripFET, and the fall in drain voltage (blue) happens basically before the bulk of the gate
charge.  The gate drive is an Arduino pin (so about 30 or 40 ohm source impedance)

(http://sphinx.mythic-beasts.com/~markt/MOSFET-0.5V.jpg)
(http://sphinx.mythic-beasts.com/~markt/MOSFET-9V.jpg)
(http://sphinx.mythic-beasts.com/~markt/MOSFET-25V.jpg)

Note the horizontal scale is 25ns/div, vertical is 1V/div for yellow (gate voltage), 5V/div for drain(blue).
The time taken to charge the plateau is extended for larger drain voltages, which suggests some sort
of delayed Miller effect, but note the plateau is present even at a 0.5V drain voltage, when the Miller
effect is for all purposes absent.

Note also the sudden onset of drain voltage falling at the moment the plateau starts - clearly this
is when a channel first forms (the inversion layer)

[ Note that due to the bench power supply and long leads I didn't get meaningful switch-off waveforms, and thinking about it I suspect the change of charge in the drift region is probably responsible for the delayed second part of the plateau - that change is proportional to the drain delta-V... ]
Those traces are very interesting. Notice in the first trace that the capacitance is actually feeding forward a small charge into the drain (the tiny positive bump).

As far as a "delayed Miller effect", I disagree. In the second and third image, you see that the Arduino drive pin is held at an almost constant voltage (the Miller effect "fighting" the Arduino pin trying to go high), then when the mosfet is mostly saturated, the more shallow slope is due to ONLY the gate capacitance slowing down the rise time of the Arduino pin.

Notice that it takes almost 250 nS for the Arduino pin to reach equilibrium. I'm assuming (since you didn't mention it) that you used no resistor between the pin and the mosfet gate, correct?

All in all, very interesting data!

Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: krupski on Feb 03, 2017, 04:33 pm
As FETs have always been the 'delicate' flower compared to BJT, due to potential for static damage,
That's only during handling. Look at how tiny SMT mosfets are used to switch 10 amperes of more on PC motherboards (the multi-phase CPU power supply).  It's amazing that those little parts drive current through toroids wrapped with #14 or #12 wire!
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: krupski on Feb 03, 2017, 04:34 pm
We used to joke that they were only there to protect the main fuse.
That's a common joke: "The transistor will always blow to protect the fuse".  :)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: TomGeorge on Feb 04, 2017, 11:01 am
Hi,
[soapbox]
I find in servicing equipment with MOSFET/IGBT catastrophic failure.

If a gate resistor is fitted then most of the  time the driving circuit is protected.
Repair, replace MOSFET usually fixes problem.

If NO gate resistor fitted then driving circuit damaged.(sometimes guts blown out of driving circuit)
Replacing MOSFET not worth trying as driver circuit is usually a controller of unknown origin/program, unless its a driver IC that has not had the part number rubbed off.

No brainer fit a gate resistor everytime.
Or a dedicated Driver IC(leave the part number on it) :)
[/soapbox]

Tom.... :)
Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: JohnRob on Aug 30, 2019, 09:26 am
I just finished with this topic in another thread.  My reason for suggesting a series output to gate resistor was to protect the  µP for damage if the Fet were to be miswired.  Or if the fet failed which usually turns the fet into a lump of resistive material.

These questions are from novice folks who need some extra safety if it can be had.  Now those that know how to design higher powered devices will not be here asking for gate resistor advice.

So the answer also depends on the audience.

Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: deeec on Jul 26, 2020, 10:25 pm

I read the whole thread and I'm chiming in as a Physicist like BillO.

I, too, had a gut instinct that for my application with MOSFETs there was absolutely no need for the gate resistor.

In my view, the research conducted here has shown where the lines are.  But this can be extended just for the thinking.

In physics, we define what current actually is - a rate of flow of charge in Couloumbs per unit time in seconds.  This is where our contentions lie, and the first derivative with respect to time i.e. dI/dt.

Now I believe the datasheet current limits are for steady state constant current i.e. DC over a resistive load.

There is something that was briefly mentioned in this discussion but not considered further.  The size of the interconnect leading to the pin from within the die is the limiting factor.  It is a resistor.  The die has been delidded and scanned and we can measure the actual width and read up on the depth and measure the length of the wire.

Without going to too much trouble I assumed the width at 0.3 microns due to the 130nm chip process, the depth at 0.48 microns from this article's aspect ratio of 1.6: https://web.stanford.edu/class/ee311/NOTES/Interconnect%20Scaling.pdf.  I assume an interconnect internally to be 0.5mm long at most.  Someone with the inclination can be more precise.

Inputting these values into a calculator at: https://www.allaboutcircuits.com/tools/trace-resistance-calculator/ results in a resistance of 64.8 Ohms within the Atmega 328p chip itself (at room temperature.  I got the 0.3 micron number from here: https://en.wikichip.org/wiki/130_nm_lithography_process#130_nm_Microprocessors
Interconnects are often copper but sometimes gold.

We will be in the right ballpark.  Now we add the resistance from the chip leg to the arduino pin.  But we're already into too many assumptions.  I just want a ballpark number and 5 Volts divided by 64.8 Ohms equals 77 mA.  This is pretty close to the 88mA that has been seen experimentally.

I leave it to others to be more precise than this.  My MOSFET gates will charge in about 20us so my duty cycle will be low.  My average current at the frequency I use will be about 34mA which is in spec according to the data sheet and your collective experiments.

Now what gives rise to an amperage limit within the Arduino?  HEAT!  This is why when people want to overclock processors they cool them with liquid nitrogen.  Increasing the clock rate means more electron flow which means more current, which means more heat.

I think the interconnects are a limiting resistance and would allow a steady state of 88mA if the temperature were kept reasonable.  It could handle more under active cooling or submerged.

But at least we have an estimate of where this resistance and hence current limit comes from.  I played with the values and substituted gold for copper.  It's a bit of a wild goose chase.  Obviously - if lightning hit the chip for an attosecond it would fry but the average current over a whole second would not be much.  The greater hysteresis from rapid heating and cooling would reduce the life of the chip, but not too greatly - just test the temperature rise and build in cooling.  Stress test it after that.

We can understand why a chip manufacturer would want to be conservative with their current ratings.  But if you are a product designer, and you want to make a million units of something it is worth your time to get scientific proof on the actual limits in your use case.

Title: Re: Myth Busters 3 – Myth: “You must have a gate resistor”
Post by: Smajdalf on Jul 26, 2020, 10:54 pm
The MOSFET driver resistance is important IMHO - according to the typical characteristics the total pin resistance changes with supply voltage and load current. A simple bonding write resistance should be constant under those conditions.