Search:
Submit Search


FYI - USB - DIY - (Facts)

Buying or building computers for Hauptwerk, recommendations, troubleshooting computer hardware issues.

FYI - USB - DIY - (Facts)

Postby engrssc » Wed Feb 15, 2017 5:32 am

USB 101

Everything you ever wanted to know (about USB) and were afraid to ask. 8)

http://pinouts.ru/Slots/USB_pinout.shtml

USB (Universal Serial Bus) designed to connect peripherals such as mice, keyboards, scanners, digital cameras, printers, hard disks, and networking components to PC. It has become the standard connection method for wide variety of devices.

Universal Serial Bus (USB) is a specification to establish communication between devices and a host controller (usually personal computer). Nowdays USB has replaced a variety of earlier PC interfaces (such as RS-232 serial or parallel port). Due to the ability to supply power to the preipheral devices USB is often used as a power charger for portable devices.

An USB system architecture consists of a host controller, a USB ports, and multiple connected devices. Additional USB hubs may be included allowing branching into a tree structure with up to five tier levels. USB can connect computer peripherals such as mice, keyboards, digital cameras, PDA, mobile phones, printers, personal media players, flash drives, GPS, Network Adapters, and external hard drives. For many of those devices, USB has become the standard connection method.

USB interface aimed to remove the need for adding expansion cards into the computer's PCI or PCI-Express bus, and improve plug-and-play capabilities by allowing devices to be hot swapped or added to the system without rebooting the computer.


The USB Pinout:
Pin Name Cable color Description
1 VCC Red +5 VDC
2 D- White Data -
3 D+ Green Data +
4 GND Black Ground
USB connectors

There are several types of USB connectors. The connector mounted on the host or device is called the receptacle, and the connector attached to the cable is called the plug. The original USB specification detailed Standard-A and Standard-B plugs and receptacles. Nowdays there are 7 USB connectors known: Standard-A, Standard-B, Mini-A, Mini-B , Micro-A, Micro-AB, Micro-B. Mini-USB pinout and Micro-USB pinout are slightly different: standard USB uses 4 pins while Mini-USB and Micro-USB uses 5 pins in connector. The additional pin is used as an attached device presence indicator.


USB pinout signals

USB is a serial bus. It uses 4 shielded wires: two for power (+5v & GND) and two for differential data signals (labelled as D+ and D- in pinout). NRZI (Non Return to Zero Invert) encoding scheme used to send data with a sync field to synchronise the host and receiver clocks. In USB data cable Data+ and Data- signals are transmitted on a twisted pair. No termination needed. Half-duplex differential signaling helps to combat the effects of electromagnetic noise on longer lines. Contrary to popular belief, D+ and D- operate together; they are not separate simplex connections. USB 2.0 provides for a maximum cable length of 5 meters for devices running at Hi Speed.
USB transfer modes

Univeral serial bus supports Control, Interrupt, Bulk and Isochronous transfer modes.
USB interfaces: USB 1.0, USB 2.0, USB 3.0.

There are three USB versions known nowdays:
USB 1.0

released in 1996.
Specifies data rates of 1.5 Mbit/s (Low-Bandwidth, is mostly used for Human Input Devices (HID) such as keyboards, mouses, joysticks and often the buttons on higher speed devices such as printers or scanners) and 12 Mbit/s (Full-Bandwidth).
nowadays is still used used by some devices that don't need faster data transfer rates.

USB 2.0

released in 2000
in addition to USB 1.0 adds signaling rate of 480 Mbit/s (Hi-Speed)
compatible with USB 1.0, but some hardware designed for USB 2.0 may not work with USB 1.0 host controllers.

USB 3.0

released in 2008
added transmission rates up to 5 Gbit/s (SuperSpeed)

USB 1.0 and USB 2.0 shares same connector pinout, USB 3.0 pinout features new connectors.

A USB device must indicate its speed by pulling either the D+ or D- line high to 3.3 volts. These pull up resistors at the device end will also be used by the host or hub to detect the presence of a device connected to its port. Without a pull up resistor, USB assumes there is nothing connected to the bus.

In order to help user to identify maximum speed of device, a USB device often specifies its speed on its cover with one of the USB special marketing logos.

When the new device first plugs in, the host enumerates it and loads the device driver necessary to run it. The loading of the appropriate driver is done using a PID/VID (Product ID/Vendor ID) combination supplied by attached hardware. The USB host controllers has their own specifications: UHCI (Universal Host Controller Interface), OHCI (Open Host Controller Interface) with USB 1.1, EHCI (Enhanced Host Controller Interface) is used with USB 2.0.
USB powered devices

The USB connector provides a single 5 volt wire from which connected USB devices may power themselves. A given segment of the bus is specified to deliver up to 500 mA. This is often enough to power several devices, although this budget must be shared among all devices downstream of an unpowered hub. A bus-powered device may use as much of that power as allowed by the port it is plugged into.

Bus-powered hubs can continue to distribute the bus provided power to connected devices but the USB specification only allows for a single level of bus-powered devices from a bus-powered hub. This disallows connection of a bus-powered hub to another bus-powered hub. Many hubs include external power supplies which will power devices connected through them without taking power from the bus. Devices that need more than 500 mA or higher than 5 volts must provide their own power.

When USB devices (including hubs) are first connected they are interrogated by the host controller, which enquires of each their maximum power requirements. However, seems that any load connected to USB port may be treated by operating system as device. The host operating system typically keeps track of the power requirements of the USB network and may warn the computer's operator when a given segment requires more power than is available and may shut down devices in order to keep power consumption within the available resource.
USB power usage:

