Menu
+7 926 904 66 66

How to design a plastic enclosure

Fundamentals of plastic enclosure design for electronics and instrument making

Although the core of any electronic product is its internal components, people recognize it by its outer shell - the enclosure, which draws attention with its design and clear controls.

In this post we walk through enclosure development step by step using a soil condition sensor as an example. It is based on this wonderful project by Ryan Madson. Using just a few sensors, a Particle Photon development board with a Wi-Fi module and the Fathym cloud platform, he built a system for continuous monitoring of moisture and temperature for a houseplant.

In this project we will focus on the enclosure's functionality and leave out the styling.

Step 1: Meeting product requirements

For any project, the first step to avoid unnecessary cost and effort and to deliver on time is a clear and complete definition of the enclosure requirements.

At this stage you need to ask: what function should my enclosure perform and what are its basic features?

Here are the main requirements for our product's enclosure: it must hold the Photon board as well as the temperature and moisture sensors.

  1. The enclosure must hold the Photon board as well as the temperature and moisture sensors.
  2. The moisture sensor must go at least an inch into the soil.
  3. The enclosure must have two buttons to control the device.
  4. The LED mounted on the board must be visible.

The parameters above are mandatory for a successful design. Note that we do not add any specific conditions such as a particular enclosure thickness. Stick to the basic requirements at first, so that necessary properties can be added later without trouble.

Expert tips. Electronic components often get noticeably hot during operation. In that case, provide a fan and/or ventilation openings.

Step 2: Modeling internal components

Let's get to work. Start by thinking through the placement of the internal parts and how they are mounted.

Ideally, you should clearly understand the internal layout of the product - this helps design the enclosure exactly as intended. In our case we have a Photon Particle Board (https://www.particle.io/products/hardware/photon-w...), temperature sensors (https://www.sparkfun.com/products/10988) and soil moisture (https://www.sparkfun.com/products/13322).

Creating models of the large parts - the board and the soil moisture sensor - simplifies the design work. In some cases the manufacturer provides the necessary drawings or 3D models.

We managed to find drawings of the board and sensor and built 3D models from them.

In our case there is no need to model every feature of the product. Only the overall dimensions and mating features matter - everything else can be ignored.

For example, the moisture sensor and board models shown here are fairly schematic, but they represent the appearance clearly enough.

Step 3: Creating the shell

With models of the internal parts in hand, we can start building the enclosure shell around them. Let's begin with a simple open shape from a rectangular primitive.

Since in our case the enclosures are injection molded, we should aim to keep the wall thickness uniform across the whole enclosure.

We set a uniform wall thickness of 1.5 mm, since this value allows both 3D printing and molding.

Step 4: Adding a connector and holes for the moisture sensor

One of our product's requirements is that the moisture sensor goes at least an inch into the soil. The external sensor could be wired to the board inside the enclosure, but it is better to make the product as a single all-in-one unit.

Let's add a connector for vertical mounting of the moisture sensor. This lets the contacts exit through the bottom of the enclosure.

Step 5: Cutouts for wiring and USB input

To connect the moisture sensor, access to its top is needed, so we remove some material while keeping the mounting connector.

We also add a cutout for the micro-USB connector. The board will plug into it by the connector, which provides some alignment.

Step 6: Board support ribs

For now the board is held only by the USB connector, so support ribs need to be added for better retention.

Fortunately, there are no components on the underside of the board, so there is no need to worry about them. The simplest way to create supports is to add ribs of equal height for the board to rest on:

This is what the assembly looks like at this stage:

Step 7: Adding mounts

Now we need to work out how to fasten the lid. Hex socket screws are a good option, so we add features that give the screws a place in the enclosure.

The added features are typical for injection molding. The bosses around the holes have extra ribs to reinforce the whole structure. All of these parts have the uniform 1.5 mm thickness we chose earlier.

Step 8: Nut cutouts

When metal fasteners are used in plastic parts, pockets are cut exactly to the size of the nuts to prevent play and hold them securely when the screws are tightened.

Step 9: Rounding outer corners

Finally, we round the corners - this distributes stress and improves the enclosure's appearance.

We still keep a uniform thickness, so the outer corner radius (3.5 mm) will be somewhat larger than the inner radius (2 mm).

At the same time we round the inner corners. It is important to keep this radius small to avoid excess material use and a corresponding increase in wall thickness.

This is what the finished assembly looks like:

Step 10: Lid

Let's move on to the lid. We use the same approach - create an open rectangular box primitive, add bosses with screw holes and round the outer corners to match the enclosure.

The mounting bosses look like this because of the uniform wall thickness. This is how they look from the opposite side.

Here the bosses are slightly shorter than the outer walls so as not to interfere with enclosure assembly.

Step 11: Rounding corners and outer edges

As in Step 9 for the bottom of the enclosure, we round the outer edges to distribute stress and match the top and bottom.

Step 12: USB connector boss

This small boss mates with the micro-USB connector, securing it in the opening at the bottom of the enclosure.

Step 13: Holes for buttons and LED

According to the initial requirements, the lid must have openings for the buttons and LED.

Step 14: Rib for securing the moisture sensor

When the sensor is pushed into the soil, it may touch the lid, which is undesirable.

To prevent this, we add a rib on the lid to hold the sensor in place.

Step 15: Rounding inner corners

The last step is rounding all sharp edges, which are not only unattractive but also concentrate stress. The radius will again be small (2 mm) to avoid excess material use.

Let's add a lid and fasteners to our assembly.

Be sure to leave free space for wiring and its bends! It is easy to forget during design, but lack of space for wires may well show up when assembling the finished product. The top image shows that our enclosure leaves enough space (almost half an inch) above the board for routing wires and the temperature sensor.

Conclusion

Your enclosure is ready for 3D printing or polyurethane casting in silicone molds. To produce it with other technologies (e.g. plastic injection molding), the model needs further refinement. This is best done by the process engineers at the plant where you plan to manufacture the enclosure.

This is a translation of the article https://www.fictiv.com/hwg/design/enclosure-design-101, but if anything about enclosure design is unclear, get in touch and we'll try to help.

How to design a plastic enclosure | Formlab