I am using a power source to charge a battery. To protect the power supply from reverse polarity conection of battery I included a PMOSFET transistor like showed:


simulate this circuit – Schematic created using CircuitLab

The problem is that this only works when power supply if off. If the power supply is on, so transistor conduces like VGS < Vt, and if now battery is connected with reverse polarity (VBAT < 0) there is a large current flow from source to battery like a short circuit, due to the large voltage diference between V1 and VBAT, and the transistor still conduces.

Is there some way to avoid this problem?


1 Answer 1


As you've noticed it won't work with your schematic, or with just a diode, because the direction of the current is the same.

So is there some way we can say "This battery has been inserted in the wrong direction!", why yes, that would be if we read what we think is the positive terminal of the battery as less voltage than ground. Because that should never happen if it has been connected correctly.

All you need for this is an op-amp acting as a simple comparator, here's an image showing a schematic illustrating my point. The one on the left is a battery being charged correctly, on the right is a battery inserted in the wrong way not taking any considerable current.

enter image description here

Here's the link if you want to play around.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.