Woodwork: finishing the casing

This weekend I finally had time to proceed with the cluster. In the last week I had been busy programming the display. After I got it working with about a 150 wires I wanted to convert it to a display with a i2c backpack. That should work with just 4 wires. This took a lot of time (the first backpack I ordered was faulty but it took me quite some time to establish that…). After I ordered a new one (this time I choose not to order an Adafruit display and backpack but a (MUCH) cheaper alternative) I got it to work pretty quickly.

I wanted to get the i2c display to work on Raspian, Minibian as well as CentOS. So far it works on the first two, on CentOS not yet as there is no smbus library for Python for that OS. But I’ll keep working on that…

Today I installed my new milling machine in the milling table and had a go at finishing the casing.

The built in display works!
The built-in display works (looks much better in real)!

At first I milled out the hole for the display. As expected this did not work out so well, the hole was bit too large. But I installed the display anyway and filled the gap with instant wood. I just hoped that when painted this would hardly be visible…

All glued together
All glued together

After glueing everything together and sanding the base I was pretty happy with the result!

Top view of finished casing
Top view of finished casing
Two large ventilation holes in the back
Two large ventilation holes in the back

In de back I milled two large holes for ventilation. I am sure the switch and USB hub will thank me for that!

Inside view with mounted display
Inside view with mounted display

The display is recessed into the front panel

Detail view of the display
Detail view of the display
Looking good after 4 coats of paint
Looking good after 4 coats of paint

After sanding again I painted the casing 4 times and the end result looks pretty nice. So tomorrow I can finally start the actual assembly…

 

Programming the display

After my milling machine died on me, I had a go at hooking up my display and writing some code. As I am not very good at this (remember, one of the reasons to build the cluster is to practice my programming skills) I leaned heavily on code I found online. Good resources for this are:

Combining the descriptions in the above links I was able to hook up my Pi with the display. The only difference from the Adventures book (written for the old Pi with 26 pen GPIO) to get it working was to connect display pin 13 to GPIO pin 21 instead of pin 27.

My first attempts at configuring the display
My first attempts at configuring the display

After that I modified some of the Python code found at the linked sites and…. YES it works! Now I only have to get it nicely integrated in my wooden base… Of course I will not tolerate so many wires in plain sight so I will probably go for a backpack behind the display to reduce the number of wires to only 4.

The design

First thing of course was deciding on a design…: would I make a stack of 4 Pi’s, two stacks of two sitting side by side or 4 Pi’s side by side… After some thinking I decided to stick with my original idea of the 2 x 2. The pile of 4 seems a bit unstable and the 4 in a row would take too much space at my desk.

The base of my cluster was going to be made of wood and would have to have enough space to accommodate the hub, switch and all cables.

I also decided to fit a 16×2 3V3 LCD Display somewhere in the cluster to show the IP or something. Just like in the Makezine manual.

With that out of the way I started working on the Pibow casings. More on that in a future post.