# USB plug in detection for charging port

Is there a way to detect if there is a USB cable physically inserted into a USB receptacle, even if it is just a cable (with nothing attached to it).

I am designing a USB charging port (short D+ and D- together styles) and would like to be able to disable the buck converter if there is nothing plugged into the USB receptacle (which will be >99% of the time).

I can't rely on the devices that will be drawing power from the receptacle to have any specific protocol in terms of negotiating charging current etc (i.e. can't use serially transmitted data from device X as a detection mechanism).

I think what I'm asking for is if there are USB-A receptacles with mechanical plug-in detection (along the lines of what is available for SIM cards and SD cards), or if there is a way of "sensing" a plug-in event transient (less inclined to go this route as it sounds pricey).

What say you?

_

_

EDIT: Found a receptacle with a "contact sense pin" feature that was referenced in another post:

Special USB Port With "Sensor" Contact

• "I can't rely on the devices that will be drawing power from the receptacle" - Well, why not? Provide 5V via a low power linear regulator, and switch to the buck converter if and when a dip in voltage is detected. Jun 20 '17 at 8:37
• I'd like to keep component count and circuit complexity at an absolute minimum for this design (space and $constraints). That's a good solution though! Jun 20 '17 at 15:24 ## 1 Answer Yes, special USB receptacles have been defined within Power Delivery specifications. In version 2.0 an extra special contact was defined, for both USB 2.0 and USB 3.0/3.1 Type-A connectors. They were called "PD Standard A Connector", and there some protocol is defined as well. In Power Delivery Rev 3.0 all Type-A and Type-B connectors are "depreciated", and the focus now is on Type-C connector. Going forward, it might be challenging to find the original "PD Standard A Connector" with extra insertion detect contact. Wurth Electronics makes one for USB3, and Assmann, both are still available at Digi-Key. • Hmm,$5.40 for a USB type-C receptacle with insertion detection pin... no thanks!!! I'll stick with the $1.22 Type A connector with insertion detection pin for now! Thanks for the info Jun 20 '17 at 15:33 • @macdonaldtomw, keep in mind that charging ports nowadays should deliver up to 3 A or even 5 A of current, while ~$1 connectors usually barely rated for 1.5 A. And the Assmann connector is just \$1.92 at Digikey in qty.10 Jun 20 '17 at 15:38
• Hey @Ali Chen, Isn't the higher-current (i.e. above 500 mA) requirement only applicable for devices that request a higher current using serial charge current negotiation protocols? In other words, if I just short the D+ and D- pins of the USB receptacle, then no USB-compliant device will ever attempt to draw more than 500 mA from the receptacle? Jun 20 '17 at 16:17
• @macdonaldtomw, no, quite opposite: if you provide the DCP signature (D+ and D- shorted with less than 200 Ohms), modern device designed to Battery Charging specifications v1.2 can draw 5 A right away, see Table 5-2 of composter.com.ua/documents/BC1.2_FINAL.pdf Jun 20 '17 at 17:53
• thanks for the heads up @Ali Chen ! Looks like I probably want the port to be a "Standard Downstream Port" instead... as in grounding D+ and D- via two 15k resistors in order to limit the charging current consumed to 100mA Jun 20 '17 at 20:54