I’m building a cluster using Raspberry Pi derivative boards (Banana Pi). Jeff Geerling gave me the idea to make a little PCB with RGB LED and also a 5.5mm DC barrel-style power connector.
There are two main reasons that I think this is useful, particularly if you are building a cluster of Raspberry, Orange, Banana, Custard or Desperate Dan Pi’s (I made the last two up, by the way). Having an application-controlled status LED on the edge of the board is very handy for a quick view of what each board in your cluster is doing. Secondly, if you are wiring up, say, 16 boards, then using lots of micro USB cables to supply 16x2Amps doesn’t seem like much fun. That’s a lot of USB power sockets that you are going to need. It seems like a Better Idea to get one, big, switched-mode 5V supply and use some thick cable to come out to some terminal block / bus bar to bring home-made cables of just the right length to a common-or-garden 5.5mm barrel connectors.
You can get all the parts from eBay / AliExpress / Mouser / DigiKey. Take care with the LED since there appear to be lots of different pinouts. This PCB layout requires the type that have a Red-Cathode-Green-Blue pinout (although any one that has the cathode on the second pin in from the edge would work). Also take care with the footprint of the DC power connector. Search for “5mm RGB LED”, “DC PCB 5.5mm”, “Raspberry Pi GPIO” and “470 1/4W Resistors” when shopping.
In theory the 5.5mm barrel connector isn’t good for 2 Amps. I’m just taking a risk here that the Pi isn’t really drawing 2 Amps most of the time – more like 1 Amp. If you are connecting a spinning-disk HDD to your Pi, then, OK, you may well be drawing near 2 Amps all the time so perhaps the Micro USB connector would be better. However, it seems counter-intuitive to me that the tiddly little Micro USB connector should be able to handle more current than a chunky 5.5mm barrel connector. Perhaps it’s something to do with contact area.
Of course you could build this with just the DC power connector or just the LED part.
Software: Note that I’m using a different set of GPIO pins from those that Jeff used since these ones in my choice seem to have minimal clash with any other functions you may wish to use such as UART, SPI and I2C. I’ll put some of my own scripts up on GitHub soon. However, at the end of the day, since there are so many variants of Raspberry Pi (A, B, 1, 2, +, Orange, Banana, etc.) that have mostly different logical mapping to the physical pin numbers on the GPIO connector that you’re probably going to need to tweak the code anyway.
You can get the PCB from Dirty Board PCB’s. I did the layout with KiCad using some parts libraries from the interweb for the LED and DC connector. I tried to lay a good chunk of copper for the 5V which was a bit tricky since the pins are on the ‘wrong side’ of the board. There is a ground plane on the back so 0V certainly has lots of current-carrying goodness to the Pi.