Go Down

Topic: Transistor types (Read 13088 times) previous topic - next topic

polymorph

As far as using "add a resistor to drive a MOSFET Gate" rule-of-thumb, if you are using this with PWM, you'll make MOSFET heating even worse by extending the time spent in the linear region.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

1ChicagoDave


polymorph proposed this advice: "a MOSFET does not require a resistor between the Arduino and its Gate."
The following calculation was done to confirm or refute that advice:
2nF gate capacitance on MOSFET is common (2000pF)

Assume 3.6ns rise time for Arduino output

i = c dv/dt
i is current from Arduino = 2.8 amps

c = 2x10^-9 F
dv = 5 volts
dt = 3.6x10^-9 seconds rise time

rise/fall time 3.6ns for SPI pin Atmega328P data sheet page 321


i = (2x10^-9) x 5 / (3.6x10-9) = 2.8 amp

data sheet

https://www.sparkfun.com/datasheets/Components/SMD/ATMega328.pdf


The most common error in calculating gate current is confusing the MOSFET  input  capacitance,  CISS,  for  CEI  and  applying  the equation....

I = C(dv/dt)

to calculate the required peak gate current. CEI is actually much higher, and must be derived from the MOSFET manufacturer's total gate charge, QG, specifications.

The  total  gate  charge,  QG,  that  must  be  dispensed  into  the equivalent gate capacitance of the MOSFET to achieve turn-on is given as:

QG = QGS + QGD + QOD

where:
QG is the total gate charge
QGS is the gate-to-source charge
QGD is the gate-to-drain Miller charge
QOD is the "overdrive charge" after charging the Miller capacitance.

You'll notice by examining curves in datasheets that in order to achieve strong turn-on, a VGS well above that required to charge CEI (and well above VGS(TH)) is often required. The equivalent gate capacitance is determined by dividing  a  given VGS  into  the  corresponding  total  gate  charge. The required gate drive current (for a transition within a specified time) is  determined  by  dividing  the  total  gate  charge  by  the  desired transition time.

In equation form:

QG = (CEI)(VGS)

and

IG = QG/t(transition)

where:
QG is the total gate charge, as defined above
CEI is the equivalent gate capacitance
VGS is the gate-to-source voltage
IG is the gate current required to turn the MOSFET on in time period t(transition)
t(transition) is the desired transition time

Also, many MOSFET's total transition times are much greater than Arduino's "3.6ns rise time". A few I have are closer to 20+ ns. And have QG values from 15-50 nC at 5-10v. Using those numbers...

IG = QG / t(transition)
IG = 15nC / 20ns = 15C / 20s
IG = 0.750 A = 750mA = still more than Arduino could (safely) source at once.

The moral of the story --
I dunno? Always check your DATASHEETS?

The end.

dc42


As far as using "add a resistor to drive a MOSFET Gate" rule-of-thumb, if you are using this with PWM, you'll make MOSFET heating even worse by extending the time spent in the linear region.


Only if you are using a combination of high pwm frequency (in which case you should definitely use a series resistor when driving a power mosfet) and too high a value series resistor. If a 100 ohm series resistor is too high to let the mosfet run cool, then you should be using a mosfet driver chip.

The rule of Ib=Ic/10 to saturate a bjt is a reflection of the fact that for most bjts, the datasheet doesn't guarantee that you can get a low saturation voltage with anything less, because Vce(sat) is quoted at that ratio and hfe is quoted at a relatively high Vce such as 10V.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

BillO

#33
Jul 05, 2013, 09:57 pm Last Edit: Jul 05, 2013, 10:00 pm by BillO Reason: 1
Quote
IG = 0.750 A = 750mA = still more than Arduino could (safely) source at once.


The AVR output resistance is about 25 ohm.  It will never pass more than 200ma, even into a short.

BillO


The most common error in calculating gate current is confusing the MOSFET  input  capacitance,  CISS,  for  CEI  and  applying  the equation....

I = C(dv/dt)

to calculate the required peak gate current. CEI is actually much higher, and must be derived from the MOSFET manufacturer's total gate charge, QG, specifications.

The  total  gate  charge,  QG,  that  must  be  dispensed  into  the equivalent gate capacitance of the MOSFET to achieve turn-on is given as:

QG = QGS + QGD + QOD

where:
QG is the total gate charge
QGS is the gate-to-source charge
QGD is the gate-to-drain Miller charge
QOD is the "overdrive charge" after charging the Miller capacitance.

