Circuit 3D

MOSFET

A MOSFET is a transistor switched by voltage: the voltage between its gate and source controls the current from drain to source, while the insulated gate draws almost no current. Past its threshold voltage it conducts, and fully on it acts as a small resistance, its on-resistance, so 2 A through 0.05 Ω turns 2² × 0.05 = 0.2 W into heat.

P = I² × RDS(on)

where I is the drain current and RDS(on) the on-resistance, from a few milliohms to a few tenths of an ohm.

N-channel MOSFETs, on when the gate is above the source, switch most motors, LED strips and power supplies.

What is a MOSFET?

A MOSFET, a metal–oxide–semiconductor field-effect transistor, is a transistor controlled by voltage: the voltage on its gate, relative to its source, switches the current between its drain and source.

It is the most common transistor made, in every chip and in power switches for motors, lights and supplies. In Figure 1, raise the gate voltage: the lamp stays dark until the threshold, then switches on over a fraction of a volt.

+12 V 4.5 V Gate D S G 997 mA Lamp

VGS = 4.5 V: fully on, about 0.034 Ω from drain to source, so the lamp gets 997 mA and the MOSFET drops only 33.5 mV, wasting 33.4 mW.

Figure 1. An N-channel MOSFET switching a 12 V, 1 A lamp, in a simple model of a logic-level part with a 2 V threshold. Between off and fully on is a narrow, hot stretch.

How does a MOSFET work?

A MOSFET works through its gate, which sits on a thin insulating oxide above the silicon: a positive gate voltage draws electrons up under it, forming a channel that links the source and the drain.

No steady current flows into the gate, because the oxide insulates it: the gate is a small capacitor, needing current only to charge or discharge. That electric field is the field effect in its name. Figure 2 shows the channel forming in an N-channel MOSFET.

Source Drain Gate 5 V n n p-type silicon oxide

Gate at 5 V: 3 V past the threshold, a channel of electrons links source and drain. More gate voltage draws more electrons and lowers its resistance.

Figure 2. Inside an N-channel MOSFET, not to scale. The gate’s voltage, across the thin oxide, draws electrons into a channel under it.

What is a MOSFET’s threshold voltage?

A MOSFET’s threshold voltage is the gate-to-source voltage at which it just begins to conduct, typically 1 to 4 V; it is not where the MOSFET is fully on.

Datasheets give the threshold voltage, VGS(th), at a tiny current, often 250 µA. For a low on-resistance, RDS(on), drive the gate well past it: most power MOSFETs are rated at 10 V, and logic-level ones at 4.5 V or less.

What is a P-channel MOSFET, and how does it differ from N-channel?

An N-channel MOSFET turns on when its gate is above its source and usually switches the ground side of a load; a P-channel one turns on when its gate is below its source and switches the positive side.

N-channel parts conduct with electrons, which move more easily than holes, so they have a lower on-resistance for their size and cost. A P-channel part makes the easy high-side switch, its source on the supply, so the load keeps its ground. Figure 3 shows both.

12 V 12 V Gate S D

N-channel, source to ground: VGS = 12 V − 0 V = +12 V, well above its source: on, the lamp lit.

Figure 3. An N-channel MOSFET below a 12 V lamp, or a P-channel one above it. Each turns on when its gate differs from its source by well past the threshold.

What is the difference between a MOSFET and a BJT?

A MOSFET is controlled by the voltage on its gate and draws almost no steady gate current; a bipolar transistor, or BJT, is controlled by the current into its base.

Fully on, a MOSFET acts as a small resistance, while a BJT keeps a saturation voltage of about 0.2 V, so MOSFETs waste less power switching large currents. BJTs remain cheap and simple for small signals.

How do you drive a MOSFET from an Arduino?

To drive a MOSFET from an Arduino, use a logic-level N-channel part, fully on at the pin’s voltage, with a gate resistor of about 150 to 220 Ω and a 10 kΩ pull-down from gate to source.

