Build your own inexpensive super-computing cluster with Raspberry Pi 3's
By: +David Herron; Date: April 15, 2018
Let's look at an example Raspberry Pi cluster project. The overall architecture is shown above, and some videos are below.
With careful choice of components it's possible to power the whole system off a USB charger that you'd use for charging cell phones. That means you have N Raspberry Pi's, plus N ethernet cords and N USB cords and N SD cards. N is probably going to equal 8, because the Pi's will be connected to an ethernet switch, and most switches have 8 ports.
As it says in the image, one of the Pi's is set aside to serve as a router. It will have a NAT gateway configured, and a DHCP server to assign IP addresses. The Pi's will therefore be on a private network, and any traffic between the Pi's will not affect your home network.
Suggested parts are:
As a Supercomputing cluster, we're likely to want to run these machines at full computation capacity. That means the CPU's will run hot, and will need cooling. That is the function of the heat sinks and fans. The heat sinks are easy to install - simply peel off the covering on the tape, and affix to the CPU. The heat sinks by themselves don't keep the CPU's cool enough, so USB-powered fans will move enough air over the Raspberry Pi's to keep them cool.
The stand-off screws are a simple way to attach Raspberry Pi's together. You simply thread the screws into holes on the boards, and screw them together. Other mounting systems have you attach each Raspberry Pi to a carrier board, then the carrier boards are screwed together with stand-off screws. This approach is simpler.
Powering the Pi's requires a USB power supply with enough capacity to run the whole system. Pay careful attention to the ratings to be sure the charger has enough capacity. To minimize voltage drop, the chosen USB cords are short, and the positive/negative leads in the cords are larger than normal to carry more current.
An eight-node Raspberry Pi cluster requires a 10-port USB charger. Eight ports are required for the Pi's, one port for the USB fans, and one port for the ethernet switch shown here.
The ethernet switch does not natively support being powered from USB. However its power requirement fits within the power capacity of a USB charging cord. To make it work requires a USB to Type M Adapter Cable, which is readily available.
The Raspberry Pi cluster can use the ethernet switch as a case. Simply disassemble the ethernet switch, drill some holes in the top cover to match holes on the bottom Raspberry Pi.