Skip to main content
Topic: Uno and Duemilanove violate USB specifications! (Read 5303 times) previous topic - next topic

Uno and Duemilanove violate USB specifications!

It looks to me like the Arduino Uno and Duemilanove are both in violation of the USB specifications. I’ve only just now looked at the schematics for the first time, in reaction to these hardware bug reports. I see no diode protection on the USB power line which would prevent the Arduino from sourcing power on the USB – and that’s a big “no no.” The Low Drop-Out diode was invented just for this purpose! :-) Granted, one can assume that the FET will open the circuit and prevent power from being sourced, but it looks like there are many cases where no protection at all is offered.

In other words, a USB device is never supposed to provide power to a USB host, but that's exactly what's happening in these hardware bug report situations.

It looks to me like the presence of 3.3V or more on the Vin pin will disconnect USBVCC (and XUSB) from +5V.  However, there are obviously problems with this setup as have been discovered - namely that the op-amp is not rail-to-rail, and thus does not actuate the FET gate fully, and also that very high voltages on Vin cause the gate threshold to change.

A simple LDO diode such as the MBRS130LT would make it impossible for power to flow from +5V to VUSB.  The Microchip sample circuits for dual power designs have a couple of these diodes to ensure that voltages do not flow where they are not supposed to.

These sorts of mistakes were common in the first few years of USB products, but I am surprised that Arduino is still shipping something that could violate the USB rules.

Re: Uno and Duemilanove violate USB specifications!

Reply #1
Good to hear that! I was planning to get an Arduino Uno after the production quality gets better but it seems these boards need some hardware change also. But can you tell me if there is the possibility to "hack" these boards to add the LDO diode somewhere?

Re: Uno and Duemilanove violate USB specifications!

Reply #2
[quote author="tayken"]... can you tell me if there is the possibility to "hack" these boards to add the LDO diode somewhere?[/quote]Possibly.  The F1 500 mA fuse could be removed and replaced with an LDO diode.  It's an 1812 SMD, so I don't know how difficult it would be to place an SMB sized MBRS130.  Maybe there's another LDO diode with 1812 pads, but I didn't see any exact matches on Mouser.  I don't have the SMD pad specs handy at the moment, otherwise I'd compare them to see if there is a match, but since the MBRS130 pins fold under, you should be able to extend them as needed.

You'd lose the 500 mA fuse protection, but that may not be an important feature if you're not trying to connect and power significant I/O - just make sure you don't short USB power and ground!  You might even be able to fit both the fuse and LDO diode between those pads, but that could get tricky.

Re: Uno and Duemilanove violate USB specifications!

Reply #3
Hmmm, Arduinos are used by many for experiments and doing some quick flywire sketches. Chances are that at some point
they may ground VUSB ... I wouldn't remove the 500mA fuse so I agree with rsdio that a LDO diode should be inserted to
prevent current being drawn by VUSB from +5V (only applies if a power supply is connected)!

The STM32VLDISCOVERY board is a good example for a versatile and safe power supply/protection design via VUSB and an
offboard +5V source (protection via D1 and D2) - STM32VLDISCOVERY user manual with schematics (page 19)

Re: Uno and Duemilanove violate USB specifications!

Reply #4
I think getting rid of the fuse is a bad idea. I may draw enough current to damage my USB port at some point. I'll look up at the drawings to see if there is an appropriate location.

[quote author="IPenguin"]
The STM32VLDISCOVERY board is a good example for a versatile and safe power supply/protection design via VUSB and an
offboard +5V source (protection via D1 and D2) - STM32VLDISCOVERY user manual with schematics (page 19)
[/quote]
Ohh, can you please stop talking about STM32 Discovery board? You are making me really really jealous! :D I looked at Farnell but they somehow don't ship to Japan. Heck, I'll try to find it somewhere.

Re: Uno and Duemilanove violate USB specifications!

Reply #5
[quote author="IPenguin"]The STM32VLDISCOVERY board is a good example for a versatile and safe power supply/protection design via VUSB and an
offboard +5V source (protection via D1 and D2) - STM32VLDISCOVERY user manual with schematics (page 19)[/quote]Ha!  They connect GND and SHELL on the USB jack, which is another common mistake.  The shell or shield could be extended to protect the signals, but it should either remain disconnected from ground or only be connected through a filter circuit.  Typically, a parallel resistor and capacitor will work, with a very high resistance.  The filter prevent radio noise from the cable from interfering with the USB device, and also prevents device noise from being broadcast over the shield as an antenna!

Thanks for the link to the schematic.  It's always interesting to see what designs are used by an OEM when they put their chip on an evaluation or experimenter board.

P.S. The MBRS130 seems to have a 0.2 V drop or less, based on the data sheet graphs and assuming no more than 500 mA (since that is the USB maximum).  STM uses the BAT60J, which has double the voltage drop, 0.4 V, under the same conditions.  Another graph shows 0.35 V drop.  In any event, it's good to see different LDO diodes for comparison.

Re: Uno and Duemilanove violate USB specifications!

Reply #6
I wasn't speaking of the USB interface but pointing at how the issue of making the power supply design (external power in parallel with VUSB) safe can be solved by easy and efficient means. ;)

Obviously the STM engineers don't care so much about EMI via the USB cable shield in the STM32VLDISCOVERY design. In this STM32F103RE (same USB MCU as on the Discovery kit) based inertial sensor platform reference design - which is due to the nature of the analog components used rather sensitive to EMI - they put more effort into noise reduction: a 1M resistor in parallel with a 4.7nF cap between USBGND and the connector shell plus an USBUF EMI filter and line terminator device - usually used in upstrem devices - on the data lines.

Re: Uno and Duemilanove violate USB specifications!

Reply #7
[quote author="IPenguin"]... plus an USBUF EMI filter and line terminator device - usually used in upstrem devices - on the data lines.[/quote]Thanks.  I've been using discrete parts to create basically the same filter network on the differential data lines at roughly the same cost, but this ST part might be better due to the Zener protection.

By the way, the data sheet says "upstream port" not "upstream device," so I think that the primary intention is that the USBUF02W6 be used on USB devices like DP makes.  But before designing with this part, it's probably a good idea to check whether the PIC has redundant filtering internally already.  Seems like different USB parts have different termination and filtering needs.