The resistor limits the brief current that charges the gate, and the pull-down keeps the MOSFET off while the pin floats at start-up. For a motor, relay or other coil, add a flyback diode across the load.

How do you work out a MOSFET’s heat and gate current?

To work out a MOSFET’s heat, multiply the square of its current by its on-resistance, P = I² × RDS(on); its gate’s first rush of current is the pin’s voltage over the gate resistor.

Example 1: a MOSFET’s heat

A MOSFET with an on-resistance of 25 mΩ switches 5 A. How much heat does it make, fully on?

Given
5 A through a MOSFET with RDS(on) = 25 mΩ, in a TO-220 package
Find
the heat it makes, and whether it needs a heatsink
Solution
P = I² × RDS(on) = (5 A)² × 0.025 Ω = 625 mWWith no heatsink a TO-220 warms about 62 °C per watt, so it runs about 39 °C above the air: fine without a heatsink
Answer
P = 625 mW

Example 2: a gate resistor

An Arduino Uno’s 5 V pin drives a MOSFET’s gate through 220 Ω. What is the most current the pin supplies?

Given
a 5 V Arduino Uno pin driving a MOSFET’s gate through 220 Ω
Find
the most current the pin supplies as the gate charges
Solution
At switch-on the gate is an empty capacitor at 0 V, so only the resistor limits the currentI = 5 V ÷ 220 Ω = 22.7 mA, for the microseconds the gate takes to chargeThat is within the pin’s 40 mA absolute maximum
Answer
About 22.7 mA at its peak

Summary

Key equations

  • P = I² × RDS(on) its heat, fully on
  • VGS > VGS(th) an N-channel MOSFET conducts
  • I = V ÷ Rgate the gate’s first rush of current
  • ΔT = P × θ its rise above the air

Key terms

Gate
The insulated control terminal.
Drain, source
The terminals the switched current flows between.
Threshold
The gate voltage where it starts to conduct.
RDS(on)
Its resistance, fully on.

Practice problems

  1. Which terminal controls a MOSFET?

  2. About how much steady current flows into a MOSFET’s gate once it is on?

  3. 5 A flows through a MOSFET with R_DS(on) = 20 mΩ. How much heat does it make?

  4. An N-channel MOSFET’s threshold is 2 V. Is it fully on with 2 V on its gate?

  5. Which kind of MOSFET usually switches the ground side of a load?

FAQ

When do you use a P-channel MOSFET?

On the high side, between the supply and the load, so the load stays grounded: switching power to a whole board, or reverse-battery protection.

What does MOSFET stand for?

Metal–oxide–semiconductor field-effect transistor: a transistor whose gate, insulated by a thin oxide, controls its current through an electric field.

Can an Arduino drive a MOSFET directly?

Yes, if it is a logic-level MOSFET, fully on at 5 V or less. Add a gate resistor of about 150 to 220 Ω and a 10 kΩ pull-down from gate to source.

What is a logic-level MOSFET?

One whose on-resistance is specified at a gate voltage of 4.5 V or lower, or 2.5 V for 3.3 V logic, so a microcontroller pin can turn it fully on.

Why does my MOSFET get hot?

Its on-resistance turns I² × R_DS(on) into heat, and much more if the gate is not driven fully on or it switches very often. Check the gate voltage, then add a heatsink.

Why does a MOSFET need a pull-down resistor?

Its gate holds charge like a capacitor. Left floating, it can stay on or drift on; a 10 kΩ resistor from gate to source keeps it off.

What is a MOSFET’s body diode?

A diode built into a power MOSFET between source and drain. In an N-channel part it conducts if the drain is pulled below the source, which can carry a motor’s reverse current.

What is a JFET?

A junction field-effect transistor, an older relative of the MOSFET: it conducts with 0 V on its gate, and a reverse voltage on the gate turns it off, so it suits small-signal amplifiers.