Power Up

The Raspberry Pi is a great education platform for learning data science. The fact that the Raspberry Pi is relatively slow and low-powered works to your advantage, allowing you to see data manipulation methods unfold at a human time scale. Even for experts, one of the best way to write quality software is to build it on slow computers such as Raspberry Pi. 

Recently I’ve been curious about performing data processing on a Raspberry Pi cluster, which presents some unique challenges. One of the most fundamental problems is finding a proper enclosure.

If you’ve played around with connecting more than one Raspberry Pi together, you’ve no doubt encountered the hassle of tangled cords. To connect six Raspberry Pi boards together, you really need a strategy for keeping things neat. This cluster case is designed to solve that particular problem.

Designing a cluster enclosure is harder than you’d think. Coming at this as a data engineer, I learned that building hardware requires a different level of attention to detail. Even a half millimeter offset in the cutting template, for example, could render one of the acrylic tiers useless.

I also learned that hands-on experience is immensely valuable in designing hardware. The cluster case template I’ve hosted at Github has gone through six revisions. Each iteration revealed one or two shortcomings I couldn’t foresee. It was only after cutting out and assembling the boards that mistakes could be identified.

In the following project I’ve included the template designs under the Solderpad Hardware License. The license is equivalent to Apache, meaning you can make and distribute the designs royalty-free. I would encourage you to contribute to the designs with improvements and extensions.

Update 12/07/15: Want an easy way to configure you Raspberry Pi boards into an Apache Spark or Hadoop cluster? Check out PocketCluster for OSX (GitHub). You can configure a cluster with just 5 clicks (video demo here).

What will the next generation of Make: look like? We’re inviting you to shape the future by investing in Make:. By becoming an investor, you help decide what’s next. The future of Make: is in your hands. Learn More.

Project Steps

Create the boards

Download the templates for the boards, which will serve as the platforms to mount the six Raspberry Pi computers.

There are four distinct board templates. You will need to cut one of each type of board, plus an additional “board-middle” design to create the middle section of the enclosure.

My build used clear acrylic, but you can use wood, synthetic, or acrylic panel to cut out these shapes, so long as a panel is strong enough to hold a USB charger and no thicker than 3mm.

If you use a service to cut boards from acrylic panel, they will come with protective films on them. Be sure to peel off the film before assembling the enclosure.

Gather components

To connect all of the Raspberry Pi together you’ll need the following materials:

Take a look at one of the USB cables. A Micro-USB-to-USB cable must be right-angled, not left-angled. You may also want to check the thickness of a wire, and make sure your cable is thick enough to deliver enough power. The one available to me comes with AWG 6 cable. Several different brands are available online.

You then need screws. Buying right-sized screws are the hardest part of the whole process, at least for me. Here’s the list of them:

The four supporting holes in Raspberry Pi 2 are 2.7 mm in diameter, and, ideally, you would want to use M2.6 screws and nuts for fixing Raspberry Pi 2 since they fit rather tight. The problem was M2.6 Pillar Screws did not come easy, and I had to custom order M2.6 Pillar Screws.

To save yourself the pain of custom ordering, I suggest using the M2.5 screws and nuts I’ve listed, which are easier to find.

In case you want to fit a network switch into the cluster, pick something slim. I found a D-Link 8-Port Gigabit Desktop Switch that fit perfectly.

One thing to remember is that you have a choice not to put in a network switch at all. You could use this enclosure simply to store your Raspberry Pi and connect them to an existing network outside of the cluster.

Assemble enclosure panels

Once you have the components and materials, assembly is rather straightforward. First put M2.5 5mm Pillar Screws on boards and tighten them with M2.5 Hex nuts. You’ll have to do this for 6 sets.

Attach Raspberry Pi

Attach the Raspberry Pi on the boards with M2.5 Screws.

Once you’re done, you’ll have six sets of platform-mounted Raspberry Pi. You’ll see that the RPis on the right side are all flipped. In this way, all the RPis’ power inputs are placed right next to the USB charger, reducing the cluster volume. The big round holes in the platform under each Pi are designed for ventilation.

Add charger support

Apply two pieces of double-sided tape on a USB charger supporter. This is to give a bit more strength to the board to support the charger.

Place it on the board named board-middle-end, as pictured.

Stack panels

Now it’s time to stack up the Raspberry Pi platforms. Look carefully how each piece is stacked.

Add cables

Once you finish stacking up the RPis, plug a Micro-USB-to-USB cable into each Raspberry Pi.

Once you plug in the cables, place your USB charger in the middle, and close the cluster with board-top. Don’t forget to tighten up with M3 4mm Screws.

Add charger

Now plug in the standard USB ends to the USB charger. Notice how the platforms cradle the charger and clear the entrance for USB ends.

Add network switch (optional)

Place the network switch at the bottom layer and close it with board-bottom and four M3 Hex Nuts like below.

Connect your Raspberry Pi boards to the network switch with Cat6 Ethernet Cables.

Power up

Once you supply power to the charger, all the RPis will light up!

You can replace as many parts as you wish, and modify as much as you want. All these instructions and schematics are here for a template.

If you get to building one, please share yours using the #rpicluster hashtag on Twitter so that we all can see!