Go Down

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

fungus


For instance, a MOSFET does not require a resistor between the Arduino and its Gate.


Yes it does, and for the same reason as a BJT, ie. to stop more than 40mA coming out of the Arduino pin.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Grumpy_Mike


Bipolar transistor gain goes down when saturated,

No?

AmbiLobe

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

polymorph

You don't really think an Arduino can source 2.8A, do you?

Look in that PDF, Pg 340, 27.1.8 Pin Driver Strength. In that section, on Pg 341, see the graph Figure 27-24. I/O Pin Output Voltage vs. Source Current(VCC = 5 V). It only tells part of the story, but if you assume that output current sourcing is linear, then with 4.5V @ 18mA of source current, that would extrapolate to about 180mA max in the initial short-circuited state when an uncharged 2nF capacitor is connected and the output is set to High. Since this decays from 180mA (or whatever the short circuit current max is) to 0mA as the 2nF Gate capacitance charges, you'll get a much longer rise time.

This link seems to explain it:
http://joost.damad.be/2012/09/dimming-12v-led-strip-with-mosfet-and.html
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

polymorph

I should also point out that while you -can- connect many MOSFET gates directly to an Arduino output, it would be a better idea to use a driver circuit. Because the maximum rated current output of an Arduino is 40mA at any one pin, and driving into a 2nF capacitance is going to cause charge and discharge pulses significantly higher than this. Your Arduino may keep working, but that doesn't mean it is a good idea or that it is not damaging it.

We seem to be illustrating my point nicely: Read those links that LarryD posted. There is a lot more to know about transistors than can be imparted in a few posts on a forum.
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

polymorph



Bipolar transistor gain goes down when saturated,

No?


Perhaps more accurately stated:

If you require 100mA with an NPN bipolar transistor as a saturated switch, with a rated Beta of 100, it would be unwise to drive the Base with only 1mA of current. Beta varies with time, temperature, and from transistor to transistor. So I would always overdrive the transistor a bit.

Again, this goes back to my point that the original poster really needs to check out LarryD's links.
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

kimkash

Thank you all for the comments and help,i found what i needed and those links are very helpful for the future!

BillO



For instance, a MOSFET does not require a resistor between the Arduino and its Gate.


Yes it does, and for the same reason as a BJT, ie. to stop more than 40mA coming out of the Arduino pin.



Not always.  Mostly in high frequency situations (such as PWM, but not limited to this) and only usually with those MOSFETS that have fairly high capacitance gates.  For most situations where you just want switch on and off a device now and then, there is usually no need for a gate resistor.

For instance, the gate capacitance of a 2N7000 is 20pf.  If an AVR could not drive 20pf without using a current limiting resistor they wouldn't be very useful, would they?  The internal resistance of the output circuit of an AVR would be enough to limit the average current into 20pf to under 40ma under almost any imaginable application.

Something like a FQP50N06 might be a whole different story.  With a gate capacitance of about 1200pf you would possibly need a resistor for PWM or other such continuous medium to high frequency applications.  But even it should not require a gate resistor for occasional on/off operation, like turning a relay, motor, solenoid or lamp fully on or off when required.  Taking a look at the specs of the AVR, and given that the output resistance of the AVR is about 25 ohms (at 5V) then the time to charge the gate of the FQP50N06 would be about 30ns.   So, the current would likely never exceed and average of over 40ma for the 30ns.  I guess this could be tested by actually measuring the current into the gate at various frequencies.

One thing I did notice in the ATmega328 specsheet that seems a bit odd.  they quote the clock period correctly at 50ns when running at 20mHz, but say that the clock rise an falls times are 500ns each.  Wouldn't that mean the max clock frequency would be 1mHz?  Odd.  Must be an error.

fungus


For instance, the gate capacitance of a 2N7000 is 20pf.  If an AVR could not drive 20pf without using a current limiting resistor they wouldn't be very useful, would they?


No, but that's a 2N7000 is a tiny little MOSFET that can't even handle the same current as an average BJT. TO220 size logic-level MOSFETs (the kind most breadboarding people will use) have a capacitance more in the region of 2uF.

As a rule of thumb, in a publicly readable forum where we have no idea what MOSFETs people are going to use, can we pretend that MOSFETs need a current limiting resistor?
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

BillO


Assume 3.6ns rise time for Arduino output


Not a good idea.  I'd be loath to assume the SPI outputs are typical as these pins are designed for general SPI compatibility .  Look at the spec for the 2-pin interface.  They are likely more typical (20+ ns).

I wish the Atmel datasheets were a bit more forthcoming with this sort of thing.  For instance, they say that the output current of any I/O pin should not exceed 40ma, but they tell us little else about this.  Is this the continuous rating?  What about 10us pulse?  or a 50ns pulse?  Seeing as the damage likely done by heat build up, what are the other conditions (temperature, voltage, etc...)?

BillO


No, but that's a 2N7000 is a tiny little MOSFET that can't even handle the same current as an average BJT. TO220 size logic-level MOSFETs (the kind most breadboarding people will use) have a capacitance more in the region of 2uF.

As a rule of thumb, in a publicly readable forum where we have no idea what MOSFETs people are going to use, can we pretend that MOSFETs need a current limiting resistor?


2uF? Not likely, maybe 2nF.

There are all sorts of MOSFETs available, yeah, the IRL540 has a gate capacitance in excess of 2nF, but in my personal estimation the IRL540 is pretty easy to beat in the spec department for most of the projects the Arduino is likely to be used for.  Like the FQP50N06.  There are even better still.  Also, the 2N7000 is plenty useful.  It seems ridiculous to use an IRL540 to switch a 120 ma load when a 2N7000 will do it for hugely less money and take up way less space, but I digress.

I do see your point, but I think it is better to get folks used to reading spec sheets and using a little common sense about their designs, no?

I see it all the time on the internet.  People learn simple rules of thumb and go around wielding them like swords of truth.  Like the fable that to properly drive a BJT into saturation you need IBE=ICE/10.  I may be one of a few, but I do believe that it's better to use the right device for the job and try to get the most you can out of it.  After all, driving thumb tacks with sledge hammers might indeed work most of the time, but not always, and it's probably never even close to ideal.

So, yes, I think we should tell people in a publicly readable forum that MOSFETs do not always need gate resistors, because that is correct.

fungus


2uF? Not likely, maybe 2nF.


(looks in box...)

IRL540 - 2.2uF
HUF76137P3 - 2.1uF
RFP30N06LE - 1.3uF    (very low for a logic-level MOSFET)

etc.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

BillO

#27
Jul 05, 2013, 07:07 pm Last Edit: Jul 05, 2013, 07:11 pm by BillO Reason: 1
(shakes head...)

Sorry, but I think there is a problem with your math.  When is 2,200pF = 2.2uF?

1uF =10-6F
1nF = 10-9F
1pF = 10-12F

1000pF = 1nF = 0.001uF

polymorph

I agree with BillO. Rules of Thumb are only useful in a very narrow range of circumstances, and the basic principles still need to be understood so that you know where and when they can be applied.

Which goes back to: Read LarryD's links.
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

fungus


(shakes head...)

Sorry, but I think there is a problem with your math.  When is 2,200pF = 2.2uF?


Oh, you're right. Duh!

It did seem a bit large when I was typing it.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Go Up