3D Printed Case for PyPortal

Let's 3D print a case for the PyPortal. Use the PowerBoost 1000C and a lipo battery to make it portable. The case houses all of the electronics and snap fits together. The enclosure features access to the microUSB port, micro SD card slot and the USB recharging port. It uses a mini panel mounted toggle switch to power the device on/off. There's also a 1/4-20 hole for a standard tripod mount so you can mount it however you'd like.

Case Dimensions

72mm (2.8in) x 99mm (3.9in) x 21mm (0.8in)

PyPortal Power

With the PowerBoost 1000C, you can use any of the 3.7v lipo batteries from the shop. We suggest one with a minimal capacity of 1200mAh. The PowerBoost 1000C has a battery charging circuit with 1A charging rate. Easily disconnect the PowerBoost from the PyPortal using a 3-pin JST connector.

Basic Portable PyPortal Guide

Our guide on making a portable PyPortal covers the basics and is intended for general reference. This guide documents the assembly of the 3D printed case.

Prerequisite Guide

Learn all about the Adafruit PyPortal by checking out the guide. It has documentation and tour walk through of the pin outs and components. Libraries for Circuit Python and demo code is available.

Additional Supplies

PyPortal, our easy-to-use IoT device that allows you to create all the things for the “Internet of Things” in minutes. Make custom touch screen interface...
$54.95
In Stock
PowerBoost 1000C is the perfect power supply for your portable project! With a built-in load-sharing battery charger circuit, you'll be able to keep your power-hungry...
$19.95
In Stock
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This...
$9.95
In Stock
Hear the good news! This wee speaker is a great addition to any audio project where you need 8 ohm impedance and 1W or less of power. We particularly like...
$1.95
In Stock
This or that, one or the other, perhaps or perhaps not! So hard to make decisions these days without feeling like you're just going back and forth constantly. Deciding whether or...
$0.95
In Stock
This cable will let you turn a JST PH 3-pin cable port into 3 individual wires with high-quality 0.1" male header plugs on the end. We're carrying these to match up with our...
$1.25
In Stock
For those who are fans of our silicone-covered wires, but are always looking to up their wiring game. We now have Silicone Cover Ribbon cables! These may look...
$1.95
In Stock
Totaling 380 pieces, this M2.5 Screw Set is a must-have for your workstation. You'll have enough screws, nuts, and hex standoffs to fuel your maker...
$16.95
In Stock

3D Printed Parts

Parts are designed to be 3D printed with FDM based machines. STL files are oriented to print "as is". Parts are listed below with file name and description. Parts require tight tolerances that might need adjusting slice setting. Reference the suggested settings below.

Part Files

Here's a list of the parts used in this project. Order goes from left to right.

  • pyp-bracket.stl
  • pyp-back.stl
  • pyp-box.stl
  • pyp-top-blank.stl

Slice Settings

Use these settings as reference. Values listed were used in Ultimaker's CURA 3.X slicing software.

  • 0.2mm Layer Height / 0.4mm nozzle
  • 0.38mm Line Width (inner & outer widths)
  • 40mm/s printing speed
  • 20% infill
  • Supports: No

CAD Assembly

The enclosure is made of three pieces that snap fit together. A frame features mounting tabs that are used to secure the PyPortal PCB. Front and back place plates can be swapped out (Use a spudger to pry open). The PowerBoost PCB is secured to a bracket that is fitted in between the 3d printed frame and PyPortal PCB. 

Circuit Diagram

