You’ve built your IoT project, but now what do you put it in. There are many things to consider when choosing an enclosure for your project.
First, I’d consider where the project is going to be placed. Is it going to be in a public place? If so, you may want to consider a box that can be securely shut and/ or mounted to something from the inside. If it’s a product that you won’t need to access the components in the future, you may want to seal the box with an adhesive instead of using a lock. When sealing the box, you’ll want to ensure the parts inside don’t overheat. Depending on the location of your product, you can leave room for air flow in the box, or you can add vents or a fan. If the enclosure is going to be in a location where it may get dusty or wet, I’d recommend getting an IP rated box. Digi-Key carries enclosures from IP 10 - IP 68.
The next thing I consider is size. You’ll want to consider the size you need for your board and other internal components as well as your external components, such as sensor, buttons, lights, antennas, etc. When considering internal size, remember to account for any extra space needed if you have components that create an issue with electrical noise. When considering size for the external components, you’ll want to consider the length and width as well as the depth needed to accommodate for the depth of the external component, if being panel mounted, plus any wiring and the components attached to the back of the enclosure.
Next is to consider future plans. Is this a single project or is it a prototype with high volume manufacturing being planned? For a single or small volume project, you may want to 3-D print a custom sized case. You can see the 3-D printers Digi-Key carries here. If you are manufacturing many, you may want to order boxes, and cut your own holes, or order custom cut boxes from Digi-Key. See more information on custom boxes here.
One thing to be aware of is the possibility of your enclosure becoming a Faraday cage. The most common cause of this is using a ferrous metal container. Another possible cause is certain boxes (most commonly black) are pigmented using ferrous materials such as iron. This could cause a the container to become a Faraday cage, with constant or intermittent issues. Often times, antennas will be run to the outside of the enclosure to be sure this isn’t an issue.