Introduction: How to Design a Microcontroller Enclosure

Picture of How to Design a Microcontroller Enclosure

So you need an enclosure, but you're not sure where to start. No matter what kind of hardware you need to protect, there are a few things you want to keep in mind on your enclosure making journey.

This Instructable will cover the general steps needed to design and build a custom enclosure. You will find tips on techniques and points to ponder on that will be helpful while designing. Different materials will be mentioned, but the focus will be on 3D printing and laser cutting.

The last steps of this Instructable contain two designs for you to download and build for the Edison. A snap-lock, laser-cut case and a sewable enclosure for all your wearable technology projects!

Intel's Edison board is used in the project examples. The Edison is a Linux embedded microcontroller that provides Wifi and bluetooth capabilities, all in the size of two postage stamps end-to-end.

*Special thank you to JON-A-TRON for collaborating with me and lending his 3D modeling wizardry on the sewable enclosure! His skills are also exhibited as the main image of this Instructable.

Step 1: Context of Use

Picture of Context of Use

Take a moment to think about how and where this enclosure will be used. Defining the context and answering a few questions will help make choices on materials and design.

Enclosures can be designed for exhibits, protection while prototyping, going out to demo a project at Maker Faire, wearables and so much more. When the context is defined, material and design decisions will fall in to place.

Here are a few questions that will help get you started:

Do aesthetics matter?

If not, too much time doesn't need to be involved in the design or fabrication process. On the other hand, if creating an attractive and functional enclosure is priority, choices can still be made, such as 3D printing at a lower resolution or using mix-matched scraps of wood that will cut back on time and money.

What are your time constraints?

Choosing a more or less complicated design and factoring in any materials that need to be ordered will depend on the time available to you.

What are your skills?

Enclosures can be made out of anything in many techniques. In this Instructable there are two examples, one using a laser cutter and one with a 3D printer. Use what materials and skills you have to create designs unique to you.

Step 2: Materials and Techniques

Picture of Materials and Techniques

Let's go over the two common ways to create an enclosure, for links to specific materials, check out the case examples and resources step.

Laser Cutting

Laser cutting an enclosure is quick, you can make many at once and materials are relatively inexpensive.

The laser cutter is one of the most useful tools in a modern shop or rapid prototyping lab. Laser cutters work by directing a laser, at a specific focal point, at a material, either precisely cutting or etching the material. The cutting head's position is moved using CNC (Computer Numerical Control), starting with a CAD (Computer-aided Design) file, typically made in Adobe Illustrator or Corel Draw.

Materials

Some materials can produce noxious gases and be harmful not only to humans but to the machines too, such as PVC. Always look up the SDS (Safety Data Sheet) of the material in question to see if it is safe to laser.

Common materials that can be cut are various plastics, wood, paper and fabric. Acrylic and plywood are great for prototyping since they are abundant and inexpensive. They also make great materials for a finished enclosure design. Acrylic comes in many colors and even in a mirrored or sparkly variety. Plywood can be stained and is easy to work with. Rounded corners and flexible can even be made by using living hinge designs.


3D Printing

3D printers extrude melted plastics on a platform along the X and Y axis, building up a 3D object layer by layer along the Z axis. There are many different kinds, the least expensive and most accessible in terms of setup and materials are desktop printers, which is what we will be focusing on in this 'Ible.

Printing takes time and patience, as well as material. When iterating use the lowest resolution and print only what you need to see if the enclosure will fit together.

Materials

There are a variety of materials that you can 3D print with. ABS, PLA and Ninjaflex are the most common, but wood based, nylon, dissolvable and even glow-in-the-dark can be also be found. Check which filament materials are supported by the specific printer that is available to you.


Other...

Use your skills and imagination to create your enclosure using any material or method you like!

Check out this amazing Lego enclosure made by a teen, this circuit that doesn't need an enclosure because it's encased in resin and this beautiful walnut wooden enclosure.

Step 3: Measure

Picture of Measure

When decisions about materials have been made and how it's going to be used, it's time to grab the caliper to start measuring. Using a digital caliper is accurate and easy when sizing up parts down to the millimeter. A decent caliper can be found online for around $40, it will come in handy, so I recommend picking one up.

