Email us

Putting a 120 VAC power supply and relay inside a small enclosure

A DIN-rail 120 VAC to 24 VDC supply, a relay and a small pump fit easily in a 10 x 8 x 6 in stainless wall-mount enclosure. Keep mains and 24 V separated, enter the cord through the bottom with a gland, bond the enclosure and DIN rail, and keep live terminals covered so nothing finger-reachable is exposed.

NEMA4 Enclosure engineering team · Published October 29, 2026 · 5 min read

A DIN-rail power supply, a relay and a small pump all fit in one 10 x 8 x 6 in stainless wall-mount box with room to work. The build is straightforward: enter the 120 VAC cord through the bottom with a gland, land it on the supply, keep every live terminal covered, and separate the mains side from the 24 VDC side so a hand in the box only ever reaches safe voltage. Get those four things right and the rest is layout and labelling.

What you need

  • A gasketed stainless enclosure rated NEMA 4X / IP66 by the manufacturer; not UL listed. A 10 x 8 x 6 in 304 stainless wall-mount enclosure fits a supply, a relay and a DIN rail with spare space; a 12 x 10 x 6 in version adds wiring room.
  • A grounded metal enclosure and DIN rail: the rail bonds to the box, the box bonds to the cord's protective ground. If you prefer non-metallic housings, read how grounding works differently there in the grounding and bonding guide.
  • A mains cord with a moulded plug, and a cable gland matched to the cord's outside diameter.
  • Touch-safe terminal blocks or a small breaker or disconnect for the line side.
  • DIN rail, end brackets, wire duct if the wiring is dense, and ferrules.
  • Labels for line, neutral, ground and the 24 V terminals.

Plan the layout before you cut

Draw the box before ordering or drilling. Put the cord entry in the bottom, the power supply near it so mains wiring stays short, and the relay above or beside it. Keep a visible gap between the mains zone and the 24 V zone; 1 in (25 mm) of panel is plenty at these voltages.

Choose a supply with finger-safe input and output terminals. Finger-safe terminals are what let a small sealed box meet touch-protection expectations without internal barriers: nothing on the mains side can be poked. If your supply has exposed screw terminals, cover the input side with a terminal cover or a small barrier strip.

Check the supply's depth against the enclosure. A typical DIN supply is about 3.2-4.5 in (80-115 mm) deep; with the back panel and the DIN rail, the 6 in (150 mm) depth of the box leaves a little convection space behind the door. Deeper supplies or added ducts push you to the next size.

Cut the entry and mount the parts

  1. Mark the gland hole in the bottom of the enclosure, centred on the cord path and clear of the mounting feet and the door hinge. Bottom entry keeps washdown water and dust out of the cord's path; other entry positions and their trade-offs are covered in the article on wiring methods into a NEMA 4 enclosure.
  2. Cut the hole to the gland maker's specified diameter, deburr it, and install the gland with its sealing washer inside the box. The steps are the same as any sealed entry, spelled out in how to install a cable gland without losing the rating.
  3. Mount the DIN rail to the back panel with screws into the panel's tapped or clip nuts. Bond the rail and panel: if the contact surfaces are painted or coated, remove the coating from the contact points, a requirement the grounding and bonding guide explains in detail.
  4. Clip the power supply and relay on the rail, with the supply's ventilation slots vertical and nothing blocking the air above or below it. Keep at least 0.75 in (20 mm) clearance, or more if the maker asks for it.
  5. Run the cord through the gland and tighten it so the jacket is clamped and the cord cannot slide. Leave a small service loop inside.

Wire the mains side

  1. Strip the cord so the jacket stops at the gland and the conductors reach the terminals with no exposed copper beyond them.
  2. Land line, neutral and protective ground. Ground first to the enclosure's ground stud, then to the supply's ground terminal, so the box is bonded even if a line conductor works loose. Tinned or ferruled ends on stranded wire prevent stray strands.
  3. If you fit a breaker or terminal block on the line side, keep its terminals covered and label it. The supply's own fuse does not count as a disconnect for service work.
  4. Tug-test every mains terminal. A loose line conductor in a sealed box is the most common fault in builds like this one.

