In creating a casing for my new Prusa i3 style 2040 aluminium extrusion printer (similar to or heavily inspired by an AM8) I needed to create a compact housing for both the Raspberry Pi and the 4 channel relay I use.
The relay is controlled by several shell scripts to schedule certain GPIO ports of the Raspberry Pi from within OctoPrint. This way I'm able to switch the (older computer) power supply, schedule LED lighting and extruder cooler fan on/off.
The relay I obtained did not fit this 4-Channel Relay Module Case, so I needed to modify this (basically I started over).
The Raspberry Pi casing is based on this casing, but that also needed some modification.
The result is a very compact Rapsberry Pi relay server casing, from which it is still possible to tinker by exposing more ports and changing wires, I did not want to close everything in.
The relay parts and the bottom of the Pi casing are fastened with M3 Allen key screws and knurled brass inserts of M3 x 3 x 4 mm. The top of the Pi housing screws directly into the bottom part pillars. There is one photo showing the knurled inserts of the bottom Pi casing.
I've added multiple parts with different logos and attachment flanges, the naming of the parts should be enough to figure out which parts you need.
Drill out the holes for the relay bottom part, the holes are blind to assist in printing without the use of support.