How to work the external power supply management ?


I would like to know, how work the operational amplifier connected (LM358D) to the P-Channel MOSFET transistor (FDN304V)

This part of Arduino board is used to connect the regulator (5V) to USB VCC, when external power supply is connected on the Arduino board.


The LM358D is a voltage comparator :
CMP : on pin 3 of LM358D (+ input)
+3V3 : on pin 2 of LM358D (- input)
GATE_CMD : pin 1 of LM358D (output)

With CMP = (VIN / 2)
CMP > +3V3 : GATE_CMD = +5V
CMP < +3V3 : GATE_CMD = 0V


The P-Channel MOSFET transistor (FDN304V) needs a negative Gate Threshold Voltage.


But the LM538D output connected on the Gate of this transistor (GATE_CMD) is between 0V to +5V but a never negative value !

I don’t know how it is work…



but a never negative value !

It is relative to the source of the FET.

Hi Grumpy Mike,

Ok, I understood ! When the GATE_CMD is on 0V then the Ugs is -5V. the FET threshold is reach.

Thanks very much.


I understood the step where there is not external supply, and therefore VG = 0V and VD = 5V from USB. However, at the first instant, also VS should be 0V due to the inexistence of external supply and the MOSFET will not work, with VGS = 0V. How it works then?

Regards, Antonio