The Verdict: BJT vs MOSFET for Your Next Build

When hobbyists ask about transistor vs MOSFET selection, they are really asking about Bipolar Junction Transistors (BJTs) versus Metal-Oxide-Semiconductor Field-Effect Transistors (MOSFETs). Here is the bottom line: Choose a BJT (like the 2N3904) for simple, low-cost linear amplification, low-frequency switching under 1A, and basic analog signal routing. Choose a MOSFET (like the IRLZ44N or AO3400) for high-current switching, PWM motor control, and direct interfacing with 3.3V/5V microcontrollers like the ESP32 or Arduino. MOSFETs dominate modern power electronics because they waste vastly less energy as heat when switching heavy loads, while BJTs remain the undisputed kings of cheap, low-power analog amplification.

The Single Physical Difference That Drives Everything

Every behavioral difference between a BJT and a MOSFET traces back to one physical reality: how the control terminal modulates the flow of charge carriers.

A BJT is a bipolar device. It uses both electrons and holes to conduct current. To keep the main current flowing from Collector to Emitter, you must continuously inject minority carriers across a forward-biased Base-Emitter PN junction. This means a BJT is strictly current-controlled. If you stop feeding base current, the transistor turns off. This physical requirement forces you to use a base resistor and accept continuous power loss ($I_B \times V_{BE}$) just to keep the switch closed.

A MOSFET is a unipolar device. It relies on majority carriers (electrons in N-channel, holes in P-channel) flowing through a channel. The Gate is physically separated from the channel by a microscopic layer of silicon dioxide insulation. When you apply a voltage to the Gate, it creates an electric field that pulls carriers into an 'inversion layer' to form a conductive channel. Because of this insulating oxide layer, a MOSFET is voltage-controlled. Once the internal gate capacitance is charged, it draws virtually zero steady-state current (measured in nanoamps) to stay turned on. As detailed in the All About Circuits semiconductor textbook, this insulated gate is what allows MOSFETs to switch massive currents without melting your microcontroller's GPIO pins.

Head-to-Head Specs: Component Comparison Matrix

Abstract theory is fine, but on the workbench, you need hard numbers. Here is how standard NPN BJTs and N-Channel MOSFETs stack up across five concrete criteria.

Criterion Standard BJT (e.g., 2N3904 / TIP31C) Power MOSFET (e.g., IRLZ44N / IRF520)
Drive Mechanism Current ($I_B$). Requires continuous base current (typically 1/10th of collector current for saturation). Voltage ($V_{GS}$). Requires initial surge to charge gate capacitance, then ~0A steady state.
Conduction Loss Fixed $V_{CE(sat)}$ drop (~0.2V to 1.0V). At 10A, a power BJT wastes 2W to 10W as heat. Resistive $R_{DS(on)}$ (e.g., 0.022Ω). At 10A, an IRLZ44N wastes only 2.2W ($I^2R$). Loss scales with current squared.
Switching Speed Limited by minority carrier storage time. Turn-off is slow unless a reverse base current is applied. Limited only by gate driver strength and parasitic capacitance. Can switch in nanoseconds with proper gate drivers.
Control Pin Draw High. Driving 5A load requires ~500mA base current. Will instantly fry an ESP32 GPIO. Near zero steady-state. Only draws current during the nanosecond switching transitions.
Thermal Behavior Prone to thermal runaway. As temperature rises, $V_{BE}$ drops, drawing more current, causing more heat. Self-limiting. As temperature rises, $R_{DS(on)}$ increases, naturally reducing current flow and preventing runaway.

When to Choose Which (And Where They Are NOT Interchangeable)

While both act as electronic switches, dropping a MOSFET into a BJT footprint (or vice versa) will usually result in a non-functional circuit or a fried component. According to Electronics Tutorials, understanding the biasing requirements is critical before swapping parts.

Choose a BJT When:

  • You are building analog audio amplifiers: BJTs have superior transconductance linearity at low currents, making them ideal for Class A/B audio output stages and pre-amps.
  • You need a simple, cheap low-side switch under 500mA: A 2N3904 costs about $0.02 in bulk and easily switches relays or LEDs from a 5V Arduino pin using a single 1kΩ base resistor.
  • You are designing high-frequency RF circuits: Specialized BJTs (and HBTs) still outperform standard silicon MOSFETs in GHz-range radio frequency amplification due to lower parasitic capacitance.

