nmos reverse current protection
You can't power from both at the same time. Two voltages sources will never be exactly matched so one will always backdrive the other, unless you do something like add current balancing resistors in series with each source but you probably don't want to do that.



The concept you heard of is simplest if you use a PMOS. It is the following:



Taken from: Reverse polarity protection - PMOS vs Schottkey diode

However, this simple PMOS ideal diode doesn't work quite like a real diode. This circuit only protects from the power supply being connected in reverse, and only if the power supply does not exceed the PMOS's maximum |Vgs|. It does not stop something on the load side from forcing current back towards the supply side.

You can understand why if you look at what it takes for the PMOS to conduct. All it takes for the PMOS to conduct is that the voltage at the source terminal is higher than that at the gate terminal. This can be produced by the power supply injecting current through the PMOS's parasitic body diode. But you can also see that there is nothing stopping something on the load from doing the same.

This means it won't work with your circuit which has voltage sources present on both sides of the PMOS. It will also not prevent decoupling capacitors across the load from discharging back into the power supply during power down.

Obviously, none of this is an issue with a real diode. The PMOS requires additional circuitry to deal with a load that can push current back towards the load:



Taken from: Understanding an &#39;ideal&#39; diode made from a p-channel MOSFET and PNP transistors

You can go to the link to see a description of how this circuit works and how it prevents the load from back-driving current.

Also note that the above circuit has voltage limitations since the voltage supplies cannot exceed the maximum Vgs. If it does, then you have to add a few extra components like zeners and resistors to limit the gate voltage.



Now we have all that out of the way, let's talk about using an NMOS instead of a PMOS.

If you try and do it with an NMOS instead of a PMOS in either of these configurations it is more complicated since the source terminal of the PMOS is not connected to a fixed voltage rail in the circuit. That means the NMOS behaves like a source follower applying a gate voltage that is referenced to the GND causes current to flow through the load connected at the NMOS's source pin. The voltage across the load rises which makes the source pin voltage rise. Since the gate voltage does not rise since it is referenced to GND, the gate-source voltage controlling the MOSFET is reduced to the point where the MOSFET starts to turn off and no longer acts as switch.

What is essentially needed just to make an NMOS behave like the simple PMOS ideal diode is a type of bootstrap circuit (if you know anything about what is required to operate NMOS on the high-side of bridge-circuits).

A bootstrap circuits is a type of charge pump which charges up a capacitor through a typical voltage supply referenced to GND, and then disconnects the capacitor and connects it across the gate-source terminal voltage to provide a voltage to the gate which is referenced to the NMOS's source pin so you can properly control an NMOS as a switch no matter what voltage is source pins is sitting at.

You basically would not try using an NMOS without specialized IC made for the task since it's too much extra circuitry for what it does:



Images taken from: LM74700 datasheet