how the Arduino Uno power automatically slected between USB and external power?

First my english is no so well,but i'll try my best to make you understand my problem. :blush: Dear all, I was learning the arduino uno rev3 schemtic, and i read about the overview about Uno 3 from the mainpage ,it says that "The Arduino Uno can be powered via the USB connection or with an external power supply. The power source is selected automatically." and now i was confused by a question. Think about this ,if thers is no external power supply to the board, and when Uno connected to USB,now the board should be powered by USB, and USBVCC is connected to a PMOSFET FDN340P which is a delpletion mode and should be supplied a negative volt to its G pin to get on,but from the schemtic we can see the gate pin was connected to an OMP LMV358 and when there is no external power supply the OMP's output should be 0? But if the pmosfet is not on how can USBVCC pass through it to supply a 5V to rest part of the board.

fdn340p is a p-Channel mosfet. 0v at the gate will turn it on

The Arduino Uno R3 is powered from the USB port as the 'default' power supply. when a DC power supply of more than 6 or 7 volts is applied to the DC input connector a comparator composed of 1/2 of the LM358 switches off and the USB power is disconnected via the Mosfet labelled T1 and thus is the board switched from the USB power to DC input power.


Thank you for the quick help .And LarryD FDN340P is exactly what confused me. In the schematic FDN340P's symbol is a enhancement-mode other than a depletion-mode MOSFET . If FDN340P is a enh mode p type MOSFET ,then it should be supplied a negative volt in its gate to get it on, this is what i learn from class,is that wrong? And i learn from the datasheet of the FND340P the VGS(th) Gate Threshold Voltage when VDS = VGS, ID = –250 mA,the min should be –0.4 volt.Maybe i should do some real test.

Here goes.
When there is a Vin voltage to the Arduino the O/P from the regulator is 5V.
The 5 volts is connected to the source of the FET.
If USB is connected to the Arduino at the same time, the PC places 5V on the Drain of the FET.
Hence there is no current flow through the FET (5-5=0 results in no current). The Vin & regulator is therefore supplying the power to the Arduino circuitry .
Now, let’s unplug the Vin supply and plug in the USB.
Since there is 5V on the drain from USB, current flows through the clamping diode in the FET and powers the 3.3 voltage regulator.
By this time the comparator is powered and has 3.3V at the inverting I/P. This voltage is greater than the non-inverting I/P (it has 0V since we don’t have anything plugged in the Vin jack). The O/P therefore goes to 0V.
With 5V at the Drain (-4.3 measured from the source to gate “this is momentarily only”) and 0V on the gate, the FET turns on and supplies the Arduino circuitry with power.
Good question.


Note: If you then plug Vin back in the jack, the regulator will supply the current and the FET will again have no current flow (5-5=0V).