Email us

Circuit board and battery enclosure sizing and layout

Size the enclosure around the mounted board, connected cables and battery replacement path, using verified usable internal dimensions. Secure the battery in a holder, insulate its terminals and confirm that replacement requires neither board removal nor wiring strain.

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

Size the enclosure around the mounted board, connected cables and battery replacement path—not just the bare circuit board. Use the available internal space after the mounting panel, door hardware and fittings are installed. A rectangular 9 V battery needs a secure holder, insulated terminals and enough access for replacement without disturbing the electronics. Prove that arrangement with a full-size layout before choosing the outside dimensions.

What you need before choosing a size

Gather the actual parts or their dimensional drawings. Include everything that remains inside when the door closes:

  • Circuit board, including mounting holes, underside solder joints and the tallest components.
  • Standoffs, fasteners and any insulating barriers.
  • Battery, holder, terminal connector and attached leads.
  • Connected plugs, cable glands, internal wiring and strain relief.
  • Mounting panel, door hardware and any door-mounted controls.

Measure plugs while connected. A socket near the board edge can require more space than the component drawing suggests. Include plug bodies, release tabs and the cable manufacturer's minimum bend radius.

Check battery suitability separately from mechanical fit. Confirm the board's permitted supply voltage, peak current and expected runtime against the battery data sheet. A battery that fits the enclosure may still be unsuitable for the electrical load.

The enclosure sizing guide covers overall enclosure selection. The steps below address the smaller clearances that determine whether a board-and-battery assembly is actually serviceable.

Build the layout around the installed parts

  1. Define the exposure before selecting the enclosure.

    Record whether the assembly faces indoor spills, outdoor rain, hose-directed water or possible immersion. These are different requirements. Our stainless wall-mount enclosures are rated NEMA 4X / IP66 by the manufacturer; not UL listed. Those ratings do not establish suitability for immersion.

    Select the required protection for the complete assembly, including every cable entry and operator device. A sealed box with an unsuitable connector is not a sealed installation.

  2. Establish the usable mounting area.

    Start with the mounting panel dimensions, not the enclosure's outside width and height. Mark panel fasteners, folded edges, grounding provisions and any areas obstructed by the door or latch.

    Draw the board and battery holder at full size. Leave space to install screws and reach terminal connections. A fastener that fits beneath an overhang may still be impossible to tighten after assembly.

  3. Build the depth stack from a common reference.

    Measure from the mounting panel's component-facing surface toward the closed door. Add standoff height, board assembly height and clearance above the tallest component.

    Check the battery holder separately. Include the battery connector, retaining strap and any leads crossing above it. Use whichever assembly projects farther toward the door, then check that position against latch and hinge intrusions.

    Keep underside solder joints clear of the metal mounting panel. Use the board manufacturer's mounting requirements rather than assuming that any short standoff provides sufficient clearance.

  4. Reserve the connected-cable envelope.

    Add the plug projection beyond each board edge. Then reserve the cable bend and the space needed to disconnect the plug. Do not force a tight bend simply to make the enclosure smaller.

    Place cable entries so their locknuts and internal bodies remain clear of the board and battery. Secure service loops without loading board sockets; the article on cable service loop retention covers that detail.

  5. Give the battery a separate service zone.

    Use a holder or restrained cradle suitable for the battery's dimensions and the installation's vibration. Support it from the mounting panel or another designed support, not from its terminal connector.

    Draw the battery's removal path as well as its installed outline. Include finger access, retaining-clip movement and enough lead length to disconnect the terminal connector without pulling on the board.

    Keep the battery from contacting solder joints, terminals and mounting hardware. Cover exposed contacts with an appropriate insulating connector or cover. Tape alone is not a dependable substitute for a properly fitted holder and terminal insulation.

  6. Separate service access from routine operation.

    Position the holder so a battery change does not require board removal. Keep its leads away from the gasket, hinge and latch. Allow the door to close without pushing wiring into place.

    If routine operation requires an external switch, specify a sealed device and its cutout rather than repeatedly opening the door. The article on battery activation through a sealed enclosure addresses that separate design choice.

  7. Check heat before accepting the smallest layout.

    Record the board's heat dissipation and maximum permitted operating temperature. Include regulator losses and any other powered devices inside the enclosure.

    A compact fit does not demonstrate acceptable temperature. The article on low-power boards in sealed outdoor enclosures explains why ambient conditions and sunlight can matter even with modest electrical losses.

Check a compact sizing example

Consider an illustrative board-and-holder layout, not a catalog enclosure or a universal clearance recommendation. All dimensions below describe the installed parts or space reserved around them.

Layout item Example measurement Space it requires
Board outline 4.0 × 2.2 in [102 × 56 mm] Base footprint before connected cables
Free-edge clearance 0.25 in [6 mm] Access margin at unobstructed edges
Connector projection 0.5 in [13 mm] beyond the right edge Space occupied by the connected plug
Cable and disconnection zone 1.0 in [25 mm] beyond that plug Illustrative allowance; verify with the actual cable
Battery holder installed envelope 2.3 × 1.3 × 0.9 in [58 × 33 × 23 mm] Holder, battery and terminal connector
Battery service zone 2.3 × 1.8 in [58 × 46 mm] Illustrative footprint including removal access
Gap between board and battery zones 0.4 in [10 mm] Separation for routing and access

