USB ESD diodes cause false VBUS detection - Page 1
Forum section: electronics / projects

author: sebmadgwick
author_rank: Regular Contributor
timestamp: February 18, 2018, 11:11:32 pm
content: 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.

author: KL27x
author_rank: Super Contributor
timestamp: February 18, 2018, 11:21:40 pm
content: 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?

author: cstratton
author_rank: Regular Contributor
timestamp: February 18, 2018, 11:29:41 pm
content: 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 railSee if you can find an app note or example for your particular processor in a self-powered configuration.

author: cstratton
author_rank: Regular Contributor
timestamp: February 18, 2018, 11:31:18 pm
content: Quote from: KL27x on February 18, 2018, 11:21:40 pmThat 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.

author: sebmadgwick
author_rank: Regular Contributor
timestamp: February 18, 2018, 11:42:31 pm
content: 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.

author: ransonjd
author_rank: Contributor
timestamp: February 19, 2018, 03:56:44 am
content: 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.

author: ransonjd
author_rank: Contributor
timestamp: February 19, 2018, 04:03:59 am
content: I will also point out that the USB pull-ups are supposed to be referenced to VBUS, and other behavior violates the USB spec. Seehttp://www.usb.org/developers/compliance/check_list/peripheral_checklist.pdf, item D2. It sounds like your IC is either misconfigured or non-compliant.

author: sebmadgwick
author_rank: Regular Contributor
timestamp: February 19, 2018, 12:47:19 pm
content: Quote from: ransonjd on February 19, 2018, 04:03:59 amI 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.Quote from: blueskull on February 19, 2018, 04:24:44 amThe 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".

author: ransonjd
author_rank: Contributor
timestamp: February 19, 2018, 02:37:05 pm
content: QuoteSorry, 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.)

author: sebmadgwick
author_rank: Regular Contributor
timestamp: February 19, 2018, 11:19:03 pm
content: Thanks for the clarification.I measured the PIC32MXVBUS 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 aVBUS of 1V. The minimum (worst-case) value Vf is not specified but even a value of Vf = 0V would only increaseVBUS 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.

author: bson
author_rank: Unknown
timestamp: February 20, 2018, 09:08:56 am
content: It doesn't have to be that complicated...