Help with a Simple MOSFET Voltage Selector Circuit  - Page 1
Forum section: electronics / beginners

author: Thane of Cawdor
author_rank: Regular Contributor
timestamp: December 09, 2019, 04:06:36 am
content: Hi,I'm working on a circuit which has potentially two power inputs (two battery packs regulated at 5V - in the diagram the primary supply is 5V and secondary supply is labelled 5V1) and was looking at using this power selector circuit attached.My first question: will this work in all cases where 5V and 5V1 inputs are connected/disconnected? The main thing throwing me off is the presense of the body diode on Q1 - doesn't this make the P-MOS unnecesary in the circuit since, whether we switch it or not, it will always conduct when the 5V battery is connected (if the voltage on the output line is low enough to allow current to flow and overcome the body diode Vf)?If so, could I just replace this with another Schottky diode or is it still better to use the MOSFET due to the lower forward voltage?My second question is a simple one: is D1 and R1 (polyfuse) required for reverse current protection or does Q1 already protect the output if the 5V rail is inverted?Thanks

author: Zero999
author_rank: Super Contributor
timestamp: December 09, 2019, 09:13:19 pm
content: Yes, the body diode makes the MOSFET unnecessary.If you do away with the MOSFET and use two Schottky diodes, then there's no need for a reverse paralell diode for reverse polarity protection.Schottky diodes do have a significant voltage drop and reverse leakage current. It is possible to use MOSFETs to solve this problem, resulting in a very low voltage drop, but the answer is to use an ideal diode controller IC, rather than attempting to make your own.https://www.google.com/search?client=firefox-b-d&q=ideal+diode+controller+IC

author: Thane of Cawdor
author_rank: Regular Contributor
timestamp: December 11, 2019, 04:07:07 am
content: Thanks for that.I keep seeing a similar method of voltage selection using a MOSFET where the body diode would render it unnecessary in a number of designs (e.g.https://cdn.sparkfun.com/datasheets/Wireless/WiFi/SparkFun_ESP8266_Thing.pdfin the power supply section andhttps://www.arduino.cc/en/uploads/Main/arduino-micro-schematic.pdfin "+5V Selector" section). So I'm just confused as to why this seems to be the standard rather than use two Schottky diodes as you suggest?The ideal diode IC looks interesting - I'll keep that in mind too.

author: Zero999
author_rank: Super Contributor
timestamp: December 11, 2019, 06:06:15 pm
content: Quote from: Thane of Cawdor on December 11, 2019, 04:07:07 amThose are P-channel MOSFETs, so they turn on when the gate is below the source. The diodes still block voltage, when they're reverse biased, so those circuits will work.

author: Thane of Cawdor
author_rank: Regular Contributor
timestamp: December 13, 2019, 07:29:40 am
content: Right, is that not the same configuration as the initial circuit I provided (Q1 is also a P-MOS)?In the case of the SparkFun design, the Vbat voltage would always be present on the VIN line even when VUSB is turned on due to the body diode being forward biased when Vbat is powered. I assume they're not isolating the voltage on VIN rather just current sharing in the case when both sources are connected - so wouldn't they be better off using ideal/schottky diodes too?

author: Zero999
author_rank: Super Contributor
timestamp: December 13, 2019, 11:08:43 pm
content: Sorry, I was half asleep when I initially replied to the thread. The MOSFET still works in both directions. If the gate is at 0V and the "drain" at 5V, the MOSFET will be on, bypassing the body diode. Note the use of quotation marks for the drain, in the previous sentence is because it will be acting as the source.The reason for using the MOSFET, over just a Schottky diode, is lower voltage drop.

author: not1xor1
author_rank: Frequent Contributor
timestamp: December 14, 2019, 08:12:09 am
content: Quote from: Thane of Cawdor on December 13, 2019, 07:29:40 amUSB power is 5V while the battery is specified as a single cell Li-PO (<= 4.2V) so the body diode will be reversely polarized and conducting just a small leakage current.Please notice the resistor between gate and ground. That is essential for proper MOSFET polarization when no USB power is connected. Another thing to consider is that you must use a low threshold voltage MOSFET, i.e. one that is full on at the minimum battery voltage.