Introduction: Water-Cooled Raspberry Pi 4 Cluster
A couple of weeks ago I built a water-cooled Raspberry Pi 4. It was a fun project and it came out looking pretty good, but was obviously crazy overkill for a single Raspberry Pi. This isn't actually why I bought the water-cooling kit, I bought it along with 7 other Raspberry Pis to try building my own water-cooled Pi cluster.
While water cooling a single Pi doesn't make much sense, it's actually quite an effective solution for a cluster. A single large fan means less noise and it actually works out cheaper than many other fan and heat sink solutions given that you'd need to buy 8 of them.
For those of you who don't know what a Pi cluster is, it's essentially a set of two or more Pis that are connected together over a network and work together to perform computing tasks by sharing the load.
If you enjoy this Instructable, please consider voting for it in the Make It Glow contest!
To build my Pi cluster, I got together 8 Raspberry Pis, a network switch, a PC water cooling kit, some cooling blocks and then a bunch of network cables, USB charging cables, standoffs and screws.
Here's a summary list of the basic parts required with some suggested purchase links:
- 8 x Raspberry Pi 4B (2GB Model Used) – https://amzn.to/3i0eYni
- TP Link 16 Port Ethernet Switch – https://amzn.to/2Ldn9km
- Rav Power USB Charging Hub – https://amzn.to/2MNCSH3
- HD Touchscreen Monitor - http://amzn.to/38ug1Zq
- Water Cooling Kit – http://bit.ly/3sfTAiO
- 8 x 30mm Cooling Blocks – http://bit.ly/38vZa8I
- 8 x Ethernet Patch Leads – http://amzn.to/3nBgXPX
- 8 x USB C Cables – https://amzn.to/35rOwOp
- 3m RGB LED Strip – https://amzn.to/3nyaPbt
- M3 Standoff Mount Kit – https://amzn.to/38u6Qs8
- M3 Screw Kit – https://amzn.to/38wl63J
- 3mm MDF Board Approx. 600 x 600mm
Some of the links above are affiliate links. By making a purchase through the links, you'll be helping to support my projects at no extra cost to you.
Step 1: Making the Cooling Block Brackets
I started off by making up 8 acrylic brackets to hold the cooling blocks in place over the CPU. These brackets were the same design I had used previously to cool the single Pi and consist of two acrylic parts that are glued together.
I laser cut the brackets from some 3mm translucent red acrylic.
I then also cut an aluminium spacer to put between the cooling block and the Raspberry Pi, to lift the inlet and outlet on the block a bit higher so that they clear the display connector. I put a drop of thermal paste between the spacer and the cooling block to help with conduction.
Step 2: Mounting the Cooling Water Blocks
I then mounted the cooling blocks onto the 8 Raspberry Pis.
Each cooling block got a drop of thermal paste before being placed over a CPU.
The cooling block brackets clamp down on the cooling block by screwing into some nylon standoffs which are screwed into the four mounting holes on each Pi. These nylon standoffs are held in place by some aluminium standoffs underneath the Pi, which will be also used to mount the Pi onto the backboard.
Step 3: Planning the Cluster Layout
Raspberry Pi clusters are traditionally built by stacking the Pis on top of each other using some standoffs. This arrangement doesn't really work with my cooling block brackets and isn't particularly eye-catching. So I wanted to try and build something a bit different, something which looked more like a feature and could be mounted onto my wall.
I played around with a couple of layout options and eventually settled for having the radiator and fan at the centre, with four Pi's on either side. The cooling water reservoir and pump would be at the bottom of the cluster and the ethernet switch at the top.
Step 4: Positioning the Cluster Components
Once I had the layout planned, I started marking out the component locations on the piece of 3mm MDF. I planned on using a square section of the sheet, approximately 600mm x 600mm.
I plugged an Ethernet cable and USB power cable into one of the Pis to ensure that there was enough clearance between them for the cabling.
There was an obvious gap in the middle of the cluster above the radiator. An old touch screen display which I had used for a previous project fitted into this gap perfectly. This display would be useful for displaying performance stats or metrics for the cluster or even to run basic scripts from and was powered using on of the Pis USB ports.
Step 5: Making a Base for Each Pi
I then designed a small acrylic base for each of the Pis.
Each base consists of two layers of acrylic, a red bottom accent layer and then a black top layer. The bases have holes for the four mounting points and then a larger hole in the middle to route the power cable from the side of the Pi to the back of the board.
I laser cut the two pieces from some translucent red acrylic and opaque black acrylic and then glued them together with some acrylic cement.
Step 6: Creating the Back Board
Now that I had all of the cluster components made and layout marked up, I could make the backboard.
I cut the backboard square and then trimmed the four corners at an angle to suit the geometry of the layout. I used a Dremel with a circular cutoff saw to trim the MDF and to cut out two holes in the middle, one for the radiator airflow and another for the cable routing behind the display.
I then drilled all of the component mounting holes. I planned on using 4 M3x8mm button head screws for each Pi and then the mounting hardware which came with the water cooling kit and the switch to mount those components.
I glued three sections of 20x40mm pine to the back of the board to stiffen it and to lift it away from the wall, creating a cavity at the back for cable management and the power supply. These were just glued into place with some PVA wood glue.
I used a hole saw to cut the holes for the USB C cables to route them to the back of the cluster, and then finished it off by spraying the front and back of the board using black spray paint.
Step 7: Installing the Components Onto the Back Board
Once the paint had dried, I started mounting all of the cluster components.
As mentioned in the previous step, I used M3x8mm screws to secure each Pi, screwing through the backboard and the acrylic base and into the aluminium standoffs.
I mounted the 8 Pis, then the cooling water components and switch.
I finished off the backboard by adding an RGB LED strip to the back so that it would light up the wall behind it. The strip has a remote control with a range of display colours and dimming options, but I think I'll mainly just use the red accent.
I didn't mount the display yet, as I wanted to get all of the cabling in place before covering up the cable routing hole with the display.
Step 8: Adding the Power & Ethernet Cables
I then added the cables.
I first plugged a USB C cable into each Pi and routed these through the holes in the base and to the back of the board. I mounted the USB hub to the back of the cluster and then plugged the Pis into the available ports. I had to use a splitter for each of the last two sets of Pis, as the hub only had 6 ports.
I wasn't sure if the hub would have enough power to run all 8 Pis. The official power supply for the Pi 4 is a 3 amp supply, but I had never seen any of my Pis run over 1A during use, so I thought I'd try it out and see. I could always add a second hub later if need be.
I then plugged and Ethernet cable into each Pi and routed these up the sides and through the hole behind the display before coming back out and into the switch. This enabled the excess cable to be coiled up at the back of the cluster, out of sight.
Step 9: Making Tube & Cable Holders
I designed and cut some cable and tube holders to assist with the positioning of the cables.
I initially tried cable tying the Ethernet cables together, but this just looked messy. So I designed a series of brackets to position the cables next to each other and hold them in place.
I also designed a bracket to hold the cooling water tube in place. There were only a few areas where these would come in handy, but they would still be useful.
Step 10: Connecting the Cooling Water Tubing & Display
I cut the cooling water tubing to the correct lengths and then pushed it over the fittings.
The cooling water circuit is a series loop, meaning that the water flows from one Pi to the next before going back to the reservoir. This has one main disadvantage, being that the Pis are cooled at different temperatures. The first receives the coolest water and the water gets progressively warmer as it passes through each Pi, with the last being the warmest. The other option was to put them all in parallel, but then I'd need to add a valve to each so that the flow rates are balanced, otherwise its quite likely that the Pis furthest away from the pump would receive little to no flow.
Once the cooling water tubing was complete, I added the display. I laser cut a bezel to fit around the display and then some acrylic brackets to mount it on.
You'll notice that I recessed the master Pi (top left) a little so that the HDMI cable fitted in underneath the adjacent Pi. without there being an obviously large space next to this Pi.
Step 11: Routing Cables
The cables were all routed to the back of the cluster where they were then coiled up, cable-tied and then either routed back to the front, to the switch, or plugged into the USB hub.
I also made up a connector to take the 12V supply to the switch and branch off another supply for the 120mm radiator fan and the pump.
Step 12: Filling the Cooling Water Loop & Adding Some Colour
Next, I had to fill up the cooling water circuit and hope that I didn't drown one of the Pis - which is something I was quite worried about with the number of connections.
I put the cluster onto its side so that the reservoir was upright and then filled it up. I kept the power to the Pis off while filling it but had to cycle the pump and fan a couple of times to move the water into the radiator and tubing.
There was one small slow leak at the inlet to the first cooling water block, I think because of the weird angle and twist to get to the radiator. I put a small cable tie around this joint to clamp it and the leak stopped.
I then added some red colouring to the water to highlight the cooling water lines.
Step 13: Preparing the Raspberry Pi OS SD Cards
I prepared a copy of Raspberry Pi OS for the master node, which was connected to the display, and then 7 copies of Raspberry Pi OS Lite for the other nodes.
I'm not going to get into the software side of the cluster in this build, as this was focused on the hardware assembly, and the software you choose depends significantly on what you're going to be doing with the cluster and how experienced you are with networking. Here's a guide on getting a very basic Raspberry Pi cluster running, while one of the best solutions is to use Kubernetes.
The preparation of the SD cards was done mainly to check that the Pis all booted up correctly, had enough power, and could be seen and interacted with on the network.
Step 14: Running the Pi Cluster
I powered the cluster up and waited for the operating system to load. All 8 booted up fine the first time and were able to be seen on the network.
The touch display worked quite well too. It's a little bit small for everyday use, but it's usable to launch applications, run scripts and to display basic data. As an example, I ran the CPU temperature monitoring script which I set up for my cooling solution comparison.
That's it, the Pi cluster is now ready to be set up and take on its first cluster computing operation!
If you enjoyed this Instructable, please remember to vote for it in the Make It Glow contest below and let me know what you think of it and what you'd do differently in the comments section.
Participated in the
Make it Glow Contest