Reverse polarity protection with a P-MOSFET
Build it step by step
0 of 7 doneBuild the diode version
1N4007 in the positive lead.
Measure the drop
At 500 mA.
Replace it with the MOSFET
Drain in, source out.
Add the gate resistor
10 k to ground.
Add the Zener
Anode at the gate.
Measure the drop again
Compare.
Reverse the battery
Nothing should flow.
How do you build a reverse polarity protection with a P-MOSFET?
A P-channel MOSFET protects a circuit from a battery wired backwards, losing far less voltage than a diode. You need IRF9540N P-channel MOSFET, Zener diode 12 V (1N4742A), Resistor 10 kΩ, Rectifier Diode 1N4007, Digital multimeter, Battery holder 4 × AA with switch and AA alkaline battery × 4. It takes 7 steps and about 60 minutes.
- Level
- Beginner
- Time
- About 60 min
- Parts
- 7
Wiring
| From | To | Why |
|---|---|---|
| Battery plus | P-MOSFET drain | Input side |
| P-MOSFET source | Load plus | Protected side (body diode points from drain to source) |
| P-MOSFET gate | 10 k resistor to ground (battery minus) | Turns on when the battery is right |
| Zener diode | Anode to gate, cathode to source | Protects the gate from too much voltage |
| Battery minus | Load minus | Common ground |
| 1N4007 diode (for comparison) | In series with the positive lead instead of the MOSFET | Compare the voltage drop |
No code needed
Connect a battery the wrong way round and many circuits die at once. A diode in series prevents it, but it wastes about 0.7 V and gets warm. A P-channel MOSFET does the same job with far less loss: with the battery correct, the gate is pulled below the source, the MOSFET turns on, and current flows through its very low resistance; with the battery reversed, the gate is not pulled low and the body diode blocks, so no current flows. The 10 k resistor sets the gate low, and the Zener limits the gate voltage on higher supplies. Measure the voltage drop across the MOSFET at about 500 mA and compare it with the drop across a 1N4007: the MOSFET should be a small fraction. The IRF9540N is not a logic-level part, so it is only partly on at the 6 V of four AA cells and its drop is larger; for low voltage circuits use a logic-level P-channel MOSFET. Test with a small load such as a resistor and LED, not a precious circuit, and do it on a bench with the battery leads held firmly. There is no code for this build.
Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| Diode drop | About 0.6 to 0.7 V at 500 mA |
| MOSFET drop | Clearly lower |
| Reversed battery | Load stays off, no current |
| Gate | About minus battery voltage when correct |
If it does not work
Load never powers
Check the drain and source are not swapped.
Drop is large
The supply is too low for this MOSFET.
MOSFET warm
Lower the load current.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the reverse polarity protection with a P-MOSFET?
IRF9540N P-channel MOSFET, Zener diode 12 V (1N4742A), Resistor 10 kΩ, Rectifier Diode 1N4007, Digital multimeter, Battery holder 4 × AA with switch and AA alkaline battery × 4.
How long does the reverse polarity protection with a P-MOSFET take to build?
About 60 minutes for a beginner maker, in 7 steps.
How do I know the reverse polarity protection with a P-MOSFET works?
Diode drop: About 0.6 to 0.7 V at 500 mA. MOSFET drop: Clearly lower. Reversed battery: Load stays off, no current.
Load never powers: what should I check?
Check the drain and source are not swapped.
Drop is large: what should I check?
The supply is too low for this MOSFET.
MOSFET warm: what should I check?
Lower the load current.
