I'm using the circuit given in the example here: Understanding an 'ideal' diode made from a p-channel MOSFET and PNP transistors
Basically there are two issues.
- In the forward direction [Vin = 15V on IN] it appears as if the gate voltage is only just below the positive rail, it is not being pulled to ground, which may have implications for higher currents. Purple is the gate voltage, also indicated by cursor A which reads 11.6V.
- The ideal diode works below 13.4V in the reverse direction [VIN 10V applied to OUT] but as soon as the voltage rises above this current flows to the input side.
From these c and d you can see that the mosfet gate is kept at VIN and at 10V there is no voltage rise at the input, but at 15V there is 2.7V at the input. If the mosfet is off it where is the current leakage coming from? The IRLML9301 is rated to 30V Vds and 20V Vgs so it should be fine. It blocks 20V in the reverse direction just fine when the gate is pulled high.
I have tried a few resistor combinations with no change and my simulation in iCircuit does not reproduce this behaviour.