You'll notice by examining curves in datasheets that in order to achieve strong turn-on, a VGS well above that required to charge CEI (and well above VGS(TH)) is often required. The equivalent gate capacitance is determined by dividing  a  given VGS  into  the  corresponding  total  gate  charge. The required gate drive current (for a transition within a specified time) is  determined  by  dividing  the  total  gate  charge  by  the  desired transition time.

In equation form:

QG = (CEI)(VGS)

and

IG = QG/t(transition)

where:
QG is the total gate charge, as defined above
CEI is the equivalent gate capacitance
VGS is the gate-to-source voltage
IG is the gate current required to turn the MOSFET on in time period t(transition)
t(transition) is the desired transition time

Also, many MOSFET's total transition times are much greater than Arduino's "3.6ns rise time". A few I have are closer to 20+ ns. And have QG values from 15-50 nC at 5-10v. Using those numbers...

IG = QG / t(transition)
IG = 15nC / 20ns = 15C / 20s
IG = 0.750 A = 750mA = still more than Arduino could (safely) source at once.

The moral of the story --
I dunno? Always check your DATASHEETS?

The end.



A little plagiarism there?  Oh well, who's to know anyway.

Grumpy_Mike


Quote
IG = 0.750 A = 750mA = still more than Arduino could (safely) source at once.


The AVR output resistance is about 25 ohm.  It will never pass more than 200ma, even into a short.


Not true I got over 270mA when I tested it and not even a short
http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

BillO

#36
Jul 05, 2013, 11:39 pm Last Edit: Jul 06, 2013, 12:13 am by BillO Reason: 1
Well, that's strange.  It's not what the graphs tell.

Update:

The graph shows 5V @ 0ma and 4.475V @ 20ma.

Since output resistance is given by Ro = <delta>Vo / <delta>Io  we get:

Ro = 0.525 / 0.02 = 26.25 ohms

I also notice that if we just look at the beginning of the curve we have

Ro = 0.125 / 0.005 = 25 ohms

And if we look at the last part of the curve we have

Ro = 0.145 / 0.005 = 29 ohms

So, according to the specsheet, the Ro actually rises as Io increases, which is exactly the behavior we would expect from a pull-up consisting of a small resistor and a teensy MOSFET, which is exactly how the AVR pin is configured for output.

Grumpy_Mike, are you suggesting the specsheet is wrong?

BillO

#37
Jul 06, 2013, 12:54 am Last Edit: Jul 06, 2013, 01:03 am by BillO Reason: 1
Well,  I just tried this with one of my ATmega328's on pin 8.

I modified blink to turn pin 8 on for 3 seconds then off for 3 seconds, then I used a mA meter with an internal input resistance of 6.1 ohms and placed it directly across pin 8 and ground.  I measured a peak of 82.1 mA while pin 8 was high.

So we have:

Io = Vcc / (Ro + Rm),  where Rm is the resistance of the meter and Ro is the output resistance of the AVR.

We can rearrange that to get:

Ro = (Vcc / Io) - Rm = (5 / 0.0821) - 6.1 = 54.8 ohms

Which agrees well with what is predicted by the curve in the specsheet.  I have a lower resistance ammeter (0.3 ohms with test leads), but it has less resolution.  I'll give that a check and update this post, but I suspect the AVR will not pass much more than 100mA.

Update:  The verdict is 88mA max into a short (well, .3 ohms).  Which means the AVR's internal resistance tops out at

Ro = (5 / 0.088) - 0.3 = 56.5 ohms

polymorph



As far as using "add a resistor to drive a MOSFET Gate" rule-of-thumb, if you are using this with PWM, you'll make MOSFET heating even worse by extending the time spent in the linear region.


Only if you are using a combination of high pwm frequency (in which case you should definitely use a series resistor when driving a power mosfet) and too high a value series resistor. If a 100 ohm series resistor is too high to let the mosfet run cool, then you should be using a mosfet driver chip.

The rule of Ib=Ic/10 to saturate a bjt is a reflection of the fact that for most bjts, the datasheet doesn't guarantee that you can get a low saturation voltage with anything less, because Vce(sat) is quoted at that ratio and hfe is quoted at a relatively high Vce such as 10V.


Yes! Exactly the point, you must first understand much more before applying a rule of thumb, in order to understand where it is and isn't appropriate.

