If you connect the Load and Ground backwards on a standard N-channel MOSFET low-side switch, the load will turn on immediately and stay on permanently, completely ignoring your microcontroller's gate signal. This happens because you have forward-biased the MOSFET’s internal parasitic body diode, creating a direct, unswitchable current path from the power supply, through the load, and straight to ground.

This is one of the most common bench mistakes when wiring DC motor controllers, LED drivers, or solenoid valves with logic-level MOSFETs like the IRLZ44N. To understand why the circuit fails to switch—and how it can sometimes destroy your microcontroller's GPIO pin if a flyback diode is also misplaced—we need to trace the schematic symbols against the physical silicon.

Terminal Mapping and Schematic Symbols

Before tracing the current path, you must map the physical pins of the component to the schematic symbol. The most common DIY MOSFET is the TO-220 package N-channel logic-level MOSFET (e.g., Infineon IRLZ44NPBF). When you hold the component with the text facing you and the pins pointing down, the pins are Gate, Drain, and Source from left to right. The large metal tab on the back is internally bonded to the Drain.

The table below maps the physical device to the schematic symbol and provides the baseline multimeter readings you need to verify the component before soldering.

Pin Name Physical Location (TO-220) Schematic Symbol Role Correct Circuit Node Multimeter Diode Test (Red-Black)
Gate (G) Left pin (face on) Control Input (Insulated) MCU GPIO (via 100Ω-330Ω resistor) OL (Open Loop) both ways
Drain (D) Middle pin & Metal Tab Switched Load Output Load Negative (-) Terminal OL (Red on D, Black on S)
Source (S) Right pin Ground Return Path Power Supply Ground (GND) ~0.45V (Red on S, Black on D)
Bench Tip: Never trust the silkscreen on cheap breakout boards or unbranded transistors. Always verify the Source and Drain using the Diode Test mode on your multimeter before applying power. The body diode will always point from Source (Anode) to Drain (Cathode) in an N-channel device.

Node-by-Node Trace: Correct vs. Backwards Wiring

To see exactly where the current goes when you swap the Load and Ground terminals, we will trace a 12V DC circuit switching a 5A load (like a DC motor or high-power LED strip) using an Arduino or ESP32 driving the Gate at 5V.

The Correct Low-Side Path

In a properly wired low-side switch, the MOSFET sits between the load and ground. The schematic symbol shows the Drain connecting to the load, and the Source connecting to ground. The arrow on the Source pin points outward, indicating conventional current flow direction when the channel is enhanced.

  1. Node 1 (Power): 12V PSU Positive (+) connects directly to the Load Positive (+) terminal.
  2. Node 2 (Switched Return): Load Negative (-) connects to the MOSFET Drain.
  3. Node 3 (Ground): MOSFET Source connects to the 12V PSU Negative (-) / System Ground.
  4. Node 4 (Control): ESP32 GPIO connects to the Gate via a 220Ω series resistor, with a 10kΩ pull-down resistor between Gate and Source to prevent floating turn-on.

Physics Check: The internal body diode is oriented with its Anode at the Source (0V) and Cathode at the Drain (pulled up to ~12V via the load). Because the Cathode is more positive than the Anode, the diode is reverse-biased. No current flows until the ESP32 pulls the Gate high, creating a conductive channel between Drain and Source.

The Backwards Path (The Body Diode Trap)

Now, let's trace the exact same circuit, but the builder swaps the Load and Ground connections on the MOSFET terminals. The Load Negative goes to the Source, and the System Ground goes to the Drain.

  1. Node 1 (Power): 12V PSU Positive (+) connects to Load Positive (+).
  2. Node 2 (Backwards Return): Load Negative (-) connects to the MOSFET Source.
  3. Node 3 (Backwards Ground): MOSFET Drain connects to the 12V PSU Negative (-) / System Ground.

The Failure Mode: The moment you connect the 12V PSU, current flows through the load and hits the MOSFET's Source pin. The internal body diode's Anode is now at the Source (receiving positive voltage from the load), and its Cathode is at the Drain (tied to 0V Ground). The diode is now forward-biased. Current flows freely through the parasitic diode to ground. The load turns on at full power.

