Email us

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

Cet article est en anglais. Voir le site en français

Dieser Artikel ist auf Englisch. Website auf Deutsch ansehen

Este artigo está em inglês. Ver o site em português

Mounting relays with exposed pins inside a metal enclosure

Stand the board off the metal 0.25 in [6 mm] on nylon standoffs bolted through the removable backplate, and bond the frame to the equipment grounding conductor. IEC 61010 practice asks for 1.5 mm clearance and 2.5 mm creepage between a 250 V circuit and grounded metal, doubled for reinforced insulation, so the standoff gap clears it with margin. The rubber pad insulates on build day and then traps heat and hides hardware.

NEMA4 Enclosure engineering team · Published November 4, 2026 · 7 min read

Mount 5 V relay boards on nylon standoffs 0.25 in [6 mm] tall, bolted through the removable backplate, and leave the rubber sheet out of it. The pin tails under one of these boards sit close enough to short on a bare metal shelf, and the contact terminals can carry 120 V, so the air gap does two jobs: insulation under the board, and a path for coil heat to leave. IEC 61010 practice asks for 1.5 mm [0.06 in] of clearance and 2.5 mm [0.10 in] of creepage between a 250 V circuit and grounded metal, doubled for reinforced insulation. That much air clears all of it, and you can see into the gap. Here are the spacings, the mounting steps and a heat check on a real 8-relay board.

What sits under the board

A relay module carries two worlds on one piece of laminate. The coil side runs at 5 V and tens of milliamps. The contact side lands on screw terminals that switch 120 V or 230 V, on the usual 0.1 in [2.54 mm] pitch, millimetres from the logic. Underneath sit the solder tails of those terminals, header pins and the odd solder spike, all facing whatever you set the board on.

Set that on a bare metal shelf and you are betting on luck. One vibration cycle, one warped corner or one dropped washer puts a tail on the frame. A bonded frame then gives the contact side a path to earth and the breaker does the rest; a floating frame sits at line voltage waiting for a wrist. The fix is four nylon standoffs and a hole pattern.

The spacings to hold

What the gap protects Clearance, through air Creepage, along surfaces
5 V coil and logic to grounded metal 6 mm [0.24 in], for hardware, airflow and service matched by the same standoff height
120–250 V contact side, basic insulation 1.5 mm [0.06 in] 2.5 mm [0.10 in]
120–250 V contact side, reinforced insulation 3.0 mm [0.12 in] 5.0 mm [0.20 in]

These are the IEC 61010-1 spacings, built on IEC 60664-1 for a 250 V working voltage at pollution degree 2 with insulating material group III. Use the 250 V row for 120 V work and you carry margin at both voltages. Basic doubles to reinforced, and your standoff height holds twice the 3.0 mm reinforced clearance. The pin-to-panel path runs through air rather than along a surface, so it beats the 5.0 mm creepage figure too.

Creepage also depends on how well a surface resists tracking. IEC 61010-2-032 allows material group I distances for all insulating materials, and glass-epoxy laminate tracks with the best of them, so the board's coated gaps are rarely the weak link. The bare pin field facing a metal panel is. To isolate a whole assembly instead of one board, choosing a nonconductive electronics mounting plate picks the material for that route.

Standoffs beat the rubber pad

A 0.25 in rubber sheet under the board passes every insulation test on build day, and there it ends. The pad rests against the pins, so the joints that carry coil heat get a blanket where they want air. A screw dropped at the next service lies on that pad against live terminals, out of sight. Rubber tears, shifts and takes a set, and a pin tail finds the gap. Nothing locates the board either, and it slides every time you pull a wire off the terminal block.

Four through-bolted nylon standoffs hold the air gap open, let you sweep under the board with a bolt shank, and keep every piece of hardware visible. That is the right mount for anything switching mains. Adhesive standoffs, a common 11 mm [0.43 in] tall on a 3 mm [0.12 in] chassis hole, suit light logic-only boards. When the barrier belongs behind one live part rather than under a whole board, insulating pads between live parts and a metal enclosure is the tool for that job.

Boards already fitted in a DIN-rail case skip the drilling altogether; mounting DIN rail on a backplate covers that side.

Mounting the board, step by step

You need four nylon standoffs of that height or taller, M3 or #6 hardware, a 3.2 mm [1/8 in] drill bit, a deburring tool and an ohmmeter. Work on the removable mounting panel with the power locked out and absence of voltage proven at the terminals.

  1. Pick the spot clear of the door swing, and leave about 2 in [50 mm] in front of the terminal block for ferrules and fingers.
  2. Offer the board up, mark the corner holes, and drill the panel at 3.2 mm [1/8 in]. The panel takes the holes; the gasketed body keeps its seal.
  3. Deburr both faces of every hole, fit the standoffs and start the screws. Nylon strips long before steel hardware does: finger-tight plus a quarter turn.
  4. Drop the board on and fasten it. Sweep a bolt shank of the standoff diameter under the whole pin field, and it has to pass end to end touching nothing.
  5. Bond the panel and body to the equipment grounding conductor. NEC 250.96(A) requires metal parts serving as the grounding path to be bonded so they carry the fault current imposed on them, and enclosure grounding and bonding shows the landing details.
  6. Dress mains to the contact terminals in one duct and the logic side in another, with ferrules on every stranded end.
  7. With power off, ohm from each underside pin row to the panel: every reading opens. A 500 V DC insulation test on clean new work reads hundreds of megohms, so chase anything under 1 MΩ.
  8. Close the door and give the box the shake a truck ride would, then re-check the standoff screws. Enclosure transport testing for loose wiring and relays has the full routine.

