USB power VS External

Hello, first time post! I was lead to believe that putting the recommended voltage into my arduino mega via in Vin pin (external battery power) would shut off the Usb power from my laptop. What I've actually observed is that, whether i put in 7V or 11V into Vin, my USB is still drawing power (I note on my dc power back that the power delivered to Vin changes when I plug and unplug my usb, showing that USB must be supplying some power).

Does anyone know what is happening here? Any takes would be extremely appreciated! I was hoping to have my USB data only! (without cutting cables!)

Is is a genuine Mega, or a clone?

Its marked as Elegoo MEGA2560, bought admitidly from Amazon but from the official store there

It may lack the Vin cutoff circuit. Do you have a schematic for the Elegoo? Are there any circuits or peripheral devices attached, besides the Arduino?

There are, I have 4x I2C devices attached, all the same, just pwm expanders. I shall look for the schematic

How are the I2C devices powered? From the Mega 5V pin?

The 3.3v pin, all sharing that in parrallel.

That could be a problem, since the Mega uses 3.3V as a reference voltage for the Vin cutoff circuit. Check 3.3V with a DMM.

My multimeter is giving me 3.38V on the 3.3V pin. Is this is the issue? What am I looking for?

That's good. It's not the issue.

What is the voltage of Mega's 5V pin when the power is connected to Vin without connecting USB?
Also, what is the USB VBUS voltage from a PC that is not connected to Mega?
The Arduino relies only on the FET body diode for the 5V to VBUS cutoff, so if the PC's VBUS voltage is higher than regulator output 5V, it is a forward bias.
I thought very very small current may be flowed even if it doesn't reach the bandgap voltage.
By the way, this FET exists to cancel the voltage drop due to the body diode from VBUS to 5V when Vin is not connected, the gate operated by comparator output.

The first question in reply #11 is a good one. I'd like to know that too. I consider the purpose of the body diode debatable. I agree that the circuit is supposed to provide power continuity from USBVCC to +5V, but I think the body diode is basically a harmless appendage here, as there are no normal conditions under which it should conduct fully. I think besides the reason of bypassing the diode, another purpose is to block USB power when Vin power is provided (as the OP suggests). Typically, USBVCC is less than 5V, not more, so it is unlikely that the body diode is conducting measurable current under normal power condition options. However the OP's situation is that Vin is always powered. In the case that there is USBVCC power, it would be isolated by a biased-off FET T1. With no power, also isolated. There should be no current difference since no current should flow through T1.

I agree that the body diode will no longer carry current at forward voltages below the bandgap.

However, this FET gate don't contribute to the cutoff mechanism.
When it is off, it's just acting as a diode.
It can be said that the cutoff depends entirely on the body diode.

See past topics below for more information.

The body diode never conducts. That is why I called it a red herring. The FET has a dual purpose:

  1. To block current from the 5V common of a device powered from the Vin jack, from flowing back into the PC USB port.
  2. To pass current from PC USB to the board +5V when there is no power at the Vin jack.

It is the first purpose that the OP is having trouble with.

The way it works is, if Vin exceeds 2x3.3 = 6.6V, IC7B output is 5V, FET T1 is biased off, and a high impedance exists between USBVCC on the drain, and the +5V on the source. Otherwise, T1 is fully on since IC7B drives the gate to zero volts, and USBVCC to +5V is a very low impedance.

The body diode never conducts or needs to conduct for the circuit to operate correctly. You could remove it if it were possible, but of course it isn't.

I just want to say that this is done only by the body diode bandgap of the FET (about the current flows from VBUS to 5V).
For example, if VBUS is 5.2V (this is within the USB specification) and the 5V regulator output is dropping to 4.5V for some reason, then current flows from VBUS to 5V.
Even if this FET is completely off.

Please see this simulator links.


First of all, go measure some actual USB voltages. You will find that they are usually below 5V. Secondly, you didn't give any reason why the regulator output would ever reach 4.5V. That would be a failed regulator. Again, yes there is a body diode and it would conduct under the circumstances you've described. However, such circumstances must be extremely rare. Certainly not normal operation.

Also, again, you could remove the diode and under normal operating conditions, there would be absolutely no difference. So it doesn't "do" anything. To the point, it has no bearing on the OP's problem.

Your simulator link does not correspond to the R3 schematic I have (It's undated but it's an official Arduino drawing).

Have you never seen a board used in "unusual" conditions by beginners at this forum?
Also The OP's Mega is a clone board and is less reliable than the official board.

Might not be related to your problem, but that doesn't sound right.
The Mega is a 5volt logic board, and expanders should normally be powered from 5volt.

Note that total current draw from the 3.3volt and 5volt pin (and any other pin) decreases with increased voltage on V-in. With 11volt on V-in, that would be less than 150mA above what the Mega itself draws. Anything more, and the Mega's 5volt regulator will over heat and shut down, and the USB supply will take over.

Time to post a circuit diagram.
Nice confusing Fritzing toddler-art please.

Yes, that's true. Literally though, the maximum total current draw decreases, not the total current draw. I know that's what you meant.