Email us

Este artículo está en inglés. Ver el sitio en español

PCB enclosure design iteration for a first build

Develop the PCB and enclosure together, then freeze their shared mounting, connector and control interfaces before completing board routing. Use matched CAD revisions, a tolerance review and a physical fit prototype to catch changes before releasing the first build.

NEMA4 Enclosure engineering team · Published October 31, 2026 · 7 min read

Design the PCB and enclosure together, but freeze their shared mechanical interfaces before completing the board routing. Start with a rough circuit layout and a rough enclosure model. Then resolve mounting, controls, connectors and component heights through small, documented revisions. Neither design needs to be finished first.

The useful milestone is a verified mechanical package: board outline, mounting holes, connector positions, control locations and clearance envelopes. Once those agree, finish the electrical layout and check the assembled prototype before releasing fabrication files.

What you need before the first pass

Gather the information that can change the package, rather than starting with a detailed enclosure model:

  • A schematic and preliminary component list, including likely power-supply and protection components.
  • Mechanical drawings for connectors, switches, indicators, displays and the tallest components.
  • PCB design software and mechanical CAD that can exchange board geometry, preferably through STEP files.
  • The intended installation environment, cable routes, mounting orientation and service access.
  • A simple revision record connecting each board model to its matching enclosure drawing.

Use manufacturer drawings to verify dimensions. A downloaded component model is useful geometry, but it is not dimensional authority.

If you have not chosen between a fixed enclosure and a custom package, resolve that constraint first. The article on choosing the case before PCB layout covers that separate decision.

Work through the design passes

  1. List the requirements that can force a mechanical change.

    Record supply voltage, external connections, installation method, environmental exposure and estimated internal heat dissipation. Identify the components whose size remains uncertain, especially capacitors, power devices and connectors. Give each uncertain item a provisional envelope rather than treating its current model as final.

    Decide whether the enclosure dimensions are fixed by an installation space or remain negotiable. A fixed mounting location makes the enclosure envelope a starting constraint. A large transformer or display may instead set the minimum package dimensions. Record which constraints cannot move and which can.

  2. Arrange blocks before drawing detailed walls or routing tracks.

    Place rough component groups inside a preliminary enclosure envelope. Include the PCB, terminals, cable entries, mounting supports and external controls. Reserve space for plugged-in connectors, cable bends, fastening tools and removal paths. These often need more room than the components themselves.

    Make a full-size paper front-panel layout. Check switch spacing, label areas and display visibility in the intended mounting orientation. Move the blocks while changes remain simple. Do not spend time refining enclosure corners while the display position or cable-entry face is still undecided.

  3. Choose how each external control will be supported.

    A panel-mounted switch or indicator attaches mechanically to the enclosure and connects electrically to the PCB. Use a suitable harness and connector when the panel must separate during service. Direct soldered wiring can work, but it needs strain relief and a defined disconnection method. Our article on wiring enclosure-mounted components to a PCB covers that interface.

    A PCB-mounted connector or control needs closer coordination between board position and panel opening. Arrange mechanical support so insertion and operating forces do not overload solder joints. A board-mounted LED may use a suitable light pipe or indicator holder. Its body diameter alone does not define the finished panel opening.

  4. Establish common datums and calculate the height stack.

    Choose reference surfaces and an origin that both drawings can identify. Locate PCB mounting holes, connector centers and enclosure cutouts from those references. State the viewing direction on each face drawing, especially when exporting a rear view that could mirror the pattern.

    Calculate height from the actual mounting surface. For example, a 0.25 in [6.4 mm] standoff, 0.063 in [1.6 mm] PCB and 0.75 in [19.1 mm] component occupy about 1.063 in [27.0 mm] above that surface. This is occupied height, not the required enclosure depth. Add allowance for tolerances, board bow, lid features and assembly clearance. Check underside leads and components separately.

    Mechanical clearance does not establish electrical insulation clearance. Determine creepage, clearance and insulation requirements from the applicable product standard and operating conditions.

  5. Place the critical PCB components and exchange models.

    Establish the board outline and mounting holes first. Place connectors, displays and controls whose locations affect the enclosure. Then place tall, hot or mechanically sensitive parts before distributing the remaining components.

    Export the populated board model into the enclosure assembly. Include mounting hardware, panel thickness, connector mating parts and internal latch or hinge envelopes. Inspect the assembly in sections, not only from outside. For a display or keypad, verify the manufacturer's opening and retention dimensions using the checks in LCD keypad panel cutout dimensions.

    Return any changes to the PCB source file. Do not move an imported board in mechanical CAD and leave the electrical layout unchanged.

  6. Check tolerance and assembly before completing the routing.

    Nominal alignment is not enough. If two independently located features each have a positional tolerance of ±0.010 in [0.25 mm] along one axis, their worst-case relative offset is ±0.020 in [0.51 mm] along that axis. Determine whether the mating opening, hardware or connector arrangement accommodates that movement.

    Build a simple fit mockup of the critical interfaces. A printed panel template or nonconductive prototype can reveal inaccessible nuts, trapped cables and awkward assembly order. Keep unqualified mockups unpowered. Verify that the board can enter, fasten and leave the enclosure without bending components or removing unrelated hardware.

    Use the results to adjust hole positions, support locations or component placement before routing becomes difficult to change.

  7. Complete routing, then repeat the mechanical review.

    Finish the PCB layout only after the shared interfaces are stable. Run the electrical design checks, then export a fresh populated model. Routing changes can introduce larger parts, relocated connectors or underside components that invalidate an earlier fit review.

    Review heat paths at the same time. A sealed enclosure cannot be assumed to remain near ambient temperature, and stainless steel alone does not establish adequate cooling. Separate heat-sensitive components from concentrated losses where practical. The article on component layout inside a sealed enclosure addresses that placement problem.

    If thermal requirements force a larger package or cooling hardware, update the enclosure and PCB together before release.

  8. Freeze matching revisions and build the first assembly.

    Release the PCB fabrication data, populated board model, enclosure drawing and harness information as one matched package. Mark the revision on every file, including exported drawings. Archive superseded exports so an older panel layout cannot accidentally accompany a newer board.

    Assemble the first unit using the intended hardware, connectors and cables. Record any hand fitting, forced alignment or unexpected assembly step as a design issue. Correct the source files rather than relying on the same adjustment during every build. A successful first assembly should confirm the process, not depend on undocumented modifications.

Checks when the prototype is assembled

Check the finished assembly against the drawing, not just against whether the lid closes:

  • Every mounting screw engages correctly without distorting the board.
  • Connectors fully mate, latch and release with surrounding hardware installed.
  • Switches operate without rubbing their openings or flexing the PCB excessively.
  • Indicators remain visible across the required viewing angles.
  • Cables clear lid edges, hinges, fasteners and sharp metal surfaces.
  • The board and serviceable parts can be removed through the intended sequence.
  • Metallic parts have the required protective bonding where applicable.

Measure operating temperatures at the intended load and ambient conditions using an appropriately safe test setup. Compare component temperatures with their manufacturer limits. A brief power-on check does not establish thermal performance.

Inspect the released CAD assembly for missing hardware and invalid geometry as well. The generated enclosure CAD checklist provides a separate geometry review before fabrication.

Mistakes that cost the enclosure rating

Our enclosures carry manufacturer ratings for the specified design; they are not UL listed. If the specification requires NEMA 4X, the controls, entries, seals and completed installation must support that requirement.

A close-fitting hole around a PCB-mounted connector is not automatically a sealed interface. Likewise, an ordinary LED pushed through a drilled opening does not establish environmental protection. Select components intended for the required panel mounting and exposure.

