Hardware Reference
In-Depth Information
Get More USB Ports
HACK 08
The Raspberry Pi Model B has two dedicated USB connector ports, but
really, that just isn't enough for an awful lot of use cases. Here's how you
can hack in a few more.
Universal Standard Bus (USB) has become the de facto standard connector for com-
puting accessories. Keyboards, mice, hard drives, joysticks, flashlights, and even foam
missile launchers all connect via USB. The Raspberry Pi (Model B) comes with two
dedicated USB 2.0 ports to allow you access to this wide world of peripheral goodness,
but these ports get used up quickly. The normal use case of a keyboard and mouse
will use up both of these connectors, and you're left with no place to put anything else!
This is not a new problem for computer users. Laptops usually come with one to three
USB connectors as well, even though a single USB host controller can support many
more devices running simultaneously on the same BUS (up to 127 devices, to be pre-
cise). The trick to getting more is to use a USB hub.
Once upon a time, USB hubs were expensive. That time is long past. In fact, they're
regularly given away for free. But there is a catch with these USB hubs. They come in
two flavors:
Bus powered
This type of USB hub draws all its power from the host computer's USB interface
and is the type you're likely to acquire as a free giveaway or in the cheap-stuff bin
at the electronics store.
Externally powered
Also known as self-powered , this type of USB hub has an external power supply
and uses it to provide full power to each USB connector on the hub.
USB 2.0 current is allocated in units of 100 mA (called unit loads ), up to a maximum
total of 500 mA per port. This means that if you are using a bus-powered hub, in the
best possible scenario (getting 500 mA from the host computer), it can power four
devices. That's what the specification says, so it must be true, right? But in the real
world, this isn't quite the case.
For starters, the USB hub needs some power to run, so it won't be able to take the
500 mA from the host computer and give it all to the ports. Even if we assume it is an
extremely efficient device (they usually are not), that means it can provide one unit
load to four devices at once. But that's not the whole story.
The USB specification is pretty loose as specifications go (partially as a result of its
ubiquity), and lots and lots of devices want more than 100 mA to work properly—most
notably, wireless networking USB devices and keyboards with fancy features (LCD
displays, integrated USB hubs, backlights, blenders, etc.). These devices are classified
Search WWH ::




Custom Search