Noob design a Power selection circuit with P-Ch Mosfets: Caveats&Hidden issues? - Page 1
Forum section: electronics / beginners

author: hitech95
author_rank: Regular Contributor
timestamp: March 23, 2021, 08:28:36 pm
content: Hi,I'm trying to create a 2 Way power source selection circuit.I've searched a bit online and I've found an interensting stackexchange answer.That said I don't completely like the use of the diode, this limits (in my case) the current and it add a quite significant voltage drop.So I've come up with this design:That said I know almost about nothing about mosfter, could I simplify this?Did I made some really stupid error?Using CircuitLab I can simulate the circuit and it seems to be working, but I have to find the right parts for my needs and I have then build a prototype.References:https://electronics.stackexchange.com/questions/356493/mosfet-switch-power-n-or-p-channelhttps://electronics.stackexchange.com/questions/340505/p-channel-mosfet-to-do-automatic-switch-between-battery-and-power-sourceRegards,Nicolò

author: Peabody
author_rank: Super Contributor
timestamp: March 23, 2021, 10:46:11 pm
content: I think your circuit is a very good start, but I have a couple comments.First, I'd suggest you always show the body diode of the mosfets in your circuit. That will help you see what they do. In your circuit, you have M1 and M4 configured in opposite directions, and it's not clear why.It seems to me that M4 is correct as shown. Even though the source is on the right, which is the opposite of the typical orientation for a P-channel used as a switch, when SW1 is open the body diode will block current from flowing from M1 back through the M4 body diode, and raising the M1 gate voltage, which would turn M1 off. So M4 looks right to me as you've drawn it.But you have M1 oriented the opposite way, which means when SW1 is closed and M1 is off, current can still flow from M4 back through the M1 body diode to the battery, which you may not want. As long as the battery is less than a diode drop below the 5V V3, no current will flow. But as the battery discharges, the forward bias of the body diode will be exceeded, and current will flow.Now if you reverse the orientation of M1, then even when it's off, current could flow through the body diode to the load. But that would only happen if Vbat is at least one diode drop *above* V3, which I assume will not be possible. So I'd suggest you try reversing the M1 orientation so that it matches M4. Mosfets generally conduct equally well in either direction, but the orientation of the body diode matters.I don't think your choice of P-channel mosfets is right for these voltages. The Vgs threshold voltage can be as high as 4V, and that's the voltage at which the mosfet only *begins* to turn on. For these voltages you need a "logic level" mosfet - one with an IRFL part number, or something similar from another manufacturer. The Vgs threshold should be near 1V maximum so the mosfet will be fully on at 4.7V.Other minor things: If you have R2 and R3, you don't need R1. And you don't need R4. I think R5 and R2 could be higher value, like 10K.

author: hitech95
author_rank: Regular Contributor
timestamp: March 24, 2021, 09:39:59 pm
content: Quote from: Peabody on March 23, 2021, 10:46:11 pmI'm glad that I'mnot completly wrong!Quote from: Peabody on March 23, 2021, 10:46:11 pmGenerally I draw dthe diode, but the online app didn't had the symbol with it.VBat is in reality a STANDBY rail of a PSU (Like for the ATX PSU 5V_STB, originally it was a battery but then I've changed the specsdue to power consumption). The idea is to switch to the proper 5V Rail when the PSU is turned on and increase the power limit on the circuit.The STANDBY power is always present if the device is pluged in. I know the M1 is in the opposite direction it is to prevent to have the mosfet to turn off when powered by the standby.Quote from: Peabody on March 23, 2021, 10:46:11 pmSo far so good, you got all my reasoning. About the last point vBAT is above 3V in fact it is around 5V. The reason I didnt use a double diode is that I want to be sure to disconnect the standby rail when main power is applied since both voltages are quite similar. (the only difference is the SMPS tolarance of the rail)Quote from: Peabody on March 23, 2021, 10:46:11 pmMy idea was to use a SI2301CDS-T1-GE3, it seems (to me) a good choice, logic level Vgs(th) and it can handle my peak 2A of current consumption.I don't fully get why I don't need R5, R4 was there due to the fact that I thought I had to limit the current... so it should be fine without itI really appreciate your help,I learn each day!

author: Peabody
author_rank: Super Contributor
timestamp: March 25, 2021, 03:46:11 am
content: If both sources are 5V, and neither is a battery, then M1 should be ok as it is. And V3 will always power the load if SW1 is closed. I assume that's what you want.That mosfet looks fine to me. And as for the resistors, you do need R5. I just don't think you need the current limit of R4 in this case. The 2N3904 should have no trouble dealing with the gate capacitance. But others here may disagree.If current levels matter at all, I think you could make the values of R2, R3 and R5 ten times higher and it would still work ok.