5

I would like to add a Raspberry Pi to an existing two-node server setup to get an utility / playing / monitoring linux system independent from the two PCs, but I can not actually consume another mains plug.

My idea would be to power the Raspberry Pi from USB ports of both PCs so if one goes down or gets shut down the Pi will always be powered, but I know / presume I should not directly connect the power lines of the two USB ports together.

This is possibly related to this other question but I have to interface to two actual PC usb ports and not two mains power supplies: I guess I don't have the luxury to afford voltage drops from diodes.

Getting someone to do some soldering work is not a problem, as far as I tell him exactly what I need :)

Is there any ready-made product or some schematic I could use to achieve this "redundant R-Pi power supply from two USB ports" ?

Luke404
  • 229
  • 3
  • 7
  • 6
    There is one another issue I'm not sure you are aware off - you should not power RaspberryPi from PC USB port at all. This is because RaspberryPi has no means to enumerate itself (it has no data lines in miniUSB power socket) so it can't negotiate it's power needs. This means that PC is not obligated to provide more than 100mA of power in this case. – Krzysztof Adamski Apr 15 '13 at 17:55
  • @KrzysztofAdamski I know about the 1 unit load limit unless the device actually negotiates otherwise, but after something like 8 months of continuous uptime I'm pretty confident those ports can sustain the Raspberry Pi :) – Luke404 Apr 15 '13 at 20:47

3 Answers3

1

Use two schottky diodes, something like this:

scheme

jet
  • 379
  • 2
  • 9
  • How well does that cope with one line failing then coming back. DOes it cause any dips or spikes? Could it brown out the Pi? Simple solution though :) – Piotr Kula Sep 13 '13 at 15:35
0

I believe that there are in fact several products that do this. You can use the Startech Dual USB - micro USB Cable, or this OWC cable. It should be able to work, but I have not tested it personally.

If you have any issues, please contact me through the comments.

xxmbabanexx
  • 3,258
  • 7
  • 35
  • 56
  • 3
    That's not really what the OP needs since those seems to be normal Y cables that would electrically connect USB ports in both computers which may create a problem. – Krzysztof Adamski Apr 15 '13 at 17:52
  • Exactly. I'm sorry but the cables you suggested would only give nasty electrical problems. – Luke404 Apr 15 '13 at 20:49
0

Maybe it's too straightforward, but can you just use a relay, for example a SPDT (Single Pole Double Throw) one? You may attach those two USB 5V sources to the two inputs of the SPDT relay and use the relay output to power the Pi. Also use one of the USB 5V to control the relay coil. Depending on the switching speed, you need to choose a certain size capacitor to keep the voltage from dropping too low during the switching.

Penghe Geng
  • 361
  • 1
  • 5
  • 10
  • I honestly fail to see how the Pi could "always be powered" if the currently selected source goes down. Please note we are talking about "power source going down", not about "human being wants to turn off one power source". – Luke404 Sep 13 '13 at 10:06
  • I forgot to mention you need a capacitor for this. Answer modified. – Penghe Geng Sep 13 '13 at 13:17
  • And yes it can "handle power source going down". Since we are using one power source to control the coil. If it's down, the relay will be switched to another position automatically. – Penghe Geng Sep 13 '13 at 13:27