# PyPortal Case

## Overview

https://www.youtube.com/watch?v=KYEBMq09bWA

## 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)

![](https://cdn-learn.adafruit.com/assets/assets/000/072/202/medium800/3d_printing_hero-shelf-clean.jpg?1551565466)

## PyPortal Power

With the PowerBoost 1000C, you can use any of the [3.7v lipo batteries](https://www.adafruit.com/category/574) 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.

[Portable PyPortal Guide (Basic)](https://learn.adafruit.com/portable-pyportal)
## 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.

[Adafruit PyPortal Guide](https://learn.adafruit.com/adafruit-pyportal)
## Parts

- [Adafruit PyPortal](https://www.adafruit.com/product/4116)
- [PowerBoost 1000C](https://www.adafruit.com/product/2465)
- [3.7v 1200mAh Battery](https://www.adafruit.com/product/258)
- [Mini Oval Speaker](https://www.adafruit.com/product/3923)
- [Mini Panel Mount Toggle Switch](https://www.adafruit.com/product/3221)

![3d_printing_parts-angle.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/158/medium640/3d_printing_parts-angle.jpg?1551479998)

## Additional Supplies

- [M2.5 Standoff Kit – Black Nylon&nbsp;](https://www.adafruit.com/product/3299)
  - 4x M2.5 x 10mm screws (PyPortal)
  - 4x M2.5 x 8mm screws (PowerBoost)
  - 4x M2.5 hex nuts

- [28AWG Silicone cover stranded wire](https://www.adafruit.com/product/3891)
- [3-pin JST cable](https://www.adafruit.com/product/3893)
- [Spudger – Double sided Prying Tool](https://www.adafruit.com/product/3434)&nbsp;(Optional)
- [Tripod Swivel-Head Mount Adapter](https://www.adafruit.com/product/2464)&nbsp;(Optional)

Featured
### Adafruit PyPortal - CircuitPython Powered Internet Display

[Adafruit PyPortal - CircuitPython Powered Internet Display](https://www.adafruit.com/product/4116)
 **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 GUIs, all open-source, and Python-powered using&nbsp;tinyJSON / APIs to get news, stock, weather, cat photos,...

In Stock
[Buy Now](https://www.adafruit.com/product/4116)
[Related Guides to the Product](https://learn.adafruit.com/products/4116/guides)
![Front view of a Adafruit PyPortal - CircuitPython Powered Internet Display with a pyportal logo image on the display. ](https://cdn-shop.adafruit.com/640x480/4116-00.jpeg)

Featured
### PowerBoost 1000 Charger - Rechargeable 5V Lipo USB Boost @ 1A

[PowerBoost 1000 Charger - Rechargeable 5V Lipo USB Boost @ 1A](https://www.adafruit.com/product/2465)
PowerBoost 1000C is the perfect power supply for your portable project!&nbsp; **With a built-in load-sharing battery charger circuit, you'll be able to keep your power-hungry project running even while recharging the battery!** &nbsp;This little DC/DC boost converter module can...

In Stock
[Buy Now](https://www.adafruit.com/product/2465)
[Related Guides to the Product](https://learn.adafruit.com/products/2465/guides)
![Angled shot of PowerBoost 1000 Charger.](https://cdn-shop.adafruit.com/640x480/2465-09.jpg)

Featured
### Lithium Ion Polymer Battery - 3.7v 1200mAh

[Lithium Ion Polymer Battery - 3.7v 1200mAh](https://www.adafruit.com/product/258)
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 battery has a capacity of 1200mAh for a total of about 4.5 Wh. If you need a larger battery, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/258)
[Related Guides to the Product](https://learn.adafruit.com/products/258/guides)
![Lithium Ion Polymer Battery 3.7v 1200mAh with JST 2-PH connector](https://cdn-shop.adafruit.com/640x480/258-02.jpg)

Featured
### Mini Oval Speaker - 8 Ohm 1 Watt

[Mini Oval Speaker - 8 Ohm 1 Watt](https://www.adafruit.com/product/3923)
Hear the good news! This wee speaker&nbsp;is&nbsp;a&nbsp;great addition to any audio project where you need 8 ohm impedance and 1W or less of power. We particularly like this&nbsp;speaker&nbsp;as it is&nbsp;small and comes with nice skinny wires with a connector on the end. It has a handy...

In Stock
[Buy Now](https://www.adafruit.com/product/3923)
[Related Guides to the Product](https://learn.adafruit.com/products/3923/guides)
![Small, black, oval speaker with Pico Blade connector.](https://cdn-shop.adafruit.com/640x480/3923-06.jpg)

Featured
### Mini Panel Mount SPDT Toggle Switch

[Mini Panel Mount SPDT Toggle Switch](https://www.adafruit.com/product/3221)
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 not to use this mini toggle switch? That's the easiest decision you'll make all day!

This...

In Stock
[Buy Now](https://www.adafruit.com/product/3221)
[Related Guides to the Product](https://learn.adafruit.com/products/3221/guides)
![Angled shot of blue, mini, SPDT toggle switch.](https://cdn-shop.adafruit.com/640x480/3221-01.jpg)

Featured
### STEMMA JST PH 2mm 3-Pin to Male Header Cable - 200mm

[STEMMA JST PH 2mm 3-Pin to Male Header Cable - 200mm](https://www.adafruit.com/product/3893)
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 Hallowing, for extending and connecting sensors or LEDs - and the wires are even color coded!

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/3893)
[Related Guides to the Product](https://learn.adafruit.com/products/3893/guides)
![Angled shot of STEMMA JST PH 3-Pin to Male Header Cable - 200mm.](https://cdn-shop.adafruit.com/640x480/3893-03.jpg)

Featured
### Silicone Cover Stranded-Core Ribbon Cable - 4 Wires 1 Meter Long

[Silicone Cover Stranded-Core Ribbon Cable - 4 Wires 1 Meter Long](https://www.adafruit.com/product/3891)
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 _a lot_ like <a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/3891)
[Related Guides to the Product](https://learn.adafruit.com/products/3891/guides)
![4 wire Silicone Cover Stranded-Core Ribbon Cable](https://cdn-shop.adafruit.com/640x480/3891-01.jpg)

Featured
### Black Nylon Machine Screw and Stand-off Set – M2.5 Thread

[Black Nylon Machine Screw and Stand-off Set – M2.5 Thread](https://www.adafruit.com/product/3299)
Totaling 380 pieces, this **M2.5 Screw Set** &nbsp;is a must-have for your workstation.&nbsp;You'll have enough screws, nuts, and hex standoffs to fuel your maker tendencies&nbsp;for days on end! M2.5 size screws fit almost all of the Adafruit breakout/dev board mounting holes...

In Stock
[Buy Now](https://www.adafruit.com/product/3299)
[Related Guides to the Product](https://learn.adafruit.com/products/3299/guides)
![Black Nylon Screw and Stand-off Set with M2.5 Threads, kit box](https://cdn-shop.adafruit.com/640x480/3299-00.jpg)

# PyPortal Case

## 3D Printing

## 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.

![3d_printing_3d-parts-angle.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/169/medium640/3d_printing_3d-parts-angle.jpg?1551481077)

[Download Source Files](https://github.com/adafruit/Adafruit_Learning_System_Guides/tree/main/PyPortal/PyPortal_Case)
## 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**

![3d_printing_3d-parts-top.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/136/medium640/3d_printing_3d-parts-top.jpg?1551466498)

## Slice Settings

Use these settings as reference. Values listed were used in [Ultimaker's CURA 3.X](https://ultimaker.com/en/products/ultimaker-cura-software) slicing software.

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

![3d_printing_cura-slicer.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/137/medium640/3d_printing_cura-slicer.jpg?1551466894)

## 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](https://www.adafruit.com/product/3434) to pry open). The PowerBoost PCB is secured to a bracket that is fitted in between the 3d printed frame and PyPortal PCB.&nbsp;

![3d_printing_pyportal-cad-explode.gif](https://cdn-learn.adafruit.com/assets/assets/000/072/175/medium640thumb/3d_printing_pyportal-cad-explode.jpg?1551496225)

# PyPortal Case

## Wiring

## 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

![3d_printing_circuit-diagram.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/170/medium640/3d_printing_circuit-diagram.jpg?1551481274)

## 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.

## 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.

## 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.

Info: 

## 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.

![3d_printing_pboost-power-test.jpg](https://cdn-learn.adafruit.com/assets/assets/000/072/163/medium640/3d_printing_pboost-power-test.jpg?1551480198)

## 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.

![](https://cdn-learn.adafruit.com/assets/assets/000/072/165/medium800/3d_printing_pboost-display-on.jpg?1551480229)

# PyPortal Case

## Assembly

## 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.

Info: 

## 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.

Info: 

## 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.&nbsp; Plugin the pico blade connector from the mini oval speaker into the speaker port on the PyPortal. Get the 3D printed frame handy.

## 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.

Info: 

## 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.&nbsp;

## 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.

## 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.&nbsp;Press the speaker into the holder to fit it into place.

Info: 

## 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.

![3d_printing_back-snap.gif](https://cdn-learn.adafruit.com/assets/assets/000/072/198/medium640thumb/3d_printing_back-snap.jpg?1551547218)

## 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.

![3d_printing_top-snap.gif](https://cdn-learn.adafruit.com/assets/assets/000/072/199/medium640thumb/3d_printing_top-snap.jpg?1551547227)

## 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.

![3d_printing_power-on.gif](https://cdn-learn.adafruit.com/assets/assets/000/072/200/medium640thumb/3d_printing_power-on.jpg?1551547235)

## 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.


## Guide Products

### Adafruit PyPortal - CircuitPython Powered Internet Display

[Adafruit PyPortal - CircuitPython Powered Internet Display](https://www.adafruit.com/product/4116)
 **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 GUIs, all open-source, and Python-powered using&nbsp;tinyJSON / APIs to get news, stock, weather, cat photos,...

In Stock
[Buy Now](https://www.adafruit.com/product/4116)
[Related Guides to the Product](https://learn.adafruit.com/products/4116/guides)
### PowerBoost 1000 Charger - Rechargeable 5V Lipo USB Boost @ 1A

[PowerBoost 1000 Charger - Rechargeable 5V Lipo USB Boost @ 1A](https://www.adafruit.com/product/2465)
PowerBoost 1000C is the perfect power supply for your portable project!&nbsp; **With a built-in load-sharing battery charger circuit, you'll be able to keep your power-hungry project running even while recharging the battery!** &nbsp;This little DC/DC boost converter module can...

In Stock
[Buy Now](https://www.adafruit.com/product/2465)
[Related Guides to the Product](https://learn.adafruit.com/products/2465/guides)
### Lithium Ion Polymer Battery - 3.7v 1200mAh

[Lithium Ion Polymer Battery - 3.7v 1200mAh](https://www.adafruit.com/product/258)
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 battery has a capacity of 1200mAh for a total of about 4.5 Wh. If you need a larger battery, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/258)
[Related Guides to the Product](https://learn.adafruit.com/products/258/guides)
### Mini Oval Speaker - 8 Ohm 1 Watt

[Mini Oval Speaker - 8 Ohm 1 Watt](https://www.adafruit.com/product/3923)
Hear the good news! This wee speaker&nbsp;is&nbsp;a&nbsp;great addition to any audio project where you need 8 ohm impedance and 1W or less of power. We particularly like this&nbsp;speaker&nbsp;as it is&nbsp;small and comes with nice skinny wires with a connector on the end. It has a handy...

In Stock
[Buy Now](https://www.adafruit.com/product/3923)
[Related Guides to the Product](https://learn.adafruit.com/products/3923/guides)
### Mini Panel Mount SPDT Toggle Switch

[Mini Panel Mount SPDT Toggle Switch](https://www.adafruit.com/product/3221)
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 not to use this mini toggle switch? That's the easiest decision you'll make all day!

This...

In Stock
[Buy Now](https://www.adafruit.com/product/3221)
[Related Guides to the Product](https://learn.adafruit.com/products/3221/guides)
### STEMMA JST PH 2mm 3-Pin to Male Header Cable - 200mm

[STEMMA JST PH 2mm 3-Pin to Male Header Cable - 200mm](https://www.adafruit.com/product/3893)
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 Hallowing, for extending and connecting sensors or LEDs - and the wires are even color coded!

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/3893)
[Related Guides to the Product](https://learn.adafruit.com/products/3893/guides)
### Silicone Cover Stranded-Core Ribbon Cable - 4 Wires 1 Meter Long

[Silicone Cover Stranded-Core Ribbon Cable - 4 Wires 1 Meter Long](https://www.adafruit.com/product/3891)
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 _a lot_ like <a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/3891)
[Related Guides to the Product](https://learn.adafruit.com/products/3891/guides)
### Black Nylon Machine Screw and Stand-off Set – M2.5 Thread

[Black Nylon Machine Screw and Stand-off Set – M2.5 Thread](https://www.adafruit.com/product/3299)
Totaling 380 pieces, this **M2.5 Screw Set** &nbsp;is a must-have for your workstation.&nbsp;You'll have enough screws, nuts, and hex standoffs to fuel your maker tendencies&nbsp;for days on end! M2.5 size screws fit almost all of the Adafruit breakout/dev board mounting holes...

In Stock
[Buy Now](https://www.adafruit.com/product/3299)
[Related Guides to the Product](https://learn.adafruit.com/products/3299/guides)

## Related Guides

- [Adafruit Powerboost 1000C](https://learn.adafruit.com/adafruit-powerboost-1000c-load-share-usb-charge-boost.md)
- [Adafruit PyPortal - IoT for CircuitPython](https://learn.adafruit.com/adafruit-pyportal.md)
- [PyPortal Pet Planter with Adafruit IO](https://learn.adafruit.com/pyportal-pet-planter-with-adafruit-io.md)
- [Doomscroll and Chill - A Wireless BLE Scroll Wheel Remote](https://learn.adafruit.com/doomscroll-and-chill-wireless-ble-scroll-wheel-rotary-encoder-remote.md)
- [Nunchuck Controlled Laser Cat Toy](https://learn.adafruit.com/nunchuck-controlled-laser-cat-toy.md)
- [Tree with Animated Eyes and Motion Sensor](https://learn.adafruit.com/tree-ent-sculpture-with-animated-eyes.md)
- [PyPortal NeoPixel Color Picker](https://learn.adafruit.com/pyportal-neopixel-color-picker.md)
- [PyPortal Guitar Tuner](https://learn.adafruit.com/pyportal-guitar-tuner.md)
- [Pico W HTTP Server with CircuitPython](https://learn.adafruit.com/pico-w-http-server-with-circuitpython.md)
- [Raspberry Pi Halloween Costume Detector](https://learn.adafruit.com/raspberry-pi-halloween-costume-detector.md)
- [Next Level MakeCode Arcade Games](https://learn.adafruit.com/next-level-makecode-arcade-games.md)
- [Creating Slideshows in CircuitPython](https://learn.adafruit.com/creating-slideshows-in-circuitpython.md)
- [PyPortal NASA Image of the Day Viewer](https://learn.adafruit.com/pyportal-nasa-image-of-the-day-viewer.md)
- [Planetary Gear Dreidels](https://learn.adafruit.com/planetary-gear-dreidels.md)
- [ePaper FeatherWing Quote Display](https://learn.adafruit.com/epaper-display-featherwing-quote-display.md)
- [CircuitPython Elgato WiFi Light Controller](https://learn.adafruit.com/circuitpython-elgato-wifi-light-controller.md)
- [CircuitPython Powered Sip & Puff with ST LPS33HW Pressure Sensor](https://learn.adafruit.com/st-lps33-and-circuitpython-sip-and-puff.md)
