Building a Raspberry Pi mini rack - Part 1

03 August 2021

Earlier this year, I managed to amass a table top full of electronics. Arduino's, Raspberry Pi's, Breadboards and components - you name it, it was covering my desk. Most of that is now packed in drawers thanks to the 3D Printing workbench I built last weekend. With a growing number of projects requiring GPIOs or just brushing up on my Kubernetes skills, I need a way to logically organise my growing collection of Raspberry Pi 4's such that they are all usable and clustered for some upcoming projects.

The obvious choice was to build a mini rack that can stack neatly on the table while doing some development work. Each Raspberry Pi would need some way to quickly identify what's going on (via an OLED screen) and ideally a few LED lights for some general purpose identification work. This rack would need it's own power and networking, ideally with the capability to add a Mobile Internet (USB) or Wireless capability for any portable or outdoor use. With this in mind, the part list is below.

  • 1 x Anker 60W USB Charger - This device looks great on paper and should comfortably run 3 x Raspberry Pi 4's with it's 15W draw at full load.

  • 3 x Raspberry Pi 4's - The brains of the operation - while there are plenty of limits on the cheaper Pico's and Zero's, these don't tend to have restrictions so you can find them around fairly easily. I've opted for 8GB ones to add extra room for database containers.

  • 1 x TP-Link AC750This ended up a difficult choice. The location of the Ethernet Port and Switch sold me on this one, the USB cable for Mobile Internet can be accessed on the side so this is a bit easier to get to than some of the other more capable GL.Net devices. The lack of an extra Ethernet port for WAN is a downer, but given it's only to provide internet connectivity to the cluster, the Wireless capability will have to do. It's also compatible with DDWRT so if I find myself stuck, there are a few hacks that might help this out.

  • 1 x Ubiquiti Mini SwitchThis USB-C powered mini switch has enough ports to connect the 3 x Raspberry Pi's, the Router and one spare for plugging a laptop into (or perhaps another network if the TP Link device is unreliable on Wireless.

With the parts sorted, it's time to determine what kind of rack to build. There are plenty of kits around for clusters - GeeekPi Raspberry Pi Cluster Case comes up a lot. On one hand, it looks to be sturdy and portable for the Raspberry Pi's themselves but the switch, router and power pack would need some work. There are many other similar styles all centred around the brass spacers and Perspex cut-outs but they're really just bigger with more fans and LEDs in the way.

Down the reddit rabbit hole, and there are a number of different 3D print options. The Ubiquiti Mini Rack was certainly appealing from a design and function perspective especially for odd-shaped components. As I'm looking at mounting some Raspberry Pi's though, I'd need to sketch up something modular to fit. I started mocking up a few designs in SketchUp 2017. Nothing too fancy at this stage - just something that would enclose each device with some cable management and the ability to stack them as I go. Having come up with one design for the Power Adapter, things were looking promising.

Figure 1 - Initial mock-up of the Power Supply module.

I wasn't too sure about having the USB power connectors go back through the case, as you might on a proper rack - but it would at least be sturdy. Other subsequent modules would match dimensions and become smaller or taller as required. Unfortunately, with 6 modules the height would be around 24cm. That's getting pretty tall - certainly taller than my PC case for sure. A few prints later and you can see that it's starting to take shape.

Figure 2 - Printer loaded, half way through.
Figure 3 - Power Supply snapped into place.
Figure 4 - Power supply, switch and router in place.

The first problem: the printing process was not great. These are some early prints after getting back into 3D Printing and many mistakes were made. I had assumed, for some reason, that I loaded the ABS Black spool in but it was PLA - I wouldn't find this out for some prints in. I had set the heat setting far too high for PLA - and just slightly low for ABS. The end result was that the molten plastic effectively scorched the printing tape underneath and caused a number of problems with the printing tape being embedded in the print itself. As I printed more, the quality seemed to get worse and the temperature of the garage certainly played a part in whether the first layer would stick to the tape.

Google and YouTube were fairly unhelpful - not because the content was wrong, but what I assumed to problem to be was wrong. I had followed advice to try Blue Painters Tape for adhesion, and this worked a little better. When I finally discovered that I had loaded the wrong spool in and I set the right temperature for PLA instead, it was far easier to replace the tape and so I continued a while with it.

