Power supply - question about MOSFET T1

Hello,

I'm building device controlled and powered from USB, however I have to add possibility to power it from external source without disconnecting from USB. So I checked how it is made in Arduino and I'm little confused. I analyzed Arduino Uno R3 schematic and I want ask you about the legitimacy of the use of T1 (Mosfet P FDN340P) controlled by LMV358 comparator. Well, let me show you my understanding and analysis from which my doubts came:

  1. We have plugged in only USB. Output of U5A is in a low state so the gate of T1 is polarized with 0V so T1 is opened.. Ok it is opened, but it doesn't matter to USB power line (USBVCC) because it is always "opened" due to the internal diode in T1 structure. If the potential on the source of the T1 is lower than on the drain then current always flows.

  2. We have plugged USB and externall power to X1. Now, output of U5A is in a high state so T1 is closed. Ok, T1 is closed so current from +5V line can't flow through the T1, but we have still voltage from USBVCC given through the internal diode in T1, however the current from usb probably won't flow because there is potential barrier created from 5V + ~0,6V of diode's PN junction. So why we need T1... (?)

Suming up these analisys I have a question - whether there would be enough if you just used a single diode on USBVCC line like D1 diode on PWRIN line? Only to block current from external power source which could flow to USB (?)

Sorry and correct me if I'm wrong, I'm not professional in electronics :wink:

Regards,
Adrian

The problem with using just a diode instead of T1 is that when powering from USB, there would be about 0.7V drop in the diode, so the +5V rail would be somewhat lower than +5V. Even if a Schottky dioes were used, there would be 0.3V to 0.4V voltage drop. The purpose of T1 is to turn on when there is no power provided on Vin, and thereby give a lower voltage drop than a diode would.

wow.. I thought about voltage drop issue but didn't take it seriously.. So how much the voltage drop is in T1 diode? Below 0.3V? I don't have that transistor but I measured Mosfet N IRF530 with multimeter (polarity diode check) and there was 0.55V between drain and source, however I'm not sure if it was really minimum voltage to switch that diode.. However, datasheet of FDN340P informs that "Drain? Source Diode Forward Voltage" is 0.7V.... I'm still confused :stuck_out_tongue:

The purpose of T1 is to turn on when there is no power provided on Vin, and thereby give a lower voltage drop than a diode would.

Right, when there is no power on Vin then T1 is turn on, but the current taken from USBVCC flows by T1 diode, so does it matter if T1 is turn on or off ?? From my tests on mosfet N results that diffrent voltages on gate (Vgs) has no influence on the current flowing from drain to sourceby transistor's diode.. Well, assuming even though this drop voltage on T1 diode is very small, why don't put this transistor to off state giving fixed 5V on gate without comparator and all that stuff? I really can't see the use of T1 when it is turn on... because we don't have then any voltage on source and only from USB...

U5A Pin 1 is the output of a comparator that turns off and pulls the gate low on T1 FDN340P P type mosfet when there is no voltage on the voltage divider formed by RN1A and RN1B (Resistor Network). This turns on T1 the mosfet (FDN340P) supplying the 5V power from the USB port to the LM2985 input and thus supplying the board with 3V3 and 5V power power.
Your confusion stems from 2 things... You didn't look up how an Op-Amp works and that you apparently were not aware that the transistor is a P type mosfet (FDN340P).
When the + input of an op-amp is more positive that the - input of the op-amp (which is connected to 3V3) the output will go low and in this case turn on the p type mosfet (FDN340P). If there is USB power applied Pin 2 is high and pin 3 (the + or non inverting input) is low and pin 3 is high and this forces pin 1 to go high turning off T1 (Mosfet, FDN340P). The body diode conducts to supply the 3V3 (LM2985) with enough voltage to work and supply the 3V3 bus.
U5B is the driver for the D13 led which in earlier versions was connected to D13. U3B is a voltage follower which has a very high input impedance and this allows the op-amp to drive the LED thus unloading the Led from D13 without any loading on the SCK pin.
I've attached both data sheets to this post. Read them.

Doc
Some small clarifications and corrections RKJ

FDN340P.pdf (102 KB)

LM358.pdf (282 KB)

Docedison:
U5A Pin 1 is the output of a comparator that turns off and pulls the gate low on the

When gate is low then transistor is on.
http://www.physics.udel.edu/~watson/scen103/mos5.html

This turns on the mosfet supplying the 5V power from the USB port to the regulators output and thus supplying the board with power.

Docedison:
This turns on the mosfet supplying the 5V power from the USB port to the regulators output and thus supplying the board with power.

sorry, but you are talking about the obvious, I think you missed the point of the case. I'm considering use of some elements if they are really necessary, however I understand how they work. Please read posts more carefully.

cheers

What's import to remember is: when T1 is "ON" there is essentially no voltage across it since the "ON" resistance is so low (~70 milliohms).

Let me re-phase it in simpler terms.

  1. 5V applied to USB.
  2. ~4.3V comes out of T1 through the internal diode.
  3. System is powered OK by 4.3V. There is enough voltage there to power the circuitry that controls T1.
  4. T1 is turned ON by op-amp, bypassing the internal diode
  5. Voltage coming out of T1 rises to ~5V.

Alternatively,

  1. 6+V applied to X1 jack.
  2. Voltage out of regulator is 5V
  3. Op-amp turns OFF transistor T1
  4. Current is prevented from flowing back through T1 to USB by internal diode.

This arrangement is only necessary when you want the 5V rail to be 5V (or as close to as your USB supply gets). If your system is a 3.3V based system, not 5V, then you can have both X1 and USB power going through diodes (diode-OR in logic terms), then into a 3.3V regulator. No need for the P-channel MOSFET. As the Arduino is (usually) a 5V based system it is required so that USB still provides 5V and not 4.3V.

majenko:
Let me re-phase it in simpler terms.

  1. 5V applied to USB.
  2. ~4.3V comes out of T1 through the internal diode.
  3. System is powered OK by 4.3V. There is enough voltage there to power the circuitry that controls T1.
  4. T1 is turned ON by op-amp, bypassing the internal diode
  5. Voltage coming out of T1 rises to ~5V.

Great! Ok, I had some bad understanding of T1 work. I thought that current will ALWAYS flow by the diode in such polarization, that's why confusion appeared. However, I'm little disappointed :wink: because I hoped I could minimalize my circuit, I also need (almost) 5V in my device..

Thanks majenko, Docedison and the others for discussion and patience.

Regards,
Adrian