Dual supply load control using MOSFET - Page 1
Forum section: electronics / projects

author: kian0079
author_rank: Contributor
timestamp: July 31, 2023, 11:45:24 am
content: Hi all,In my application, I want to drive a load using either 3.3V (from a LDO) or from a 5V USB supply. I also want to be able to enable or disable this 3.3V by using a PMOS with the gate connected to a micrcontroller. The circuit I have in mind is attached.If the 3.3V supply is connected, and the 5V supply is disconnected, the microcontroller will be able to enable or disable the 3.3V to flow into the load. Diode D1 will prevent 3.3V from flowing into the 5V supply. In another case, if the 5V supply is connected and the 3.3V is disconnected (microcontroller will be shut off too), 5V will flow directly into the load through the diode.But what if both 3.3V and 5V is connected at the same time? It seems like this could cause a problem, especially if the PMOS is turn on, in that case, both 3.3V and 5V will flow into the load. How can I avoid this problem? Hope to get some advise here. Thanks in advance!

author: connectTek
author_rank: Regular Contributor
timestamp: July 31, 2023, 11:56:17 am
content: Use 4v7 zener diode in reverse in place of the BAT20J.Depending on the load current is what size zener.

author: ledtester
author_rank: Super Contributor
timestamp: July 31, 2023, 12:48:59 pm
content: Quote from: kian0079 on July 31, 2023, 11:45:24 amIn this case it looks like the 5V supply will provide power to the 3.3V rail through the body diode of the DMP1045U which doesn't seem to be what you want to happen.

author: kian0079
author_rank: Contributor
timestamp: July 31, 2023, 12:57:01 pm
content: Quote from: connectTek on July 31, 2023, 11:56:17 amHi connectTek, do you mean like this? But I don't quite understand how this works.

author: kian0079
author_rank: Contributor
timestamp: July 31, 2023, 12:58:51 pm
content: Quote from: ledtester on July 31, 2023, 12:48:59 pmHi ledtester,Would adding another zener diode between Q1 and D1 work? This would prevent the 5V supply from providing power to the 3.3V rail.

author: ledtester
author_rank: Super Contributor
timestamp: July 31, 2023, 01:26:06 pm
content: Yeah that should work. It would also solve your other problem when both supplies are trying to feed the load. In that case only the 5V supply would provide power to the load since it has the higher voltage. The drawback is the diode drop incurred by the 3.3V supply when it is supplying power.How much current is the load going to draw? Is the load the audio chip you mentioned in your other post which draws about 400mA?

author: Peabody
author_rank: Super Contributor
timestamp: July 31, 2023, 01:56:00 pm
content: If you forget the microcontroller control, and just make it switch automatically, you can do that without the additional diode. In the circuit below, Main is the 5V supply, and Backup is the 3.3V supply. When 5V is present, it turns off the mosfet, and when it's absent, the pulldown turns on the mosfet. Notice that the mosfet is oriented oddly, but that's so the body diode will block backflow when the mosfet is off. This is just a standard load sharing circuit that switches automatically. It always passes the higher voltage if both supplies are present, but otherwise passes the one that's present, while blocking backflow into the absent supply. And there is no diode drop in the 3.3V line.

author: kian0079
author_rank: Contributor
timestamp: August 01, 2023, 12:12:36 pm
content: Quote from: ledtester on July 31, 2023, 01:26:06 pmYes, the load is driving the audio chip which could draw a max current of about 400mA. I prefer not to have any voltage drop when using the 3.3V supply. Is there any other way to solve this?

author: kian0079
author_rank: Contributor
timestamp: August 01, 2023, 12:15:14 pm
content: Quote from: Peabody on July 31, 2023, 01:56:00 pmThanks Peabody. I am aware of this solution. However it is important that I can choose to cut off the 3.3V supply to the load using a microcontroller pin. When powered by 5V, the load will get 5V all the time, there is no requirement to cut off the 5V supply.

author: Peabody
author_rank: Super Contributor
timestamp: August 01, 2023, 02:23:26 pm
content: Quote from: kian0079 on August 01, 2023, 12:15:14 pmWill the microcontroller know when the 5V supply is present?Edit: I think the solution is to replace the added diode with a second mosfet oriented in the opposite direction. The body diodes will prevent current flow in either direction when the mosfets are off, but both will be bypassed when they are on. So there's no voltage drop. I think the circuit shown below might work.Edit 2: The GPIO control should work as long as the voltage drop across the GPIO diode is less than the gate threshold voltage of the mosfets. Just to be sure, you might want to make the GPIO diode a schottky.

author: kian0079
author_rank: Contributor
timestamp: August 02, 2023, 11:28:18 am
content: Quote from: Peabody on August 01, 2023, 02:23:26 pmThe microcontroller will not know that the 5V supply is present.Someone recommended a dual mosfet solution similar to what you have suggested. But it uses an additional transistor to control the mosfets. See attached.

author: Peabody
author_rank: Super Contributor
timestamp: August 02, 2023, 02:24:26 pm
content: Yes, I think that would work too. But if 5V is absent and 3.3V is present, my circuit would turn on the mosfets unless the processor forces them off. Your circuit would turn off the mosfets unless the processor forces them on. So it would depend on which you prefer.Also, I don't know if it makes any difference whether the drains are connected together or the sources are connected together. It probably doesn't matter, but maybe someone else here could comment on that.Edit: For the mosfets shown in your circuit, my circuit would be borderline on turning them off properly. Those mosfets have a very low threshold voltage, so the diode drops in my circuit might leave them slightly on.