Skip to content

PiPiece

PiPiece Photo

pipeline status

A custom Raspberry Pi 5 case designed for astrophotography! Works perfectly with the HQ Camera V3 and HyperPixel 4.0 Screen.

Quick Navigation

UI & Software

For the web-based interface and software controls for PiPiece, check out the PiPiece UI project. It provides a user-friendly dashboard for controlling and monitoring your astrophotography setup on the Raspberry Pi.

pipiece ui preview screenshot

Getting Your Parts Ready to Print

Check out the interactive OpenJsCad viewer below to explore the 3D model! When you're ready to print:

  1. Uncheck all the parts you don't want to print
  2. Set the resolution to Ultra High to get a smooth part
  3. Select your export format (STL is what most people use)
  4. Click generate (it's best to generate an STL file for each part individually)
  5. Import the file into your favorite slicer and start printing!

Tip: I highly recommend printing with PETG instead of PLA. The Pi 5 runs pretty warm, and PLA can get soft and deform over time. PETG handles the heat much better!

What to print: You'll need three parts total:

  • cameraCaseTop
  • cameraCaseBottom
  • picase

Download the STL files directly:

Assembly Guide

Welcome to your PiPiece build! 🎉 Once you've got your 3D printed parts ready (the main case, camera-case-top, and camera-case-bottom), you're ready to start putting everything together. Don't worry—we'll walk through it step by step!

What You'll Need - Parts

image 1

Here's your shopping list:

Note: The links below go to Adafruit and Amazon for convenience, but you can source these parts from any retailer you prefer!

Plus, you'll want one of these lenses:

or

What You'll Need - Tools

Grab these tools before you start:

  • 1.5mm hex wrench (for removing the tripod mount from the HQ Camera)
  • 2mm hex wrench (for the M2.5 socket head screws)
  • Phillips screwdriver
  • Needle nose pliers
  • Painters tape (about 2 inches worth—this helps keep the ribbon cable in place)

Step 1: Remove the Tripod Mount

First things first! Use your 1.5mm hex wrench to remove the 1/4-20 tripod mount from the Raspberry Pi HQ Camera. We'll be putting this back on in a different orientation in the next step.

image 2

Step 2: Case Up the Camera

Now slide the camera case over your camera, then connect the ribbon cable. Here's the trick: when you re-attach that 1/4-20 tripod mount, make sure the flush part is positioned next to the camera case. This ensures everything fits snugly!

image 3

Step 3: Mount the Camera Assembly

Time to mount your camera assembly to the main case! Use those m2.5 20mm socket head screws and locking nuts. Tip: Make sure the ribbon cable threads through the rectangular hole in the case—it's designed specifically for this.

image 5

Step 4: Connect the Raspberry Pi

Carefully attach the ribbon cable to your Raspberry Pi, making sure the network and USB ports line up properly with the case openings. Then add the HyperPixel GPIO header extension onto the Pi. You're doing great—we're halfway there!

image 6

Step 5: Secure That Cable!

Here's where that painters tape comes in handy! Carefully tape the ribbon cable to the underside of the Raspberry Pi. A couple of important things to watch out for:

  • Don't cover the mounting holes on the Pi
  • Keep the second micro HDMI port clear
  • There's a helpful little rib molded into the case that helps guide the ribbon cable away from the HDMI port—use it!

Painters tape works great here because it won't leave residue, but any gentle tape will do.

image 9

Step 6: The Final Assembly (Take Your Time!)

This is the trickiest part, so let's go slow. Attach the HyperPixel 4 screen, then carefully lower the entire assembly into the case. The fit is pretty snug, so here's the technique:

  • Use the USB and network ports as guides to help maneuver the board into position
  • Important: DO NOT press directly on the screen or force anything!
  • Let the m2.5 15mm screws do the work—gently tighten them to draw the case and screen together

image 10

Remember: patience is key here! The screws will gently pull everything into alignment. No pushing on that beautiful screen!

image 11

🎊 Assembly Complete! Look at what you've built!

image 12

The Finishing Touches

Now for the fun part—adding your optics! You can either:

Attach a lens directly:

image 13

Or go with an eyepiece adapter:

image 14

Then connect it to your telescope and you're ready to explore the cosmos!

image 15

image 16

For Developers: Working with the Source Code

Want to modify or customize the design? Great! This project uses gulp to bundle everything into a single dist/PiPiece.jscad file. Here's how it works:

  1. Run the development server: npm start
  2. Start a jscad1-server instance (JSCAD v1 isn't available online anymore, but you can install a local server via NPM)
  3. Drag the generated dist/PiPiece.jscad file into the jscad1-server window
  4. Enable Auto Reload in OpenJSCAD
  5. Save your changes and gulp regenerates the file—your model updates automatically!

Pretty cool, right? 😊

Other Useful Commands

Clean build: Run npm run clean to delete the dist directory and start fresh.

Inject dependencies: Run npm run inject to manually combine source files and bundle in dependent libraries.

Building the Documentation Site

Want to create that fancy interactive documentation site? Run npm run build to generate a vuepress static site that combines this README with a live vue-openjscad viewer.

Note: The base URL defaults to /PiPiece/ but you can customize it with the BASEPATH environment variable. When you push to GitLab, the CI/CD pipeline automatically builds and publishes everything to GitLab Pages.

Tip: Check out the vue-openjscad package documentation if you want to tweak settings like the grid display or camera angles.

Live Development Preview

Run npm run serve to start vuepress in development mode. This gives you:

  • Live preview of your documentation
  • Hot reloading when you edit the README
  • Instant feedback on your changes

Note: Changes to the 3D model itself won't auto-reload—you'll need to manually refresh your browser for those.

About jscad-utils

This project uses jscad-utils, a super helpful library that makes creating and aligning 3D objects much easier. It's like having power tools instead of hand tools!

If you decide you don't need it (maybe you're a purist!), just:

  1. Run npm uninstall --save jscad-utils
  2. Remove the util.init(CSG); line from PiPiece.jscad

Adding More Libraries

The JSCAD ecosystem has lots of cool libraries! Search NPM to discover what's available. Installing any JSCAD library with NPM and running gulp will automatically bundle it into your dist/PiPiece.jscad file.

Example: Want to add a Raspberry Pi model to your design? Easy!

  1. Install the library: npm install --save jscad-raspberrypi
  2. Use it in your code by returning a combined BPlus group from the main() function:
javascript
main() {
  util.init(CSG);

  return RaspberryPi.BPlus().combine();
}

// ********************************************************
// Other jscad libraries are injected here.  Do not remove.
// Install jscad libraries using NPM
// ********************************************************
// include:js
// endinject

Sharing Your Design Online

Want to share your customized design with others? There are a few easy options:

Using GitHub Gist

The quickest way to share:

  1. Upload your dist/PiPiece.jscad file to a new GitHub gist
  2. Get the raw file URL
  3. Create a shareable link: http://openjscad.org/# + your raw gist URL

Example: http://openjscad.org/#https://gist.githubusercontent.com/johnwebbcole/43f2ef58532a204c694e5ada16888ecd/raw/d0972463f70222e6d4c6c6196a1c759bb3e2362a/snap.jscad

Using GitLab Snippet

Prefer GitLab? Works the same way:

  1. Save your file as a public snippet on GitLab
  2. Create a link: https://openjscad.org/#https://gitlab.com/snippets/YOUR_SNIPPET_ID/raw.jscad

Example: https://openjscad.org/#https://gitlab.com/snippets/1795323/raw.jscad

Note: Replace the snippet ID with yours, and don't forget to add .jscad at the end!

License

ISC © John Cole