I’ve run into the issue before, when you think you can use a powered USB hub as a power source for the Raspberry Pi and as a hub to connect USB devices to the board. Unfortunately, as Bharath Bhushan Lohray explains, “USB hubs are supposed to only power up the ports to the full 500mA capacity on connecting and enumerating a USB device. In the absence of a USB device, the ports are powered to output no more than 50mA—just enough to enumerate a newly plugged device.” This means that it won’t provide the power needed by the Pi.

Bharath offers a hack which can get around this problem. On his site, he details how to mod a freebie bus-powered USB hub to act as both a power supply for the Pi and a powered hub for USB devices. It’s perfect for any project where you have many USB devices (and therefore use a lot of power), but only want a single power supply for the project. Needless to say, this hack isn’t limited to the Raspberry Pi and and will work with any single-board computer.

Matt Richardson

Matt Richardson

Matt Richardson is a San Francisco-based creative technologist and Contributing Editor at MAKE. He’s the co-author of Getting Started with Raspberry Pi and the author of Getting Started with BeagleBone.

  • MP

    Is there a problem between using the computer vs the power supply’s ground? I wouldn’t want to plug that into anything I cared about…

    • Greg

      The power supply ground is almost certainly floating.

      • http://adcurtin.wordpress.com adcurtin

        On a computer? No, it will be grounded to earth ground (the computer case is, the USB shield is). The pi shouldn’t care though.

    • http://lohray.wordpress.com Lord Loh

      I am not following this discussion. If it is about the mod I presented – there is one common ground with the Pi / hub / power supply – any other way is a recipe for trouble.

      • http://www.facebook.com/gelfling6 Stephen Griswold

        Agreed! The two should have a common ground plane. the ‘switchbox’ I made for mine, the shield for the USB plug, the power supply socket, the black banana jack, and the shield & black wire for the mini-USB to the Pi, are all connected at all times.. the only that is switched on/off, is the power coming from the supply socket, to the rest of the connections (USB red, Red Banana Jack, USB Hub plug)

  • http://www.facebook.com/gelfling6 Stephen Griswold

    I thought of doing the same with the Pi I have, but it looked too close between the shell, and where I’d have to tap for the power. Likewise, I wanted two other things.. (a) a place to tap the +5V for projects on the breadboard, and (b) an actual on/off switch. I ended-up getting a cheap project box from Radio$hack, a pair of banana binding posts, a small SPST switch, and a coaxial plug that fit the USB hub, a coaxial jack that fit the power supply, and a $1.00 USB cable from the Dollar store.. result, I wired the center of the jack to one pin of the switch, the other pin of the switch to the red binding post through the top of the box, to the red wire of the USB cable (hacked down to length, the red & black wires, about 2 Inches length, the white wire cut to 3/4, insulated, and the green wire 1/4″, insulated.) and to a wire going out to the coaxial plug center. and simply common-grounding the coaxial jack outside, to the black banana post, to the black wire from the USB plug, and to the outer shell of the coaxial plug. This way, all I had to do, was plug the power supply into the coaxial socket, the coaxial plug into the hub, and the USB cable end into the Pi. and, two jumper wires from the banana post on the box to +5V & GND connections of the breadboards. all I had to do, was flip the switch to the on position, and everything was go! When done, flip the switch off, and unplug the supply.

    • http://adcurtin.wordpress.com adcurtin

      > cheap project box from Radio$hack


      • http://www.facebook.com/gelfling6 Stephen Griswold

        Yeah… I still go to RS for some parts, but lately, their prices and selection have gone in totally opposite directions. (price, ^ , selection, v ).. At least, the nice thing, is the parts for the ‘switch-box’ are all available there..

  • http://kj4vyi.wordpress.com kj4vyi

    hahah funny that you posted this ” cheap usb hub ” my company just bought a couple hundred of these to give away to customers !!! reckon ill have to rescue a few of these and try this out !!

    • http://bharath.lohray.com/weblog/ Bharath Bhushan Lohray

      Yes. These hubs serve no purpose other than what your co. is trying to do :-D plugin 2 devices and the computer shall detect a power surge and shut down the port – Windows shows a notification about this.