Trying to understand Uno power selection circuit

Hi there:

I half understand the Arduino Uno power select circuit that uses as p-FET to disconnect the USBVCC when an external Vin is supplied, but one bit baffles me. If no external supply is connected then at startup what state is the p-FET in? If the p-FET is ON (Vgs -ve) then USBVCC powers the LMV358 op-amp which compares 3v3 to 0V and drags the p-FET gate voltage down and it all works (although the initial p-FET source voltage is floating). But if the p-FET is OFF then the LMV358 has no power, so the p-FET gate voltage is indeterminate, so what happens to the p-FET? It all seems a bit chicken and egg to me.

Could some kind person please explain what I am missing, as I would like to reuse this circuit?



The parasitic diode in the pfet allows Vbus - 0.7V through regardless. When the fet is turned on that voltage drop is reduced.

When it is off, then the power is unable to flow backwards into the USB, and the diode is reverse biased so is not conducting.


In more detail:

Power can move forward from the USBVCC to the 5V rail through the p-FET because of the Drain-Source Diode. That diode has a drop of 0.7 to 1.2V. If USBVCC is +5V then 3.8 to 4.3V will get through to the 5V rail which powers the 3.3V regulator. If Vin/2 is less than the output of the 3.3V regulator the comparator output goes LOW. This pulls the Gate more then 1.5V below the Source (5V rail) and the p-FET turns on, shorting out the Drain-Source Diode and giving the full USBVCC 5V to the Arduino. If Vin/2 is greater than the output of the 3.3V regulator the comparator output goes HIGH. This brings the Gate voltage close to the Source voltage (5V rail) so the p-FET stays open. Power can't go from the 5V rail to the USBVCC line because the Drain-Source diode points the other way.

If you used just a plain safety diode the 5V rail would only get USBVCC minus the diode drop.

Thanks for the great explanations ... nifty MOSFET :)

Thank You John Although the circuit is easily understandable for me that was the best explanation I have seen yet for a simple but subtle circuit... IMO