The Raspberry Pi cluster

I think that’s called a bake sale

personal
raspberry pi
cluster
ir
wildlife
camera
homelab
kubernetes
k3s
nas
Author

Shannon Quinn

Published

Posted on the 13th of July in the year 2022, at 4:30pm. It was Wednesday.

A birdhouse sized for small owls, being retrofitted to house a single Raspberry Pi 3B+ connected to multiple cameras positioned discreetly on the outside of the birdhouse, while still providing room inside for birds to nest.

This birdhouse is watching you.

Ha! Thought I’d left for good, didn’t you? Yeah well, I’m back b****es, and I’m here to talk about a little at-home tech project I’ve been working on for the better part of the past year. It comes in multiple parts–so the updates will come in multiple posts!–and it’s still very much a work in progress. But I’ve reached the point where I actually have something interesting to talk about, so I wanted to go ahead and get this party started.

Over a year ago, as intermittent lockdowns dragged on and overall job satisfaction continued to plummet, I was looking for ways to keep my brain busy outside of work (read: to keep from going insane). I had a couple of Raspberry Pis I had ideas for, but which I just hadn’t gotten around to doing anything with, so I did like any good restless tinkerer with both too much and too little time on their hands would do: I went out and bought five more of them, then assembled them into a mini-cluster.

I posted about this a few times on my instagram: first when I’d assembled the Pi cluster, and again when I’d put together a Network Attached Storage (NAS) with 20TB to do my bidding.

Since then, things got busy, but thanks to a two-week staycation in mid-late May of this year, I’ve made significant strides:

The latter two are what I’ve been focusing on over the past few months in particular (the last one is the cover image at the top of this post!). For the second one, I took the approach of trying to make everything as self-contained as possible. When you’re setting up a cluster of Raspberry Pis, there’s a shocking amount of cabling involved, despite what their diminuitive form factors might have you believe: they still need some space, and given the aforementioned toddler, I wanted as much of the full apparatus wrapped in a protective covering as possible.

This was the end result:

A homemade tiny server rack built from wood specifically meant to protect the 5-Pi stack from toddler smacks.

Why yes, that is indeed a GamersNexus anti-static mat.

The Pi cluster “rack”, the 8-port switch, the power strip, and even a handful of intake/exhaust fans would all be installed inside a homemade “cage”. Only two cables needed to exit the cage: one for the power strip (to go in an outlet), and one for the network (to go in the router). The rest would be protected inside half-inch hobby wood from Home Depot, safely protected by a hinge cover with a handle and a slide lock. For easy viewing, I made a side panel transparent with acrylic (man that was a bitch to cut and adhere), and I even managed to slice out some openings in the front and back to install intake and exhaust fans, just to make absolutely sure the temperatures didn’t get too obscene.

I learned a lot along the way, not the least of which involved wiring, voltage/current/resistence, woodworking, and design.

Two bare wires from a USB cable. I cut these cables so I wire them instead to directly power 5V Raspberry Pi fans.

Learned a lot about wiring. See those fans in the back? This was a cooler originally designed to sit on top of desktop RAM; instead, I’m repurposing them to work as exhaust fans for the cluster.

A Farsense voltage converter, specifically for pulling standard 5V USB inputs to 12V outputs.

Had to revisit high school and college electrostatics, since some of these fans drew 12V but I only had 5V outputs on the Raspberry Pis (they’re not meant to carry high voltage!).

Slices of cables that I used to extend the length of the actual Raspberry Pi fan cables, so they could reach the Raspberry Pi GPIO pins from their mounts in the side of the server rack.

So yeah, had to do some actual wire splicing and modding to get everything to play nice in the low-voltage environment.

Final configuration of the server rack with running Raspberry Pi cluster, lit from the inside by the former RAM fans, and visible via the side plexiglass panel.

But wow, was it worth it!

As for the birdhouse, it also comes with a bit of a surprise. I bought one that was big enough to house its own Raspberry Pi, which I built inside a waterproof/shatterproof plastic container to protect it from the outdoor elements. This is what drives the infrared camera on the front and handles detecting wildlife that walk by.

A side view inside the birdhouse through an open panel. Inside is the Raspberry Pi 3B+ within its waterproof/shatterproof case, with a hinged piece of wood on top, followed by about a cubic foot of space for birds to nest, along with sawdust as nesting material.

This is the Pi’s home inside the bird house. Still plenty of room for birds to nest above without disturbing or being disturbed by the Pi!

The mounted Raspberry Pi NoIR v2 camera, just above the entry/exit hole for the birds, so that the camera ribbon can be run along the top and back of the birdhouse and protected with Gorilla tape, out of the way and hopefully uninteresting to any nesting birds.

This is the infrared camera that can see amazingly well at night. Its data/power ribbon is protected both from the elements and by the residents of the birdhouse by Gorilla tape, something Mark Rober recommended.

And I’m definitely not done yet. I still have a LOT of additional testing to run on the capabilities of the infrared camera (you can track my progress at the bleeding edge or even provide suggestions here at the GitHub repo I’ve set up for it), and the actual Raspberry Pi cluster still needs to be spun back up after I reformatted the whole thing to start from scratch.

Ultimately, the goal is to have the Pi cluster act as the processing center, providing all kinds of internal apps for viewing and managing data on the NAS–including photos, videos, and audio, in addition to the wildlife images being captured at night–while the birdhouse is just one component that generates videos for analysis and storage.

I’ll be posting additional updates here as I make progress. Join me, won’t you? :)

Citation

BibTeX citation:
@online{quinn2022,
  author = {Quinn, Shannon},
  title = {The {Raspberry} {Pi} Cluster},
  date = {2022-07-13},
  url = {https://magsol.github.io/2022-07-13-the-raspberry-pi-cluster},
  langid = {en}
}
For attribution, please cite this work as:
Quinn, Shannon. 2022. “The Raspberry Pi Cluster.” July 13, 2022. https://magsol.github.io/2022-07-13-the-raspberry-pi-cluster.