Tiny Package, Many Projects

OMG, isn't that just the cutest PiTFT display? The Adafruit 2.2" PiTFT HAT is a perfect mini display for all sorts of Raspberry Pi projects. In this project, we're going to 3D print an enclosure to fit the Pi A+ and the 2.2" PiTFT. There's openings for HDMI, microUSB, A/V jack, USB and SD card. There's also rubber buttons for the 4-tactile switches on the display.

Prerequisites Guide

Ready through the following guides to get catch up on how the display works and options to run OpenGL based games.

Tools & Supplies

If you don't already have the tools and supplies, you can order by clicking on the thumbanils on the right side.

Parts

You only need a Raspberry Pi Model A+ and the 2.2" PiTFT for this project, but if you want this to be portable, you need a 5V USB battery pack.

Mini Astrobox

With this project, we can make a small astrobox that puts our 3D printer on the Wifi Network. The Astroprint image is easy to install and lets us control the printer with any device on the network.

Simple, easy and cute!

This is a very simple project using the raspberry pi a+ and PiTFT 2.2" display. 
There's minimal soldering involved and it's really easy to put together. Power via USB on computer or portable battery. It's almost as simple as the enclosure appears.

  • 2.2" PiTFT is the smallest display in Pi HAT format
  • The covers feature standoffs with pegs for mouting to PCBs - no screws, adhesives or extra hardware 
  • PiTFT features ready to burn image with preconfigs for Raspbian - the guide has links to download and full documentation
  • Use chromium in kiosk mode for astrobox
  • Retropie works and you could play emulators

I Don't Own a 3D Printer, Help!

Check with your local hacker/maker space, library or a 3D printer directory like 3D Hubs. You can send the STL files to a local 3D printing operator.

Type in your location and get a list of available makers!

Printers & Materials

To print the parts, the 3D printer will need a bed with a minimum size of 100mm x 100mm x 50mm. Prints the parts with no support material. Use the slice settings below for reference.

Parts should be good to print as is. Orientation should be flat and centered on the bed.

pi22-bot.stl

bottom of case

pi22-case.stl

case frame

pi22-standoffs.stl

standoffs

print two

pi22-top.stl

top of case

4 top/bottom layers

pi22-buttons.stl

rubber buttons

print with ninjaflex. 240c extruder with printing speed of 30mm/s

Slice settings for Printrbot Simple Metal in CURA

  • 8% Infill
  • 1mm shell
  • 0.2mm layer height
  • .8mm top/bottom layers
  • 208c temperature
  • Skirt 3mm distance / 1 line count
  • Print speed 40mm/s
  • Travel speed 70mm/s
  • Retraction 30mm/s speed 
  • Retraction distance 1mm

Display Alignment

If your screen isn't lined up with the outside on the PCB silkscreen, you may want to adjust it so it's properly lined up with the cutout in the enclosure.

Adjust Display

Carefully slide a razor blade or small putty knife underneath the display and use the edge to push the adhesive off the foam tape.

Be cautious and avoid scraping the silkscreen on the PCB (as that could cut a trace). This may remove some of the stickness of the foam tape. Carefully peel it off.

Place and Stick

Add a new piece of foam tape to the same spot on the display. Line up the display with the outline and press it down to stick it into place.

Add GPIO socket header

Insert the header into the GPIO on the display. Use a mounting putty on both sides of the header. Press it down to temporarily secure the header in place.

Secure PiTFT 

A Panavise Jr will help hold the PCB in place while you solder. Place the PiTFT PCB into the Panavise Jr. with the header facing out.

Solder Header

Position the PCB so it's in a comfortable orientation for your hands to solder (lefty or righty?). Heat up your soldering iron, and grab some solder. Apply solder to the pins.

Soldered Header

Check that all the pins are soldered nicely and there's no bridging, cold solder, shorts, or unsoldered pins.

Ready PiTFT

Your 2.2" PiTFT is now ready for installing! In the next page we'll assemble the enclosure.

Top Cover

Grab the 3D printed top part and the 2.2" PiTFT. We need to test the tolerenaces to ensure everything is going to fit right.

Test Mounting Pegs

Line up the buttons cutouts with the ones on the display and place the top part over the display. Press down on the corners to get the pegs to insert into the mounting holes on the PiTFT PCB.

Test Spacers

The two 3D printed spacers have holes on boths sides. They should fit into the pegs on the top and bottom parts. These spacers keep the two PCB's from bending and closing in on each other.

Bottom Cover

Grab the 3D printed bottom part and the Raspberry Pi A+. We'll also test the tolerances on these two. Place the part underneath the PCB and press down on the corners to insert the pegs into the mounting holes.

Install Spacers

Remove the top and bottom parts from the PCB's and install the PiTFT onto the Raspberry Pi A+. Fit the two spacers on the ends near the tactile buttons. You can add a very small amount of mounting tack to keep them from falling out.

Install Circuit into Case

Insert the PCB at an angle with the ports going in first. Press the PCB down into the case and pull the edge with the clips outward a bit to let the side with the GPIO fit.

Ports

The ports should line up with the cutouts on the case. At this point you should check the spacers are still in the right spot. Make sure the holes are lined up.

Install bottom part

Grab the bottom part and line up the SD card cutout with the cutout on the case. Press down on the corners to fit the pegs through the mounting holes and through the spacers .

Install Rubber Actuators

Insert the ninjaflex buttons into the cutouts on the top cover part. They'll have a slightly lose fit so you need to hold them down while installing the cover to the display.

Install Top

Hold the top part face down, so they buttons don't fall out. Place the case part onto the top cover. Press the two parts together and make sure the corners snap together.

Final Enclosure

Yay it's done! If everything snap fits together nicely, you should be good to install an SD card and power up your tiny Raspberry Pi project.

Install SD card

The cutout on the bottom part of the enclosure should let you insert a microSD card. 

Tolerances aren't right?

If you find the pegs from the 3D printed parts don't fit into the mounting holes, you may need to level your printers bed and ensure its not too tight. Alternatively you can resize the diameter of the pegs in CAD or carefully sand them.

Pegs Break?

They pegs should be pretty ridged and withstand several installations. If you find they easily break off, you may want to turn off your retraction in your slicing software. I’ve personally found Makerware has this problem. Try CURA or Slic3r instead.

Top and Bottom covers don't fit?

If the corners don't quite snap into the case, the spacers are most likely not aligned properly, causing the pegs to only insert half way through.  Use a thin pointy tool to poke the spacers and align them into place.

Ready to go image

The PiTFT requires kernel support and a couple other things to make it a nice stand-alone display. We have a detailed step-by-step setup for hackers who want to tweak, customize or understand the PiTFT setup. If you just want to get going, check out the ready to go image!

Detailed Instructions

Check out the prerequisite guide to manually install the tools for the PiTFT. There's also a helpful FAQ for things like switching between the PiTFT and an HDMI Monitor.

Astroprint

If you're interested in using this as an Astrobox to wireless controll your 3D printer, you'll need to first burn an image of Astroprint to a microSD card and then manually install the tools for the PiTFT. We have a guide on install Astroprint on the Raspberry Pi.

This guide was first published on Aug 31, 2015. It was last updated on Aug 31, 2015.