DIY Raspberry Pi Desktop Case With Stats Display

by thediylife in Circuits > Raspberry Pi

31093 Views, 307 Favorites, 0 Comments

DIY Raspberry Pi Desktop Case With Stats Display

DIY Raspberry Pi 4 Desktop Case With OLED Stats Display
Raspberry Pi 4 Desktop Computer.jpg
Raspberry Pi 4 Desktop Computer Case.jpg
Pi 4 Desktop Case With LEDs.jpg
Raspberry Pi 4 Desktop Case Lights.jpg

In this Instructable, I'm going to be showing you how to make your own Desktop Case for a Raspberry Pi 4, which looks like a mini desktop PC.

The body of the case is 3D printed and the sides are made from clear acrylic so that you can see into it. An Ice Tower provides the cooling to the CPU and an I2C OLED display on the front of the case displays the Pi's IP address and information on the CPU usage and temperature as well as the memory and storage usage.

If you like this Instructable, please vote for it in The 1000th Contest!

Supplies

To Build Your Own Case, You'll Need:

In addition to the above, you’ll also need to have access to a 3D printer to print the plastic portion of the case.

I use the Creality Ender 3 Pro which I’ve found to produce great quality prints and is quite affordable.

3D Printer - Creality Ender 3 Pro – Buy Here

You don’t need a laser cutter for this build, although it does help significantly with making the sides. You can also use an online laser cutting service or simply cut your own sides using hand tools. I’ve used a Desktop K40 laser cutter/engraver.

Note: The above parts are affiliate links. By purchasing products through the above links, you’ll be supporting my projects, with no additional cost to you.

Design the Case Body

Designing The Case In Tinkercad.jpg
Designing The Case Mounting Footprint.jpg

I started out by designing the body of the case to be 3D printed using Tinkercad.

I drew a rough outline and then began positioning the Raspberry Pi and other components within the case so that the OLED display was visible on the front and the ports on the Pi were all accessible on the front or side of the case.

The OLED display is held in place with two small clips on the body along the top edge and a small 3D printed clamp with a screw to hold the bottom edge.

The Raspberry Pi and Ice Tower are both installed and mounted using the mounting hardware and standoffs which are supplied with the Ice Tower, so you don't need to buy any extras.

I don't really remove the SD card from the back of my Raspberry Pi very often, so I didn't make provision to do so through the case. If you'd like to be able to remove it while the Pi is in the case, then you'll need to add a cutout in the back of the case to allow you to do so.

3D Print the Case Body

3D Printing The Case Housing.jpg
3D Printed Components.jpg
Attach Fan Power.jpg

I 3D printed the body of the case on my 3D Printer using black PLA with a 0.2mm layer height and a 15% infill. I also added some supports for the ports and display cutouts on the front using the slicing software's.

Once the two parts are printed, you'll need to remove the supports and clean up the edges with a craft knife.

You can download the 3D print files here.

Install the Pi & Ice Tower

Standoffs Mounted Into The Case.jpg
Secure The Pi With The Second Set Of Brass Standoffs.jpg
Remove The Fan From The Ice Tower.jpg
Mount The Ice Tower Legs.jpg
Install The Ice Tower.jpg

Once the main body is printed, you can start installing the components. Start off by installing the brass standoffs into the base and then position the Pi onto them and use the second set of standoffs to secure it. This is done the opposite way round to the Ice Tower instructions if you happen to look at them first.

You'll also need to remove the fan from the Ice Tower as we're going to be mounting it onto the acrylic side panel so that it draws cool air in from outside the case and exhausts it through the holes in the opposite side.

Add the support brackets onto the Ice Tower and then mount the Ice Tower onto the Pi, remembering to add the heat sink contact pad first.

Install the OLED Display

Install The OLED Display.jpg
Secure The OLED Display Clip.jpg
Make Up The OLED Display Ribbon Cable Connector.jpg
Plug In The Ribbon Cable Connector.jpg

