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.