Checks when the board is in

  • The shank still sweeps under the pin field with the wiring dressed.
  • Every standoff screw is still snug after the first full heat cycle.
  • Interior temperature after an hour with all coils on sits within a couple of degrees of the rise you computed, 2.9 C in the example below.
  • The door opens twice and the gasket shows an even compression line all the way round.

Standing off an 8-relay board in a 12 x 12 x 6 in enclosure

Inputs, each with its source:

  • 8-channel board, 5 V coils, contacts switching 120 V, the typical controls relay board.
  • Coil draw about 70 mA at 5 V per relay, per the coil ratings on the common cube relays: 0.35 W each.
  • LEDs and input drivers on the logic bus: about 0.4 W.
  • 120 V to 5 V supply at about 80 % efficiency; a 120 VAC supply and relay sharing one small box has the sizing detail.
  • Enclosure: 12 x 12 x 6 in [305 x 305 x 152 mm] 316L stainless from the wall-mount range, this 12 x 12 x 6 in model.
  • Stainless walls shed heat at 3.7 W/m²K, this site's reference value; ambient 35 C [95 F]; electronics limit 40 C [104 F].

The rule in words: an enclosure loses heat through its skin at the coefficient times the area, in watts per degree, so the rise is the heat load divided by that product. The standoff has to clear the reinforced-insulation clearance for whatever the contacts switch.

The arithmetic:

  • Coil heat: 8 × 0.35 W = 2.8 W. With 0.4 W of logic, the low-voltage bus carries 3.2 W.
  • Supply input: 3.2 W ÷ 0.80 = 4.0 W, and every watt of it lands in the box as heat.
  • Skin: 2 × (12 × 12 + 12 × 6 + 12 × 6) = 576 in², which is 0.37 m². Capacity: 3.7 W/m²K × 0.37 m² = 1.37 W/K.
  • Rise: 4.0 W ÷ 1.37 W/K = 2.9 C, so the interior sits at 35 + 2.9 = 37.9 C.
  • Headroom: the 40 C limit allows 5 C of rise, so this box sheds 5.0 C × 1.37 W/K = 6.9 W.
  • Spacing: 120 V contacts need 3.0 mm [0.12 in] reinforced, and the standoff height holds twice that.

Decision: 4.0 W against a 6.9 W ceiling, 37.9 C against a 40 C limit. Run it sealed, with no fan and no vent, because a fan-filter or louvre drops the assembly to that part's rating and the box does not need one. Past about 7 W in this size at 35 C ambient, step up one box size or work through the enclosure heat calculation guide.

Mistakes that cost the spacing or the seal

  • Drilling the gasketed body because the panel felt awkward to remove. Every hole in a rated wall is only as good as its gland or plug, so a bare screw hole gives away what the door seal still claims.
  • Hardware long enough to pass the standoff and touch the panel below the board.
  • Wiring pulled tight across the air gap: one conductor resting in it defeats the whole mount, so keep the runs in duct.
  • A foam pad where the standoffs should be, which hides hardware the same way the rubber sheet does.
  • Overtightening nylon until it strips, then leaving a loose corner you will find by the rattle.

If we drill the panel for you

You set the grade, the size and every hole on the approval drawing through the custom stainless cutout service, and the enclosure is delivered in 10 business days counted from your approval of the drawing. A dry indoor shop is 304 territory, the same box in 304, while washdown and salt air call for 316L. Every enclosure is rated NEMA 4X-type / IP66 by the manufacturer and is not UL listed, and that rating holds only as long as the walls stay whole.

Enclosures in this article

EnclosureMaterialOutside H x W x D / displayRating
12 × 12 × 6 in316L stainless12 x 12 x 6 inRated NEMA 4X / IP66 by the manufacturer; not UL listed
12 × 12 × 6 in304 stainless12 x 12 x 6 inRated NEMA 4X / IP66 by the manufacturer; not UL listed

Questions

Do I need standoffs if the board only switches 5 V signals?

Yes, and for a reason that has nothing to do with shock. At logic-level voltages there is no shock hazard, but solder tails still short on a bare metal shelf at the first vibration, and the board still needs air underneath. A 0.24 in standoff fixes both, and nylon 6/6 serves continuously to about 105 C [221 F], well past a sealed enclosure interior.

Is a 1/4 in rubber sheet ever the right answer under a relay board?

Under a passive terminal strip, yes. Under a relay board, no: the pad fills the air gap the coils want, hides a dropped screw against live terminals, and nothing keeps the board from sliding on it. Standoffs leave the gap open and visible, which is what your next service visit needs.

How much standoff height does a board switching 230 V need?

3.0 mm [0.12 in] of through-air gap satisfies reinforced insulation at 250 V under IEC 61010 practice, and the 0.25 in [6 mm] standoffs used here give you twice that while clearing the pin tails. The common adhesive standoffs run 11 mm [0.43 in] tall, so even stock heights clear 230 V work with room to spare.

Can I mount the relay board on the enclosure door?

On a hinged door it works, with two conditions. Route the wiring as a loop that flexes at the hinge side, and keep about 1 in [25 mm] between the board edge and the door gasket so nothing rubs the seal. Inspect that loop at every service visit, because the flex point is where door wiring fails.

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 × 12 × 6 inRequest a custom quote

Check the heat load in the calculator · Outdoor enclosures: sizes for this job

Keep reading

More on layout and installation

All articles

Buying guides

The guides behind this answer

All guides