One day in 1994, seven world-leading technology companies sat down and created a new standard for connecting computer peripherals. By "one day," of course I mean, "over the span of several months." But all technicalities aside, the standard that they laid down became the Universal Serial Bus, or USB for short.
Today, USB is truly a 'Universal' standard and you'd be hard-pressed to find an electronic device that doesn't have a USB port of one kind or another. But how do you know which USB cable will fit your device? Hopefully this buying guide will help you find the cable that you need for your next project.
USB cables replace the huge variety of connectors that used to be standard for computer peripherals: Parallel ports, DB9 Serial, keyboard and mouse ports, joystick and midi ports... Really, it was getting out of hand. USB simplifies the process of installing and replacing hardware by making all communications adhere to a serial standard which takes place on a twisted pair data cable and identifies the device that's connected. When you add the power and ground connections, you're left with a simple 4-conductor cable that's inexpensive to make and easy to stow.
The USB standard defines the way in which a device talks to the host. Unless you're taking advantage of a brand new standard called "USB On the Go" (USB-OTG) which allows devices limited host capabilities, you're probably going to be connecting a device directly to a host. A USB device can't initiate communication, only the host can, so even if you can find the right cable: connecting two devices with no host just doesn't work. Also, because USB cables carry both power and data, connecting two hosts without a device in-between can be disastrous (causing high-currents, short circuits, even fires).
99% of host controllers will have a USB-A receptacle, so when you're looking for a USB cable, you'll usually be looking for a "USB A-to-something" cable. A lot of the time the USB-A end is assumed, since that's the connector on most PCs, and cables will be named after the connector on the opposite end. Some smaller hosts use a Mini or Micro receptacle but they usually supply a pigtail adapter to USB-A.
Some cables are also hubs, which allow multiple USB devices to be plugged into the same host port. In theory, you can stack these hubs as deep as you want to up to 127 devices, but in practice you need to consider power limitations. Some cables are extension cords, with the plug at one end and the receptacle at the other. There are limits to this as well because of the round-trip signal time of the serial data. It's suggested that USB cables are kept under 5 meters in length.
There are also some wacky, non-standard USB cables out there so you have to be careful when you're just plugging things in. Not everything that can be physically connected can be electrically connected.
The best way to answer that question is to take a stroll through the types of USB cable that we sell here at SparkFun and talk a little bit about what each of them are used for. Let's get to it!
We have so many of these around the office, it's crazy. Mini-B is the once-great (now deprecated) standard for portable devices. The Blackberry had it, the Motorola Q had it, but most importantly, the FTDI Basic Breakout still has it.
Despite being discouraged for future devices (in favor of the Micro-B) the Mini-B connector is still fairly common. It's large enough to solder without too much trouble but small enough to fit in some seriously tight spaces. Along with the FTDI Basic Breakout, here are a few other SparkFun devices that the USB A to Mini-B cable will connect to your computer:
Micro-B is the newest and smallest USB connector type. Nearly every new cell phone uses a Micro-B connector so you might already have one or two of these cables laying around. Since Mini-B is being phased out in favor of this connector, many of our products that currently have a Mini-B connector will change to Micro-B in the future.
We're already using the Micro-B on a bunch of our newer boards. Here are a few SparkFun devices that the USB A to Micro-B cable will connect to your computer:
This is the classic. USB A to B cables are super common for printers and other large peripheral devices. They're also the standard programming connector for the Arduino UNO.
Besides the Arduino UNO, USB B is used on a lot of programmers and development boards. Here are a few other SparkFun devices that the USB A to B cable will connect to your computer:
See... This is the kind of non-standard cable that the USB-IF (USB Implementers Forum) was put together to avoid. I don't even want to think about the havoc that might ensue if you were to unwittingly connect two computers with a cable like this...
But until the Mini connectors came out, using a USB-A type connector on the device end was the only way to get around the USB-B type's space-issue. Some of the Olimex designs we used to carry used them for just that reason: The USB-B was too big. This isn't really done anymore because the Mini-B connector type exists now. That doesn't mean you can't do it on your own designs though... in fact, a pair of scissors will turn this potentially dangerous USB cable into two very useful USB bare-wire pigtails.
USB devices are generally intended to be "near computer" devices but certain values of "near" fall outside the 6-10ft. length of standard USB cables. Some devices like webcams, WiFi adapters or XBee Explorers want to be free. In this case, the USB extension cable offers an extra 6-10ft. of freedom.
Even though you can technically connect these end-to-end, remember that you're limited to about 5 meters of functional USB cable. World record stretches of data line are probably best attempted with something more robust like Ethernet.
Here's a table of the USB cables that we sell.
Cable | End 1 | End 2 | Length | Notes |
---|---|---|---|---|
|
USB-A | Mini-B | 6' | |
|
USB-A | USB-A | 6' |
Don't use these cables to connect two Host devices, you could do some serious damage! |
|
USB-A | USB-B | 10' | |
|
USB-A | USB-B | 6' | |
|
USB-A |
USB-A Receptacle |
10' | |
|
USB-A |
USB-A Receptacle |
6' | |
|
USB-A | Micro-B | 6' | |
|
USB-A | DB-9 | 6' |
This cable has an FTDI chipset inside. Along with the drivers on your PC, it provides you with an RS232 Serial Port. |
|
USB-A |
USB-B Mini-B Micro-B |
6' |
This cable doesn't have a USB splitter so don't try to connect multiple data devices, it won't work. |