With the connector on the right, the board zone needs 5.75 in [146 mm] of width: 4.0 + 0.25 + 0.5 + 1.0 in. Its height becomes 2.7 in [69 mm], including the two free-edge margins.

Placing the battery zone below it gives a combined height of 4.9 in [124 mm]: 2.7 + 0.4 + 1.8 in. A clear mounting area of 6 × 5 in [152 × 127 mm] is therefore a candidate for this example. It is not an outside enclosure size or a catalog size claim.

For depth, assume 0.25 in [6 mm] standoffs, a board assembly projecting 0.8 in [20 mm] above its standoff seating plane, and 0.35 in [9 mm] overhead clearance. That stack totals 1.4 in [36 mm].

A verified 1.5 in [38 mm] clear depth from the mounting panel to the nearest closed-door obstruction would accommodate that stack. It leaves little room for unplanned wiring above the board. The example also assumes the actual battery removal motion fits its reserved service zone.

Convert these clear-space requirements into outside dimensions only after checking the enclosure drawing. Wall thickness, mounting panel position and door hardware prevent a reliable conversion by subtraction from nominal dimensions alone.

Check the assembled enclosure

Disconnect external power and remove the battery before drilling, changing wiring or checking mechanical fit. Remove electronics before machining, and clean away all chips before reinstalling components.

Use the actual board, holder, plugs and cables for the final fit check. A paper outline cannot reveal every plug-release or battery-clip obstruction.

Confirm the following before accepting the arrangement:

  • Every board fastener can be installed and removed with the intended tool.
  • Solder joints and component leads remain clear of metal surfaces.
  • The battery stays restrained in the installed orientation.
  • Battery replacement does not strain wires or require board removal.
  • Cable bends meet their manufacturers' requirements.
  • The closed door does not touch components, plugs or wiring.
  • No lead crosses the gasket or enters the latch mechanism.
  • Cable fittings remain accessible for installation and inspection.

Then verify operation at the expected load and environmental conditions using an appropriate safe test procedure. Check the hottest components, not only the internal air temperature. Arrange components deliberately rather than filling every remaining gap; component layout inside a sealed enclosure explains the thermal consequences.

Avoid changes that lose the seal

Do not drill an extra opening to solve a clearance problem after the layout is approved. Moving a cable entry can place its sealing washer on a bend, seam or obstructed surface.

Select glands for the actual cable jacket diameter and wall arrangement. A connector passing through an oversized hole needs a purpose-designed sealing system, not a loose grommet or added sealant. Where preterminated cables complicate entry, compare the options in gland plates and split cable entry systems.

Keep the gasket sealing land free of wires, adhesive, chips and battery leads. Do not tighten the door harder to overcome interference inside the enclosure. Correct the layout instead.

A field-modified enclosure needs its completed configuration assessed against the required protection. The rating of the original enclosure does not automatically establish the rating of every modification.

Put usable space and access on the order

Specify the required clear mounting area and clear depth alongside the outside dimensions. Attach a layout showing the board holes, battery holder, connector envelopes, cable entries and battery removal direction.

Call out the exposure, material, required enclosure rating and mounting orientation. Identify any insulating barriers, bonding provisions and internal supports needed by the electrical design. An insulating liner does not replace required bonding of a metal enclosure.

Use the stainless enclosure size finder to compare outside and nominal inside dimensions. Confirm the drawing before treating nominal inside dimensions as completely unobstructed space.

For custom enclosures, you define the material, width, height, depth and cutouts, with orders available from one piece. Put the battery service envelope on the drawing so it is not mistaken for unused space. For custom work, the enclosure is delivered in 10 business days, counted from your approval of the drawing.

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
20 × 16 × 8 in304 stainless20 x 16 x 8 inRated NEMA 4X / IP66 by the manufacturer; not UL listed
24 × 20 × 8 in304 stainless24 x 20 x 8 inRated NEMA 4X / IP66 by the manufacturer; not UL listed

Questions

How much space does a circuit board and battery enclosure need?

Measure the mounted board, connected plugs, cable bends and battery holder as separate envelopes. Add a battery removal zone and check the depth to the nearest closed-door obstruction. Choose the enclosure from verified usable dimensions, not outside dimensions alone.

Can the 9 V battery sit next to the circuit board?

Only if the holder, restraints and insulation prevent contact with solder joints, terminals and other conductive parts during use and replacement. A separate service zone is usually easier to inspect and maintain. Do not leave the battery loose or support it by its connector leads.

Does fitting a 9 V battery mean it can power the board reliably?

No. Mechanical fit does not establish electrical suitability. Check the board's input voltage range, peak current, regulator losses and required runtime against the battery manufacturer's data. Also confirm that the selected battery chemistry suits the expected temperature and operating conditions.

Does adding a cable gland preserve the enclosure rating?

Treat every new opening as a design change. The fitting must suit the cable diameter, wall thickness, mounting surface and required environmental protection. Assess the completed configuration rather than assuming the original enclosure rating automatically covers an added gland or connector.

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

Related engineering answers

All articles

Buying guides

The guides behind this answer

All guides