Sunday 23 December 2012

Power for the Pies

My Raspberry Pi power plans have proceeded plumptiously.

Here's what I made. I started off with a standard PC power supply. I have a few of these in my junk pile; some are stone dead, but some are marked as "weak", meaning that they do seem to work but they don't have enough oomph to power a full-sized PC and a handful of hard drives. Sometimes that's because the 12 volt voltage comes out well under 12, sometimes I just don't know why. So I'm using a "weak" power supply - you'll see why that won't matter in a minute. Here's what I started off with.

The first thing to do is to persuade it to run even though there isn't a PC motherboard attached. To do this, I short circuited two of the pins, green and black. There's several how-tos on the internet that explain it in detail, but it's very easy, takes about ten seconds.

Next, I took the UBEC, Universal Battery Eliminator Circuit. My favourite of the two I tried is the Hobbywing, because you can jumper it to 5 or 6 volts (Pies seem to prefer 6) plus it has a LED to tell you it's awake. They come with a pair of wires at each end. I attached the input wires to a Molex connector, the sort of connector that PCs use. That means I can just plug it in to a PC power supply.

If you're familiar with PC power supplies, you'll have noticed that the UBEC is connected to the 12 volt (yellow) line, not the 5 volt (red). That's because the whole point of a UBEC is to take a voltage that's greater than I want, and convert it to the 5 volts (or 6, in my case) that I do want. And that's why it won't matter if the PC power supply that's supposed to put out 12 volts actually puts out 11, or 10, or even less.

This is a close-up of a UBEC. This isn't the one I prefer; the Hobbywing is better for Raspberry Pies.

The output end of the UBEC terminates in the sort of connector that's used in model aircraft. I took that off, and connected a wire that led to the sort of round connector with a tip, that almost everything else uses. I connected two wires, with two different sizes of connector, that's so I can plug it in to either of the powered hubs that I use.

After I soldered the connections, I checked with a multimeter, to make sure that A) the connections worked, and B) I haven't accidentally short-circuited the UBEC output. I think the UBEC will shut down gracefully if that happens, but I'd rather not put it to the test.

So now I can plug the output of the UBEC (6 volts) into a powered USB hub.

And now we're ready to power up the Pies.

I could connect five Pies to this arrangement. The PC power supply gives as much power as the UBEC can take, the UBEC can handle a maximum of 3 amps, that's 3000 milliamps, and a Raspberry Pi wants 500 milliamps. So, powering five Pies works. I'm actually powering four pies from this, and I have the USB-driven hard drive plugged in also. One of the Pies is powered from the connector that the USB hub thinks is its input.

Previously, to power the four Pies and the hard drive, I was using two power bricks and a PC power supply (for the hard drive power). The power bricks felt quite hot when running, which means that they're wasting quite a lot of power in doing the conversion (the wasted power is what makes the heat).

Now, I'm using on PC power supply to power the lot, and it feels cool to the touch. The UBEC feel very warm, but not worryingly hot.

I managed to give myself a 240 volt shock at one point while I was messing around with this; I thnk the power supply I was using at that moment was faulty.

I've ordered three more Hobbywing UBECs, they cost about $7 each.

Here's what it all looks like.

The PC power supply is the big grey box on the left; I can't remember what sort of computer it came out of, but it's a totally non-standard size, and so pretty useless. Except here.

The hard drive is a 400 gb Sata; 400 gb drives are too small in capacity to be usable these days; I'm buying 3000 gb drives as standard. But I have a whole bunch of 400s in a box, and as storage for the Pies, they're fine.

The thing in the front glowing redly is the Hobbywing UBEC. That's the LED glowing, it isn't red-hot!

The blue glow near the middle, is the powered USB hub, getting power from the UBEC. The four Pies can be seen in the boxes that RS ship them in - they make good Pi boxes, after I used a hacksaw to cut holes for the ethernet and power cables.

The black blob between the hard drive and the power supply is the USB-Sata interface thingy.

This little arrangement is replacing four full-sized computers which would have been drawing about a kilowatt between them. I haven't measured, but from previous experiments, I'd say that this is using about a tenth of that power. But I'm not only saving that electricity; it also means that, come summer, I'll have that much less cooling by the aircon, so the saving is probably twice as much.


  1. Whoops I just ordered lots more bits thanks for the time in writing the blog.

  2. So I'm using a "weak" power supply - you'll see why that won't matter in a minute. Here's what I started off with.Outdoor power supply

  3. Hello Solly,
    Nice experiment. This is a good and successful test you have done. Thank you for your nice sharing. Hope you post your next article soon.