Electrical – OTG detection with only signal wires

usb

USB On-The-Go (OTG) has an "attach detection protocol" (ADP) which allows the host device to know if a peripheral is connected.

ADP periodically measures the capacitance on the USB port to determine whether there is another device attached, but the implementation gets cloudy.

There's a short description of ADP on the Wikipedia Page and here is the official documentation. I've read both but maybe I'm not getting something.

In my application, a DPDT relay will be used to switch the VCC and GND of a USB cable between a charger and an OTG cable. However, the signal wires will remain connected to the OTG side all the time. Will this trigger the Attach Detection Protocol and cause the host to supply power at the wrong time?

EDIT:
I found this on the official documentation page 22 and it seems to be answering my question.

ADP operates by detecting the change in VBUS capacitance that occurs when two devices are attached
or detached. The capacitance is detected by first discharging the VBUS line, and then measuring the
time it takes VBUS to charge to a known voltage with a known current source. A change in capacitance
is detected by looking for a change in the charge time.

Since only the VBUS (5V) is used, is it safe to say that ADP won't be triggered by the signal wires by themselves?

Best Answer

Make sure that you have at least 1µF capacitance over Vbus and GND when going for USB-IF compliance. Also make it less than 10uF to pass the current surge test.
This is required for ADP detection as described in the USB 2.0 OTG & Embedded Host specification.