Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I've got my RPi set up as a media centre, running Raspbmc, using a powered hub to run a bunch of peripherals including terabyte external HD and a hacked-together IR remote.

All very nice, but it's resulted in a huge pile of cables and disembowelled electronics behind my TV, so I want to tuck it all away inside a case with just the power, HDMI, and Ethernet cables coming out.

Now, two power supplies to one box seemed silly, so I started looking at powering the Pi from the hub I'm using. A friend of mine seemed concerned by this, and knowing his experience in the field I thought it best to check. Here's the setup:

  • Wall socket -> 5V 3A PSU -> Hub
  • Hub (regular USB-A port) -> RPi microUSB power port
  • RPi (regular USB-A port) -> Hub USB-B data port

(Also off the hub's other regular USB-A ports are a WiFi stub, Bluetooth keyboard/mouse pickup, terabyte USB3.0 hard drive)

It seems to run quite happily. I've tested it a little (with a careful eye out for danger signs, ready to start yanking leads from sockets) and I've not seen any instability, or any signs of data corruption on the SD card (which I was told could happen) or the external drive.

How do I check for certain whether this setup is safe, for hardware (I don't want to fry the gear) and software (I don't want to corrupt the SD or HD)? I don't want to put this all neatly inside a case to have it break.

share|improve this question
    
What are your friends concerns about this? The loop does not feel natural, true, but only the power pins get used by the microUSB input on the RPi. –  ikku Feb 7 '13 at 11:01
add comment

4 Answers

up vote 1 down vote accepted

You say that it seems to run quite happy. I'm with @ikku on this. It may not "feel natural", but it works.

I'd personally run it for a few days. Maybe maxing it out, by running Quake 3 or OpenArena for a few days. Just have them constantly loop.

I have seen setups like yours run without issue. I woudnt say there is much of a concern. But I'll completely understand if you play OpenArena for a few hours in the name of "testing" ;)

share|improve this answer
add comment

Testing for a backfeed is easy:

  1. Unplug all cables from your Raspberry Pi.

  2. Remove the SD card

  3. Plug the micro USB cable into your Raspberry Pi so that the cable is attached both to the USB hub and your Raspberry Pi. Also make sure your USB hub is powered. You also may want to power cycle your USB hub before plugging it into your Raspberry Pi, just to make sure.

If the red led on your Raspberry Pi does not burn there is no backfeed and you're good. If the red led does burn you won't be able to safely power your Raspberry Pi through you USB hub.

share|improve this answer
add comment

One of the improvements of the V2 board (with the mounting holes) is support for backfeeding USB hubs.

From the blog:

USB Output Power

The resetable fuses protecting the USB outputs have been removed. This feature was implemented on some later revision 1.0 PCBs by replacing the fuses with links; revision 2.0 permanently implements this modification. It is now possible to reliably power the RPI from a USB hub that back feeds power, but it is important that the chosen hub cannot supply more than 2.5A under fault conditions.

This means that if your USB hub backfeeds, you can use a single cable between the Pi and the hub.

In addition, since you can only put a USB cable in one way, you can connect both the frontfeed from your hub, as well as the backfeed without causing a short.

share|improve this answer
add comment

I'll add my personal experience: I've wanted and tried to do exactly what you're doing. I had a D-link USB hub with a 3 A power supply. I plugged the pi into the hub, and then plugged the hub back into the pi. The moment I did, the pi always shut off. It didn't do any damage; everything's fine. So even if it were a problem, at least for me, it doesn't hurt. I'm still mystified as to why mine doesn't work, though. I might have swapped it out for a cable with the 5 V lead removed, but I don't really need a powered hub now anyway.

So again: if it works, count yourself lucky and use it. I can't imagine any way that it would damage your pi.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.