Author Topic: USB D+ and D-  (Read 6588 times)

0 Members and 1 Guest are viewing this topic.

Offline nicksydneyTopic starter

  • Regular Contributor
  • *
  • Posts: 57
  • Country: au
USB D+ and D-
« on: January 06, 2014, 10:04:45 pm »
Hi,

New to electronics and reading on few schematics as interested in designing something with USB. Noticed from this 2 links http://www.instructables.com/id/USB-Wii-Classic-Controller/?ALLSTEPS and http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf that the resistors used to connect the D+ and D- pins are different. My question is how do we go about determining the resistor value to use for those pins ?

Thanks
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: USB D+ and D-
« Reply #1 on: January 06, 2014, 10:11:59 pm »
Eeny, meeny, miny, moe, most likely. Alternatively they are forming a low pass filter with the parasitic capacitance, to round off sharp waveform edges so they don't have to worry about RF emissions - assuming about 15pF, that would be at 1/(2*pi*22*15pF) = 482 MHz - not really very useful unless they're doing USB 2.0, which I doubt. I'll go with eeny meeny.

They probably selected them with the same care with which they drew the schematic. (Sorry. Pet peeve.)
« Last Edit: January 06, 2014, 10:13:51 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline AlfBaz

  • Super Contributor
  • ***
  • Posts: 2184
  • Country: au
Re: USB D+ and D-
« Reply #2 on: January 06, 2014, 10:21:37 pm »
They're trying to match impedances, haphazardly by the looks of it. Section 7.1.1 of the USB 2.0 spec talks about this at length
 

Offline nicksydneyTopic starter

  • Regular Contributor
  • *
  • Posts: 57
  • Country: au
Re: USB D+ and D-
« Reply #3 on: January 06, 2014, 10:24:53 pm »
Hi c4757p,

Eeny, meeny, miny, moe, most likely.

You mean when we want to design with USB it's not standard as per say ? bit lost here :)

Alternatively they are forming a low pass filter with the parasitic capacitance, to round off sharp waveform edges so they don't have to worry about RF emissions - assuming about 15pF

You mean for both schematics ?

Thanks

 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: USB D+ and D-
« Reply #4 on: January 06, 2014, 10:35:28 pm »
I don't think the Arduino one had any thought at all put into the selection. The other one may be correct, actually. USB characteristic impedance is supposed to be 90 ohms differential, and they used 68 ohm resistors. From the datasheet for the ATmega48-328 series, the output impedance is about 30 ohms, so 30 + 68 = not ridiculously far from 90. (They'd have been better off using 56 ohm, I think.)
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Zbig

  • Frequent Contributor
  • **
  • Posts: 927
  • Country: pl
Re: USB D+ and D-
« Reply #5 on: January 06, 2014, 10:38:04 pm »
Since, as you said, you're new to electronics, you really don't want to "design something with USB" first thing.
 

Offline nicksydneyTopic starter

  • Regular Contributor
  • *
  • Posts: 57
  • Country: au
Re: USB D+ and D-
« Reply #6 on: January 06, 2014, 10:40:25 pm »
Since, as you said, you're new to electronics, you really don't want to "design something with USB" first thing.

I'm learning as doing it that's the best way to learn and will learn from my mistakes too :)
 

Offline Zbig

  • Frequent Contributor
  • **
  • Posts: 927
  • Country: pl
Re: USB D+ and D-
« Reply #7 on: January 06, 2014, 10:48:58 pm »
Since, as you said, you're new to electronics, you really don't want to "design something with USB" first thing.

I'm learning as doing it that's the best way to learn and will learn from my mistakes too :)

I probably didn't phrase it right (non-native English speaker here). What I meant is you really shouldn't attempt talking USB at the very beginning of your electronics hobby. You know, learning to walk before you learn to run, etc.
 

Offline romantronixlab

  • Regular Contributor
  • *
  • Posts: 88
  • Country: us
Re: USB D+ and D-
« Reply #8 on: January 06, 2014, 10:50:06 pm »
Since, as you said, you're new to electronics, you really don't want to "design something with USB" first thing.

I'm learning as doing it that's the best way to learn and will learn from my mistakes too :)

Like zbig said it good to first try(start) with simple easy projects to understand better the design aspect of a circuit and the inner workings.
But at the same time I must say I have done the opposite of starting with the simple stuff first but takes more time and resources (parts and money)
Will think about it.
 

Offline nicksydneyTopic starter

  • Regular Contributor
  • *
  • Posts: 57
  • Country: au
Re: USB D+ and D-
« Reply #9 on: January 06, 2014, 10:57:48 pm »
Hi Alfbaz,

Thanks will download and have a read in that section.

They're trying to match impedances, haphazardly by the looks of it. Section 7.1.1 of the USB 2.0 spec talks about this at length
 

Offline nicksydneyTopic starter

  • Regular Contributor
  • *
  • Posts: 57
  • Country: au
Re: USB D+ and D-
« Reply #10 on: January 06, 2014, 10:58:20 pm »
Thanks for the explanation now it make bit more sense to me, will do more reading on the USB spec.

I don't think the Arduino one had any thought at all put into the selection. The other one may be correct, actually. USB characteristic impedance is supposed to be 90 ohms differential, and they used 68 ohm resistors. From the datasheet for the ATmega48-328 series, the output impedance is about 30 ohms, so 30 + 68 = not ridiculously far from 90. (They'd have been better off using 56 ohm, I think.)
 

Offline gxti

  • Frequent Contributor
  • **
  • Posts: 507
  • Country: us
Re: USB D+ and D-
« Reply #11 on: January 07, 2014, 04:49:16 am »
The series resistors, if any, will be specified in the microcontroller's datasheet. STM32 and FTDI both specify 22 ohms, so I think it's quite likely the Arduino designers at least copied people who knew what they were doing, if they didn't know themselves.

If you're bitbanging USB, you're on your own.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: USB D+ and D-
« Reply #12 on: January 07, 2014, 04:52:02 am »
You are correct, gxti. The 32U4 datasheet does indeed specify 22 ohm resistors, so now I have egg on my face.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline nicksydneyTopic starter

  • Regular Contributor
  • *
  • Posts: 57
  • Country: au
Re: USB D+ and D-
« Reply #13 on: January 07, 2014, 05:52:44 am »
The series resistors, if any, will be specified in the microcontroller's datasheet. STM32 and FTDI both specify 22 ohms, so I think it's quite likely the Arduino designers at least copied people who knew what they were doing, if they didn't know themselves.

If you're bitbanging USB, you're on your own.

Is this the standard way from the MCU vendor to specify the resistor or it could be that depending how good the vendors are with their datasheet ?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf