NewNot sure which service you need? Answer four quick questions. Try the Service Finder

Product Development

PCB and Enclosure Co-Design: The Decisions to Make Together, Early

By IMECA3D · · 8 min read

Line drawing of a circuit board inside the outline of its enclosure: the board's four mounting holes sit inside orange boss rings, a connector meets an opening in the wall, an antenna sits at the top edge in a dashed clear zone, a sensor sits in a corner cut off by a dashed line, and vent slots line the right wall

Most enclosure problems are decided on the circuit board: a mounting hole where no boss can stand, a connector set back too far for the plug to reach, an antenna boxed in by metal, a temperature sensor next to the regulator. Each is easy to avoid while the board is still being laid out, and expensive once it has been made. This article lists the decisions the board and the enclosure share, and how the two designers can make them together.

vents123456781Mounting holesbecome the screw bosses2Edge connectorsset the wall openings3Antenna at the edge≥ 15 mm clear, no metal4Sensor away from heatslots, own opening5Hot parts near ventsheat leaves the box6Tallest partsets the lid height7Button and LEDflexure, light pipe8Programming accessreachable when closed?
Each decision on the board is also a decision about the enclosure. Made together and early, they cost nothing; made late, they mean a new board or a new enclosure.

Why together, and why early

In many projects the board is finished first and the enclosure is "wrapped around it" afterwards. That works for a development board you cannot change anyway, but for your own PCB it wastes the cheapest moment to fix problems. A change costs more at every stage of development; our guide to the stages of hardware development shows how quickly.

The better order starts on the mechanical side: the enclosure designer defines the board outline, the holes and the areas to keep clear, and the electronics designer lays out the board inside those limits. Siemens describes exactly this baseline step in its ECAD–MCAD workflow. From then on, the two sides exchange files until the outline, holes and connectors are fixed, and only then is the board routed in detail.

The eight decisions the board and enclosure share

1. Board outline and mounting holes

The mounting holes become the enclosure's screw bosses, so put them where a boss can stand: near the corners or edges, clear of tall parts, with a component-free ring around each hole for the screw head on top and the boss underneath. Agree the screw size early; our screw boss designer gives the boss and hole sizes for heat-set inserts and screws. If there will be more than one board, agree the stack and the standoff heights at the same time.

2. Connectors on the edges

Every connector the user plugs into sets an opening in a wall. Keep them on one or two edges, at or slightly beyond the board edge, so the plug's moulded body can reach the socket through the wall. Connectors grouped on one edge can share a separate I/O panel, which is easier to print and to change than a full enclosure part. Our guide to designing 3D printed enclosures for electronics covers the opening details.

3. The antenna

A wireless module is the part most easily spoiled by its enclosure. For its modules, Espressif suggests placing the on-board PCB antenna outside the base board, or with its feed point close to the board edge, and not in the middle of the board. Inside the housing it recommends a clearance of at least 15 mm in all directions, and asks designers to consider the housing's effect on the antenna. In practice that means no screws, inserts, batteries or metal brackets close to the antenna, and the module at an edge that faces outward, not into a wall full of metal. Check your own module's guidelines for its exact keep-out area.

4. Sensors that measure the air

Temperature, humidity and gas sensors measure whatever is around them, including the heat from your own electronics. Sensirion's design guide for its humidity and temperature sensors asks for the sensor to be decoupled from heat sources: distance from processors, regulators and displays, thin copper connections, and milled slots in the board around the sensor. It also recommends a small dead volume around the sensor and an opening close to it, so the sensor sees the outside air quickly. Place the sensor in the coldest part of the device; for its SCD30 CO₂ sensor, Sensirion advises placing it below heat sources, because warm air rises.

5. Hot parts

Regulators, processors and power stages should sit where their heat can leave: near the vents and the walls, away from the sensors and the battery. The enclosure then puts its openings next to them. Our heat-rise worked example shows how much this matters in a plastic box, and why pressing a hot board against a printed wall is not a fix.

6. Heights

The tallest component sets the height of the enclosure. Place tall parts (electrolytic capacitors, inductors, connectors, the battery) where the enclosure has room, or choose low-profile parts. A simple height map of the board, showing where parts above a few millimetres sit, lets the mechanical designer shape the lid around them.

7. Buttons, LEDs and displays

Buttons near an edge can be pressed through a flexure in the enclosure wall; LEDs can shine through a light pipe or a thin window. Both need the part's position fixed early, and LEDs need enough distance between them so the light of one does not bleed into the next pipe. Displays need a flat mounting area and a window cut in the right place.

8. Assembly and service

Decide early how the device will be programmed, tested and serviced: is the USB port reachable with the lid closed, is there room for a programming clip, which way does the battery connector face, which order do the boards and cables go in? These answers change both the board layout and the enclosure.

How the files go back and forth

Mechanical (MCAD)Board outline, holes,keep-outs, height limitsElectronics (ECAD)Places parts, routes,exports the 3D boardDXF · IDF · IDXSTEP of the assembled boardChecks fit, clearances,openings, heatRepeat until outline, holes and connectors are frozen, then route the board
Board and enclosure are designed in a loop, not one after the other. The simplest loop needs only two files: an outline from the enclosure side, a STEP model from the board side.

The simplest loop needs only two files. The mechanical side sends the board outline, holes and keep-out areas as a 2D file (DXF) or in the older IDF format; the electronics side sends back a STEP model of the assembled board, which most ECAD tools can export. A STEP model is a "snapshot": it carries the 3D shapes but not the component data, which is enough for fit checks.

Teams that iterate often can use IDX (Incremental Design Exchange), a format developed for ECAD–MCAD collaboration under ProSTEP iViP. It tracks each object (outline, holes, components) and each proposed change, so either side can accept or reject changes instead of re-importing a whole new file.

Whatever the format, agree two things: who owns which items (usually the outline, holes and connector positions sit with the mechanical side, and the parts placement with the electronics side), and when each one is frozen.

When the board cannot change

With a development board or an existing product's board, co-design is not possible: the enclosure adapts to the board as it is. That is still fine for prototypes and small batches, as in the ESP32 enclosure below, where the USB opening and the corner bosses follow the board's own connector and holes. Co-design pays off from the moment you design your own PCB.

White 3D printed enclosure with an ESP32-WROOM board in the base, screw bosses in the corners and a USB opening in the side wall, next to its lid with slanted vent slots
An enclosure designed around a board that could not change: the openings and bosses follow the development board.

Where IMECA3D fits

Our electronics enclosure design service includes PCB–enclosure co-design: we help place sensors, buzzers, heat-generating parts, membrane vents, connectors and buttons so the board and the enclosure work together. We design the enclosure and work alongside your electronics designer, who lays out the board. The best start is an early layout or a STEP export from your ECAD tool (KiCad, Altium, Fusion and others); for a first concept, the board outline with its holes and the heights of the tallest parts is enough. See also product development support if the enclosure is part of a larger project.

Sources

← All articles

Designing a board that needs an enclosure?

Send the board outline or an early layout. We work with your electronics designer on holes, connectors, sensors and heat before the board is routed.

Get a Quote
Chat on WhatsApp