Reverse Polarity Protection

How do you ensure that your board stays intact, even when you connect the battery the wrong way?

Connecting your battery backwards could be disastrous for your components. Microcontrollers expect certain voltages on their supply pins, so connecting 5V to a GND pin isn't exactly ideal. While it's nice to hope that the user has common sense and won't ever connect the battery in reverse, in real life someone's going to mess up at some point, and you can't do a thing about it. So the next best thing to do is to accept that it's going to happen, and design a circuit that protects your board when it does.

Enter the reverse polarity protection circuit.

Of course, there are many ways to make a reverse polarity protection circuit, and there are even dedicated ICs, but this is the way we use because it's simple and requires only three components: a P-MOSFET, a zener diode, and a resistor.

How it works normally

For a P-MOSFET to conduct, the voltage at the gate needs to be less than the voltage at the source AND this voltage difference has to be less than the threshold voltage. This voltage difference is notated as Vgs, and the threshold as Vgs(th). Hence, to "turn on" a P-MOSFET, Vgs < Vgs(th).

(Recall that for a N-MOSFET, Vgs has to be positive, i.e., the gate voltage > the source voltage, and it has to be greater than the threshold voltage).

When the battery is first connected, the body diode of the MOSFET starts conducting. After some time, Vs will be around Vbat. Since the gate is tied to ground (and presumably Vgs < Vgs(th)), the MOSFET fully conducts and acts as a short. 

The zener diode is used as a clamp to ensure that Vgs stays constant even when VBAT goes overvoltage, since MOSFETs are only rated up to a certain Vgs.

How it works in reverse

When the battery is connected in reverse, the diode is forward biased, and its tiny forward drop will ensure that the gate voltage exceeds the source voltage, ensuring that the MOSFET never turns on. The resistor is there to limit the current going into the diode in this case. Note that here, the load might still see a reverse voltage, but it will be across the diode and resistor, not the entire battery.




Sources:

https://www.infineon.com/dgdl/Reverse-Batery-Protection-Rev2.pdf?fileId=db3a304412b407950112b41887722615

https://electronics.stackexchange.com/questions/497973/reverse-polarity-protection-circuit-with-p-mosfet-and-zener