Arduino Uno trips USB overcurrent protection on host computers

Hola -- I'm new to Arduino, but not to electronics design and microcontrollers (as I do it for a living). I bought an Uno for my kid so he could learn microcontroller basics without too much trouble.

I plugged the Uno into my Mac and was instantly greeted with the complaint about "Device on USB drawing excessive current." It did this regardless of whether it was plugged into a powered hub or into the Mac directly. Oddly, the Mac was able to talk to the Arduino after that, so my guess (without actually looking at USB traffic on my bus analyzer) is that once whatever tripped the current limiter stopped, enumeration continued.

Then I figured I'd use the DC jack with a 9V wall wart. Same thing happened. So that's bizarre.

So I looked at the schematic to see what is going on and it's obvious why it does this: the design doesn't meet the USB specs. It ignores them. The Mac does the right thing when it complains about current draw. Follow along.

Pin 1 of the USB jack is the +5V VBUS. That feeds the polyfuse which limits current drawn from the bus to 500 mA. So right there, we have to ask: Why would the Arduino ever draw more than 500 mA? My presumption is that shields could cause that condition.

After the polyfuse the VBUS net is called USBVCC. That goes to the drain of the MOSFET T1. The source of the MOSFET is the net +5V which is the main power rail in the design. It goes to the two microcontrollers' supply inputs, to an LDO which provides +3.3 V, to the connectors, and importantly, to the output of the 1117 regulator.

The input to that regulator, the net VIN, comes from the DC power jack through a polarity-protection diode. VIN feeds, through a voltage divider, the comparator U5A, which controls the MOSFET gate. If a power supply is plugged into the jack, then the comparator disables the USBVCC from providing the main +5 V rail; that rail comes from the 1117 output. If no supply is plugged in then the MOSFET is turned on and USBVCC is the +5 V rail.

Let's ignore, for the moment, the "wisdom" of allowing the output of the 1117 regulator to be driven above its input. (Read the data sheet https://www.onsemi.com/pub/Collateral/NCP1117-D.PDF as this is marginal, especially in the case where the input is shorted to ground as it is when no plug is connected!)

The 1117 has 47µF input and output decoupling caps. With no input on the DC jack, the USB VBUS sees the 47µF output cap (through the MOSFET). The USB 2.0 Spec section 7.2.4.1 says that the maximum load capacitance must be no more than 10 µF. The reason? To limit device inrush current which would trip the overcurrent protection in the root or downstream hub, which would in turn tell the host computer to throw up the warning.

So why 47µF? The NCP1117 doesn't need it. It's fine with the data sheet's recommendation of 10µF (which would also meet the USB spec!).

I suppose I should also note that the design ignores the differences between Bus Powering and Self Powering from a USB enumeration standpoint. That you can connect a power supply to the device at, well, any time, is worrisome.

My question to the Arduino designers: did you not notice the warnings from the host computers? Did you think they don't matter?

(deleted)

I'm new to Arduino

...and yet you've been a member here since 2016.

Hmmm.

Lots of Arduinos, both real and clone, multiple PCs and laptops (none are Apple, sorry) never had this problem.

I suppose a BAD clone could cause such things.
Macs have always been notorious about absolute minimal power to USB devices.
You may want to check that it is actually capable of the 500mA (usb 2.0) or higher in the case of USB 3.0.

Most Arduino UNO's even maxed out are around the 400 mA so well below the 500 mA threshold.

EDIT.

IIRC a long time ago there was a similar complaint and that did turn out to be a power setting on a MAC.
Also IIRC there were a series of complaints (not in here BTW) about mac's usb current being woefully inadequate.

Both would require detective work on your part as I dont and wont have a mac in the house due to the closed source and pay through the nose approach.

I’m suspecting a dud Arduino - mine take less than 100mA.

Might be worth that you measure the current to see where you are , clones with dud USB take lots of current - had a couple of those as NANO’s .

I’m pretty sure that the arduino dc jack does NOT “short to ground” when nothing is plugged in. Or is not supposed to, anyway.