The 2-pin JST cable from the battery connects directly into battery port on the PowerBoost 1000C. Voltage and Ground wires from the PowerBoost 1000C connect to the 3-pin JST port on the PyPortal (doesn't matter which one).

  • 5V/VCC pin from PowerBoost 1000C to 3-pin JST(VCC) on PyPortal
  • GND from PowerBoost 1000C to 3-pin JST(GND) on PyPortal
  • EN from PowerBoost 1000C to switch
  • GND from PowerBoost 100C to switch

Toggle Switch

Use a 2-wire cable (6cm long) to connect the toggle switch to the PowerBoost. Remove a bit of insulation from the tips of the wire and tin them with a bit of solder. Connect the wires to the middle pin and either the far left or right pin on the switch. A third helping hand tool can hold the switch and wire in place while soldering.

3d_printing_pboost-switch-wire.jpg

3d_printing_switch-wire-solder.jpg

3d_printing_pboost-switch-connect.jpg

Connect Switch to PowerBoost

Solder the two wires from the switch to the EN and GND pins on the PowerBoost. We'll use the 3-pin JST cable soon. Polarity doesn't matter so the wires can go either way.

3d_printing_pboost-jst-wires.jpg

3d_printing_pboost-switch-wiring.jpg

3d_printing_pboost-switch-wired.jpg

Connect JST Cable

We'll use a 3-pin JST cable (9cm long) to easily connect the PowerBoost to the PyPortal. We only need two of the three wires, so you can remove the white wire. Using wire strippers, remove a bit of insulation from the tips of the wire and tin them with a bit of solder. Solder the wires to the voltage (+) and ground (–) pins on the USB output of the PowerBoost.

3-Pin JST cable is used to easily connect peripherals to PyPortal.

3d_printing_pboost-jst-wire.jpg

3d_printing_pboost-jst-wiring.jpg

3d_printing_pboost-jst-wired.jpg

Test PowerBoost

Plug in the 2-pin JST cable from the lipo battery into the battery port on the PowerBoost. Then, connect the 3-pin JST from the PowerBoost to either of the two 3-pin ports on the PyPortal. Use the toggle switch to turn the circuit on and off.

Quick Connect!

You can easily disconnect the battery from the PowerBoost, and disconnect the PowerBoost from the PyPortal. This makes it easy to install in and out of project enclosures, stands and the like. You could even wire the toggle switch to a 2-pin JST cable set for extra modularity.

PowerBoost Setup

We'll need four M2.5 x 8mm screws and nuts to secure the PowerBoost PCB to the bracket. Start by inserting the screws into the PowerBoosts mounting holes. Then, fasten nuts onto the threads of the screws like shown in the photo.

3d_printing_pboost-bracket-screws.jpg

3d_printing_pboost-screw-nut-install.jpg

3d_printing_pboost-screw-nut-installed.jpg

A screw tap can help create threads in mounting holes that are too tight.

Secure PowerBoost to Bracket

Orient the PowerBoost PCB so it's right side up with the bracket (the flat side) and line up the mounting holes. Insert the screw threads into the brackets mounting holes that are line up. Insert and fasten four additional M2.5 nuts onto the threads of the screws.

3d_printing_pboost-bracket-preinstall.jpg

3d_printing_pboost-bracket-screw-install.jpg

3d_printing_pboost-bracket-nuts.jpg

Use a pair of flush cutters to trim the screws flush with the nuts.

PyPortal Connections

Plug the JST connector from the PowerBoost into one of the ports on the PyPortal – The port closest to the tab is a good choice.  Plugin the pico blade connector from the mini oval speaker into the speaker port on the PyPortal. Get the 3D printed frame handy.

3d_printing_pboost-bracket-installed.jpg

3d_printing_pboost-bracket-pyportal-plug.jpg

3d_printing_bracket-frame-pyportal.jpg

Frame Install

Grab the toggle switch and remove the fasteners from the stem. Insert and panel mount the toggle switch into the hole on the side of the 3D printed frame. Place the PyPortal into the 3D printed frame with the cutouts lined up with the ports. Insert the PyPortal PCB at an angle so the mounting tabs line up with the mounting holes on the 3D printed fame. Place the 3D printed bracket over the PyPortal PCB with the mounting tabs lined up with the holes.

3d_printing_switch-mount.jpg

3d_printing_bracket-preinstall.jpg

3d_printing_bracket-install.jpg

Check the sides of the frame to line up the ports with the cutouts.

Secure Frame to PyPortal

Insert and fasten four M2.5 x 10mm screws through the mounting holes on the frame. These should go through the mounting holes of the PyPortal PCB. The screw should fully clear the mounting tab on the 3D printed frame. Repeat this process for the remaining mounting tabs. 

3d_printing_bracket-fasten.jpg

3d_printing_bracket-tab-screwd.jpg

3d_printing_frame-tab-screwd.jpg

Plugin Battery

Grab the JST connector from the 3.7v 1200mAh lipo battery and plug it into the port on the PowerBoost. The Battery can rest over the ESP32 modular inside the frame.

3d_printing_frame-front-screwd.jpg

3d_printing_battery-connect.jpg

Install Speaker

The back plate features a little holder for the speaker to snap fit into. Orient the speaker so the wiring can be fitted into the frame without being kinked. Press the speaker into the holder to fit it into place.

3d_printing_speaker-preinstall.jpg

3d_printing_speaker-installed.jpg

Remove the white paper backing from the speaker if you'd like to stick it to backing.

Snap Fit Backing

Orient the back plate with the features on the frame – the square cut out should be a good indication. Carefully fit the backing so the lips catch the nubs on the side of the framing. Firmly press the lips into the framing to snap fit everything shut. Press down on all the sides to fully shut it closed.

Snap Fit Top

Similar process for the face plate – orient the top so the cutaway is lines up properly with the display. Press fit the plate into the framing to close everything shut.

Power Test

Use the mini panel mounted toggle switch to power on/off the PowerBoost – This will feed power to the PyPortal as long as it's plugged into the PowerBoost.

Recharging Battery

The microUSB port on the PowerBoost is used for recharging the 3.7v 1200mAh lipo battery. It's got a charging rate of 1A, so it takes about an hour and a half for a full recharge. With the PowerBoost connected, the microUSB port from the PyPortal will still provide power.

Opening Case

I suggest using a pudger praying tool to open up the case. Wedge the flat piece in between the framing and either the front or back plate. Press on the sides of the framing to slightly flex it open.

Tripod Mount

There's a hole on the side of the frame that can be used for securing a tripod mount or adapter. If the mounting hole is too tight, use a 1/4-20 (imperial size) screw tap to create proper threading.

This guide was first published on Mar 06, 2019. It was last updated on Mar 06, 2019.