阅读时间:6分钟
虽然硬件产品的功能来自其内部组件,但通常会通过其外壳(包含电子产品)的外壳来认可产品,从而使其具有吸引力和用户友好。
In this post, I’m going to walk you through the steps for designing a basic enclosure, using the design of a IoT plant monitor product as an example.
The design is based onthis awesome projectby Ryan Madson—using just a couple of sensors, a WiFi-enabled Photon developer board from Particle, and an online cloud platform calledfathym,他能够不断监测家里植物的水分和温度。
出于本示例的目的,我们不必担心围栏的外观,而只是关注功能。
Step 1: Start with the Product Requirements
与任何设计,我喜欢先思考requirements, which can help you keep your development in scope and avoid adding cost and complexity where you don’t need it.
At this stage, you should ask yourself,我的外壳需要做什么,其最基本的功能是什么?
这是我们工厂监视器外壳的要求:
- The enclosure will house a Photon board, a temperature sensor, and a soil moisture sensor.
- 土壤水分传感器将至少渗透到土壤中。
- The enclosure will allow for interaction with two buttons on the top of the board.
- The onboard LED will be visible through the enclosure.
The above features are necessary for a successful design. Notice how the requirements don’t go on to include more specific design decisions such as wall thickness dimensions at this point. In the beginning, keep your requirements as streamlined as possible so you can have flexibility in your design later on.
专家提示:封闭电子倾向于增加的脾气ature of the system. You may need to add a fan or some sort of heat rejection method if your components are getting too hot.
步骤2:建模内部组件
Now on to the enclosure. I generally start a design such as our plant monitor example by thinking about how the innards will be held.
Ideally, you have a good idea of what’s going inside the enclosure so you can accurately design around it. In our case, we have aPhoton Particle board, atemperature sensor,asoil moisture sensor.
Modeling the larger parts—the Photon board and the soil moisture sensor—will make the 3D design easier and more relevant. You can often find some sort of dimensional drawing from the manufacturer, if not an actual 3D model.
I was able to find dimensions for both the Photon board and the soil moisture sensor, allowing me to create some simple 3D models.


The placeholder models don’t need to reflect every feature of the part. The outer dimensions and any mating features are important to model, but everything else can be left out.
For instance, my models of the soil moisture sensor and Photon board are pretty blocky, but the extents of the parts are accurately represented.


步骤3:创建外壳
Now that we have models of the electronic parts, we can design our enclosure around them. I start by shelling out a rectangular prism, creating an open box shape.
As we create features, we are striving for uniform wall thicknesses because注射成型, the process we’d use for mass manufacturing, requires it.
I’m going to use .040” wall thicknesses because that will be 3D printable as well as injection moldable.

Step 4: Add Slot and External Holes for Soil Moisture Sensor
One of our requirements states that the soil moisture sensor must be inserted at least an inch into the soil. One option is to just run wires from the board to the sensor outside of the enclosure, but I like the idea of a fully packaged product.
I’m going to add a slot that will hold the moisture sensor vertically, allowing the probes to pass through the bottom of the enclosure.


步骤5:为电线连接和微型USB连接器创建切口
我们需要为电线在水分传感器顶部焊接留出空间,因此让我们在保持插槽的同时取出一些材料。
I’ll also add a cutout for the micro-usb connector. The board will rest with the connector inside this slot, providing some alignment.

步骤6:为光子板创建支撑肋骨
光子板目前正在其微型USB连接器的一侧保持一侧,但我们应该添加板可以坐的支撑。
Luckily, there is nothing mounted on the bottom of the Photon board, so we don’t have to worry about hitting anything. A pretty simple way to create supports is to add ribs of our uniform thickness, where the board can rest.

Here’s a current view of the assembly so far:

步骤7:添加盖紧固件功能
Now we need to think about how the lid will be attached. I’m a big fan of the socket head cap screw, so let’s add some extra features around the outside of the enclosure to allow a fastener to pass through.

您在这里看到的功能是注射成型的典型特征。老板围绕着紧固件的孔,并在外部结构上有额外的肋骨以进行支撑。所有几何形状的均匀厚度为.040”。
步骤8:添加螺母功能
A trick for using metal fasteners in plastic parts is to countersink, or cut, the exact size of the nut on the bottom side of the part, keeping it from rotating while you screw in the fastener.

步骤9:圆角外角
最后,我们将使外角半径呈半径,这将减少那里的应力浓度,并使外壳看起来更加友好。
我们仍然保持均匀的厚度,因此对于外角,外半径(0.140英寸)将略大于内半径(0.100英寸)。
While we’re at it, let’s radius our internal corners, too. It’s important to keep these small to avoid adding too much material and increasing wall thickness.

Here is the completed bottom half of our enclosure:

Step 10: Lid Design
Now on to the lid! We’ll use the same types of features in the lid, shelling a box, adding bosses for the fasteners to pass through, countersinking the fasteners into the top, and radiusing the outer corners to match the bottom.



紧固件的老板看起来像在上面一样,因为我们保持了统一的壁厚,这就是另一侧的iNtertersink的样子。
I’ve also made the bosses slightly shorter than the outer wall height so that there are no interferences.
步骤11:圆角和顶部边缘
Just like in Step 9 for the bottom of the enclosure, we will radius the outer corners of the lid to decrease the stress concentration and make the lid match the bottom.

步骤12:添加突出以保持微型USB连接器的顶部
这个小老板将与Micro-USB连接器的顶部交配,将其固定在外壳底部的插槽中。

步骤13:切开按钮和LED灯的孔
As per our requirements, holes are created for interacting with the buttons on the board and seeing the LED light.

Step 14: Add Rib for Holding Moisture Sensor
当将水分传感器推入土壤中时,它可能会与盖子联系,这并不理想。
To remedy this, I’ll add a rib that will hold the moisture sensor down in a more secure position.

Step 15: Radius Internal Corners
The final step is to radius all of those sharp corners that are not only aesthetically unpleasant, but have large stress concentrations. Again, we’re going to keep the radii small (.005”) to avoid adding too much material.

Now let’s add the lid to our full assembly and throw in some hardware.



Be sure to leave space for wires and their bends! It’s easy to forget about wire routing while you’re designing until you’re trying to assemble the product. You can see from the above section view that I’ve left plenty of room (nearly half an inch) above the board for wires and the small temperature sensor.
Final Notes
Hopefully this gives you some helpful guidelines for designing and prototyping your own product enclosure. To start3D打印your enclosure design,hop on over to Fictivwhere you can get 3D printed parts delivered in 24 hours.
For more detail on enclosure design features, check out our posts onhow to design snap fit components,choosing the best fasteners for 3D printed parts,how to conduct a tolerance analysis for 3D printed parts, andhow to design light pipes.