Interactions between power sources?

I understand the three basic DC power options: wall wart with DC barrel plug, 7-12vdc in; VIN pin, same range; USB (+5). Directly powering +5 or +3.3 pins not recommended. At least that's my executive summary of what I've read about Dues and DC.

But what about the case when I have the wall wart connected and I have a USB cable plugged in to the Native port because I'm doing HID emulation? Do I effectively have additional current available because of having two power inputs? or does one (the barrel jack maybe) cut out the other? Or does the Native Port not supply power at all, only the Programming Port?

I'm figuring out the power budget for my enclosure...

I know someone is gonna say "just read the schematic" :slight_smile: and I did look at the schematic, but I'm afraid it just confused me. it shows where all the ins and outs are, but not (to my uninformed eye) whether/how they interact...

See this thread:

http://forum.arduino.cc/index.php?topic=135399.0

Hi Ard_newbie, thanks, interesting thread but I think the OP is doing the reverse of what I am doing.

He seems to be attaching mice and keyboards to the Native USB Port.

I am plugging the Native USB Port into a host. Instead of attaching a keyboard to my Due, I am telling my Due to pretend to be a keyboard. So its Native Port USB cable is connected to a host computer.

What I am wondering is what it does with the 5v provided by the host computer on that Native Port, if there is also an external p/s connected at the barrel jack.

The normal behavior of a USB 2.0 device is to be powered by a USB host up to 100 mA during enumeration stage and 500 mA maximum after negotiation process between host and device. The UOTGHS peripheral is fully compliant with the USB 2.0, therefore this behavior works. However, since the DUE can provide up to 800 mA if powered by a battery pack thru the jack, the DUE as USB device behaves as a self-powered device.

From USB 2.0 spec: It is the responsibility of the USB device to monitor VBUS to insure that a stable interconnect has been made between device and host before enabling a pull-up resistor on a data line. Upon initial connection of host and device, the host looks for either one of its data lines to be pulled high as a signal that a device has been attached to it. A self-powered device would only need the ability to detect VBUS level.

As I can see on the schematic, the DUE as a self-powered USB device is fully compliant with this process. As for the programming port, if there is a battery pack connected to the jack, the DUE is powered from the battery pack.

An issue may come if you would want to use the UOTGHS peripheral with its OTG feature. When 2 dual role get connected together via a cable, the cable sets a default host and a default device. If the application is such that the roles need to be reversed, then the Host Negotiation Protocol (HNP) will provide a handshake that performs the function. But, AFAIK, the 500 mA provider will remain the default host, therefore if the DUE is the default host, it can become a USB device but will continue to provide 500 mA to the default device: in this case, you can't expect the DUE to provide 800 mA to several sensors plus 500 mA to the default device.

However, since the DUE can provide up to 800 mA if powered by a battery pack thru the jack, the DUE as USB device behaves as a self-powered device.

That was what I wanted to know! thanks!