When your ESP32 attempts to turn the load off by pulling the Gate to 0V, nothing happens. The physical channel closes, but the body diode remains forward-biased and continues conducting. When the ESP32 pulls the Gate to 5V to turn it 'on', the channel simply parallels the diode, slightly reducing the voltage drop, but the load was already on. You have lost all switching control.

Hardware Damage Risk: If your load is inductive (like a DC motor or relay coil) and you wired it backwards, the flyback diode you placed across the load is likely also reversed relative to the MOSFET's body diode. When the circuit is first energized, the inductive kickback can avalanche the MOSFET junction, permanently shorting the Drain and Source and potentially feeding 12V back into your ESP32's GPIO pin, frying the microcontroller.

High-Side vs. Low-Side: Does Polarity Matter?

The 'backwards' mistake manifests differently depending on whether you are using an N-channel MOSFET on the low side or a P-channel MOSFET on the high side. Understanding this distinction is critical when reading wiring diagrams for DC-DC converters and motor drivers.

Switch Topology Component Type Correct Orientation Consequence of Swapping Load/Source
Low-Side N-Channel (e.g., IRLZ44N) Drain to Load, Source to GND Load stays ON permanently via forward-biased body diode. Gate signal ignored.
High-Side P-Channel (e.g., IRF9540N) Source to VCC, Drain to Load Load stays ON permanently. Body diode (Drain to Source) forward-biases from VCC to Load.
High-Side N-Channel (Requires Charge Pump) Drain to VCC, Source to Load Body diode conducts immediately. If Gate is driven, VCC shorts to Load without regulation.

For high-side P-channel switches, the body diode points from Drain to Source. If you swap the Power Supply (Source) and the Load (Drain), the diode conducts from the Load side back toward the power supply, or if the load has a secondary ground path, it creates a dead short across the power rails the moment power is applied, usually tripping the power supply's overcurrent protection or melting the PCB traces.

How to Verify Your Connections with a Multimeter

If you have already soldered the board or wired the terminal block and the load won't turn off, do not immediately blame the microcontroller code. Verify the physical silicon path using a digital multimeter (DMM) like a Fluke 117 or Klein Tools MM400.

  1. De-energize the Circuit: Disconnect the main power supply and unplug the USB cable from your microcontroller. Capacitors in the load or power supply must be fully discharged.
  2. Set the DMM to Diode Test Mode: This mode applies a small test current (usually 1-2mA) and measures the forward voltage drop across a semiconductor junction.
  3. Probe the Source and Drain: Place the Red probe on the Source pin and the Black probe on the Drain pin.
    • Expected Reading: 0.40V to 0.60V. This confirms the body diode is intact and you have correctly identified the Source and Drain.
    • If it reads 0.00V or near zero: The MOSFET is internally shorted (blown) and must be desoldered and replaced.
    • If it reads 'OL' (Open Loop): You are either probing the Gate, or the internal silicon junction has cracked open from thermal stress.
  4. Reverse the Probes: Place the Red probe on the Drain and the Black probe on the Source.
    • Expected Reading: 'OL' (Open Loop). The diode is reverse-biased and blocking current.
    • If it reads a voltage drop: The MOSFET is shorted internally.
  5. Verify the Wiring Path: With the meter in continuity mode (beep), place one probe on the Load's negative terminal and the other on the MOSFET pin you identified as the Drain. It should beep. Place a probe on the System Ground bus and the MOSFET Source. It should beep. If the Load is connected to the Source, your wiring is backwards.

By relying on the physical properties of the parasitic PN junction rather than the schematic silkscreen, you eliminate the most common point of failure in DIY DC switching circuits. For deeper reading on MOSFET internal structures and safe gate-drive practices, refer to the Electronics Tutorials MOSFET guide and the Infineon IRLZ44N datasheet specifications for exact threshold voltages and diode forward current limits.