USB notes - other

From Helpful
Jump to navigation Jump to search

⚠ This is for beginners and very much by a beginner / hobbyist

It's intended to get an intuitive overview for hobbyist needs. It may get you started, but to be able to do anything remotely clever, follow a proper course or read a good book.


Some basics and reference: Volts, amps, energy, power · batteries · resistors · transistors · fuses · diodes · capacitors · inductors and transformers · ground

Slightly less basic: amplifier notes · varistors · changing voltage · baluns · frequency generation · Transmission lines · skin effect


And some more applied stuff:

IO: Input and output pins · wired local IO · wired local-ish IO · ·  Various wireless · 802.11 (WiFi) · cell phone

Sensors: General sensor notes, voltage and current sensing · Knobs and dials · Pressure sensing · Temperature sensing · humidity sensing · Light sensing · Movement sensing · Capacitive sensing · Touch screen notes

Actuators: General actuator notes, circuit protection · Motors and servos · Solenoids

Noise stuff: Stray signals and noise · sound-related noise names · electronic non-coupled noise names · electronic coupled noise · ground loop · strategies to avoid coupled noise · Sampling, reproduction, and transmission distortions

Audio and video notes: See avnotes

USB: everyday · power · connectors · lower level · misc

Platform specific: : Microcontroller and computer platforms ·· Arduino and AVR notes · ESP series notes · STM32 series notes · Teensy series notes


Less sorted: Ground · device voltage and impedance (+ audio-specific) · electricity and humans · Soldering · landline phones · pulse modulation · PLL · Multimeter notes · signal reflection · Project boxes · resource metering · Radio and SDR · vacuum tubes · Unsorted stuff · 'E-fuse'

Some stuff I've messed with: Avrusb500v2 · GPS · Hilo GPRS · JY-MCU · DMX · Thermal printer ·

See also Category:Electronics.


Connectors

See Common plugs and connectors#USB


USB versions

  • USB(1) exists since 1996, 1.1 since 1998
only type A and type B plugs were technically in the specs
1.5 Mbps ('Low speed') and 12 Mbps ('Full speed')
  • USB2 exists since 2000-ish ()
used roughly the same cabling, if produced to higher spec
also started introduced various of the mini and micro
adds 480 Mbps ('High Speed')
four pins
power lines are 5V and ground
data is 3.3V differential
the fifth pin on micro plugs is OTG ID, and is either tied to ground (marking that side as host side) or floating (marking it as device side) (verify)
  • USB3 exists since 2008ish
3.0 adds SuperSpeed (5 Gbit/s), 3.1 adds SuperSpeed+ (10 Gbit/s)
leaves all those USB2 pins there, adds five pins and lines to USB2:[1]
two differential pairs
and a ground
technically the USB3 part is entirely separated from USB2 part (which made hubs more interesting)
often recognizable by the blue plastic in the plugs and sockets, or SS (for Super Speed, the mode that USB3 adds)
micro plugs/sockets are often not blue, possibly because it would be hard to see anyway(verify)), and because they're less ambiguous that PC-side A sockets


Host hardware variants

PC controllers will be one of

  • OHCI (Open Host Controller Interface)
    • USB 1
    • Open standard
  • UHCI (Universal Host Controller Interface)
    • USB 1
    • Proprietary standard
    • Intel and VIA are usually UHCI
  • EHCI (Enhanced Host Controller Interface)
    • USB 2
    • public (open?) standard
  • XHCI (eXtensible Host Controller Interface)
    • USB 3
    • in theory replaces OHCI, UHCI, and EHCI


See also:


Speeds

  • USB1 "Low speed"
    • ~178KByte/s (1.5 Mbit/s) of wire speed, max max ~120KByte/s of carried data due to 8b/10b coding (not yet accounting for protocol overhead)
    • Meant for devices that will never need much speed, such as keyboards
  • USB1 "Full speed"
    • 1.5MByte/s (12 Mbit/s) wire speed, ~1.2MByte/s of carried data
  • USB2 "High speed"
    • 60MByte/s (=480Mbit/s) wire speed, ~48MByte/s carried data
    • expect no more than 30MByte/s, and 25MB/s is more common (apparently because of offloading(verify))
  • USB3 "Superspeed+"
    • 625MByte/s (5Gbps) of wire speed, ~500MByte/s (4Gbps) carried data
    • Note: May do USB2 devices a little faster (as in, may reach 30-40MByte/s where many USB2 controller may stop at ~25MByte/s) (verify)
    • expect no more than ~400MB/s usually
  • USB3.1 "Superspeed+"
    • 1250MByte/s (10Gbps) of wire speed, before 128b/132b coding, ~1200MByte/s (~9Gbps) carried
    • expect no more than ~900MByte/s usually


Notes:

  • Hubs share speed.
  • PC USB ports often come as two ports side by side on a hub, so share their speed
This means e.g. copying between two adjacent ports may happen at half the speed you expected.
(at least up to USB2 - USB3 became smarter about a few cases(verify))
  • USB3 modes are full-duplex, everything before was half-duplex
  • I'm ignoring USB4 for now


Alternate modes

"Hey I have this USB-C thing that has a DP - does it carry video from the laptop, or does it contain a video card?"

Spec stuff

https://www.beyondlogic.org/usbnutshell/usb1.shtml