How To Build a Raspberry Pi Cluster


The most frequent question we hear at PicoCluster is, “How do I build a Raspberry Pi Cluster?”  That’s a tough question to answer since there are many ways to configure a cluster.  At PicoCluster we have spent much of the last 2 years coming up with a Raspberry Pi cluster design that we feel works extremely well.  The design that you choose for your cluster may be totally different.  However, many of the components will be the same, regardless of the configuration.  While this is not a complete tutorial, let me give you the highlights of how to put our 5-node Raspberry Pi Cluster together.

Step 1 – Tower the Raspberry Pi’s

Using a mounting plate, carefully stack your Raspberry Pi’s together.  You should use spacers between each of the Raspberry Pi’s.  If you are using a kit from PicoCluster to build your cluster, spacers are included.  Don’t forget to put a spacer between the mounting kit and the first Raspberry Pi.  Your Raspberry Pi tower should look similar to Photo 1.

Photo 1:

 

Step 2 – Attach the PDU (Power Distribution Unit)

Instead of using a separate power source for each Raspberry Pi, use a Power Distribution Unit (PDU).  A PDU allows you to distribute power to multiple components from a single power source.  You will want to attach the PDU to the mounting plate using spacers.  If you are using a kit from PicoCluster, your PDU should look like Photo 2.

Photo 2:

 

Now you can attach the PDU to the top of your Raspberry Pi cluster.  It should look similar to photo 3.

Photo 3:

 

Step 3 – Connect the USB Power Cables

Raspberry Pi’s are powered using micro USB power cables.  Attach the USB power cables between the PDU and the Raspberry Pi’s.  You may need to use a “Y” USB power cable if you have more Raspberry Pi’s than you have power slots in your PDU.  Your Raspberry Pi cluster should look similar to Photo 4 at this point.  Notice that in this picture we have used a PDU with 4 power slots and a total of 5 Raspberry Pi’s.  We used a “Y” USB power cable for the bottom two Raspberry Pi’s.

Photo 4:

 

Step 4 – Mount the Raspberry Pi Tower to the Base of the Case

Now it is time to mount the Raspberry Pi tower to the base, or bottom, of the case.  Make sure to have the USB power cords facing the middle of the case.  The networking ports need to be facing the side of the case for easy access after your Raspberry Pi cluster is completed.  See photo 5 for exact placement if you are using a PicoCluster kit.

Photo 5:

Step 5 – Connect Up the Raspberry Pi Tower and the PDU

Now it is time to run power to the Raspberry Pi cluster.  Connect a 12 volt external power cable and the 12 volt network card power cable to the PDU as shown in photo 6. Take note that if you are using the PicoCluster kit, the black striped ground wires share the middle connector.

Photo 6:

If you are using a PicoCluster kit, also note the power cords routing as shown in photo 7.

Photo 7:

The External power cord is connected from the PDU to the pre-drilled hole in the PicoCluster front case as shown in photo 8. If you are designing your own case, it may look entirely different.  The network power cord will connect from the PDU to the 12V power slot on the network card after the network jumpers are attached in step 7.

Step 6 - Connections to control the Raspberry Pi’s

Attach an HDMI cable to the top Raspberry Pi in your cluster.  This will enable you to connect your Raspberry Pi cluster to a monitor.  You need to make sure the other end of the HDMI cable is accessible outside your case.  With a PicoCluster, you will mount the other end of the HDMI cable to the front cover. Attach two USB cables to the upper Raspberry Pi. These cables will allow you to use a mouse or other peripherals with your Raspberry Pi cluster.  If you are using a PicoCluster kit, mount the other ends to the pre-drilled holes in front cover. See photo 8.

 Photo 8:

Step 7 - Connect the network card

For a 5-node Raspberry Pi cluster, we use an 8-port network card.  The network card enables all of the Raspberry Pi’s to work together.  Begin by connecting the jumper cables from the network ports on each of the Raspberry Pi’s to the corresponding port on the network card.  See photo 9.

Photo 9:

If you are using a PicoCluster kit, you will attach the black jumper cable from the next slot on the network card to the opening in the front case and secure with screws. You can see what this will look like by going back to photo 8.  Now connect the 12V power cord attached to the PDU in step 5 into the network card power connector. See photo 10.

Photo 10:

Step 8 - Attach the network card  

Secure the network card to your case.  If you are using a PicoCluster kit, you will attach it to the left side panel of the case using the pre-drilled holes. You can now attach the left side to the rest of the case, lining up the pre-drilled slots with the tabs and use the bolts and nuts to hold the side in place. See photo 11.

Photo 11:

Step 8 – Flash your microSD Cards

Now is the time to make sure you have flashed your microSD cards with the operating system you want to use on your cluster.  Insert the microSD cards into the appropriate slots of each Raspberry Pi.  Don’t forget this step!

 

Step 9 - Assemble the Rest of the Case

Now is the time to complete your case.  If you are using a PicoCluster kit, complete the case by attaching the back and left side of the case lining up the tabs with the slots and using the bolts and nuts to hold the back and right side in place. Finally, we mount the top plate by aligning up the tabs with the slots and securing it all with nuts & bolts.  See photo 12.  Your case may be different.  The key is to make sure the components are protected and connections are accessible.  Your Raspberry Pi cluster is now ready to use!

 Photo 12:


5 comments


  • Rick Lovato

    Do you have a phone number to call about questions and the purchase?


  • Melanie

    Tobias Klein, that’s usually the job of the framework that you’re using. If you’re writing your own distributed program, then you have to be able to monitor the workload on each node in the cluster, then assign work according to which node is least busy.


  • tobias klein

    hi How to control a multiple raspberry pi system so that each raspberry is used evenly?


  • Don Cameron

    Great instructions!


  • Andrew Petelin

    Hi! Great job, Craig!
    Thank you for the post and Pico’s =)


Leave a comment


Please note, comments must be approved before they are published