Author Topic: USB ESD diodes cause false VBUS detection  (Read 3063 times)

0 Members and 1 Guest are viewing this topic.

Offline sebmadgwickTopic starter

  • Regular Contributor
  • *
  • Posts: 129
  • Country: gb
    • YouTube Channel
USB ESD diodes cause false VBUS detection
« on: February 18, 2018, 11:11:32 pm »
I am using the USBLC6-2P6 for ESD protection on a USB device.  See attached schematic.

The diode arrangement in the USBLC6-2P6 combined with the D+/D- pull-ups internal to the USB interface (PIC32MX) cause VBUS to be held high even when VBUS power is removed.  My solution is to at a 1k resistor between VBUS and ground.  This fixes the problem but I am not satisfied for two reasons:

1) The USBLC6-2P6 is specifically designed for this circuit yet it introduces the VBUS problem.  Am I doing something wrong?

2) The 1k resistance is a value I chose through trail and error.  I would be happier if this value was based on a calculation.  For example, the pull-up values on D+/D- combined with the VBUS detect threshold.
 

Offline KL27x

  • Super Contributor
  • ***
  • Posts: 4102
  • Country: us
Re: USB ESD diodes cause false VBUS detection
« Reply #1 on: February 18, 2018, 11:21:40 pm »
Sounds like you are powering the device through a different PSU (or a battery) when it is unplugged from USB? And that you are wishing to poll VBUS to detect when the device is plugged in, or something? But it is held up to digital high because you have no rectifier in there?

Can you add a rectifier diode between VBUS and Vsupply for your device? And use a 1Meg or 100K pulldown on it instead of 1K?
 

Offline cstratton

  • Regular Contributor
  • *
  • Posts: 62
  • Country: us
Re: USB ESD diodes cause false VBUS detection
« Reply #2 on: February 18, 2018, 11:29:41 pm »
It looks like you have an always-on USB speed identification pullup which is pulling up a floating VBus through the protection diode.  Your load resistor solution will end up burning around a milliamp - which could be an issue for something battery powered.  Additionally it is possible with the value of your load resistor you'll end up with an intermediate voltage in the best-avoided zone where both upper and lower input FETs are partially on.

It seems like there are two ways this could be supposed to work:

1) Don't activate the pullup resistor until VBus is detected.   Though loss of VBus could still be tricky.

2) Detect that VBus is something approaching 5v, and not a diode drop below the 3.3v rail

See if you can find an app note or example for your particular processor in a self-powered configuration.
 

Offline cstratton

  • Regular Contributor
  • *
  • Posts: 62
  • Country: us
Re: USB ESD diodes cause false VBUS detection
« Reply #3 on: February 18, 2018, 11:31:18 pm »
Can you add a rectifier diode between VBUS and Vsupply for your device? And use a 1Meg or 100K pulldown on it instead of 1K?

That won't work.  The diode would be reverse biased and do nothing in the absence of VBus, but likely lead to overvoltage in its presence.  The large value pulldowns would not appreciably reduce the voltage when working against the small value pullup and protection diode.  With the asker's 1K load pulldown, the false VBus is probably on the order of a volt, which is already problematically high.
« Last Edit: February 18, 2018, 11:33:03 pm by cstratton »
 
The following users thanked this post: KL27x

Offline sebmadgwickTopic starter

  • Regular Contributor
  • *
  • Posts: 129
  • Country: gb
    • YouTube Channel
Re: USB ESD diodes cause false VBUS detection
« Reply #4 on: February 18, 2018, 11:42:31 pm »
If the 1k is removed then I measure VBUS to be 2.5V when VBUS is not powered.  This is as expected given a typical diode forward voltage and pull-up to 3.3V.
 

Offline ransonjd

  • Contributor
  • Posts: 40
  • Country: us
Re: USB ESD diodes cause false VBUS detection
« Reply #5 on: February 19, 2018, 03:56:44 am »
You could consider using something like a TPD2E009 for data and a separate TVS for vbus. There are cheaper parts to consider, but that's one I have on a recent schematic.
 

Offline ransonjd

  • Contributor
  • Posts: 40
  • Country: us
Re: USB ESD diodes cause false VBUS detection
« Reply #6 on: February 19, 2018, 04:03:59 am »
I will also point out that the USB pull-ups are supposed to be referenced to VBUS, and other behavior violates the USB spec. See http://www.usb.org/developers/compliance/check_list/peripheral_checklist.pdf , item D2. It sounds like your IC is either misconfigured or non-compliant.
 

