# MOSFET vs BJT: Choosing the Right Switch

> BJTs suit small loads under 500mA; logic-level MOSFETs handle amps and stay cool. How to choose the right switch, and why an IRF540N on a 5V pin cooks itself.

[HTML version](https://soldr.ai/blog/mosfet-vs-bjt-choosing-the-right-switch)

23 August 2026 · Bharat Raj · [originally published on Compoden](https://compoden.com/blogs/guides/mosfet-vs-bjt-choosing-the-right-switch)

**The practical difference: a BJT is controlled by current into its base and suits small loads under about 500mA, while a MOSFET is controlled by voltage on its gate, wastes almost no drive power, and handles amps without breaking a sweat, provided you pick a logic-level MOSFET that turns fully on at your microcontroller's voltage.** For an indicator LED or a relay coil, a 2-rupee-class BJT like the BC547 is perfect. For a motor, an LED strip, or anything past half an amp, an N-channel logic-level MOSFET such as the IRLZ44N runs cooler and simpler. The single most common mistake is grabbing a standard MOSFET like the IRF540N, which never fully turns on from a 5V pin and quietly cooks itself.

## Two different control philosophies
A BJT (bipolar junction transistor) is a current amplifier. Push current into the base and a multiplied current flows collector to emitter. The base current is a real, continuous cost: switching 500mA with a gain of 100 needs 5mA of base drive flowing the whole time the load is on, plus a base resistor to set it.
A MOSFET (metal-oxide-semiconductor field-effect transistor) is voltage-controlled. Its gate is insulated from the channel; apply enough voltage between gate and source and the channel between drain and source turns into a low-value resistor. Once the gate is charged, essentially zero current flows into it. Drive power is nearly free, which is one reason MOSFETs dominate power electronics.

## The heat equation that decides everything
A switch wastes power equal to the voltage across it times the current through it. A saturated BJT drops about 0.2V, so at 1A it dissipates 0.2W: warm, and it gets worse linearly with current. A good MOSFET behaves like a resistor when on, with a resistance called Rds(on). An IRLZ44N fully driven has Rds(on) around 0.025Ω. At 1A that is I²R = 0.025W, ten times cooler than the BJT. At 3A the BJT drops to marginal while the MOSFET is barely warm without a heatsink. This is why the crossover point sits around a few hundred milliamps: below it, either works and the BJT is cheaper; above it, the MOSFET wins decisively.

## The logic-level trap
Every MOSFET datasheet lists a threshold voltage, but that number is where the device barely begins to conduct, not where it switches well. What matters is the gate voltage at which the datasheet specifies Rds(on). A standard MOSFET like the IRF540N specifies its on-resistance at 10V gate drive. Feed it 5V from an Arduino Uno R3 and it half-conducts: the load runs dimly or slowly, the MOSFET drops volts across itself, and it gets hot enough to fail. From a 3.3V board the situation is worse still.
Logic-level MOSFETs (IRLZ44N, IRL540N, AO3400, and friends; the L is the hint in many part numbers) specify full conduction at 4.5V or even 2.5V. From a 5V pin, choose logic-level, always. From 3.3V, check the Rds(on) at 2.5V column exists before buying.

## Worked example: switching a 12V LED strip
A one-metre 12V LED strip drawing about 1A, controlled from an Uno. Take an IRLZ44N: gate, drain, source, left to right with the label facing you. On a 400-point breadboard: strip's +12V to the supply, strip's negative wire to the drain, source to ground, and both the 12V supply ground and the Uno GND tied together. Gate connects through a 220Ω resistor to pin 9 (the resistor tames the surge of current that charges the gate each switching edge), plus a 10kΩ from gate to ground so the strip stays off while the Uno boots.
`digitalWrite(9, HIGH)` lights the strip at full brightness. `analogWrite(9, 128)` dims it to half via PWM, and the MOSFET stays cool through all of it. The same circuit with a BC547 would exceed the BJT's ratings immediately.

## Where this bites you
The standard-MOSFET mistake deserves repeating because it is so common: an IRF540N "works" in testing with a small load, then thermal-throttles or dies when the real load arrives. The failure is sneaky because partial conduction looks like success at low current. If your MOSFET is hot and your load is underpowered, check the gate-drive spec first.
Second trap: leaving the gate floating. An insulated gate holds whatever charge wanders onto it, so a MOSFET with a disconnected gate can drift on, off, or in between, seemingly at random. The 10kΩ gate-to-ground pull-down fixes this and holds the load off during microcontroller reset and boot.
Third: forgetting the shared ground. The gate voltage is measured relative to the source. If the 12V supply and the Uno do not share a ground, the gate-source voltage is undefined and nothing sensible happens.

## FAQ

### Do I still need a flyback diode with a MOSFET?
For inductive loads (motors, solenoids, relay coils), yes. MOSFETs contain an internal body diode, but it is oriented the wrong way to clamp your load's switch-off spike; you still want an external diode across the load itself. For LED strips and heaters, no diode needed.

### Why does my MOSFET switch slowly or buzz when I PWM it?
The gate is a capacitor and takes real current to charge quickly. Driven through a very large resistor, the MOSFET dawdles through its lossy half-on region on every PWM edge and warms up. Use a modest gate resistor (100Ω to 330Ω) from a pin, and keep PWM frequencies moderate when driving big MOSFETs directly.

### Where do modules like the L298N fit into this choice?
The L298N motor driver is an older BJT-based bridge chip packaged onto a convenient board: easy to wire and fine for small motors, but it drops a volt or two internally, exactly the BJT heat story above. MOSFET-based drivers (TB6612FNG and similar) waste far less. The trade-offs of this article apply to ready-made modules too.
If you tell Compoden's AI build assistant Soldr what load you are switching, it will pick a suitable driver and wire it into your project plan for you.
