3D Printed Case

If you're just getting started with BrainCraft projects, chances are you need a way of keeping parts held together. This is where a 3D printed enclosure comes in handy. This case is designed to house the Raspberry Pi 4, BrainCraft HAT and a Pi camera module. It features a mounting plate for mounting to camera tripods.

Pi Cameras

The enclosure supports both the Camera V2 and HQ modules. The PCB mount features mounting holes that make it easy to secure the camera.

Prerequisite Guides

Take a moment to walk through the following guides to get familiar with the boards and components.

Parts

Video of a white hand hovering a coffe mug over a Adafruit BrainCraft HAT thats connected to a Raspberry Pi 4. Display detects that its a coffee mug.
The idea behind the BrainCraft HAT is that you’d be able to “craft brains” for Machine Learning on the EDGE, with Microcontrollers & Microcomputers. On ASK...
Out of Stock
Angled shot of Raspberry Pi 4
The Raspberry Pi 4 Model B is the newest Raspberry Pi computer made, and the Pi Foundation knows you can always make a good thing
$45.00
In Stock
Angled shot of Raspberry Pi Camera Board v2 - 8 Megapixels connected to a flex cable and a Raspberry Pi.
Snap, snap! The Camera v2 is the new official camera board released by the Raspberry Pi Foundation!The Raspberry Pi Camera Board v2 is a high quality 8...
$29.95
In Stock
Top view of Raspberry Pi HQ camera module.
Snap, snap! There's a new official camera board released by the Raspberry Pi Foundation!The Raspberry Pi High Quality Camera is the latest camera accessory...
Out of Stock
Angled Shot of the Speaker - 40mm Diameter - 4 Ohm 3 Watt.
Hear the good news! This speaker is a great addition to any audio project where you need a 4 Ohm impedance and 3W or less of power.At 40mm diameter it...
$4.95
In Stock
1 x JST PH 2-Pin Cable for Speaker
JST PH 2-Pin Cable - Female Connector 100mm
1 x M2.5 Hardware
Black Nylon Screw and Stand-off Set – M2.5 Thread
1 x Mini Tripod Stand
Portable Folding Desktop Stand
1 x Mini Ball Head for Tripod
Tripod Mini Ball Head Tripod Mount Head-Metal

Parts List

STL files for 3D printing are oriented to print "as-is" on FDM style machines. Parts are designed to 3D print without any support material. Original design source may be downloaded using the links below.

File names

  • frame.stl
  • back-frame.stl
  • pcb-mount.stl
  • back-cover.stl

CAD Assembly

The Pi is secured to the PCB mount with M2.5 standoffs and machine screws. The Pi camera module is secured to the PCB mount with M2.5 standoffs and machine screws. The PCB mount is secured to the frame with M2.5 screws and hex nuts. The back frame snap fits onto the frame. The back cover snap fits onto the back frame.

CAD Files

You can download 3d models of the components used in this project from the links below.

SVG Files for CNC

Use the SVG file to create a face plate out of acrylic with a laser cutter or CNC mill. This is a substitute for the pcb-mount.stl part and has the same mounting holes. The plate works best with 1/8in (3mm) thick sheets of acrylic material.

PCB Mounting Hardware

Use the following hardware to install on the PCB Mount.

  • 4x M2.5 x 6mm FF standoffs
  • 4x M2.5 x 4mm long machine screws

Install Standoffs

Insert machine screws through the four mounting holes on the PCB mount. Reference the photo for correct placement and orientation. Fasten the standoffs onto the machine screws.

These standoffs will be used to secure the Raspberry Pi.

Secure PCB Mount to Frame

Place the PCB mount over the tabs on the frame.stl part. Use the following hardware to secure the PCB mount to the frame.stl part. 

  • 4x M2.5 x 6mm long machine screws
  • 4x M2.5 hex nuts

Pi Camera Hardware

Use the following hardware to secure the Pi Camera Module (either V2 or the HQ module)

  • 8x M2.5 x 4mm long machine news
  • 4x M2.5 x 12mm long FF standoffs

Install Standoffs to Camera

Insert the M2.5 machine screws through the four mounting holes on the raspberry pi camera module PCB. Insert and fasten the standoffs on to the screws. Finger tightened the screws to secure the standoffs. 

Secure Camera to PCB Mount

Place the Raspberry Pi camera module over the PCB mount and line up the standoffs with the mounting holes. Reference the photo for correct placement and orientation.

Use 4x M2.5 x 4mm long machine screws to secure the standoffs on the Pi camera module to the PCB mount.

Remove SD card from Raspberry Pi before installing into case

Secure Pi to PCB Mount

Use 4x M2.5 x 4mm long machine screws to secure the Raspberry Pi to the PCB mount. Place the Raspberry Pi over the four standoffs that you installed earlier. These should be facing the opposite direction of the Pi Camera. Insert the screws through the Pi's mounting holes first, then place the PCB over the standoffs. 

Connect Flex Cable

Insert and install the flex PCB cable on to the camera connector on the Raspberry Pi. Thread the flex PCB cable through the slot on the BrainCraft HAT – Pull the cable all the way through. Then, snap fit the BrainCraft HAT on top of the Raspberry Pi. Firmly press the headers together.

Be sure to fully secure the latch on the Raspberry Pi Camera Connector.

Tripod Hardware

This step is for specifically for the Raspberry Pi Camera Module v2.

The Raspberry Pi HQ Camera has a built-in tripod screw and does not require this step.

Use the following hardware to secure the tripod mounting plate to the back frame.

  • 2x M2.5 x 6mm FF standoffs
  • 4x M2.5 x 4mm machine screws

Install Tripod Screw 

Install a 3/8 to 1/4-20 screw insert to the tripod plate. Use a 3/8-16 size tapping tool to create better threads in the 3D printed plate. The tripod screw insert can be fastened using a flat head screw driver.

Install Tripod Plate

Insert the M2.5 x 4mm screws through the two holes on the side of the back-frame.stl part. Insert and fasten the 2x M2.5 x 6mm FF standoffs to the thread of the screws – Note the placement of the standoffs. Use 2x M2.5 x 4mm screws to secure the tripod plate to the standoffs.

Install Back Frame

Carefully fit the back-frame.stl part over the BrainCraft HAT and snap fit it onto the frame.stl part. Thoroughly "click" all of the edges together to secure the framing

Connect Flex Cable to Camera

Insert the flex PCB cable into the camera connector on the Raspberry Pi camera module. The blue colored side should be facing away from the camera's image sensor.

Be sure to fully secure the latch from the Raspberry Pi Camera Module.

BrainCraft HAT Cover

Place the back-cover.stl over the BrainCraft HAT and orient the cover so matches the display, buttons and ports. Slide the flex PCB cable from the camera over the slit on the back cover. Press all of the edges together to fully secure the cover.   

Final Build

Congrats! The enclosure is assembled and ready for use. Have fun and happy machine learning!

This guide was first published on Nov 11, 2020. It was last updated on Mar 08, 2024.