EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: Bambur on April 07, 2011, 11:43:48 am

Title: How to terminate D+/D- of USB 2.0?
Post by: Bambur on April 07, 2011, 11:43:48 am
I am designing a PCB with PIC18F2553 and looking for a proper way to terminate USB D+/D- lines. Could someone suggest a solution for this problem? Thanks!
Title: Re: How to terminate D+/D- of USB 2.0?
Post by: neoone on April 07, 2011, 11:50:39 am
It will probably work without any termination like here (http://www.sparkfun.com/datasheets/DevTools/PIC/PIC18F2553%20UBW%20Quickstart%20Guide.pdf).
Title: Re: How to terminate D+/D- of USB 2.0?
Post by: metalphreak on April 07, 2011, 02:21:11 pm
I've used a direct connection on both the PIC18F2550 and 18F4550 without any issues (~100 boards in use).

I don't think microchip specifies anything in their documents either. I think everything is handled internally in the chip. I have seen on other (non PIC) products where they use an inline resistor for protection though.
Title: Re: How to terminate D+/D- of USB 2.0?
Post by: DavidDLC on April 07, 2011, 04:44:39 pm
Just try to have the traces as short as possible and with ground planes around them, also try not to cross any other fast changing signal traces on the other side of the board (if you have two layer board).
Title: Re: How to terminate D+/D- of USB 2.0?
Post by: Bambur on April 08, 2011, 11:08:12 am
Thanks for the replies to everyone!

Indeed, I have noticed that cheap PIC development boards do not have any terminating resistors on the D+/D- lines, but I can see those on professional boards, however. Hence, I am not so convinced that those are not needed really. I will try to research this subject further and post an update when I find something. More opinions are welcome of course.
Title: Re: How to terminate D+/D- of USB 2.0?
Post by: johnmx on April 09, 2011, 12:05:40 am
You can use ESD protection diodes. I use the PRTR5V0U2X:

http://www.nxp.com/documents/data_sheet/PRTR5V0U2X.pdf (http://www.nxp.com/documents/data_sheet/PRTR5V0U2X.pdf)
Title: Re: How to terminate D+/D- of USB 2.0?
Post by: scrat on April 11, 2011, 01:49:13 pm
Devices like PIC18f2550 are already terminated on the chip for full speed (see p.378 of the datasheet).
The datasheet for the PIC18F2553 is quite short, and doesn't report series impedance on the USB lines (I don't know why it is completely different from most others).
Title: Re: How to terminate D+/D- of USB 2.0?
Post by: Bambur on April 14, 2011, 01:12:42 pm
Devices like PIC18f2550 are already terminated on the chip for full speed (see p.378 of the datasheet).
The datasheet for the PIC18F2553 is quite short, and doesn't report series impedance on the USB lines (I don't know why it is completely different from most others).

Thanks! Indeed, the datasheet for PIC18F2455/2550/4455/4550 lists the driver output impedance.

TABLE 28-4: USB MODULE SPECIFICATIONS
D320 ZOUT Driver Output Impedance 28 — 44 ?

Why is there such a large range of impedance? Is it supply voltage Vdd dependent?

It seems to me it is a good idea to add a series resistor to D+ and D- lines to (over)match each line to 45 ? as USB specifies.
Title: Re: How to terminate D+/D- of USB 2.0?
Post by: scrat on April 14, 2011, 01:53:33 pm
That's what I was saying: there is no relative data for the device you were considering (PIC18F2553).
I guess the 28-44 range is compliant with the USB specs, otherwise they should have recommended a series resistance. FWIK, parameters spreading and its variability with Vdd/temperature is quite common in integrated devices (I expect it being especially high for low resistance values), usually the thing that remains accurate is the matching ratio between the single transistors inside the same IC, which is the way they ensure precise gains.
Title: Re: How to terminate D+/D- of USB 2.0?
Post by: Clear as mud on March 22, 2014, 01:53:20 pm
Thank you for this topic.  I was running around like a Chicken Little, thinking the sky was falling because I hadn't provided termination resistors on my PIC18F24K50 development board, but it's right there in the datasheet (http://ww1.microchip.com/downloads/en/DeviceDoc/30684A.pdf), on page 475.  It says
Quote
Note 1: The D+ and D- signal lines have been built-in impedance matching resistors. No external resistors,
capacitors or magnetic components are necessary on the D+/D- signal paths between the PIC18(L)F2X/45K50
family device and USB cable.
So, I suppose this means I should take out the filter beads that I already put on the USB data lines?
Also, what about ESD protection diodes?  Still recommended, I suppose.

I think the 28-44 ohm range you were wondering about comes from the USB specification itself.  See Fairchild Application Note 5052 (https://www.fairchildsemi.com/an/AN/AN-5052.pdf), where it says
Quote
The resistor value can be anything needed in order to ensure the total impedance seen by the transmission line stays within the 28? to 44? range
Title: Re: How to terminate D+/D- of USB 2.0?
Post by: Clear as mud on March 22, 2014, 04:28:08 pm
Oh, duh.  The filter beads are on the power and ground, not the data lines.  So, that answers that question.  I actually misrepresented this design, in that it was my girlfriend's design, not mine.  So that's why I didn't realize what the filter beads were connected to.

So, this seems to be the correct way to implement the USB hardware: data lines straight from USB connector to PIC microcontroller, with no passive components at all in between because it is already in the USB module in the PIC.  Filter beads on power and ground,  Possibly a capacitor on the connector shell to ground, or possibly a resistor or a solid connection, based on whatever reduces EMI the most.  And some ESD protection diodes on the data lines.  That's what I'm going to do.
Title: Re: How to terminate D+/D- of USB 2.0?
Post by: T3sl4co1l on March 22, 2014, 08:54:30 pm
Although you could use a common mode choke if you still want some filtering.  Make sure to use a high bandwidth "data" type, otherwise you'll probably lose as much [differential] signal as noise!

Tim