# Driving a mosfet directly - questions

• What is the proper way of driving a logic level with an arduino?
• How does one pick the correct value of the gate resistor?
• Or, if it better to use something like a 2n2222 to drive the fet? Seems like you wouldn't need to.

Specifically, I was looking at the MTP3055 - since it's such a common part.

http://www.datasheetcatalog.org/datasheets/90/489299_DS.pdf

I've seen gate resistors values from 100 ohm to 1k ohm. What gives?

What is the proper way of driving a logic level with an arduino?

Connect from the Arduino pin to the gate through a resistor, like this:

http://ruggedcircuits.com/html/circuit__7.html

A pull-down resistor on the gate (or zener diode) is also suggested to keep charge from accumulating at the gate when the Arduino is unconnected or floating.

Or, if it better to use something like a 2n2222 to drive the fet? Seems like you wouldn’t need to.

You don’t need to.

How does one pick the correct value of the gate resistor?

There is a tradeoff between current drawn from the Arduino pin and the switching speed (turn-on/off time) of the MOSFET. The MOSFET gate looks like a short circuit at the instant the Arduino drives its pin high (it is very capacitive). The instantaneous current sourced by the Arduino is (to a first approximation) I=5/R where R is the gate resistor. It is a good idea to keep I<0.02A so I would recommend R>250 ohms.

Now since the MOSFET gate is very capacitive (a few nF) the gate resistor and this “capacitor” form an RC network which cause the gate voltage to rise “slowly” towards 0V rather than instantaneously. For example, the MOSFET you selected (MTP3055) has a gate capacitance of about 760pF, let’s say 1nF for simplicity. The time constant formed by a 250ohm resistor and 1nF capacitor is 250ns. As a first approximation it will take 5 time constants, or 1.25us, to turn on/off the MOSFET.

99.9% of the time this is good enough (turning on a solenoid or relay, for example) but is not good enough for high-frequency switching in power supplies, motor drivers, etc. so more careful consideration is required.

The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, light sensor, potentiometers, pushbuttons

One important thing to remember is that FET's of any kind are voltage controlled devices, Bi-Polar transistors are current controlled devices.

A silicon bi-polar transistor when it comes "on" has a .6V voltage drop across the emitter/collector junction, that's why they get hot, whatever current you draw through the transistor has to dissipate that 0.6V @ whatever current you are pulling through it. ALL silicone devices have this 0.6V voltage drop.

It's a bummer big germanium power transistors are no longer available. Germanium devices have a 0.3V drop across them, it's why "crystal" radios usually have an OA-91, it makes them more sensitive.

a FET turns into a piece of wire! :-) And has a minuscule voltage drop across it. That's IF you turn it "hard" on.

With a Bipolar transistor like a 2N2222, you can get away with just a resistor on the base, but it will only switch when the voltage hits 0.6V, a better way is to put a voltage divider on the base, calculate the 2 resistor values so you have the base sitting just under 0.6V, then feed the output from your Arduino pin through a resistor into the voltage divider, it will switch much quicker that way.

Remember you can use a transistor for much more than a switch! (I hear told :) )

Specifically, I was looking at the MTP3055 - since it's such a common part.

The MTP3055 is a pretty conventional N-channel power mosfet. A problem is most conventional mosfets are not designed to fully turn on (saturate to allow full rated current to flow) with just +5vdc across the source/gate. Many look at the threshold voltage specification (+4vdc for the mtp3055) and assume it will work fine with the +5vdc output high voltage from an Arduino output pin. The device actually requires +10vdc gate voltage to drive to full current ratings. Threshold voltage is that voltage which allow the device to just start conducting, perhaps just milliamps, and not the fully rated current the device is capable of. One really needs to look at the gate voltage Vs source/drain voltage and current curves shown in graphs in most device datasheets.

The good news is that there are mosfet devices that are designed to interface with +5vdc logic levels to full device ratings. They are typically called LOGIC LEVEL MOSFETS and usually will have a "L" as part of their part number. Here is one example below. Notice that it's threshold voltage rating is 1-2vdc Vs 2-4vdc for the mtp3055.

http://www.fairchildsemi.com/ds/ND/NDB6060L.pdf

Lefty