Electronic – MOSFET like relay for short-circuit

microcontrollermosfetsolid-state-relay

I need to short-circuit a power source using a microcontroller to measure the short-circuit current capacity (less than 10A). So the impedance of the short circuit should be as low as possible.

I was using a 5V relay commanded by a BJT transistor and it works very well.
But for space reasons I would like to test other options, like using a MOSFET transistor working as a switch.
I tested with the logic level NMOS IRL540N as shown in diagram and it worked fine. Putting 5V at the gate closes the short circuit with about 36mΩ resistance.

But the problem is when the power supply is connected wrongly with reverse polarity the NMOS always conducts, even with a low microcontroller output.
I don't understand why it conducts as VGS remains null even with reverse polarity connected.

How can I protect the MOSFET to be always off when reverse polarity is connected to drain-source?

The power supply could reach up to 25V. Is the MOSFET always secure?
The absolute maximum rating for Gate-to-Source Voltage is 20V, but in this application VGS is always lower than 5V.

schematic

simulate this circuit – Schematic created using CircuitLab

Best Answer

A glance at the IRL540N shows the reason for reverse conduction.

enter image description here

Figure 1. The MOSFET contains a built-in diode as part of the construction.

You can't add a diode because the voltage drop will be too high for your application.

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 2. Modified circuit with built-in diodes shown.

You could add a second MOSFET in series but reversed. This would prevent either polarity passing unless the MOSFETS were turned on. The down-side is double the on resistance and the fact that the power circuit is not directly referenced to ground.