Aziz Bench

IRF9540N as a switch with Arduino and ESP32

A 100 V P-channel MOSFET in TO-220 for switching the positive side. Its RDS(on) is guaranteed at −10 V, so the supply must be about 10 V or more, with a divider above 16 V.

Transistor
IRF9540N
P-channel MOSFET · TO-220 · Infineon (IR)
Max voltage
100 V
Max current
23 A
RDS(on)
117 mΩ at −10 V
TO-220 pinout
1G2D3S

Gate drive on the high side

On the high side a small NPN driven by the pin pulls the gate of the IRF9540N down and the gate sees the load supply. Above 80 % of its 20 V gate limit a divider keeps it within range.

SupplyGate voltageVerdictWhy
5 V−5 VNot guaranteednothing guaranteed below 10 V
12 V−12 VWorksRDS(on) at most 117 mΩ guaranteed from 10 V
24 V−10.9 V (with a divider)WorksRDS(on) at most 117 mΩ guaranteed from 10 V

Specifications

TypeP-channel MOSFET
PackageTO-220
Maximum voltage100 V
Maximum current23 A
Threshold VGS(th)−2 … −4 V
RDS(on), maximum117 mΩ at −10 V (11 A)
Gate voltage limit±20 V
Gate charge97 nC at −10 V
Thermal resistanceθJA 62 °C/W · θJC 1.1 °C/W
Maximum junction temperature175 °C
Datasheet usedInfineon (IR)

Pinout

PinFunction
1Gate
2Drain
3Source

Printed face toward you, leads down: pin 1 is on the left. The metal tab is connected to pin 2.

Similar parts

PartPackageRDS(on), guaranteedMax voltageMax current
IRF9540NTO-220117 mΩ at −10 V100 V23 A
AO3401ASOT-2385 mΩ at −2.5 V30 V4 A

Tips

The gate swings by the whole supply voltage: keep it below 80 % of the MOSFET’s 20 V limit, with a divider or a 16 V Zener above that.

Every coil needs a flyback diode across it, cathode to the positive supply. Without it the voltage spike at turn-off can destroy the transistor at the first switching.

A TO-220 in free air sheds little heat: fit a heatsink, insulated if the tab must not touch it (the tab is the drain or collector).

Open the calculator →Check the IRF9540N with your own load, supply, PWM frequency and temperature.

Other transistors

Frequently asked questions

How do I drive the IRF9540N from a microcontroller?

Source to the positive supply, a 10 kΩ resistor from gate to source, and a small NPN driven by the pin that pulls the gate to ground. RDS(on) is guaranteed from 10 V, so the supply must reach that; above 80 % of the 20 V gate limit add a divider.

What is the IRF9540N pinout?

TO-220: 1 gate, 2 drain, 3 source. Printed face toward you, leads down: pin 1 is on the left. The metal tab is connected to pin 2.

Source of the figures: Infineon (IR) datasheet (PDF)