MOSFETs for MCU boards

The small N- and P-channel MOSFETs that do the switching around a microcontroller, including level shifting, load switching, isolation and reverse-polarity protection.

10 parts, 4 recommended. Updated .

What to look for

  • Gate drive first. Look at the on-resistance specified at the voltage your GPIO actually gives (3.3 V, sometimes 1.8 V), not the threshold voltage
  • Drain-source voltage with margin over the rail you are switching (5 V, 12 V, 24 V)
  • Gate-source voltage rating, which matters when a P-channel gate swings to a 12 V or 24 V rail
  • Continuous current and on-resistance for the load, and the heat a small package can get rid of
  • Single (SOT-23) or dual (SOT-363 / SC-70-6). A dual saves area and placement cost when you need two
  • Gate ESD protection, for anything that touches a connector or is hand-assembled
  • Multiple sources for the same part number, so it can be swapped without a board change

Alternatives

BSS138DW

Diodes Incorporated

SOT-363 (dual N)

A dual BSS138, the classic choice for bidirectional I2C level shifters. The low threshold suits 3.3 V gates, but on-resistance is only specified at 10 V, so check the datasheet curves for your gate voltage.

  • Dual N-channel
  • 50 V
  • ±20 V gate
  • 0.2 A per FET
  • threshold 0.5–1.5 V
  • 3.5 Ω max at 10 V gate
Price not yet checked
Datasheet Diodes DS30203 Rev. 16-2, Sep 2021

BSS138BKS

Nexperia

SOT-363 (dual N)

Nexperia's current dual logic-level FET with ESD protection, and the replacement to look at for the older BSS138PS.

  • Dual N-channel
  • 60 V
  • 320 mA
  • logic level
  • gate ESD protection up to 1.5 kV

Not yet checked against the datasheet.

Price not yet checked

2N7002K

onsemi (also others)

SOT-23 (N)

The ESD-protected 2N7002. Use it instead of the plain part for single signal FETs, especially on lines that go to connectors.

  • N-channel
  • 60 V
  • ±20 V gate
  • 380 mA
  • threshold 1.0–2.3 V
  • 2.5 Ω max at 4.5 V
  • 1.6 Ω max at 10 V
  • 2 kV HBM gate ESD
Price not yet checked
Datasheet onsemi 2N7002K/D Rev. 21, Nov 2026

BSS84

onsemi (also others)

SOT-23 (P)

Small-signal P-channel for switching low-current lines high-side, such as a pull-up or a sensor's few-milliamp supply. Not a power switch.

  • P-channel
  • −50 V
  • ±20 V gate
  • −0.13 A
  • threshold −0.8 to −2.0 V
  • 10 Ω max at −5 V
Price not yet checked
Datasheet onsemi BSS84/D Rev. 5, Oct 2021

Budget options

2N7002

Many (onsemi 2N7002L shown)

SOT-23 (N)

The cheapest signal FET there is, and fine for logic-level jobs at a few milliamps from a 5 V gate. Marginal from 3.3 V, because the threshold can be 2.5 V.

  • N-channel
  • 60 V
  • ±20 V gate
  • 115 mA
  • threshold 1.0–2.5 V
  • 7.5 Ω max at 10 V
Price not yet checked
Datasheet onsemi 2N7002L/D Rev. 11, Jun 2024

Avoid for new designs

BSS138PS

Nexperia

SOT-363 (dual N)

Marked "Not for design in" by Nexperia (product page, Dec 2026). Use the BSS138BKS or another dual instead.

  • Dual N-channel
  • 60 V
  • 320 mA
  • logic level

Not yet checked against the datasheet.

Price not yet checked

Which one to start with

Most MCU boards need only two or three of these.

  • AO3400A for anything that carries real current from a GPIO: LEDs, relays, motors, fans, solenoids. It is fully on at 2.5 V, so a 3.3 V pin drives it directly.
  • AO3401A when the switch has to be in the positive supply line: powering a peripheral or sensor rail on and off, or protecting the board from a reversed input.
  • A small-signal dual for everything at milliamp level: level shifting, open-drain outputs, inverting a signal, and driving the AO3401A’s gate. Choose the 2N7002DW when the gate drive is 5 V or the drain sees up to 60 V. Choose the FDG6301N when the gate is driven from 3.3 V or less.

