The appeal to 3D print things is pretty apparent. You can create all sorts of things in various colors and incorporate your own fancy stylings into them. If you are a person who likes the idea of being able to customize your electronics or have certain themes in your computer and peripherals, you can easily put your 3D printer to use and create things that complement your existing devices.
In this Instructable I'll be going over a few general steps I have taken to make a case for a microcontroller, specifically the uC32. These steps can be followed for any type of board and with many computer aided drafting (CAD) programs. I chose this board because I happen to want a case for this particular one, and I will be using Tinkercad because I feel its ease of use and access allows people who may be new to 3D modeling a quick way to get started. So without further ado, lets get started!
Step 1: Measure Your Board
This is the first step, and probably the most important. I suggest that if you want to keep as snug of a fit for your board and your input and output pin (IO) access as possible, you should make your measurements with a set of calipers. If you do not have any calipers available though, or you are less worried about a super precise case fit, you can simply use a ruler with clear markers for millimeters and just eye the dimensions.
Take the measurements of the perimeter of your board and record the dimensions accurately, taking care to make sure your measurements are clearly labeled. Be aware that these perimeter measurements will be the internal dimensions of your case. You will need to note this fact during modeling by either making the dimensions of your case internally or adding the wall thickness to each measurement. This will be pointed out again in the next step.
Take note of some of the measurements depicted in the collage above. If you have plans on accessing much of your IO on the board, you will need to take some pretty precise measurements of the ports you want access to. For this to be at all usable, you will at minimum need to measure cutouts for the ports that will allow you to program and/or power the board.
Step 2: Create the Base of Your Case
This first step in your case design is fairly straight forward, as the step title suggests.
Start by grabbing a box from the shapes panel on the right side of your browser window and placing it into the work space. Now click a corner of it and drag until you have the perimeter dimensions you measured for your board 1 to 2mm (I often add some extra room to certain measurements, since it tends to mean you can still use your print if there is a significant bit of shrink). Recall that this is still the inside dimension of the box, so to create a shell we will need another piece.
While pressing the 'Alt' key, drag the shape you just made to an open space, which should produce an identical box (top left image above). Increase the dimensions of this box by 2x the desired wall thickness. I wanted the wall thickness to be 2mm, so I increased the width and length of my box by 4mm each. Now with these two boxes side by side, you can click on the smaller of the two and select the 'Hole' option in the 'Inspector' box at the top right corner of the workspace (top right image above).
Now that you have your cutout available, select it and use the black arrow above the box to increase its height above the workspace. This height will end up being the thickness of the bottom of the base of your case. Nest the pieces together and then group them together.
Step 3: Create the Top of Your Case
This step may require a bit of patience if you are unfamiliar with the tools, however it does not differ tremendously from the process we followed in the previous step.
Start by dragging a cylinder into the workspace, this will become the basic pin to hold your case together. Scale its diameter down to an appropriate size such that it will fit within the size of the wall but won't be too close as to make the wall weak. The size I used for this case was 1.3mm in diameter. The height of the case base I chose was 12mm, so I decided to go with a height of 8mm so as to have 4mm exposed once the pins are placed.
Use the 'Align' tool under the 'Adjust' tab to align the pins with each other. Be careful to make sure that you start with pins placed in opposite corners and align the other two to them. This step is quite important, since any misalignment will result in your case not fitting together nicely.
Once the pins are placed, select the base and pins together (click and drag or shift+click everything) and create a copy by pressing Alt and dragging, as in the previous step. Select all the pins on the duplicate and click the 'Hole' option. Now expand the diameter of the holes by 0.1mm (just my suggestion) so that the pins printed on the base will fit into the holes in the top.
Step 4: Determine Your Cutouts
For the board I am using, a minimum of two cut outs need to be made, however if you wanted to have more IO port access you can use this same process to create more cutouts.
For the base:
Drag out two more blocks onto the work space. change the width and height to the width and height measurements you took in step 1. I suggest adding at least 0.5mm to these measurements to help prevent it from being too close, as the final dimensions will be a bit smaller once the print is finished.
As before, use the black arrow above each block and elevate it to the interior base height (2mm for this box). I first align the pieces with either side of the box and set them there. Once they are in position, you can slide them further toward the middle of the box. This method implicitly causes the CAD program to give you a measurement from its starting point (at the side wall) to its final position. This is how you can align these boxes properly with their corresponding IO ports. Once in position, select both and click on the 'Hole' option.
For the top:
If those two port boxes you just made are taller or shorter than the wall height of the base, you will need to make changes to the top in order to properly fit them together. Just create two more box pieces and dimension them so their height is the difference between the box wall height, minus the base, and the height of the box. So something like,
- (wall height - base thickness) - box height = block height for top
Depending on which piece you are doing, you may need to either make it a hole or a block that you will need to align in a similar way you did earlier in this step. Group all your pieces together and you'll be good to go.
From here you can either be done and move onto the next step or you can play with some other shapes if you want to create some unique features for your case.
Step 5: Download and Print
As the title says, just download your model for 3D printing, slice it in an engine like Cura, and you're done!
As I mentioned in the beginning, these steps were what I did to make a case for the uC32, however you can adapt this process for any board type. Now that you have gone through a first run, you can go forth and create your own microcontroller or FPGA cases!