MyRoboPath
electronics17 min readUpdated 2026-03-14Intermediate

Transistors & MOSFETs: Switching Heavy Loads with Small MCU Signals

Control high-power actuators: compare current-controlled BJTs (2N2222) with voltage-controlled N-Channel MOSFETs (IRLZ44N, AO3400), gate thresholds, Rds(on) resistance, and gate driver circuits.

MyRoboPath Engineering Lab
Peer-Reviewed Open-Source Hardware & Firmware Guide

Key Engineering Takeaways

  • Microcontroller GPIO pins are limited to 20mA; transistors allow 3.3V/5V logic to switch 50A+ high-power loads.
  • BJTs are CURRENT-CONTROLLED: requires continuous base current (I_b = I_c / beta) and has ~0.2V–0.4V saturation voltage drop.
  • MOSFETs are VOLTAGE-CONTROLLED: draws zero continuous gate current; conducts with ultra-low ON-resistance (R_DS(on) < 0.01Ω).
  • Never use standard MOSFETs (IRF540N) with 3.3V/5V microcontrollers—they require 10V on Gate to turn on! Use Logic-Level MOSFETs (IRLZ44N / IRLB8721).
  • Always place a 10kΩ pull-down resistor from Gate to Ground to prevent floating gate oscillation during microcontroller boot.
Prerequisites
  • Ohm's Law, Transistors, and PWM basics
Required Hardware / Tools
  • IRLZ44N Logic-Level N-MOSFET (TO-220)
  • 2N2222 NPN Transistor
  • 100Ω and 10kΩ Resistors
  • 12V DC Motor and Flyback Diode

The Problem: Microcontrollers Cannot Drive Motors Directly

An ESP32 or Arduino GPIO pin can safely supply at most **12mA - 20mA at 3.3V / 5.0V**. A standard robotics DC motor, high-power LED spotlight, or solenoid draws **1.0A - 10.0A at 12V**. Connecting the load directly to a GPIO pin will immediately vaporize the internal microcontroller output driver. A **Transistor (BJT or MOSFET)** serves as an electronically controlled solid-state switch: your GPIO pin controls the gate/base, allowing heavy current to flow from the battery to the motor with zero physical moving parts.
Microcontroller driving motor through MOSFET
Figure 5.1: Microcontroller GPIO controlling high-power 12V motor through an isolated MOSFET switch.Visual Guide

N-Channel Power MOSFETs (IRLZ44N / IRLB8721) for Heavy Loads (>2A)

For high-power robotics, **N-Channel MOSFETs** are the undisputed king of switching: ### Why MOSFETs Outperform BJTs: 1. **Zero DC Gate Current**: The Gate is an insulated capacitor (SiO_2). Zero current is required to hold the switch ON. 2. **Ultra-Low ON-Resistance (R_DS(on))**: When turned on, the channel behaves like a pure 0.01 Ω resistor. 3. **Low Heat**: **Formula:** P_loss = I^2 × R_DS(on) = (5 A)^2 × 0.012 Ω = 0.3 Watts (Barely warm!)
TO-220 MOSFET pinout diagram
Figure 5.2: TO-220 Power MOSFET package pinout: Gate, Drain, and Source.Visual Guide

The Logic-Level Trap: Standard vs Logic-Level MOSFETs (V_GS)

> [!WARNING] > **The IRF vs IRL Trap**: > - Standard MOSFETs (like the famous **IRF540N**) require **10.0V on the Gate** to fully turn on. Applying 3.3V from an ESP32 only partially turns it on, causing huge resistance and melting the MOSFET! > - Always select **Logic-Level MOSFETs (Prefix "IRL" - e.g. IRLZ44N, IRLB8721, AO3400)**, which are engineered with thin gate oxides that saturate fully at **3.3V - 4.5V**!
MOSFET logic level Vgs curve
Figure 5.3: Drain current vs Gate-Source voltage (Vgs) curve for logic-level vs standard power MOSFETs.Visual Guide

Complete High-Power MOSFET Motor Driver Schematic

### The 4-Component High-Power Low-Side Switch Circuit: 1. **Gate Resistor (100 Ω)**: Placed in series between GPIO pin and Gate to dampen ringing and limit inrush charging current into the gate capacitance. 2. **Pull-Down Resistor (10 kΩ)**: Placed between Gate and Ground to ensure the MOSFET stays 100% OFF during microcontroller bootup and reset. 3. **N-Channel MOSFET (IRLZ44N)**: Source connects to Ground; Drain connects to Motor Negative lead. 4. **Flyback Diode (1N5819 / 1N4007)**: Connected across motor terminals (+ to +12V, - to Drain) to absorb inductive back-EMF spikes.
Complete MOSFET motor driver schematic
Figure 5.4: Complete low-side N-MOSFET motor driver schematic with gate pull-down and flyback protection.Visual Guide
Gate Pull-Down RuleAlways include a 10kΩ resistor from Gate to GND. Without it, the MOSFET gate will float and randomly turn ON at full power when your microcontroller is booting!

Frequently Asked Questions

What is the difference between Low-Side and High-Side switching?

Low-Side switching connects the transistor between the load and Ground (N-MOSFET / NPN BJT), which is easiest because Gate control voltage is referenced directly to Ground. High-Side switching connects the transistor between Power (+12V) and the load (P-MOSFET / PNP BJT), which is used when the load must remain permanently grounded.

Tags:#Transistors#MOSFETs#BJT#Motor Drivers#Gate Driver#Power Electronics