One part saves your board when you plug it in backwards
One P channel MOSFET that passes power with almost no loss when you plug in the right way, and blocks it when you don't.

Free build sheet
The parts, every wire with its length and bend points, a bend guide, both sides of the board and checkboxes to track your progress. Print it or keep it open at the bench.
Open the build sheetWhat you need
7 parts on a perfboard 16 × 28 holes, plus hookup wire.
| Qty | Part | Where to buy |
|---|---|---|
| 1 | Diode (axial) D1 | |
| 1 | Power Input (2-pin) J1 | |
| 1 | Screw Terminal 2P (5.08mm) J2 | |
| 1 | LED LED1 | Buy LED on Amazon |
| 1 | TO-220 Q1 | |
| 1 | Resistor (axial)100k R1 | Buy Resistor (axial) on Amazon |
| 1 | Resistor (axial)1k R2 | Buy Resistor (axial) on Amazon |
Check every pin against the datasheet of the exact part in your hands before wiring.
As an Amazon Associate I earn from qualifying purchases.
Cut list
7 wires, 200 mm (7.9 in) in total, in the order the build sheet cuts them. Wire numbers match the build sheet. Each length includes 5 mm per end to go through the hole.
| Wire | Colour and net | Length | ||
|---|---|---|---|---|
| 6 | BlackGND H22 → I26 | H22 → I26 | 23mm | 15mm (90°) |
| 5 | BlueGND L17 → G21 | L17 → G21 | 33mm | 18mm (90°) |
| 4 | GreenVOUT K18 → E21 | K18 → E21 | 33mm | 13mm (90°) |
| 1 | RedVIN D6 → E13 | D6 → E13 | 30mm | 23mm (90°) |
| 7 | RedGND K16 → E6 | K16 → E6 | 51mm | 30mm (90°) |
| 3 | WhiteVOUT H16 → F15 | H16 → F15 | 18mm | 10mm (90°) |
| 2 | YellowVOUT I17 → I18 | I17 → I18 | 13mm | Straight |
About this build
Plug a board in backwards and it can be gone in a second. Every rugged little board hides the same fix: a P channel MOSFET in the high side, with its drain to the supply and its source to the load.
The right way round, the MOSFET turns hard on and drops almost nothing. Backwards, it stays off and nothing reaches the load. A 100k gate resistor and a 12V zener clamping the gate keep the gate voltage in its safe range.
The part is an IRF9540N in a TO-220. TO-220 lead orders aren't all the same, so take the wiring from the build sheet and the datasheet. 12V comes in on a 2 pin header, the protected rail leaves on a screw terminal, and a 1k resistor and an LED show the rail is live.
More builds
See all builds
VideoHow your ESP32 reads a 12V battery: the voltage divider
Two resistors scale a 12V battery down to a voltage an ESP32's 3.3V input can read safely, with a zener as a backstop.
6 parts · 9 wires
PowerSensors
VideoThis LED tells you how dead your battery is
A light for a 12V lead acid battery: green when it's healthy, yellow when it's getting low, red when it's nearly flat.
13 parts · 17 wires
PowerTools and test
VideoThis lights an LED from a dead battery
One transistor and a hand wound coil that light a white LED from a nearly dead 1V cell. Six parts.
6 parts · 9 wires
LightsPower