Reverse polarity protection circuit - Page 1
Forum section: electronics / beginners

author: mr_byte31
author_rank: Regular Contributor
timestamp: October 23, 2024, 02:44:01 pm
content: Hi,I want to build protection circuit against reverse polarity for 5V supply.I appreciate some help to understand the different in design between the two pictures below.in this figure, I can see the P-Mosfet is connected via R1 to VCC and this will ensure it is OFF by default.Q1 will be switched ON because of R2 is biasing it high. This will make the Gate of Q2 low and then it will be switched ON and start to let current pass...My question: why Q2 exists between connection of R1 and R2 ? :does it matter if R2 is connected to source of Q2 ?does it matter if R1 is connected to Drain of Q2?source:http://blog.deconinck.info/post/2017/12/22/18650-Battery-charger-reverse-polarity-protectionI found a similar circuit in the Pi HAT recommendations to avoid reverse polarity problems.I am not sure why two PNP transistors are required ! does this add extra benefit compared to above circuit?There is something strange about the connection of the Mosfet. the VCC is connected to Drain. I believe the P-Mosfet pass current from source to drain.I am also not sure why the MOSFET exists between the two PNP transistors. any clarifications?is this kind of connection similar to current mirror ?source:https://www.eevblog.com/forum/projects/using-an-n-channel-mosfet-as-a-reverse-polarity-protection-diode/I have mosfet with 3v V_GS, would that cause a problem for both circuits?

author: golden_labels
author_rank: Super Contributor
timestamp: October 23, 2024, 05:50:21 pm
content: Hello.NOTE: while writing this response, I was unaware of the source of the image supplied. The image has been modified and the attribution has been skipped, leading to completely different interpretation of its purpose. The original seems to bethis StackExchange thread, user jms appears to be the author, and the circuit had a different goal. My response and the explanations, except for the erased part, remain valid; in particular the penultimate line suggesting a different circuit.I believe the author of this circuit made a mistake while drawing the schematic. In that configuration the MOSFET is going to conduct, if the circuit is reverse-polarized. It will through the body diode. Here is the same schematic will the body diode marked. As you can see there is an unobstructed path from the bottom, through load, through the body diode, to the top.The idea seems to be the circuit below. I did draw it in two ways, so you could see easier what happens with different polarities.In the expected polarity, fhe body diode conducts (the right way), which powers the Q2, which pulls the gate of Q1 to ground, turning it fully on. At this point the circuit latches, as Q1 now powers the entire circuit. That continues until the charge from the gate-source is removed. This is the purpose of R1: it allows the implicit gate-source capacitor to discharge.If the polarity is reversed, there is a path formed through diode D1, base-collector(!) junction of the Q2 transistor, and R1. This provides enough voltage across gate-source to turn Q1 off. Diode D1 also acts as a protection against exceeding reverse voltage of Q2’s base-emitter junction. Yes, that’s an unconventional use of a transistor. But keep in mind BJTs are internally formed from two P-N junctions. While transistors are optimized for different usage and being inferior while reverse-polarized or used as diodes, technically there is nothing inherently invalid in using them that way.I hope that answers your concern about the need for R1 and R2.In the thread, from which this schematic is taken, Korishan also shows another schematic taken from a video they link. You may consider it instead that one.The forum allows uploading attachments. The controls are below the text input. Please consider using it, instead of external services.

author: golden_labels
author_rank: Super Contributor
timestamp: October 23, 2024, 11:39:05 pm
content: As for the second circuit, first consider Q3, Q4, R3, and R4 in isolation, without the MOSFET being there. It forms a PNP current mirror:(1)For a current mirror to work, voltages against which both transistors are referenced (VAand VC) must be equal. If the output side is even slightly lower (dozen millivolts), base-emitter junction of Q4 is going to not see the right voltage and Q4 is going to be cut off.(2)As it happens, if the circuit is polarized right, the MOSFET will provide that voltage difference. If Q4 is shut down, R4 is pulling gate of the MOSFET to ground, turning it fully on.If the circuit is polarized wrong, the entire BJT assembly is going to be reverse polarized and not conducting. And MOSFET is going to have its gate-source connected through R4 and the load, making it not conducting either:(1)Upside-down compared to an NPN one.(2)Or trickle only minuscule current, completely irrelevant to this circuit.

author: mr_byte31
author_rank: Regular Contributor
timestamp: October 24, 2024, 07:21:39 am
content: That is definitely a great explanation. I totally appreciate it.Let me start with a basic question. shouldn't the current in P-Mosfet go from source to drain ? or it really doesn't matter.I see the correct connection now making the +ve terminal of supply connected to the drain. thus, current will flow from drain to source..