Next, we can install the OLED display.

If your display came without the pins soldered into place, you'll need to solder them to the back side of the display first.

Slide the top edge of the display underneath the clips in the body of the case and then secure it with the 3D printed clamp and a small screw. You might need to use a flexible shaft or 90-degree screwdriver to do this.

Make up a 4 wire ribbon cable assembly of the correct length using the female header pins and the ribbon cable. I used a crimper and some DuPont connectors, you could also just use female breadboard jumpers if you like.

Plug the display cable into the back of the display and then onto the Pi's GPIO pins as follows:

  • VCC to Pin1 3.3V Power
  • GND to Pin14 Ground
  • SCL to Pin3 SCL
  • SDA to Pin2 SDA

Design the Acrylic Sides

Export Side Profile Of Case To Make Acrylic Sides.jpg
Drawing The Acrylic Sides In Inkscape.jpg
Making The Hexagon Pattern For The Exhaust Air.jpg
Completed Side Panels.jpg

Now that the internals are all in place, we can close up the sides with the acrylic panels.

I started by exporting the side profile of the case with the Ice Tower roughly positioned so that I could open it up in Inkscape to design the pieces for laser cutting.

There are two sides needed, one with the fan cutout and mounting holes and one on the opposite side for the exhaust air. I designed a hexagon pattern onto this side, if you're going to be using hand tools to make your sides then you'll just need to drill circular holes.

Download the laser cutting files here.

Cut the Acrylic Sides

Laser Cutting The Side Profiles.jpg
Side Sheets Ready To Be Installed.jpg

I laser cut the side panels from 2mm clear acrylic. You can also use a colour tinted acrylic or an opaque acrylic if you'd like.

If you can't find the coloured acrylic in 2mm sheets, you can also use 3mm acrylic, you'll just have slightly thicker sides.

Install the Acrylic Sides

Screw Fan Onto Side Panel.jpg
Screw Fan Side Panel Onto Case.jpg
Fan Side Panel In Place.jpg
Screw On Exhaust Air Side.jpg

Start out by installing the fan side panel.

You'll need to press some M3 nuts into the pockets on the fan to mount it. These are quite tight, so it's easiest to place the nuts on a flat surface and then press the fan pocket down onto them so that the seat squarely in the pocket.

Screw the fan onto the side panel using the screws which you removed from the Ice Tower assembly. These are too short to go through the acrylic and the fan, so you'll need to press the nuts into the front side of the fan. They are tight enough that they hold the fan securely in place.

Lastly, use four M3 x 8mm button-head machine screws to attach the side panel to the case body.

Wrap the fan's power cable around the back of the Ice Tower and then plug it into the 5V and Ground pins on the Pi's GPIO pins.

Once your fan is connected, you can close up the other side with another four M3 x 8mm screws.

Program the OLED Display

Plug In Pi To Program Display.jpg
Python Script To Display Stats.jpg
OLED Stats Display For Raspberry Pi.jpg
Display Showing stats.jpg

Now we just need to get the display working using a Python script, you'll need to boot your Pi up to do this.

The Pi communicates with the display using the I2C interface, so you'll need to make sure that this is enabled in the preferences.

This script is mostly based on one of the example scripts in the Adafruit Python Library for OLED display modules, with a few minor changes to add the CPU temperature and change the format of the display. You can test run the script to check that your display is working correctly and you don’t get any errors before setting it to run automatically using crontab.

To download the script and see step by step instructions for getting the code to work, have a look at my blog post.

Reboot it and you should see your Raspberry Pi's stats and IP address shown on the display.

The Case Is Complete

Back Side Of Pi 4 Desktop Case.jpg
Raspberry Pi 4 Desktop Case With LED Lighting.jpg

That's the case complete, let me know if you like the design and what you'd do differently in the comments section.

Please also remember to vote for this Instructable in The 1000th Contest if you enjoyed it!

Good luck making your own Raspberry Pi desktop computer case!