As measurements are taken, roughly sketch out the board and other components, writing in the measurements as they are made. Use this to draw and build around, adding padding and room around each part. If using 3D modeling software, make a model of the board and any other outstanding components, such as ports, the tallest component and batteries to use when you model the enclosure itself.

Add enough room around ports so the cable heads can travel all the way through the wall of the enclosure. Mark where reset or power buttons are if you are interested in creating an extension or an opening for access.

Step 4: Sketch Design

Picture of Sketch Design

I find it helpful to hand sketch design ideas and test out different aesthetics on paper. Work in whatever medium is comfortable to you. You can only get so far without getting to the material itself. You will learn of unknowns once you start fabricating, but a lot can be worked out with a pencil in hand.

Keep all the measurements you recorded handy and sketch each layer, panel or side plugging in the necessary measurements as you go. Keep the calipers around, they are useful for visualizing the space around the board.

Don't forget to include any mounting holes, hardware or room inside for padding or batteries. Decide how it will be held together. Laser cut panels are typically constructed using comb (AKA box or finger) joints, captive square nut joints or using the flexibility of the material to create snap together slots and tabs.

McMaster-Carr is great for including parts. For example is Fusion 360 you can import parts based on their part number which adds so much ease of ordering and design accuracy.

Think about what ports need to be accessed and even how often. For example, for the laser cut design shown here, the enclosure is used to protect the board while programming and prototyping circuits. The GPIO pins live under a flip-top lid for easy access while prototyping and the two USB ports are available for powering and programming the board.

3D printed designs give you a lot of flexibility in design. They can be though of as layers, snap together boxes, super crazy sculptural elements, etc. Have fun with your design, since the laser cut enclosure was going to live on my desk and I <3 cats, I decided to mod the files a little bit to make feet and ears and so the USB cords are it's tails.

Step 5: Final Design Files

Picture of Final Design Files

Go into the appropriate CAD environment, 2D or 3D and render the final files.

Illustrator or Corel Draw are usually the software choices that interface with laser cutters in fabrication labs. These laser cutters take .ai and .cdr files respectfully. The cutters see vector paths as cut lines once the stroke width is set to a hairline, which is usually represented by .001 in the Stroke panel in Illustrator. Raster images are used for engraving, getting shades through depth that is linked to the resolution of the file.

The 3D printers I use, the Objet and a MakerBot take .stl files, check to see what file format the printer you are using accepts, it may be different.

Step 6: Iterate

Picture of Iterate

Fitting together the joints, making sure ports line up and are accessible and generally learning how a material behaves takes time, so expect to make several enclosures.

With each iteration, design details and dimensions are tested by making tweaks and modifications along the way. For example, you may realize that your original joint designs don't work and need to scrap them for a better working choice. This is where the design becomes reality and it's important to remember to remain flexible.

When prototyping with a 3D printer, there are a couple things you can do to iterate fast and save materials.

  • Choose a lower resolution to print in, this will save time and material.
  • Print only what you need to test. For example, when I printed all the layers for the sewable enclosure in several different dimensions I only printed the bottom plane of the dome top, leaving the dome unfinished. This way I had enough to see if it lined up to fit with the board and other layers correctly.

When prototyping with a laser cutter a good substitute material for iterations is cardboard. However, it's not as hard as acrylic and doesn't have the tension needed to snap together or hold weight at times. It can still be helpful for checking measurements and general shape.

Step 7: Project Example : Laser Cut and Snap-Together

Picture of Project Example : Laser Cut and Snap-Together

This design is made for the prototyping and programming stage while working with an Intel Edison with Mini Breakout Board. For quick access to the GPIO pins board was turned upside down and pins were exposed. There is a flip lid that is quick to open and helps protect against dust. Below the board, room is left to fit a battery to power the board while circuits are being tested using a breadboard.

The design doesn't require any adhesive or hardware to put together. It has tab and slot joints and snap lock features.

Acrylic has some flexibility, but can also be quite brittle. If more flexibility is needed for the snap hooks, modify the design file or use 1/16" thick acrylic.


Materials

(1) Edison with mini breakout board

9" x 6" piece of 1/16" or 1/8" thick acrylic

(4) 3/8" #4 screw - pick up at the local hardware store

Access to:

Adobe Illustrator or Corel Draw

Laser

Step 8: Project Example : 3D Printed and Sewable Enclosure