author: PGPG
author_rank: Frequent Contributor
timestamp: October 24, 2024, 09:36:31 am
content: Quote from: mr_byte31 on October 24, 2024, 07:21:39 amWhen Mosfet is ON it doesn't matter.When it is OFF the parasitic diode have to be considered. So typical applications use it in configuration when this diode is always reverse polarized.I don't use MOSFETs a lot. I'm not sure if this parasitic diode is in all MOSFETs or only is some, specially higher current ones.

author: Solder_Junkie
author_rank: Frequent Contributor
timestamp: October 24, 2024, 10:29:54 am
content: Beware that a single MOSFET with an internal diode will not provide reverse polarity protection.I have built many protection boards using an LTC4368 and a pair of MOSFETs.The data sheet is:https://www.analog.com/media/en/technical-documentation/data-sheets/LTC4368.pdfNote, the LTC4368 is tiny, and the power MOSFETs need hot air to solder them (there is a pad under them).SJ

author: Warhawk
author_rank: Frequent Contributor
timestamp: October 24, 2024, 10:49:05 am
content: Quote from: Solder_Junkie on October 24, 2024, 10:29:54 amWhy not? We've been doing it for years!The only trick is that you use the intrinsic body diode forward-biased. You apply Vgs voltage to further reduce the drop on the diode.Please elaborate more on why you can't use a single FET for reverse polarity protection, or add more context to your previous text, because what you wrote is simply not true.

author: golden_labels
author_rank: Super Contributor
timestamp: October 24, 2024, 02:01:18 pm
content: Quote from: mr_byte31 on October 24, 2024, 07:21:39 amBoth.All transistors are optimized to be used in one direction. This way the designers may squeeze most out of them and provide the best characteristics. There are also constraints from the manufacturing process that are forcing assymetrical designs. Both lead to physical realizations being more complicated than explanatory diagrams and making transistors useful primarily in one direction. Using them the other way around gives poor performance.(1)However, the principle of operation is symmetric. This remains true equally for BJTs, JFETs, and MOSFETs. Becomes evident, if you look at the most simplified diagrams of each type:BJT,MOSFET,JFET. So a transistor may be used “the wrong way” as long as you know it performs well in that configuration. With MOSFETs you also need to mind the body diode, as quite obviously it makes the transistor very assymetrical as a switch.In this case we only care about having anything, that provides a path better than a diode. Charge collected on the gate opens the transistor, allowing current to pass. It’s not that important, if the transistor meets its best specs: even suboptimal operation provides much lower voltage drop than the constant 600 mV from a diode.Quote from: PGPG on October 24, 2024, 09:36:31 amAll MOSFETs and they have two such diodes. Connected back to back, so there is no notable conduction through the transistor:However, in most discrete transistors the body terminal is shorted to source, providing a path around the diode on that side. This leaves its sister free to pass current:Only after posting I noticed I drawn N MOSFETs, while we talk about P MOSFETs. Not goign to redraw that. For P-type just flip the diodes.(1)Including limiting conditions. Grab any BJT datasheet and compare how much voltage can reverse polarized base-emitter junction withstand, compared to the base-collector junction.

author: Peabody
author_rank: Super Contributor
timestamp: October 24, 2024, 02:30:09 pm
content: I see all these complicated circuits for reverse polarity protection, but wonder why just a single mosfet wouldn't work:https://youtu.be/IrB-FPcv1Dc?si=bG6fBcYwm3xjMhET&t=131

author: Solder_Junkie
author_rank: Frequent Contributor
timestamp: October 24, 2024, 02:36:31 pm
content: Quote from: Warhawk on October 24, 2024, 10:49:05 amLet me put it another way. The LTC4368 is purpose made to use as a protection device. Not only does it provide reverse polarity protection (with back to back MOSFETs), it has over current and low Voltage protection too.Ideal for the job of avoiding problems with a lithium battery.I guess you can put something together using two transistors and a single MOSFET… but why not opt for a better solution?SJ