Check the specified panel-thickness range, gasket seating surface, retention method and installation torque for every penetrating component. A sealing washer cannot compensate for an unsuitable opening or a warped mounting surface.

Do not enlarge a finished cutout simply to absorb a board-position error. Resolve the tolerance problem and confirm the sealing arrangement instead. Use the cutouts, glands and HMI windows guide for penetration fundamentals.

A fit mockup verifies geometry only. It does not demonstrate water protection, corrosion resistance, electrical safety or compliance of the finished product.

What to put on the enclosure drawing

Make the enclosure drawing understandable without access to the PCB design software. Specify material, outside width, height and depth, mounting orientation and the required environmental rating. Define the minimum usable internal space separately from outside dimensions.

For each face, show cutout dimensions, locations, tolerances and the viewing direction. Identify the mating component and its drawing revision. Include panel-thickness constraints and keepout areas for nuts, connectors and service access. Agree the PCB support arrangement before approval.

We build custom enclosures with your specified material, dimensions and cutouts, starting at a quantity of one. Use the cutout designer to lay out openings and include the exported layout with the quote request.

Finish with one explicit release condition: the enclosure drawing and PCB mechanical export must identify the same approved interface revision. That prevents a correct board and a correct enclosure from becoming an incorrect pair.

Enclosures for this job

Catalog sizes that suit the job this article answers, picked from its subject; open one for its full specifications.

EnclosureMaterialOutside H x W x D / displayRating
12 × 10 × 6 in304 stainless12 x 10 x 6 inRated NEMA 4X / IP66 by the manufacturer; not UL listed
16 × 14 × 8 in304 stainless16 x 14 x 8 inRated NEMA 4X / IP66 by the manufacturer; not UL listed
20 × 16 × 8 in304 stainless20 x 16 x 8 inRated NEMA 4X / IP66 by the manufacturer; not UL listed

Questions

Should the PCB or enclosure be designed first?

Start with the fixed constraints, then develop both designs together. Establish a rough board layout and enclosure envelope before freezing their shared interfaces. Complete routing after mounting holes, connector positions, control locations and component-height allowances have survived a mechanical fit review.

Should switches and indicators connect to the PCB with wires?

Panel-mounted controls connected through a suitable harness can simplify positioning and service. PCB-mounted controls reduce separate wiring but demand tighter mechanical coordination. Choose based on mounting loads, alignment tolerances, sealing and access, rather than assuming either arrangement is always better.

Which files help coordinate the PCB and enclosure?

Exchange a populated board model, a dimensioned mechanical drawing and the relevant component drawings. Include mounting holes, board thickness, underside features and connector mating envelopes. A STEP model helps check fit, but a controlled drawing should define critical dimensions, tolerances and revisions.

Does a successful fit prototype prove the enclosure rating?

No. A fit prototype can confirm alignment, fastening access and assembly order, but it does not establish environmental protection. The finished design needs suitable penetrations, seals and hardware, installed as specified, with evaluation appropriate to the required enclosure rating and product requirements.

Checklist before you order

Specify it once, built to your drawing

  • Environment and NEMA type: Type 1, Type 3R, Type 4, Type 4X, Type 6P, Type 12, Type 13 (manufacturer ratings, not UL listed)
  • Material: 304 stainless steel, 316L stainless steel, Powder-coated carbon steel, Aluminum, Polycarbonate, Fiberglass (FRP)
  • Size: inside or outside height, width and depth, with the depth your deepest component needs
  • Cutouts, glands and windows, dimensioned from one datum on each face
  • Mounting and access: wall, pole or stand, hinge side, mounting panel
  • Quantity: from one piece

Delivered in 10 business days, anywhere in the world. Counted from your order; for custom work, from your approval of the drawing.

Build it from 12 × 10 × 6 inRequest a custom quote

NEMA 4X enclosures: sizes for this job

Keep reading

More on layout and installation

All articles

Buying guides

The guides behind this answer

All guides