Typical circuits

Low-side switch from a GPIO (AO3400A)

Load between the supply and the drain, source to ground, gate to the GPIO. Fit a 100 kΩ pull-down from gate to ground: during reset and boot the GPIO is an input, and a floating gate can half-turn the FET on. A 100 Ω series gate resistor close to the FET calms ringing on long traces. For relays, solenoids and motors, put a diode across the load to clamp the turn-off spike.

High-side load switch (AO3401A plus half a 2N7002DW)

P-channel source to the supply, drain to the load, and a pull-up (10–100 kΩ) from gate to source so it is off by default. One half of a 2N7002DW, driven by the GPIO, pulls the gate to ground to turn it on. This lets a 3.3 V MCU switch a 5 V or 12 V rail. The AO3401A’s gate is rated ±12 V, so above about 12 V use a resistor divider or a Zener to limit the gate-source voltage.

Reverse-polarity protection (AO3401A)

A P-channel in the positive input line, drain to the connector, source to the board, gate to ground. With the right polarity the body diode conducts first and then the channel turns on, so the loss is the on-resistance rather than a diode drop. Reversed, it stays off. Above about 12 V input, add a Zener and resistor so the gate-source voltage stays within ±12 V.

Bidirectional I2C level shifter (one N-channel per line)

Gate to the lower supply, source to the low-voltage side with its pull-up, drain to the high-voltage side with its pull-up. Either side can pull the line low. This is the circuit described in NXP’s application note AN10441, and it works with any FET whose threshold is well below the lower supply. From a 3.3 V gate use the FDG6301N or a BSS138-type part. For a 1.8 V side, use a dedicated level translator IC instead: there is too little gate drive left for a discrete FET to be reliable.

Isolating a powered-down peripheral

The same pass-gate circuit stops a powered-off sensor or module from being back-powered through its I/O pins (through its protection diodes) by an MCU that is still running. Tie the FET’s gate to the peripheral’s supply: when the peripheral is off, the gate is low and the line is disconnected.

Pitfalls

  • Threshold is not “on”. VGS(th) is where the FET just starts to conduct, typically at 250 µA. Use the on-resistance at your actual gate voltage. A 2N7002 is specified at 5 V and 10 V; at 3.3 V it may barely conduct.
  • Floating gates at reset. MCU pins are inputs until the firmware configures them. Without a gate pull-down, loads can flicker on at power-up.
  • SOT-363 pinouts differ. Dual FETs from different manufacturers do not all share one pinout, and neither do N+P complementary pairs. Check each datasheet before treating parts as drop-in swaps.
  • Heat in SOT-23. An AO3400A carries amps only with copper on the drain pad. Work out I² × RDS(on) at your gate voltage and the board’s thermal resistance from the datasheet.
  • Gate voltage limits on P-channel switches. With the gate pulled to ground, VGS equals the whole rail. That is fine at 5 V, but a 24 V rail will destroy a ±12 V gate without a clamp.
  • Body diode. Every MOSFET conducts backwards through its body diode. A single FET cannot block in both directions, which is why reverse-polarity and load-isolation circuits put it a particular way round.
  • ESD. Small signal FETs without gate protection are easy to damage during hand assembly or when they connect directly to a connector. Prefer the ESD-protected parts (2N7002K, FDG6301N, BSS138BKS) in those places.

About this guide

A short list of parts worth starting with for this job, chosen on engineering merit, with the reasons, typical circuit notes and the usual pitfalls. Prices are shown at a small quantity and at volume, with the source and the date they were checked.

Disclaimer

  • Guidance only. Specifications are summarised in my own words from the manufacturer's datasheet revision shown; always design from the current datasheet. Parts marked "not yet checked" have not been verified against it.
  • Prices are a guide, not a quote, and change often. Check with your supplier before you order.
  • Part and manufacturer names are used only to identify parts. This guide is independent and not affiliated with, endorsed by or sponsored by any manufacturer or supplier.
  • Provided as is, without warranty. You are responsible for the designs you build.