author: golden_labels
author_rank: Super Contributor
timestamp: October 24, 2024, 03:29:41 pm
content: Notice to mr_byte31:I did edit the first response. You may wish to read the note I added at the beginning.For the future: please put images in attachments, provide attribution, indicate the sources. Preferably also don’t remove fragments of images, if there is no good reason to do so. Not doing so hurts you more than anybody else: the less the responder knows, the harder it is to give a good answer. As you can see above: you may even get a wrong response.Quote from: Peabody on October 24, 2024, 02:30:09 pmI already did mention this circuit.(1)Or rather the next one, as the one you directly linked has downsides which the video explains before providing an improved version. And actually there is an even simpler and cheaper solution: use a keyed connector.I don’t know, what was the reason for people to design those more complex circuits. You’ll have to wait for others to explain.I may make some guesses. Other than there being no particular reason(2)and people simply creating different designs to achieve the same goal, I can imagine dynamic behavior may be the cause. The BJT is almost a short to the ground, unlike a resistor. That means it will turn on the transistor faster and the gate drive is decoupled from the load.Upondigging deeper(extra) it seems that the first schematic in the thread was actually misrepresented. An important part was hidden: the energy source is on the right.While I doubt it’s an explanation in this particular case, I also can’t exclude it: somebody may have already taken the more obvious solution. This isn’t going to be a problem for a hobbyist, but a commercial product is a different story.Quote from: Solder_Junkie on October 24, 2024, 02:36:31 pmCost? Space constraints? Sourcing chain reliability?(1)The penultimate line here.(2)An unexpectedly common correct explanation for many things.

author: PGPG
author_rank: Frequent Contributor
timestamp: October 24, 2024, 03:47:18 pm
content: Quote from: Peabody on October 24, 2024, 02:30:09 pmSingle MOSFET protects against supply being connected reverse polarity but not protects against rapid voltage drop.

author: mr_byte31
author_rank: Regular Contributor
timestamp: October 24, 2024, 04:30:47 pm
content: @golden_labels, I added sources under the pictures.next time, I will attach them.@PGPG, do you think that adding more transistors or resistors will avoid voltage drops? I am sorry, I didn't get it.

author: mr_byte31
author_rank: Regular Contributor
timestamp: October 24, 2024, 04:36:08 pm
content: Quote from: Peabody on October 24, 2024, 02:30:09 pmwatch thispartSeems there is limitation based on the usage. ....

author: PGPG
author_rank: Frequent Contributor
timestamp: October 24, 2024, 06:08:48 pm
content: Quote from: mr_byte31 on October 24, 2024, 04:30:47 pmI was writing about protecting and not avoiding.May be (have no time to analyse) these more complicated circuits try to mimic diode behavior (in contrast to transistor diode not conducts current in reverse direction).Voltage regulators don't like reverse current.Microcontroller sometimes need a while between NMI about disappearing supply and real supply off.Reverse current can be very high if its source is negative surge at DC supply.

author: Peabody
author_rank: Super Contributor
timestamp: October 24, 2024, 08:38:28 pm
content: Quote from: mr_byte31 on October 24, 2024, 04:36:08 pmWell, Great Scott has the mosfet backwards. That's why the fuse blows - current going through the body diode when the voltage is reversed. I have found the Afrotechmods circuit to be completely effective.

author: Peabody
author_rank: Super Contributor
timestamp: October 24, 2024, 08:42:40 pm
content: Quote from: PGPG on October 24, 2024, 03:47:18 pmI'm late to the thread, so maybe this has already been discussed. But I don't know what "rapid voltage drop" refers to.

author: PGPG
author_rank: Frequent Contributor
timestamp: October 24, 2024, 10:13:52 pm
content: Quote from: Peabody on October 24, 2024, 08:42:40 pmI have checked my wording, but Google translator gives me the same wording.I thought it is clear what happens when input voltage rapidly drops down.Let us assume many 12V devices are supplied from one supply. In your device you have diode then big electrolytic capacitor then regulator and next big electrolytic capacitor.When 12V supply is switched off than voltage at 12V supply can drop down much faster than voltage at your both capacitors.But if your 12V input is connected to capacitor through MOSFET and not diode than your capacitor have to follow the input so drops fast (down to voltage when MOSFET disconnects) and gets having lower voltage than regulator output capacitor. That makes output capacitor being discharged through your regulator (it can kill it).I just wrote that one sentence trying to point on why single mosfet can be not perfect in such application.

author: mr_byte31
author_rank: Regular Contributor
timestamp: October 25, 2024, 11:24:20 am
content: Quote from: Peabody on October 24, 2024, 08:38:28 pmGood catch….you are correct.The internal diode of Mosfet is making current work in reverse polarity.It seems Scott is cheating when he said that his change works at the end!!!!

