Source: https://mokxi.com/learn/reverse-polarity-protection
Updated: 2026-09-27

Learn

# What a diode does when the battery goes in backwards

Written by the Mokxi team, updated September 27, 2026

Sign up free or see every lesson

- 192 parts on the bench
- 25 boards running now
- 1.00x real time, on every board

Click the switch to reverse it

The switch reverses the supply. Left: no protection. Middle: a 1N5817. Right: a P-channel MOSFET.

Sooner or later every circuit gets its power connected the wrong way around: a battery holder, a barrel jack with the other polarity, two wires swapped on a bench supply. A diode is the simplest guard against it, because a diode lets current through in one direction and blocks it in the other. The question is what it costs you the rest of the time, when the battery is in the right way.

The circuit above answers that three ways at once. The slide switch is the battery: in one position the rail gets +5 V, in the other the same battery is in backwards and the rail gets -5 V. Each 100 ohm resistor stands in for a circuit drawing 50 mA. The left one is unprotected, the middle one sits behind a 1N5817 Schottky diode, and the right one sits behind an IRF9540N P-channel MOSFET with its gate tied to ground.

Press Run and read the current under each resistor, then click the switch. The unprotected load goes from +50 mA to -50 mA. The other two go to zero.

## A diode, in one paragraph

A diode has an anode and a cathode, and the cathode is the end with the band. Current flows from anode to cathode once the anode is a few tenths of a volt higher, and almost none flows the other way. That forward drop is not a fixed number: it grows with the current. A 1N4148 drops about 0.62 V at 1 mA and 1 V at 100 mA; a 1N4007 rectifier about 0.63 V at 5 mA and 0.91 V at an amp; a 1N5817 Schottky about 0.24 V at 5 mA and 0.45 V at an amp. The meter’s diode range reads the drop at a milliamp, which is how you check a diode and find its band on the bench.

## No protection: what the -50 mA means

In the simulation, a resistor fed backwards just passes current backwards, and nothing is harmed. A real board is not a resistor. Every chip on it has protection diodes from each pin to its supply, electrolytic capacitors on the rail are polarized, and the regulator was never designed to see its output above its input. Reverse the supply and current finds its way backwards through all of them at once. Often the first sign is heat; sometimes it is a smell. That is what the other two circuits are there to prevent.

## A series Schottky diode: simple, and costs a drop

Put a diode in series with the positive lead, band towards the load, and a reversed battery simply cannot push current through it. That is the middle circuit, and reversed it reads zero. The right way around, the diode drops about 0.30 V at 47 mA, so the load gets 4.70 V instead of 5, and the diode turns 0.30 V x 47 mA = 14 mW into heat.

Change the diode’s model to a 1N4007 in the properties panel and the load gets 4.26 V: an ordinary silicon rectifier costs more than twice the Schottky’s drop. On a 12 V supply that hardly matters. On a board running from 5 V into a 3.3 V regulator, or from three AA cells, three quarters of a volt can be the difference between working and not.

## A P-channel MOSFET: almost no drop at all

The right-hand circuit is the one to use when every tenth of a volt counts. The MOSFET’s drain faces the battery, its source faces the load, and its gate goes to ground. Connected the right way, current first flows through the MOSFET’s own body diode, which lifts the source to about 4.3 V. The gate is at 0 V, so it is now 4.3 V below the source, which turns a P-channel MOSFET on, and the channel shorts out the body diode. The load gets 4.97 V.

Reversed, the body diode points the wrong way and blocks, the source stays at ground, the gate is not below it, and the channel stays off. It behaves like a diode with a drop of a few tens of millivolts, which is why this arrangement gets called an ideal diode.

One detail from the datasheet matters on a real bench. The gate can only take about 20 V from the source before the thin insulation under it fails, so above roughly 12 V people add a Zener diode from gate to source and a resistor to ground, to clamp it.

## Common mistakes

Fitting the diode backwards, which protects perfectly against a correctly connected battery by never letting anything through. Using a small-signal 1N4148, rated for a couple of hundred milliamps, in the supply line of something that draws an amp. Wiring the P-channel MOSFET with drain and source swapped: its body diode then conducts whatever the gate is doing, and a reversed battery goes straight through. You can try that last one in the editor: swap the two wires on the MOSFET, reverse the switch, and watch the right-hand load carry current it should not.

And a word about batteries themselves. A lithium cell can deliver a very large current into a short or a reversed circuit, enough to make wires and parts hot. Build and test protection circuits like these on a current-limited bench supply or with small cells, never on a big pack.

## Questions

Which diode is best for reverse polarity protection?

A Schottky such as the 1N5817 or 1N5819, because its forward drop is about half that of a silicon rectifier. Pick one rated for more than your load current and more than your supply voltage in reverse. When even a Schottky’s drop is too much, use a P-channel MOSFET.

How much voltage does a protection diode lose?

It depends on the diode and the current. In the circuit on this page, at 47 mA, a 1N5817 Schottky loses 0.30 V and a 1N4007 loses 0.73 V. At an amp they lose about 0.45 V and 0.91 V.

How does a MOSFET protect against reverse polarity?

A P-channel MOSFET in the positive line, drain to the battery and gate to ground, turns on only when the battery is the right way around, and its channel then drops a few tens of millivolts. Reversed, its body diode blocks and the gate cannot turn it on.

Related

## Keep going

MOSFET vs BJT: Which Transistor to Switch With The Flyback Diode, and the Spike It Stops Picking a Resistor for an LED An NPN Transistor as a Switch, Driving a Motor The diode models, and their drops The MOSFET models

## Build this for real

Open the editor, change a value and watch the number move with it. Nothing to install, and no account needed.

Start building Open the editor