I had only bought the one roll of PLA and further research would suggest and prove to be a far easier material to print with. But I'd bought several roles of ABS and needed to sort that one out. With some trial and error, I eventually settled on a Glass Square (200mm x 200m) with some Hair Spray to keep the ABS plastic down, and some Aluminium Foil inside the printer to help keep the heat in during printing (this had more of an impact than I thought it would - being in a Garage, it gets very cold in Victoria!). With some manual calibration of the Printer Bed, this turned out to be the best solution for both PLA and ABS. No more tape, super easy process to follow. If there was one thing I wish I knew before starting these prints again, is what 'bad' looks like.

There were a few other prints that were frankly rubbish. The design looked horrible and function definitely wasn't as good as it could be. So I continued browsing through Reddit and Thingiverse for more ideas. I saw a recent post about the Monty rack. This thing looks absolutely amazing albeit overbuilt for my purposes - but the concept is spot on. The case uses slotted extruded aluminium for the supports and 3D Printed rackmount inserts to mount everything in place. Prices in Australia for aluminium is not cheap though and frankly at the price just for the supports - I could certainly build something like this in a more visually attractive way, such as a wall mounted cluster.

I ultimately decided not to do that (although it would have looked pretty cool with some water cooling and cables laid out on a board), and instead look at 3D Printing some supports. I would design a 2cm x 2cm design, with a trapezoid cut out to help give the screws themselves a little more plastic to help hold each face plate in place. Each 'RU' would effectively be 3cm high, and 15cm wide (11cm usable space, given the 2cm each side). The power supply will be mounted at the back, inside the rack 'square' and as such would create a nice little cube - around 15cmx16cm accounting for legs and a top (20cm if I decide to add handles).

Figure 5 - Plastic extrusion clone.

The holes are small enough to enable some self-tapping from some leftover M3 Thumb Screws I have from an old PC Repair kit to hold the face plates in place and each end will enable some standoffs to be glued in place to hold the top and bottom 'lids' in place. I chose Black for the Aluminium extrusions, Grey for the trays to hold components in place and Red for the face plates. The design would be somewhat reminiscent of 80's style electronics.

Figure 6 - 3D Printed Support Bars and first Face Plate
Figure 7 - Ubiquiti Switch added to the stack.