Picture of Project Example : 3D Printed and Sewable Enclosure

This sewable enclosure was designed specifically for wearables. It can be hand or machine sewing to fabric, as well as pinned down while prototyping. The bottom sleeve is printed in NinjaFlex, The battery clip and top shell are printed in PLA. It's designed for Intel's Edison with the mini breakout board, which is great for wearables for many reasons. Some of the best reasons are because of it's WiFi and bluetooth capabilities, and it's size.

This enclosure design has extra room surrounding the Edison board, allowing space for the LiPo battery clip or any other circuitry you may need to stuff in it. There are openings on the side of the top shell that allow wires to be fed through, connecting any sensors or actuators that are needed for your project. If you need to program the board, there is also an opening in the back where the USB ports can be accessed through. In addition, an extension from the top of the shell was created that allows you to access the on/off button with ease.

The final design was in collaboration with JON-A-TRON. My coworkers rule.

Materials

(1) Edison with mini breakout board

(4) Steel Hex Nut Part #90480A003 from McMaster-Carr

(4) Steel Button-Head Socket Cap Screw Part #92949A086 from McMaster-Carr

PLA filament

NinjaFlex filament

Access to:

MakerBot Replicator 2 or other desktop printer that takes NinjaFlex

Step 9: Resources

Picture of Resources

Comments

Samiraawong (author)2016-04-01

OMG

bra2920200 (author)2015-12-06

0H MY G000000000000D

robotics master (author)2015-11-24

what is the difference between eighth.ai and sixteenth.ai

robotics master (author)2015-11-24

i have a doubt.what is that eighth and sixteenth.ai ..what is the difference

sharpstick (author)2015-04-19

My favorite for cheap quick enclosures is cigar boxes. Most cigar stores have a pile in the back of the store. Usually they sell them for 1$ to $5. They come in a variety of sizes and shapes. I've gotten them from about 60 to 800 cubic inches.

absolutekold (author)sharpstick2015-04-20

I love using them as well.. The only issue with cigar boxes that I've found is heat dissipation. the heat buildup running a microcontroller and having a few batteries or a power brick can become an issue if you are doing anything that requires sustained "heavy lifting". One of my maker buddies was doing a "steampunk" 3d printer setup and used a cigar box to keep all the brainy bits hidden. Had to end up cutting a hole in the box and installing a small computer fan to keep things from getting too crispy. As things got warm his motor controller board would get wonky. Took forever to figure out the problem. Wish I had some real math to figure out Watts vs Volume to keep things happy but I haven't really looked into the issue as for most uses the "generic" case is more than big enough for low power applications.

push_reset (author)sharpstick2015-04-19

That's great! Very resourceful and I bet they can be fairly sturdy. In my mind they also have a great old-world aesthetic, which I love. Maybe that only applies to the vintage ones.

samircury (author)2015-04-18

Nice! It probably has enough room to store the edison + 2 LiPo cells or alternative battery pack. But using a couple of RC toy LiPo cells should get this guy going for a while.

push_reset (author)samircury2015-04-19

Yes! The final design for the sewable enclosure has a battery clip built for a LiPo with 550 mAh. It can be altered and made larger to fit something with a bigger capacity. Or you can secure multiple batteries is other ways. The design files are just a starting point!

REA (author)2015-04-17

That first picture kind of gives off an Evangelion vibe to it. Or maybe it's just me.

push_reset (author)REA2015-04-17

Love Evangelion, I haven't watched it in awhile, now I want to. I can see how it has that feel to it.

REA (author)push_reset2015-04-17

It's basically Unit 02's colour scheme. At first I thought you made one of Asuka's hair clips.

hobbyman (author)2015-04-16

Great educational instructable.

I should have done this :D

push_reset (author)hobbyman2015-04-16

Thanks dood! Sounds like you have experience building enclosures. What's your fav medium to work in?

About This Instructable

34,711views

237favorites

License:

Bio: Specializing in sewing, soldering and snacking. More stuff I do... I teach an interactive fashion and textile class called Wearable and Soft Interactions at California ... More »
More by push_reset:How to Connect a Werkstatt-01 to a Eurorack ModuleMale Header, Alligator and TS CableLaser Cut Skiff Eurorack Case
Add instructable to: