25
\$\begingroup\$

A self-powered USB peripheral provides its own power, so is it okay to connect just D+, D- and GND to the host port, or do you always have to connect +5V as well, then wait for the negotiation phase for the device to tell the host that it is self-powered and therefore doesn't want any power, thank you very much?

The specific peripheral I'm looking at is based on an FTDI FT4232H USB-to-serial adapter, but I'm really hoping for a generic answer to the question.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ FTDI has a lot of app notes and info on this in their datasheets. Did you take a look there? \$\endgroup\$ Jan 19, 2013 at 0:02
  • \$\begingroup\$ FTDI datasheet ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT4232H.pdf shows VBUS connected to RESET# through a resistor bridge, so that (presumably) unplugging the USB cable causes the device to reset (if it were bus-powered then, obviously, unplugging the USB cable would completely de-power the device!). But the question is, does the load on VBUS mean something to the USB host, and does the lack of load by leaving VBUS n/c break something in the USB handshaking? \$\endgroup\$
    – kbro
    Jan 20, 2013 at 6:17
  • \$\begingroup\$ USB has usually no idea of whether there's anything connected. Unless your pulling more than 100mA, it can't tell whether something is connected. \$\endgroup\$ Jan 21, 2013 at 0:17
  • \$\begingroup\$ @GustavoLitovsky, actually, USB hosts have no means at all to discriminate between no current or 100 mA current drawn from its port. The only means defined in USB specifications is when overcurrent occurs, which is way above 500 or 900 mA. However, everything can be designed using extra circuitry and extra GPIO pins. \$\endgroup\$ Jan 31, 2019 at 17:48

4 Answers 4

17
\$\begingroup\$

The generic answer to this question is yes, the VBUS (+5V from cable) must be connected to the device even if it is self-powered. The reason is as follows:

To start the connect process on host side, the device must pull up D+ (in case of FS/HS mode), or D- (in case of LS device).

However, USB specifications have a mandatory requirement that no USB device should source any current on any interface pin unless it is connected to a cable, see section 7.1.5.1, which reads,

The voltage source on the pull-up resistor must be derived from or controlled by the power supplied on the USB cable such that when VBUS is removed, the pull-up resistor does not supply current on the data line to which it is attached.

If a USB device doesn't have this control, one of data lines will be a source of current. Premature assertion of pull-ups were a source of problems for some legacy USB hosts. That's why this rule was instituted, and there is a special test for this in USB-IF certification program.

Therefore, the USB VBUS is an important "side-band" signal in USB connect protocol. As such, normal USB device ICs do have a separate input pin to sense the presence of USB host. Some IC manufacturers (e.g. FT232H, MCP2221, etc.) skip on this requirement, assuming that their chip will be solely used in bus-powered configuration, where the pull-up control requirement is automatically satisfied. However, when designing these chips into self-powered designs, some extra circuit efforts are needed to link the enabling of pull-ups with presence of VBUS on the USB port.

Regarding the USB connect "handshake" protocol, USB doesn't rely on current drawn from VBUS. The protocol is this: Host port must have VBUS active; VBUS is connected to device; device sees the VBUS and pulls-up 1.5k on one of D+/D- wires; host sees this connect, and after a 100ms delay asserts USB_RESET signaling (SE0 etc.).

\$\endgroup\$
19
\$\begingroup\$

With a self powered device don't connect it's 5V to the host's 5V, you may blow the either power supply. GND and D+, D- will do fine.

Mind you that levels for D+ and D- are rated for +3.6V max, not to 5V as you might expect!

\$\endgroup\$
3
  • 5
    \$\begingroup\$ It is however worth monitoring VBUS to detect disconnect / connect conditions, as part of the initial negotiation of USB involves pull-ups on D+ and D-. We once ran into issues where a hub couldn't properly enumerate devices depending on the order in which the self-powered hub and self-powered devices were turned on, unless you observe VBUS. The solution was to use a potential divider on VBUS to handle it. \$\endgroup\$
    – Jxj
    Jan 19, 2013 at 0:21
  • 1
    \$\begingroup\$ For the same reason, the pullup resistor -- which both notifies a host that a device has been plugged in, and identifies its initial speed -- should be referenced to VBUS, not the device's local supply. \$\endgroup\$
    – Dave Tweed
    Jan 19, 2013 at 1:27
  • 1
    \$\begingroup\$ Hmmm - the "Self-Powered Devices" callout box on usbmadesimple.co.uk/ums_2.htm says much the same - don't pull D+ or D- above VBUS. More interestingly, don't drive D+ or D- when VBUS is off. The FT4232H datasheet ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT4232H.pdf shows VBUS connecting to RESET# which would tie in with the "don't drive when VBUS is off", but there doesn't appear to be any guarantee that D+/D- are always below VBUS at reset. I thought the whole point about reset is that D+ is either above or below D-, not that is was close to VBUS. \$\endgroup\$
    – kbro
    Jan 20, 2013 at 6:37
0
\$\begingroup\$

As @GustavoLitovsky observed, there is no requirement for a host to monitor VBUS current except for an over current condition. Consequently a self powered device downstream need only connect it's local +5V to its VBUS in one of two ways: directly, and cut the VBUS line in the cable; alternately, wire OR local 5V + host VBUS, preferably with ideal diodes like the LTC4357* that regulate an NFET like the FDB3632 that regulate a 25mV drop.

*https://www.analog.com/media/en/technical-documentation/data-sheets/4357fd.pdf

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Welcome to EE.SE. Note this question is seven years old and already has an accepted answer. \$\endgroup\$
    – David
    May 23, 2020 at 22:22
  • \$\begingroup\$ This is not a meaningful answer to the question asked; what it hints at is actually quite mistaken \$\endgroup\$ Jan 19, 2021 at 2:46
0
\$\begingroup\$

The original question was about FTDI devices.

Ale..chenski mentioned the need in the standard "or controlled by the power supplied on the USB cable"

The FTDI documentation talks about using the VBUS 5v from the cable to set the value of the FTDI RST# pin using a voltage divider between VBUS and GND. Therefore when the cable is connected RST#=2.5v which is logic 1. But wen the cable is disconnected then RST#=0 and the device resets driving the various USB lines into a high impedance state.

So yes the USB 5v should be used with FTDI devices.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.