Enclosure Design for Electronics: Materials, IP Ratings, Tolerances, and How PCB Layout and Mechanical Enclosure Design Interact
The enclosure decides whether a good board becomes a good product. How PCB layout and mechanical enclosure design interact, then the plastics, the IP ratings, the molding rules and the tolerances that hold against the board.
You can spend six months getting a board right - clean power rails, a pass at the EMC lab, a firmware stack you trust - and still ship a product that feels cheap, overheats, or lets water in the first time it rains. The enclosure is where that gets decided, and it is almost always the part of the program that gets rushed. This is a working guide to hardware enclosure design for electronics and embedded systems: the interaction between PCB layout and mechanical enclosure design, which plastic to choose, what an IP rating really promises, the injection-molding rules you cannot break, and the tolerances that hold between a molded wall and a populated board. A hardened steel injection mold runs $20,000 to $80,000 and takes 6 to 10 weeks to cut; if the plastic was designed around a PCB that later grew 2 mm or gained a taller connector, you are paying to re-cut steel.
Design the Enclosure and the Board Together, or Pay Twice
The single most expensive enclosure mistake is starting mechanical design after the PCB is frozen. The board outline, the mounting-hole pattern, the connector edge, the tallest component, the antenna keep-out, the battery footprint: all of these are negotiable while the schematic is still in flux and non-negotiable once you release the board to fab. Good enclosure work starts as a shared 3D model where the ME and the EE trade millimeters: move the USB-C jack 1.5 mm inboard so the wall can carry a draft angle, rotate the antenna so it clears a metal boss, drop a component to a lower-profile part so the lid does not bow. That co-design discipline is the same one that separates a product built for a real field life from one that gets recalled, and it is exactly how we approach an industrial device meant to run for a decade.
How PCB Layout and Mechanical Enclosure Design Interact
Asked plainly, how do PCB layout and mechanical enclosure design interact? Through six shared decisions that neither discipline can make alone. Each one is a line in the contract between the board and the housing, and each has a default owner.
- Keep-outs. The housing takes volumes away from the board: the gasket flange, the rib that captures the board edge, the travel of every snap hook, the inside of the lid, and a copper-and-component keep-out around each mounting hole sized to the screw head and the top of the boss (about 5 to 6 mm in diameter for M2.5 hardware). The mechanical engineer owns the outline, the keep-outs and a maximum-height map for every zone of the board, top side and bottom side; the layout engineer owns everything inside them. Both go into the layout tool as rules, not as a note in an email.
- Connector placement and user-facing parts. Every port, button, LED and display is a hole in the wall, so its position is set by the outside of the product before the board exists. Layout then places the connector so the shell sits a defined distance behind the wall, behind a cutout sized to the overmold of the chunkiest cable a customer will plug in, not to the bare receptacle. Light pipes and tactile switches go through the same negotiation: a 0.5 mm shift in a dome switch moves where the finger has to press.
- Antenna volume. A chip or trace antenna needs a ground-free zone on the board and a keep-out volume in the housing. A plastic wall a few millimeters away detunes it, and metal, metallic paint or a battery inside that volume kills it. The RF engineer defines the volume as 3D geometry, the mechanical engineer protects it, and the matching network is tuned on production-process parts, never on a print.
- Thermal path. An unfilled plastic conducts heat at roughly 0.2 W/mK against about 170 W/mK for 6061 aluminum, so a sealed plastic box cannot rely on its walls to carry heat away. Layout puts the hot parts, the regulators, the motor drivers and the SoC, where a thermal pad can reach a boss, a plate or the chassis, and the housing provides that landing. Settle the path before placement, because moving a hot part after layout is a respin.
- Mounting bosses and board retention. Boss positions become the mounting-hole pattern. Three or four well-placed holes plus a captured edge beat a board that floats on its connectors, where every cable insertion flexes the solder joints. Hole diameter, boss height and the standoff under the board also set the clearance for the tallest bottom-side part, which is why the height map has two sides.
- The tolerance stack between board and housing. A routed board outline lands within about +/-0.15 mm, a reflowed connector within about +/-0.1 mm of its footprint, the board shifts in its mounting holes by the hole clearance, and a molded wall holds about +/-0.1 to 0.2 mm. Summed worst case, a connector can sit 0.5 mm or more from where the CAD shows it, which is why cutouts get 0.3 to 0.5 mm of clearance per side and the board is allowed to float toward the connector instead of fighting it.
Who decides what first? The outside of the product. Industrial design fixes the envelope, the grip and where every port, button and display sits, which is the work our industrial design phase delivers as DFM-aware CAD. The electrical engineer then states the board's non-negotiables: the connector edge, the antenna, the battery, the heat sources and the tallest parts. The mechanical engineer converts both into a board outline, a mounting pattern, keep-out volumes and a height map, and only then does layout begin inside that envelope, at the layout stage of the PCB design workflow. From there the two models iterate as a pair, exchanging STEP files every time either side moves something, until the outline, mounting holes and connector positions are frozen in writing, before the fab order and before tool kickoff. Our PCB design and mechanical work run as one phase for exactly this reason.
Material Selection: Match the Plastic to the Job
There is no universal enclosure plastic. Each resin trades cost, heat resistance, stiffness, impact and cosmetics. Pick against the actual environment and the actual load, not against what the last product used.
- ABS (e.g. Cycolac): cheap, easy to mold, great cosmetic surfaces, HDT around 90-100 degrees C. The default for indoor consumer housings. Poor UV and heat resistance, so keep it out of the sun and away from hot power stages.
- Polycarbonate / PC (Makrolon, Lexan): high impact, HDT around 130 degrees C, and optically clear for lenses, light pipes and windows. More expensive, notch-sensitive, and prone to stress cracking near solvents and some adhesives.
- PC-ABS blend (Bayblend, Cycoloy): the workhorse of electronics housings. It buys most of PC's toughness and heat with most of ABS's moldability and cost. When in doubt for a rugged consumer or industrial box, start here.
- Nylon / PA6, PA66: tough, abrasion- and fatigue-resistant, and self-lubricating for gears, latches and wear surfaces. It is hygroscopic: it absorbs moisture and its dimensions and stiffness shift with humidity, which matters for tight fits.
- Polypropylene / PP: cheap, chemically resistant, and the king of living hinges (flip caps, battery doors that flex a million cycles). Low stiffness, low HDT, and it resists paint and bonding, so plan mechanical retention instead of glue.
- Glass-filled grades (20-30% GF nylon or PC): when you need stiffness and dimensional stability, glass fill raises modulus and HDT dramatically. The cost is anisotropic shrink and warp, abrasive wear on the tool, and rougher cosmetics that usually need texture to hide.
- Aluminum (die-cast, or CNC / extruded 6061): a real thermal path, inherent EMI shielding, and a premium feel. It is heavier, pricier, and opaque to RF, so it fights any onboard antenna.
- Silicone / TPU overmold: not the structure, the interface. Grippy skins, sealing gaskets, tactile buttons and drop protection. Essential on handhelds and wrist-worn devices where the enclosure, battery and antenna all fight for the same millimeters, as we cover in wearable device design.
When Metal Earns Its Keep
Aluminum is not a default; it is a decision you justify. Reach for it when you have real heat to dump (an extruded aluminum chassis can be the heatsink for a power stage or motor driver, with the MCU sitting nearby on the same board), when you need EMI shielding without conductive paint or a separate can, or when the product's positioning demands a cold, solid, machined feel. The trade is cost, weight and RF opacity. If your product has a BLE or Wi-Fi radio, a metal enclosure forces an external antenna, a plastic RF window or a carefully placed slot. Solve that in the industrial design phase, not after the housing is machined.
IP Ratings: What IP54, IP65, IP67, and IP68 Actually Promise
An IP code has two digits: the first is solid and dust ingress (0-6), the second is water (0-9K). Marketing rounds these off; engineering does not. Know exactly what you are claiming before you print it on a datasheet.
- IP54: dust-protected (not dust-tight) plus splash from any direction. Fine for an indoor or sheltered outdoor box that never gets hosed.
- IP65: dust-tight plus low-pressure water jets. The realistic target for most outdoor equipment enclosures.
- IP67: dust-tight plus immersion to 1 m for 30 minutes. The common bar for handhelds and wearables (the drop-in-the-sink test).
- IP68: continuous immersion beyond 1 m at a depth and duration the manufacturer defines, so IP68 without a stated depth is meaningless.
- The code says nothing about salt spray, solvents, thermal cycling or aging. A gasket that passes IP67 fresh can fail after two years of compression set and UV. Test the rating on aged units, not just first articles.
Sealing Is a Feature You Design In, Not a Sticker
The fastest way to spot an amateur enclosure is an IP67 claim with no sealing feature anywhere in the CAD. A rating is only real if a physical element blocks the leak path. These are the tools that actually create a seal:
- Compression gaskets in a tongue-and-groove channel: the standard for a screwed two-part housing. Design for 15-30% gasket compression, size the groove for it, and space the screws close enough that the flange does not bow open between them.
- O-rings for round interfaces: battery caps, plungers, cylindrical joints. Give them a properly dimensioned gland (groove depth and width) so the ring is captured and compressed, never just pinched.
- Ultrasonic or laser welding: for permanently sealed, non-serviceable housings. It gives a clean, gasket-free IP67 seam but eliminates any hope of opening the unit for repair.
- Adhesive and pressure-sensitive gaskets: die-cut foam or liquid-dispensed (FIPG) beads for thin, cosmetic seams like a display bezel.
- Potting: flood the whole assembly in epoxy or urethane for the harshest environments. It seals and stiffens but adds weight, kills serviceability and traps heat, so reserve it for genuinely brutal applications.
- Gore (ePTFE) vents: the piece most sealed designs forget. A fully sealed box is a pressure vessel; ship it by air or move it between a warm room and a cold morning and the pressure change sucks the gasket in or bulges it out, eventually breathing water past the seal. A membrane vent equalizes pressure while blocking liquid.
- Cable glands and sealed connectors: any wire or connector that pierces the wall is a leak path unless it is a glanded, gasketed or IP-rated part in its own right.
Design for Injection Molding: The Rules You Cannot Break
Injection molding is a set of physics constraints wearing the costume of a design tool. Violate them and you get sink marks, warp, short shots and parts that will not eject. The core rules are not style preferences.
- Uniform wall thickness: hold a consistent 2-3 mm nominal wall. Thick sections cool slower and pull the surface inward as they shrink, leaving visible sink marks; abrupt thick-to-thin transitions cause warp. Where you must change thickness, blend it with a gradual taper.
- Coring out solid volume: never mold a solid block. Hollow thick bosses and pillars so their wall matches the nominal, or they will sink and add cycle time.
- Radii everywhere: sharp internal corners concentrate stress and resist flow. Add a fillet of at least 0.5x the wall thickness on internal corners.
- Ribs, bosses and gussets for stiffness: you get rigidity from geometry, not from thicker walls. Keep ribs at 40-60% of the nominal wall to avoid sinking on the show surface opposite them, and gusset tall bosses so they do not snap.
- Gate and knit-line placement: the ME and the molder must agree early on where plastic enters and where two flow fronts meet. Knit lines are cosmetically and structurally weak; keep them off show surfaces and out of high-stress zones.
Wall Thickness, Draft, and the Features Molders Hate
Two variables cause more tool rework than everything else combined: wall and draft. The wall is covered above. Draft is the taper that lets a part release from steel; without it, the part grips the mold and tears or scuffs on ejection. Give every vertical face a minimum of 0.5-1 degree of draft, and 1-2 degrees or more on textured surfaces (deeper texture needs more draft; the Mold-Tech rule of thumb is roughly 1.5 degrees per 0.025 mm, or 0.001 in, of texture depth). Zero-draft walls are a promise of an expensive, sticky tool. Undercuts, the snaps or lips that block straight ejection, are not forbidden, but each one forces a side-action, lifter or slide that adds cost and lead time, so use them deliberately, not accidentally.
Fastening: Snap-Fits vs Screw Bosses vs Heat-Stakes
How two halves join drives serviceability, seal integrity and unit cost. Choose the method against how the product is assembled, opened and repaired.
- Snap-fits: zero fasteners, fastest assembly, lowest cost, and ideal for high-volume consumer parts. They wear with repeated cycling and are hard to combine with a high-compression gasket, so they suit sealed-once or lightly serviced products.
- Screw bosses: the reliable default for a serviceable, sealable enclosure. Thread-forming screws into properly sized bosses give the clamping force a compression gasket needs. Size the boss hole for the screw, gusset tall bosses, and avoid the over-torque that strips the plastic.
- Heat-staking and threaded inserts: for mounting the PCB or joining panels permanently. Brass heat-set inserts give metal threads that survive repeated service far better than plastic bosses when a joint is opened often.
- Board retention: the PCB itself needs locating and holding, with bosses through the mounting holes, ribs that capture the board edge, or a captured fit. Do not let the board float on its connectors, or every cable insertion flexes the solder joints.
Tolerances and Fits: Where the Plastic Meets the PCB
Molded plastic is not machined metal. A realistic injection tolerance is roughly +/-0.1 to 0.2 mm on a small feature, looser on long spans and on glass-filled resins that shrink anisotropically. The classic failure is a connector cutout dimensioned to a metal-part tolerance: the USB-C or barrel jack ends up rubbing the wall or recessed too far for a plug to reach it. The fix is the stack-up from the interaction section above: sum the board fabrication tolerance, the connector placement tolerance, the board-retention slop and the molded-wall tolerance, and confirm the worst case still lets a mating connector seat. Give connector cutouts generous clearance (often 0.3-0.5 mm around the shell) and let the board float slightly to the connector rather than fighting it.
Thermal: Getting Heat Out Without Breaking the Seal
Plastic is an insulator, so a sealed plastic box traps heat and can push a regulator or SoC past its junction limit. There is a direct tension with your IP rating: vents let heat out and water in. Resolve it deliberately. For a low-power sealed device, conduct heat into the case with a thermal pad or gap filler from the hot part to a boss or an aluminum plate and let the whole enclosure radiate. For higher dissipation, design real airflow, inlet and outlet vents with a chimney path, and accept a lower IP rating, or use a membrane vent for pressure while relying on conduction for heat. Never leave the thermal path to chance; model it before the tool cuts.
Cosmetics: Texture, Paint, and IMD
How a product looks and feels is a molded-in decision, not a coat of paint added later. Mold-Tech (MT) and VDI texture standards define the surface grain right in the steel; texture hides sink and flow marks and improves grip, but it demands extra draft. Painting and soft-touch coatings add feel and color but also cost, a secondary process, and adhesion and wear risk. In-mold decoration (IMD/IML) bonds a printed film during molding for durable, scratch-resistant graphics and multi-color panels in one shot. Decide the cosmetic strategy before tool release, because texture and film gates change the tool itself.
The Prototype-to-Tooling Path
You do not go straight from CAD to a $50,000 steel tool. You de-risk the geometry in cheaper materials first, and you budget for it: the ramp from first form model to production tooling is a real line item, which we break down in hardware prototyping costs. For the printed steps, drop your STL into our free 3D printing quote tool; it runs in your browser and returns the part's dimensions, printability findings and a price band at 1 to 100 pieces.
- SLA / resin 3D print for form and fit: fast, cheap, cosmetically decent for checking how it sits in the hand and whether the populated board actually drops in. Not representative of production strength or material.
- SLS nylon or CNC-machined prototypes for function: durable enough to test snap-fits, drop performance and rough sealing before committing to steel.
- Urethane cast or aluminum bridge tooling for small runs: dozens to a few hundred near-production parts for beta units and early certification, without the cost or lead time of hardened steel.
- T1 samples off the production tool: the first shots from real steel. Expect to inspect, adjust the mold and run T2 (and sometimes T3) before parts are golden. This tool-release milestone lands right at the DVT-to-PVT boundary in the NPI phase model, so plan the schedule around it.
Where Enclosure Programs Go Wrong
The failure modes are boringly consistent across companies. Watch for these, because each one is a re-cut tool or a field return:
- Designing the enclosure after the PCB is frozen, so the plastic has to contort around a board that had no reason to be that shape.
- Ignoring draft until the toolmaker's DFM report comes back, then discovering half the walls need to be redrawn.
- Specifying tolerances a mold cannot hold, causing rattles, gaps and connectors that do not line up.
- Claiming an IP rating with no actual sealing feature, a gasket groove, a weld or a gland, anywhere in the model.
- Forgetting the membrane vent and watching a 'sealed' unit breathe moisture in over a few thermal cycles.
- Treating cosmetics and thermal as afterthoughts, then paying for a second tool to add texture or vents you could have molded in from the start.
If any of these describe your program and the tool has not been cut yet, a free 30-minute call with one of our engineers before tool kickoff is the cheapest design review you will ever get. Bring the board files and the CAD; we will tell you which of these is about to cost you.
Need an Enclosure That Matches Your Board?
The mechanical envelope is where a good board becomes a good product, or where a solid design quietly turns into overheating, leaks and re-cut tooling. At inteRFace R&D we design the board and the enclosure as one system: material selection against the real environment, sealing features that make an IP rating true, molding rules and tolerances that hold at scale, and a prototype-to-tooling path that de-risks the steel before you spend it. The work is priced in engineering hours, and you get a written quote with phases before any work starts. For a planning number today, run your product through the free cost estimator; then book a free 30-minute call and bring the board that needs a housing worthy of it.
Frequently asked questions
How do PCB layout and mechanical enclosure design interact?
Through shared decisions that neither side owns alone: the board outline and mounting-hole pattern, keep-out volumes and a component height map, connector and button positions set by the outside of the product, a protected antenna volume, a thermal path from the hot parts to a boss or plate, and a tolerance stack between the routed board and the molded wall. The outside of the product is decided first, the board's non-negotiables second, and layout starts only once that envelope exists.
How much does an injection mold for an electronics enclosure cost, and how long does it take?
For a typical handheld or small consumer housing, expect $20,000 to $80,000 for a hardened production tool, and 6 to 10 weeks from tool kickoff to T1 samples, plus a couple of weeks of tuning to T2. Larger or multi-cavity tools cost more. Aluminum bridge or soft tooling cuts both the cost and the lead time to a fraction for early volumes, which is why we push clients to prove the geometry in soft tooling before releasing hard steel.
Can I really hit IP67 with a plastic enclosure I can still open for service?
Yes, with a properly designed compression gasket in a tongue-and-groove channel and enough screws to keep the flange from bowing between them. The trade is that a serviceable seal relies on the gasket staying compressed over years, so you design for compression set and validate the rating on aged units, not just fresh ones. If the product never needs opening, ultrasonic welding gives a more robust and cheaper seal.
What is the most common reason a good PCB ends up in a bad enclosure?
Sequence. The board is designed and frozen first, then the enclosure is asked to wrap around whatever shape resulted, with connectors and tall components exactly where the wall wants to be. Co-designing the board and the mechanical envelope from the start, with the outline, mounting holes and connector positions frozen together and in writing, removes the majority of enclosure re-spins.
What enclosure material should an embedded device use by default?
PC-ABS for most indoor, rugged consumer and industrial housings: it buys most of polycarbonate's toughness and heat resistance with most of ABS's moldability and cost. Move to polycarbonate for impact or optical windows, to glass-filled grades when stiffness and dimensional stability matter, and to aluminum only when you have real heat to dump or need EMI shielding and can live with its weight, cost and RF opacity.
What has to be frozen before the enclosure tool is cut?
The board outline, the mounting-hole pattern, every connector, button, LED and display position, the antenna keep-out volume, the tallest component in every zone of the board, the material grade and colorant, the draft on every vertical face, the parting line, the gate locations and the cosmetic texture. Each of those changes the steel. Firmware can keep changing after tool kickoff; geometry that touches the tool cannot.
How inteRFace R&D can help
Building something hardware-shaped?
We help hardware founders go from sketch to certified product. Tell us what you're working on — a senior engineer reads every email.