author: golden_labels
author_rank: Super Contributor
timestamp: October 25, 2024, 01:51:14 pm
content: Both GreatScott and sources of the image discussed show a circuit with a purpose different than what this thread talks about. Which also seems to be the reason for all the compication. It’s clear, if you look at the full picture — without its right side cut off. The circuit is not protecting an idle load, but prevents the catastrophic outcome of connecting two energy sources in a loop.

author: Zero999
author_rank: Super Contributor
timestamp: October 25, 2024, 01:57:44 pm
content: Quote from: PGPG on October 24, 2024, 10:13:52 pmPut a diode across the regulator to protect it, then simple single MOSFET reverse polarity is alll that's required.

author: coromonadalix
author_rank: Super Contributor
timestamp: October 25, 2024, 02:16:52 pm
content: LTC4359CDCB based

author: PGPG
author_rank: Frequent Contributor
timestamp: October 25, 2024, 02:53:51 pm
content: Quote from: Zero999 on October 25, 2024, 01:57:44 pmIt is rare situation when considering some solution used in different applications you could always say: "it is all that's required".The solution MOSFET + diode across regulator is good in many applications but not in all (I have mentioned such problem in another post).If you detect voltage at first capacitor to generate NMI to give microcontroller enough time to finish tasks that can't be broken then if the charge from capacitors is stolen by MOSFET + diode time left can be too short.

author: Peabody
author_rank: Super Contributor
timestamp: October 25, 2024, 04:40:25 pm
content: Quote from: golden_labels on October 25, 2024, 01:51:14 pmI see your point. I've used the single mosfet protection in circuits using replaceable primary batteries, but never bothered in circuits using a charger - on the theory that the batteries would be replaced rarely, and you just have to be careful.But I see that things become more complicated if, for example, you have a TP4056 charger charging an 18650, which is also powering the load. What do you have to do to protect both the charger and the load from a reversed battery? At different times, you have current flowing into, or out of, the battery, so it doesn't seem to be simple. Maybe I need to look at Great Scott's "solution" circuit again.Edit: It looks like the solution circuit with the mosfet + bipolar works to protect the charger, but I don't think it protects the load. So you would also need the single mosfet protection between the battery and the load.Edit2: No, I think I was wrong about needing additional protection for the load side. The mosfet/NPN circuit prevents current from flowing into the battery terminal unless the voltage is rightside up. That should protect everything.

author: Zero999
author_rank: Super Contributor
timestamp: October 25, 2024, 04:45:34 pm
content: Quote from: PGPG on October 25, 2024, 02:53:51 pmIf it's run off a 12V PSU, then all that's needed is a good old diode. The 0.6V or 0.3V, for a Schottky is insignificant, given the regulator powering the MCU will still work down to 7V or so.

author: PGPG
author_rank: Frequent Contributor
timestamp: October 25, 2024, 05:01:14 pm
content: Quote from: Zero999 on October 25, 2024, 04:45:34 pmYes, of course.But not longer than 2..4 weeks ago I have seen schematic (I suppose it was at this forum) having such MOSFET reverse voltage protection at the USB socket.I remember that for question what this transistor protects against I have written something like that against specially prepared USB cable with internally crossed supply wires.The problem of supplying whole PC from capacitor in such USB device is also worth considering.

author: mr_byte31
author_rank: Regular Contributor
timestamp: October 25, 2024, 07:42:09 pm
content: Quote from: golden_labels on October 25, 2024, 01:51:14 pmRaspberry PI recommended thesecond picturein my initial post to be used "reverse current blocking diode"The idea for all circuits is to avoid reverse current ..

author: golden_labels
author_rank: Super Contributor
timestamp: October 27, 2024, 12:52:09 am
content: Digging just a tiny bit more in the source (or even carefully reading the linked one) makes it pretty clear: it’s not designed to protect against power source being connected in reverse, but against backfeeding from another power source. Here is afuller picture of how it’s being used.Circuits you asked about do (1) and (2), while what you seem to want is (3):For that the circuit shown in the linked YouTube video, the one with a single MOSFET and a zener diode, is enough. Of course assuming that all ratings are ok.

author: mr_byte31
author_rank: Regular Contributor
timestamp: October 28, 2024, 07:29:26 pm
content: That is pretty clear to me now and supper thx for the support.Just to conclude on this topic. if I want to have a circuit that can be :1- powered by USB-C or Lipo but not both at the same time.2- protect again against reverse polarity of LiPo source.I would need two circuits, one from reverse polarity and one to avoid reverse current ?