Bus-powered hubs: Draw Max 100 mA at power up and 500 mA normally.
Self-powered hubs: Draw Max 100 mA, must supply 500 mA to each port.
Low power, bus-powered functions: Draw Max 100 mA.
High power, bus-powered functions: Self-powered hubs: Draw Max 100 mA, must supply 500 mA to each port.
Self-powered functions: Draw Max 100 mA.
Suspended device: Max 0.5 mA

Dedicated charger mode:

A simple USB charger should incorporate 200 Ohm resistor between D+ and D- wires (sometimes shortcircuit D+ and D- together is enough). The device will then not attempt to transmit or receive data, but can draw up to 1.8A, if the supply can provide it.
USB voltage:

Supplied voltage by a host or a powered hub ports is between 4.75 V and 5.25 V. Maximum voltage drop for bus-powered hubs is 0.35 V from its host or hub to the hubs output port. All hubs and functions must be able to send configuration data at 4.4 V, but only low-power functions need to be working at this voltage. Normal operational voltage for functions is minimum 4.75 V.
USB cable shielding:

Shield should only be connected to Ground at the host. No device should connect Shield to Ground.
USB cable wires:

Shielded:
Data: 28 AWG twisted
Power: 28 AWG - 20 AWG non-twisted

Non-shielded:
Data: 28 AWG non-twisted
Power: 28 AWG - 20 AWG non-twisted
Power Gauge Max length
28 0.81 m
26 1.31 m
24 2.08 m
22 3.33 m
20 5.00 m

Here is the non-simplified version :shock:

https://www.google.com/search?q=usb+pinout&biw=1237&bih=552&tbm=isch&imgil=rnsLv9UUGGJpsM%253A%253BLazxK_G48sTe-M%253Bhttp%25253A%25252F%25252Fpinouts.ru%25252FSlots%25252FUSB_pinout.shtml&source=iu&pf=m&fir=rnsLv9UUGGJpsM%253A%252CLazxK_G48sTe-M%252C_&usg=__3zlDE7ZaLWgI2MZLaNudWas6p18%3D&ved=0ahUKEwj6mdyx5pHSAhVK04MKHbllAv4QyjcIJw&ei=2CCkWPrNPMqmjwS5y4nwDw#imgrc=rnsLv9UUGGJpsM:

I'm in the process of hacking some USB items for an interesting project
If it works (out), I'll report further. :wink:

Rgds,
Ed
User avatar
engrssc
Member
 
Posts: 5089
Joined: Mon Aug 22, 2005 11:12 pm
Location: Roscoe, IL, USA

Re: FYI - USB - DIY - (Facts)

Postby organsRgreat » Wed Feb 15, 2017 8:15 am

Does “branched structure” mean it's OK to connect one USB hub into another USB hub? I'd only do this for applications where speed was not critical, traffic not too busy, and current demands minimal; but it would be interesting to know whether this is theoretically permissible? Seven 7-way hubs connecting into one 7-way hub could provide 49 connections?
organsRgreat
Member
 
Posts: 277
Joined: Fri Nov 16, 2012 6:30 am
Location: England

Re: FYI - USB - DIY - (Facts)

Postby dcaton » Wed Feb 15, 2017 11:06 am

organsRgreat wrote:Does “branched structure” mean it's OK to connect one USB hub into another USB hub? I'd only do this for applications where speed was not critical, traffic not too busy, and current demands minimal; but it would be interesting to know whether this is theoretically permissible? Seven 7-way hubs connecting into one 7-way hub could provide 49 connections?

I've never had a problem chaining hubs together, but what you're describing would be somewhat unwieldly. If you really need that many connections, you might consider something like this: https://www.amazon.com/Manhattan-Port-USB-Hub-161718/dp/B0074024XU. I've used several of those at my last job to test hardware that we built, and they worked really well. Probably a lot cheaper than chaining a bunch of smaller hubs together as well, unless you already have them.
dcaton
Member
 
Posts: 48
Joined: Sun Jan 29, 2017 2:12 pm
Location: Lighthouse Point, Florida

Re: FYI - USB - DIY - (Facts)

Postby organsRgreat » Wed Feb 15, 2017 2:41 pm

No, I don't need 49 USB inputs – I was just trying to clarify the principle! Because my Hauptwerk organ is integrated with my computer and hi-fi, various electronic units are spread all around the room. More likely it would be useful to have, say, three USB connections to a hub near the rack-mounted organ units, feeding into a 7-way USB hub near the computer. From what you say this should be perfectly possible.

I'm aware that some items only work reliably if they go directly to a USB connection on the computer's motherboard. Thanks for sharing your experience.
organsRgreat
Member
 
Posts: 277
Joined: Fri Nov 16, 2012 6:30 am
Location: England

Re: FYI - USB - DIY - (Facts)

Postby engrssc » Wed Feb 15, 2017 6:11 pm

And basic USB posses some line length issues. I'm running 33 ft using amplified USB cables with no problems.

I have, but not using presently a CAT 6 setup for transporting USB to even greater lengths without any loss of speed or data integrity. \The system I have can deal with 4 separate USB paths over a single CAT 6 cable.

I'm told there also is a fiber system for doing that, but I don't have any info Doesn't seem to be a "need" for such, anyway not in my own case

Rgds,
Ed
User avatar
engrssc
Member
 
Posts: 5089
Joined: Mon Aug 22, 2005 11:12 pm
Location: Roscoe, IL, USA


Return to Computer hardware / specs

Who is online

Users browsing this forum: No registered users and 1 guest