Choose a MOSFET When:

  • You are switching high currents (>2A): A logic-level MOSFET like the IRLZ44N handles 40A+ with a tiny heatsink, whereas a BJT would require massive base drive and a huge heatsink to manage the $V_{CE(sat)}$ heat.
  • You are using PWM for motor control or LED dimming: MOSFETs switch on and off significantly faster without the 'storage time' delay inherent to BJTs, reducing switching losses at 20kHz+ frequencies.
  • You are interfacing directly with 3.3V logic (ESP32/Raspberry Pi): A 3.3V GPIO cannot source the 50mA+ needed to saturate a power BJT. A logic-level MOSFET (like the SOT-23 AO3400) switches fully with just 2.5V on the gate.
⚠️ Where They Are NOT Interchangeable:

1. High-Side Switching: You cannot simply swap an NPN BJT for an N-Channel MOSFET on the high side of a load. An NPN emitter-follower will drop the output voltage by ~0.7V. An N-Channel MOSFET requires the Gate to be higher than the Source voltage to turn on; if the Source is tied to your 12V battery positive, you need a 20V+ charge pump to turn it on. Use a PNP BJT or P-Channel MOSFET for high-side, but beware that P-Channel MOSFETs generally have much higher $R_{DS(on)}$ than their N-Channel counterparts.

2. The 'IRF520' Trap: Many beginners buy the IRF520 MOSFET because it is cheap and in a TO-220 package. However, it is not a logic-level MOSFET. It requires 10V on the gate to fully turn on. If you drive it with a 5V Arduino, it will operate in its linear (high-resistance) region, overheat, and fail at currents above 2A. Always check the $V_{GS}$ threshold and the $R_{DS(on)}$ specification at your exact logic voltage.

Cost and Availability in 2026

For small-signal applications, BJTs (2N3904) and small-signal MOSFETs (2N7000) are both dirt cheap, hovering around $0.02 to $0.05 per unit. However, as current requirements scale up, MOSFETs become vastly more economical. A 30A power BJT might cost $1.50, but you will spend another $1.00 on heavy-duty base resistors and a large heatsink. A 30A logic-level MOSFET (like the IRLB8721) costs around $1.20, requires no base resistor, and runs cool enough to often skip the heatsink entirely.

Frequently Asked Questions

Can I replace a 2N2222 BJT with a 2N7000 MOSFET directly on my breadboard?

No, they are not pin-compatible or functionally interchangeable without circuit modifications. The 2N2222 (TO-92 package) pinout is Emitter-Base-Collector (E-B-C). The 2N7000 pinout is Source-Gate-Drain (S-G-D). While the physical pins align if you map Emitter to Source, Base to Gate, and Collector to Drain, the drive circuitry must change. A BJT circuit relies on a base resistor to limit current into the base-emitter junction. If you leave that resistor in place for a MOSFET, it will form an RC filter with the MOSFET's gate capacitance, severely slowing down your switching speed and potentially causing the MOSFET to overheat during slow transitions. You must remove the base resistor and instead place a pull-down resistor (e.g., 10kΩ) from Gate to Source to ensure the MOSFET turns off when the GPIO floats.

Why does my ESP32 GPIO fail to switch an IRF520 MOSFET for my water pump?

This is the most common mistake in DIY power electronics. The ESP32 outputs 3.3V on its GPIO pins. The IRF520 is a standard-level MOSFET designed for 10V $V_{GS}$ drive. At 3.3V, the IRF520 barely crosses its threshold voltage ($V_{GS(th)}$ is typically 2.0V to 4.0V). It will 'partially' turn on, but its $R_{DS(on)}$ will be massively high—often several ohms instead of the 0.27Ω listed in the datasheet. When your water pump pulls 3A through that high resistance, the MOSFET dissipates massive heat ($P = I^2R$) and thermally destroys itself or drops the voltage to the pump. The fix: Replace the IRF520 with a true logic-level MOSFET rated for 3.3V drive, such as the IRLZ44N (for TO-220 through-hole) or the AO3400 (for SMD SOT-23).

Do MOSFETs need a gate resistor like BJTs need a base resistor?

Yes and no, but for entirely different reasons. A BJT requires a base resistor to prevent the base-emitter junction from acting like a dead short and pulling infinite current from your microcontroller, which would fry the GPIO pin. A MOSFET gate is insulated, so it will not draw steady-state current and won't fry your pin via DC overcurrent. However, a MOSFET gate acts like a small capacitor (often 1000pF to 5000pF for power FETs). When the GPIO pin transitions from LOW to HIGH, it dumps current into this capacitor. This instantaneous inrush current can exceed the absolute maximum ratings of an ESP32 or ATmega328P GPIO pin (typically 20mA to 40mA). Therefore, we use a small gate resistor (usually 10Ω to 100Ω) not to limit steady current, but to dampen the inrush spike and prevent high-frequency ringing/oscillation on the gate trace. Always include a 10kΩ pull-down resistor from Gate to Ground as well, to keep the MOSFET off while your microcontroller is booting up and its pins are high-impedance.