For instance, for a quick-and-dirty circuit using generic BJT transistors (2N2222, 2N3904, 2N3906, etc.), I liberally apply the Ib = Ic/10 or 20 rule-of-thumb. For a final circuit, I use known transistors and read the datasheet.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

Grumpy_Mike

Quote
Grumpy_Mike, are you suggesting the specsheet is wrong?

The data sheet is right, you are interpreting it incorrectly.
That is a specification, that is worst case, not what you get.
As the pin is on for so long there is probbly a heating effect limiting your current. My measurements were done with rapid pulses.

fungus

#40
Jul 06, 2013, 11:21 am Last Edit: Jul 06, 2013, 11:27 am by fungus Reason: 1
What happens if you connect 8 MOSFETs to a port (ie. 8 pins) and turn them all on simultaneously? With no resistors there's part of the chip with (maybe) one amp going through it. That's going to hurt the chip eventually even if it's only for a microsecond at a time. In a PWM controller that microsecond might be hundreds of times per second.

(And that's without getting into the decoupling problems it would cause).

And don't think this doesn't happen ... I wrote a software PWM for last year's Xmas tree. Every PWM cycle started with "PORTB=0xff" to turn all the lights on.

And before you start with "You could turn them on one at a time in sequence!", remember that the real problem is in posting "MOSFETs don't need resistors" in public forums. If you start arguing technical exceptions to rules then pretty soon we're back to "LEDs don't need resistors!" (in the eyes of the public).
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

BillO

#41
Jul 06, 2013, 12:46 pm Last Edit: Jul 06, 2013, 01:07 pm by BillO Reason: 1

The data sheet is right, you are interpreting it incorrectly.
That is a specification, that is worst case, not what you get.


No, I'm not.  I know how to calculate internal resistance.  

I also used a scope.  There were no "heating effects" observed.  Pfffft... What a ridiculous thing to say.  The fact is both MOSFETs and normal resistors actually conduct more when heated!

However, I do not want to argue.  If you want to believe what you believe, then go right ahead.  Everyone, including yourself, that wishes to repeat the experiment can.  I did, with several chips and got the same result.  That result agrees with the datasheet.  

Quote
"MOSFETs don't need resistors"

@fungus.  I'm not sure I know what you are talking about.  I said that MOSFETs don't always need resistors, not that you should never use resistors.   The needs of MOSFETs and LEDs are nearly opposite.  MOSFETs need arbitrarily high current drivers while LEDs need current limiting drivers.  The fact is, both of these needs are best accomplished by means other than just series resistors, but resistors sometimes suit our needs even if they are not ultimately the right way to go.

As I am fond of saying, the facts just don't care if you ignore them.  It turns out, neither do I.

fungus


@fungus.  I'm not sure I know what you are talking about.  I said that MOSFETs don't always need resistors, not that you should never use resistors.


I'm saying that when you post in public forums where people even know the difference between a BJT and a MOSFET, let's pretend that they always need resistors.

Because:
a) It's a good habit to get into
and
b) It's 99.99% likely to be the correct thing to do (and the 0.01% of cases where it isn't, you're probably better off with a MOSFET driver anyway...)
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

BillO


That is a specification, that is worst case, not what you get.


One more note on this.  I was just going through the ATmegaXX8 specsheet again this morning and just noticed that the part of the specsheet that has the Vo / Io graphs is entitled "Typical Characteristics".

pwillard

Datasheets provide "nominal" operating conditions so that some lazy peon who loosely designs something... might actually gets his "appliance" to work reliably every time.   Using the experiment approach to dispute datasheets might be slightly educational, but I understand what G M is saying.  While it may not be specifically "heating" causing damage as described, consistently exceeding datasheet nominal values, without taking the time to design a circuit properly... as is common with someone new, will most likely result in a forum thread titled "I think I burned a pin... now what do I do?"  

Using a 2 cent resistor can prevent this... I would say, as does Grumpy Mike, that you use caution first... and then when you know what you are doing and can prove to yourself on your own you don't need a "component"... remove at will.   For now...  with a standard small signal BJT, use a 1K ohm resistor... with a mosfet, use 150 Ohm.  remove it when you can prove to yourself you don't need it.

Blindly taking some advice to leave out a component designed to "protect" your design when you don't understand the reasons it's there, has a high probability of having you replace a UNO or ATMEL 328 because you didn't insert a part that costs 2 cents.  

Go Up