Wire the 24 VDC side

Keep the low-voltage wiring in its own duct or channel, routed away from the mains conductors. Land the supply output on the relay coil circuit and the pump feed through touch-safe terminals. If you bond the 24 VDC negative to ground for a stable reference, do it once, at the supply, using the terminal the supply maker designates for it. Never let the 24 V return ride on the enclosure or the DIN rail; keep it on a wire so the ground system carries only fault current, not load current.

The relay's control signal comes in from outside, so plan that entry too. A shielded instrument cable through its own gland, or a second position in a multi-hole layout, keeps the signal away from the mains cord. For signal-level boxes the choice of housing matters more; the article on instrument junction box selection for signal wiring covers that case.

Check the finished assembly

  • Continuity from the cord's ground pin to the enclosure, the DIN rail and the supply's ground terminal.
  • No exposed live copper anywhere a finger or a dropped tool can reach; covers on the line-side terminals.
  • Mains and 24 V wiring separated, each gland tight, the cord immovable by hand.
  • Supply output voltage correct under load, pump cycling on the relay as intended.
  • Thermal check after an hour: the supply case warm to the touch, the enclosure door not hot. If the box runs hot at your ambient, the article on removing heat from a small sealed IP66 enclosure lays out the options.

Mistakes that cost you safety or the rating

  • Side or top cord entry where water can follow the cord down; always enter from below in wet locations.
  • A gland clamping the conductors instead of the jacket, so strain lands on the terminals.
  • Leaving the supply's exposed screw terminals bare on the mains side.
  • Using the enclosure or rail as the 24 V return, which puts load current on the bonding path.
  • Sizing the box so tight that the supply has no convection room; a cooked supply fails long before its rating suggests.
  • Using a non-metallic box and assuming grounding is optional; metal raceways and shields still need bonding inside, and the rules differ.

What to put on the order

Size the enclosure for the parts plus 30-40% spare width on the rail, and a 6 in (150 mm) depth for a standard DIN supply. Order it with the gland holes cut to your drawing: our custom enclosure builder takes bottom-entry gland positions, DIN rails and cutouts directly, and every box is delivered in 10 business days. Pick 304 stainless for dry indoor and washdown rooms, or 316L for salt air and chemical areas; the trade-offs are in the guide to NEMA 4 vs 4X and IP66. If the layout will grow, the backplate and DIN rail spacing advice in the layout guide helps you leave the right spare space the first time.

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
10 × 8 × 6 in304 stainless10 x 8 x 6 inRated NEMA 4X / IP66 by the manufacturer; not UL listed
12 × 10 × 6 in304 stainless12 x 10 x 6 inRated NEMA 4X / IP66 by the manufacturer; not UL listed

Questions

Can I use an appliance cord through a gland to power an enclosure?

Yes, for a cord-connected assembly. Use a gland sized for the cord's outside diameter, with a strain relief that clamps the jacket, not the conductors. Enter from the bottom so water cannot run down the cord. Terminate the line, neutral and protective ground on a listed inlet, terminal block or directly on the power supply input, with no exposed copper beyond the terminal.

Do the 24 VDC negative and the protective ground have to be separate?

The 24 VDC side is often bonded to protective ground at one point for a stable reference, which most power supplies allow at a designated terminal. What matters is that each wire goes where it belongs: line and neutral to the supply input, protective ground to the ground terminal, and the 24 V negative only to the low-voltage side. Never use the enclosure or DIN rail as a 24 V return path.

How much space do I need around a DIN power supply?

Follow the supply maker's clearance for ventilation, typically at least 0.75 in (20 mm) above and below the unit. A small supply wastes 10-20% of its input as heat, so a 100 W unit can dissipate 10-20 W into the box. Leave room for convection and keep other components out of the plume above it.

Does the enclosure need a NEMA or IP rating for indoor use?

For a dry indoor location, dust and finger protection matter more than water protection. Type 1 or IP2X covers touched live parts; Type 4X / IP66, rated by the manufacturer and not UL listed, gives washdown capability if the environment needs it. Match the rating to the room the enclosure sits in, not to the rating of the components inside it.

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 10 × 8 × 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