Offline sebmadgwickTopic starter

  • Regular Contributor
  • *
  • Posts: 129
  • Country: gb
    • YouTube Channel
Re: USB ESD diodes cause false VBUS detection
« Reply #7 on: February 19, 2018, 12:47:19 pm »
I will also point out that the USB pull-ups are supposed to be referenced to VBUS, and other behavior violates the USB spec. See http://www.usb.org/developers/compliance/check_list/peripheral_checklist.pdf , item D2. It sounds like your IC is either misconfigured or non-compliant.
I believe you are incorrect.  The D+/D- pull-ups must to a "voltage source between 3.0 and 3.6V".  Item D2 ("Is the device’s pullup active only when VBUS is high?") is satisfied as VBUS is pulled-down by the 1k and the D+/D- pull-ups subsequently disabled when VBUS power is removed.  The problematic behavior of the D+/D- pull-ups keeping VBUS high is only introduced when the USBLC6-2P6 is added to the circuit without the 1k pull-down.

It is supposed to detect VBUS presence at 4.4V, but most USB chips just use a 5V tolerant LVCMOS to implement VBUS detection. You need a resistive divider to suppress this behavior.
The PIC32MX features "integrated analog comparators for VBUS monitoring".  I do not believe 4.4V is the relevant threshold for switching off pull-ups, read on.

I created this post hoping that someone would comment on the apparent design flaw of the USBLC6-2P6.  The diode configuration is not unique to this part, it is fairly common, just Google image search "USB ESD protection".

So the question is: what is the VBUS threshold below which the device should switch off the D+/D- pull-ups?  If the threshold is not greater than ~2.5V then the diode configuration design is flawed.  Item D3 ("Is the VBUS switching threshold for the device’s pullup control between 1.0V and 4.0V?") suggests this may be the case.  I have been searching the USB specification but have not yet been able to find a definitive answer.  I am also not able to confirm the thresholds implemented by the PIC32MX's "integrated analog comparators for VBUS monitoring".
« Last Edit: February 19, 2018, 01:04:15 pm by sebmadgwick »
 

Offline ransonjd

  • Contributor
  • Posts: 40
  • Country: us
Re: USB ESD diodes cause false VBUS detection
« Reply #8 on: February 19, 2018, 02:37:05 pm »
Quote
I believe you are incorrect.

Sorry, that was badly worded. I meant, as you wrote, that the pull-up is only supposed to be active when VBUS is high.

I don't think you're doing anything wrong.  You just got unlucky and chose two parts that are incompatible in a way that's not evident from the datasheet.

If I were to apportion blame for this problem, I would say the PIC32MX is the worse offender. While the USB device checklist requires a threshold between 1V and 4V, that appears to be for ease of real-life implementation. The USB spec defines valid Vbus high as 4.01V.  In the end, the PIC32MX is holding the pull-up on when VBUS isn't at a valid high, even if it is the addition of the diode that makes this behavior problematic.

At the end of the day, I would just swap out diodes or add a resistor divider to the vbus pin on the PIC32MX to effectively increase its switching threshold. (Assuming you're not using OTG.)
 

Offline sebmadgwickTopic starter

  • Regular Contributor
  • *
  • Posts: 129
  • Country: gb
    • YouTube Channel
Re: USB ESD diodes cause false VBUS detection
« Reply #9 on: February 19, 2018, 11:19:03 pm »
Thanks for the clarification.

I measured the PIC32MX VBUS detection threshold as 1.65V.  The USB specification defines the pull-ups as 1.5k.  This combined with the 1k pull-down and observed diode Vf of 0.8V results in a VBUS of 1V.  The minimum (worst-case) value Vf is not specified but even a value of Vf = 0V would only increase VBUS to 1.32V.

I believe the 1k is pull-down is 'safe' but I will abandon the USBLC6-2P6 for the next hardware revision and use ESD protection that does not introduce this problem.

I came across the Wurth 824014 (image attached) which has an extra diode, presumable to address this problem.
 

Offline bson

  • Supporter
  • ****
  • Posts: 2270
  • Country: us
Re: USB ESD diodes cause false VBUS detection
« Reply #10 on: February 20, 2018, 09:08:56 am »
It doesn't have to be that complicated...


 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf