Parametric 3D Printed Electronics Case/Enclosure

= Introduction = Cases/Enclosures for electronics project are often a bit of a pain. They cost too much, it is hard to find the right size, and after one is in hand it can be quite a bit of work to finish off all the holes, mounting bits and so on. Perhaps 3D printing can come to the rescue. I looked around for what are called parametric models of cases -- I did not find any that were quite what I had in mind so I designed my own.

This is an article started by Russ Hensel, see [] for a bit of info. This project is now at github: [Parametric-Case-Enclosure].




 * For a bunch more pictures of this object see: Pics of 3D Printed Case 
 * For the instructable version see: Any Size Enclosure You Want: 4 Steps

= Requirements = These I the main things I had in mind and have implemented.


 * FreeCad based.
 * Parametric -- at least for height, width and base.
 * Easy to customize each face with holes .....
 * Early idea was to print 4 walls as one price, then use sheet stock for top and bottom -- still an option.
 * Various options as to how to print the 6 different sides, as 1...6 sides.

= Result = Not yet complete but it works. Made a few basic enclosures, but till I need another one off on other projects.

Get the Files
See github: [Parametric-Case-Enclosure]

Modifications I Might Make

 * Add additional optional structures internally for mounting.
 * Perhaps slide in slots for boards.
 * Better control of the bolt holes.
 * Chamfers would be easy to add at least non parametrically.

= Use =

Sample Workflow
There are a number of decisions that you need to make prior to messing with the files:

You can tape it closed, use nuts and bolts, or self tap bolts into it. You may want to print some parts separately but then glue them together. expect the front to be printed with the sides. To implement you plan make fusions of the desired parts, mesh them and export. Not yet. Additional details below.
 * How big -- just enter the numbers in the spreadsheet.
 * How thick -- just enter the number in the spreadsheet.
 * How do you want it to open and close. Normally at least one side must come off to mount the components inside, you could glue it closed but service is a problem.
 * How many parts to you want to print and at what orientation: You could print the 4 walls as one piece and then a top and bottom or a larger number of pieces.  Right now I
 * You need not use the top as the top, it could be the front, decide for yourself.
 * What holes do you want in each side? Each side has an associated sketch for holes in that side.  Lay out your parts and update the sketches.

Spreadsheet
So simple just open the file, open the spreadsheet ( double click on the spreadsheet in the model ) and enter the values ( no units, assumes mm ). The values that are supposed to work ( let me know if they do not ) are:


 * height -- the case height
 * width -- the case width
 * length -- the case length, x direction
 * thick -- the case thickness. I started with 3 but 2 mm also seems ok.  Up to you, your printer and material.
 * leave the rest alone

Sketches
Each face has a sketch associated with a face. Find them in the model and edit. All are pockets. Unused items can be slid to the side. Sketches need not be fully constrained, but it is a good idea ( unless off to the side )

Sketch names:


 * RightEdgePunch
 * LeftEdgePunch
 * BotPunch
 * ToipPunch
 * RearPunch
 * TopPunch

Fusions and Export
Pick the sides you want to print: for example lets say you want to print in 2 parts, the top and rear as one and the rest as one part with them bolted together.

The punched ( with holes ) sides are named:
 * FrontPunchedDrilled ( or FrontPunched if you do not want the bolt holes )
 * RearPunchedDrilled
 * BotPunchedDrilled
 * TopPuhchedDrilled
 * LeftEdgePunched
 * RightEdgePunched

First create the fusion. Go to the part workbench. Select:
 * FrontPunchedDrilled
 * RearPunchedDrilled

Then apply the union operation. You will get a new part: Fusion xx, you might rename it top_and_rear, but you need not keep it around long, so perhaps it does not need a rename.

Next, go to the mesh workbench and then select your last fusion/union object and apply the Meshes Create Mesh from Shape ( I use .1mm standard mesh ). You will again get a new object, xxx ( meshed ) It will appear right on top of the fusion so you may or may not want to tinker with the part visibilities.

The mesh workbench has a Meshes -> Evaluate and Repair function. Use it. Sometimes it finds things other times not. Why not be safe.

With the meshed selected go to the File export and export the mesh as an stl file. Give this a good name to make it easy to find later top_bot.stl perhaps.

Repeat the above but using the parts:


 * BotPunchedDrilled
 * TopPuhchedDrilled
 * LeftEdgePunched
 * RightEdgePunched

The stl files are now ready for your 3D printer workflow. ( Which may ask for additional mesh fix up, this has always gone fine for me. )

Configuration Examples
This will be coming later, perhaps just in pictures, for now one example see: [Parametric-Case-Enclosure]

= Related Links =

GitHub
Some results from github search on FreeCad and Enclosure or Case


 * russ-hensel/Parametric-Case-Enclosure: Parametric Case-Enclosure in FreeCad for electronics or other projects. In FreeCad
 * maygli/EnclosureGenerator: FreeCAD plugin to generate enclosures for electronic devices
 * DaniDiaz71/DSS-SG100-Signal-Generator-Case: FreeCad files and other stuff about DSS SG100 Signal Generator Case // SP: Caja para generador de señales DSS SG100
 * afiskon/freecad-rtlsdr-case: Simple 3D-printed case for RTL-SDR
 * dejongh/raspberrypicase: FreeCAD files and Python script for a Raspberry Pi case that can be 3D printed and customised with your text.

Search Thingiverse
Not all I found. All these should link to FreeCad source.
 * Search Thingiverse - Thingiverse
 * TRONXY P802 Power Supply Switch Cover by justsean - Thingiverse
 * RaspberryPi Squeezebox by reparator - Thingiverse
 * Raspberry Pi enclosure remix by papergeek - Thingiverse
 * Orange Pi Zero Case by xoan - Thingiverse
 * DivMMC EnJoy Enclosure (Sinclair ZX Spectrum) by LCD - Thingiverse
 * Parametric Project Enclosures by thehans - Thingiverse