Ok - this thing looks about 1,000x better than the previous attempt and far better than I thought it would look. The holes are the right size for those M3 screws to grip without being overly troublesome (although if I were to do this all over again, I'd probably make the holes around 0.5mm smaller again) and the sizing for the first component is spot on. I'd just need to print a tray for this to sit in, some other faceplates and the other supports. If the Raspberry Pi now fits in the rack, along with the LED Lights / Buttons and OLED screen, we should be onto a winner.

Figure 8 - Raspberry Pi Mount with PCB for Screen, LEDs and Buttons.

This Raspberry Pi faceplate probably took the most amount of time to get right - aligning the USB and Ethernet ports. I needed enough room to place the 4 x 3mm LEDs, 4 x Push Buttons and enough room for a 128x32 OLED Screen. The idea being that I can see what's running on each Raspberry Pi without necessarily logging in to see what's going on. If I need to reboot them, I can do it from the controller. The lights will help build and diagnose some GPIO projects and also enable the remainder of the rack to run a series of ARM-compatible containers. I would use a consistent approach for cooling via an Armour shell - if these things are running databases and Kubernetes, as well as powering a potential light show at the end of the year, then they're going to produce a fair bit of heat from each CPU.

This leads up to the end of May when I thought I might only require a Raspberry Pi 2 as the Kubernetes master node. This has changed in design since then, but to give you an idea on what a full stack would look like (and when I noticed I didn't have an extra two thumb screws), I've placed the photo below.

Figure 9 - Face Plates completed.

At this stage, I'm pretty happy with the progress but still have a little bit more to do. For starters, I'll need to wire up a screen, buttons and do some programming before finalising the PCB for the slot. Secondly, I'll need to print all supports and the cover for top and bottom.

But that's where this post will end. Until next time!

Building a new 3D Printer Workbench

27 July 2021

Several years ago, I purchased a 3D Printer due to a growing number of projects I wanted to start building. Given the prices had dropped considerably, I opted to purchase a Da Vinci Pro 3D Printer - a fully enclosed one that is somewhat suitable for ABS and PLA printing such that I could design and print a few cases and models for some electronics projects I was planning. Suffice to say, I got as far as 3D Printing a goose that lived on top of a Christmas Tree in 2019 before the preparations of having a baby began (read: lots of painting, house maintenance and other things during lockdown that were an incredible time suck).

Figure 1 - Da Vinci Pro 3D Printer
Figure 2 - Printed and Painted Goose
Figure 3 - Goose at the top of the 2019 Christmas Tree

By the way, if you don't get the reference - I strongly recommend you check out a game coded and published by a local developer here in Melbourne - Untitled Goose Game. While short, it's a barrel of laughs.

With the garage walls painted, floor epoxied and my shelving in place, it was time to set up my workspace for 3D Printing and other projects. I had a table space of approximately 120cm x 60xm of which the printer itself took up around half of that. Somehow I managed to cram a soldering station and storage on the table in the remaining 60cm x 60cm. I've recently purchased a Resin printer and UV curing station in the hopes of printing miniature models with detail and of course there's no room to place these items in the current setup. This got me thinking about building a new workbench.

Earlier, I had some success building a couple of computer tables with an Alex shelf from Ikea and a Kitchen Bench Top from Bunnings. The end result is aesthetically pleasing and quite practical without costing the world to build so I figured something in a smaller scale might fit the bill.

Figure 4 - Desk setup from earlier 2020 feat. Alex Book Case and Bench Top.

If I were to replicate the same kind of thing as above with a couple of Alex Drawers, some thinner bench tops and some thick heavy duty castor wheels - it would be a super useful bench to move my growing 3D Printer collection and associated spools as well as store my ever-growing collection of electronics and microcontrollers. There's not much wrong with the dimensions of the existing table - 120cm x 60cm should be sufficient for these two printers and the curing tank. This will leave a little bit of space to work on as well, with plenty of storage for the growing electronics collection. And of course, the remaining 120cm x 60cm table can be used for the full soldering station with plenty of elbow room.

The order goes something like this:

The total cost comes to around $380 if you have some screws lying around otherwise add a few extra dollars for some wood screws.

Having purchased much of this before lockdown no. 5 and a spare weekend to get it all done in, I set out to build the two Alex drawer shells and had a production line going for the drawers themselves. No photos of this stage, but having built them before the best thing I can suggest, like any Ikea product, is sort the screws into piles before beginning and have easy access to each of the parts.

The next step was to build a platform for the drawers to live on. At this stage, I found some wood screws and was about ready to start drilling away until I realised I had no washers to hold the castor wheels in place! Not to worry - I've got a 3D Printer. So I pulled out my trusty copy of SketchUp 2017 and drew a countersunk washer. Having put 24 of these on the 3D Printing platform, it's now time to get them printed while assembling the remaining drawers.

Figure 5 - Washers in XYZPrinting
Figure 6 - First castor wheel screwed to the first panel. Only 5 more to go!
Figure 7 - All six castor wheels attached to the bottom platform.

With all six castors installed, the next step is to mount the Alex Drawer shells to this panel. When assembling the shell, make sure you've got the right panel with the holes in it facing downwards as the top panel in this instance is solid. They are interchangeable - just be mindful about placement.

Figure 8 - Alex Drawer Shell on each side of the bottom platform.

Now these drawers aren't perfect fits - there's about a 2cm overhang but for my use, this isn't a problem as the power board will mount at the back some time in the future.

Figure 9 - Panel overhang by 2cm.

Once complete, the next step is to cut VELCRO strips to length in four places to mount the top panel to the top of the drawers. I like the Velcro strips as it stops table movement on the top, but it's also removable if you need to adjust it or to disassemble it later. It also helps offset any minor table warping so it sits somewhat flush on top. I find it easiest to bind both sides of the VELCRO strip together before cutting into lengths. Remove the sticker from one side and place it on the wood panel but leave the sticker on the side that will attach to the top of the drawers until ready to assemble.

Figure 10 - VELCRO Strips in place.

The final step is to remove the protective sticker and carefully flip over before mounting. By slowly letting the front down, I was able to make minor adjustments until both sides were square with each chassis. Once in place, push down where the strips are attached to ensure a good seal with the cupboards underneath.

Figure 11 - Mounting the top panel to the top of the drawers.

Having then assembled the smaller drawers, it's time to insert them into the chassis and screw them in.

Figure 12 - Assembled Drawers awaiting mounting
Figure 13 - Completed drawer installation.

It's finally done - end to end it took around two hours with most of that time in assembling the drawers themselves... and probably another two hours moving all of my electronics and microcontrollers to the drawers. With a bit of cleaning and unboxing the Resin printers, I can see how they'll look including turning the printer on for a quick run.

Figure 14 - Future 3D Printer Home

For $380, this looks and functions fantastic. It really is just a platform with a few drawers attached, but now it's home to most of my project work ready to wheel around the garage as necessary. Given how well this came out, there might be another one made in the coming months to move the soldering station among other things to.

« < 1 2 3 4 5 6 7 8 9 10 11 12 13 > »