MOSFET – Using PFET as a Diode for Battery Charging

battery-chargingmosfet

I would like to use a PFET as a diode to only let current from the 3.3V to 4.2V area (when 4.2V is not present).

When 4.2V is present, it should not charge the battery.

Is it possible to do this with mosfets. I would like minimal voltage drop and up to 600mA can be drawn.
Circuit 2 is what I am trying to achieve. Circuit 1 is my attempt, but it isn't working.

Btw, this is a mod on a PCB, so I am limited in the part count.

enter image description here

Best Answer

As the user The Photon already pointed out in the comments, there are some ics which can do what you want. For example, this evaluation board from Texas instrument uses two ideal diodes LM66100 to connect a load to two different supply voltages. If the second supply voltage is larger than the first one, the ideal diode of the latter is disabled and the load is supplied by the former.

If for some reason, you still want to implement something similar using discrete components, you can try the following. I must say upfront what this circuit was not optimized and may have some flaws, which I might have overseen.

How it works:

The upper mosfets act as ideal diodes operating in a complement fashion. The lower long tailed pair compares both supply voltages and turns on, the one which is higher. Some positive feedback might be needed somewhere in order to add some hysteresis during the transition. circuit