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

Mount a 5 V power supply inside an enclosure safely

Bolt a mains-approved 10 W encapsulated AC/DC module to standoffs or a DIN rail carrier, keep 0.4 in [10 mm] of air around it, and land every wire on a terminal. A 5 V, 0.4 A load wastes about 0.35 W, so a sealed stainless box rises less than 1 C and needs no vents.

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

Short answer: mount a 10 W encapsulated AC/DC module with genuine product-safety approval (IEC 62368-1 covers audio, stage and ICT equipment) on 0.4 in [10 mm] standoffs or a DIN rail carrier. Keep 0.4 in [10 mm] of air around its mains pins, and land every wire on a terminal. Heat is a non-issue: a 5 V, 0.4 A load wastes about 0.35 W, so a sealed stainless box warms by less than 1 C and needs no vent or fan. That is just as well, because any opening you cut drops the enclosure's rating. The two parts that fail this build are the bare board that takes mains onto solder pads and the adapter with its plug cut off.

Pick an approved encapsulated module, not a bare board

An approved module carries the safety case; a bare board does not. A potted 10 W brick approved to IEC 62368-1 has its transformer isolation, creepage, clearance and flame-retardant potting built, tested and marked. IEC 62368-1 is the product-safety standard written for exactly this class of gear: audio, stage and ICT equipment. It sets how far live mains parts must sit from low-voltage parts, which is more than you can eyeball on an open board. In US workplaces, OSHA 29 CFR 1910.303(a) requires electrical equipment to be approved, and an unmarked board is not.

Size the module at 10 W for a load of about 2 W. The headroom covers a relay coil of 0.2-0.4 W and a microcontroller board later. The datasheet of a modern 10 W encapsulated part states about 85% efficiency at rated load. At 20% load the same datasheets show 70-80%, which still leaves under 1 W of waste heat in the box. Fuse the low-voltage output at 1 A; the module delivers more than twice the load.

Boards sold as mains-input buck converters are usually uninsulated flybacks, with live pads one 2.54 mm pin pitch from anything nearby. Feed any DC-DC stage from a 12 or 24 V output of the approved module instead; a buck stage making 2 W from 12 V loses about 0.2 W at 90% efficiency. If the feed is 120 V rather than 230 V, nothing in the mounting changes, as the small-box supply-and-relay example at 120 VAC shows.

What you need

  • One 10 W encapsulated AC/DC module, 230 V in, rated for the 2 A output, approved to IEC 62368-1; its datasheet gives the fuse value, the clearances and the derating curve.
  • A sealed stainless enclosure built to the layout. A stage box that meets rain and spilled drinks wants a Type 4X build; ours are rated NEMA 4X / IP66 by the manufacturer, not UL listed, come in any width, height and depth, and are delivered in 10 business days, counted from drawing approval for custom work. Start from the custom stainless enclosures page.
  • Backplate, DIN rail, and either two M3 standoffs 0.4 in [10 mm] long or a DIN rail carrier clip for the module.
  • A C14 appliance inlet with an integral fuse holder, fused at 1-2 A time-delay for a 10 W part at 230 V, fed by a 3-core 0.75 mm² cord.
  • Terminal blocks, a 1 A fuse for the low-voltage lead, and a cable gland sized to the low-voltage cable's outer diameter.
  • A multimeter, an insulation meter and a driver for M3 screws.

Mounting and wiring, step by step

  1. Order the openings cut before anything ships. The inlet hole and the gland hole go into the flat sheet at the factory (cutouts for stainless enclosures); drilling stainless after assembly leaves swarf that settles at pin pitch, exactly where it can bridge a clearance.
  2. Lay out two zones on the backplate. The mains zone holds the inlet, the fuse holder and the module pins; the low-voltage zone holds terminals, relay and logic. Keep 0.4 in [10 mm] between the zones, or fit a fixed insulating barrier where the layout is tight. The depth guide for DIN rail devices gives the minimum box depth.
  3. Fix the backplate and the DIN rail, and face the module's pins sideways or upward with nothing conductive above them; the backplate and rail layout guide covers the spacing and the order of assembly.
  4. Bolt the module down. Two M3 screws into the 0.4 in [10 mm] standoffs at about 0.5 N·m, or clip the module into its carrier on the rail; the 0.4 in [10 mm] air gap stays open on every side.
  5. Wire the mains side. Earth from the inlet to the enclosure earth stud first, then line and neutral through the inlet fuse, with the 0.75 mm² cord gripped where it enters. Keep mains leads short and bundled away from the low-voltage pair. The mains wiring safety article covers fusing and cord anchoring, and the outdoor mains entry article covers a permanent glanded feed.
  6. Wire the low-voltage side. Run a twisted pair from the module output through the 1 A fuse to the terminals and out through the gland, sealed on the cable's outer diameter.
  7. Clip the relay module to the rail and land its coil on the logic terminals and its contacts on the light feed; a 12 W fixture draws 0.05 A at 230 V, so a 10 A contact barely notices it. Stage gear travels and gets kicked, so spring the relay on vibration mounts for DIN rail relay modules.

The heat budget for the 2 W logic load in a 10 x 8 x 6 in box

This is the arithmetic behind the no-fan call, run for a stage-box logic supply in a 10 x 8 x 6 in box.

The inputs: a 2 W load (0.4 A at the output voltage) for logic and a relay coil; a 10 W module at 85% efficiency, the datasheet figure for modern parts of this class (budget 80% for a part without a datasheet); a 10 x 8 x 6 in [254 x 203 x 152 mm] stainless box, built to order in whatever size the layout needs, as the example case; and a wall heat transfer of 3.7 W/m²K for stainless, the value this site's guides use.

The rule: at steady state, waste heat in watts equals the wall constant times the surface area times the temperature rise, so rise in C = Q / (k x A).

The arithmetic:

  • Area: A = 2 x (0.254 x 0.203 + 0.254 x 0.152 + 0.203 x 0.152) = 2 x 0.1211 = 0.242 m².
  • Wall constant: 3.7 W/m²K x 0.242 m² = 0.90 W/C.
  • Heat at the real load: 5 V x 0.4 A = 2.0 W out; 2.0 / 0.85 = 2.35 W in; 2.35 - 2.0 = 0.35 W lost in the box.
  • Rise: 0.35 / 0.90 = 0.4 C.
  • Worst case, module flat out: 10 / 0.85 = 11.76 W in, so 1.76 W lost and a rise of 1.76 / 0.90 = 2 C.

The decision: in a 25 C room the box air sits at 25.4 C, or 27 C with the module flat out, both inside the 40 C interior we size electronics boxes to unless a datasheet allows more. The threshold for this box is about 13 W of waste heat: 15 C of rise times 0.90 W/C is 13.5 W. Past that you move from a sealed box to real cooling, which the enclosure cooling checks article covers. Sun on the box raises the ambient rather than changing the method; the heat-load assessment article walks that calculation.

Checks when the box is closed up

Isolate the feed and prove absence of voltage at the inlet before the first terminal lands; that is the one step with no substitute. Then close the box only after:

  • Earth bond: inlet earth pin to enclosure earth stud reads tenths of an ohm or less.
  • Isolation: with the module's mains pins tied together, an insulation meter at 500 V DC to the low-voltage terminals reads hundreds of megohms on a healthy potted part; a few megohms means flux, moisture or damage.
  • Clearance: door shut and loom dressed, nothing conductive within 0.4 in [10 mm] of the mains pins.
  • Heat: an hour at full draw leaves the box air within about 1 C of the room (0.4 C calculated above) and the module body warm to hold, not painful.
  • Function: the relay picks up cleanly and the output rail holds within 5% of 5.0 V under load.

Mistakes that cost the rating or the approval

  • Mains onto solder pads. A perfboard build at 230 V has no controlled creepage and no approval; it is the version of this project that starts box fires.
  • Cutting the adapter's plug off. The fuse, cord anchor and plug insulation are part of what the approval covers; once cut, the article inside the box is not the one that was tested.
  • Holding the module by its pins. A cable tie across the pins stresses the solder joints; clamp the moulded body only.
  • Venting the box "to be safe". A vent or fan carries its own lower IP and drags the whole assembly down to it, so a Type 4X / IP66 build with a louvered vent is a vented box. This build wastes 0.35 W and keeps its seals.
  • Drilling after assembly. Stainless swarf lodges in pin-pitch gaps and can bridge clearance distances; cut the openings first, in the flat sheet.
  • Buying the undocumented module. Without a datasheet there is no fuse value, no derating curve and no isolation figure to design around; buy the documented part and keep the printout with the box.

Catalog dimensions to compare

Compare these catalog dimensions with your component layout. Open each enclosure for its rating, material and usable space, then check those specifications against your application.

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
16 × 12 × 8 in304 stainless16 x 12 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
30 × 24 × 10 in304 stainless30 x 24 x 10 inRated NEMA 4X / IP66 by the manufacturer; not UL listed

Questions

Can I glue an encapsulated AC/DC module to the floor of the box?

Yes, when a bead of structural adhesive or a nylon tie holds the moulded body to a flat base and leaves the pins and the 0.4 in [10 mm] air gap clear. Screws into the module's flange or a DIN rail carrier hold better against vibration, come apart for replacement and make later inspection easier. The glue adds nothing to safety; the isolation lives inside the potted body.

How much heat does a 5 V, 0.4 A supply add inside the box?

About 0.35 W: a 2 W load at 85% efficiency draws 2.35 W from the mains and the difference lands in the box. Even a 10 W module running flat out wastes 1.8 W, which lifts a 10 x 8 x 6 in stainless box about 2 C. In a box that size you can burn about 13 W of waste heat before the interior passes 40 C.

Can a bare buck converter board take 230 V mains directly?

Not on its own. Boards sold as mains-input buck converters are usually uninsulated flybacks with no product-safety approval, and their live pads sit one 2.54 mm pin pitch from anything you mount beside them. Run the buck stage from the 12 or 24 V output of the approved module instead, with its own 1 A fuse.

Can I cut the mains plug off a wall adapter and hard-wire the low-voltage lead?

Leave the mains side whole. The fuse, cord anchor and plug insulation are part of what the approval covers, so a cut-down adapter is no longer the article that was tested. An encapsulated module approved to IEC 62368-1 does the same job inside the box, bolts down with two M3 screws, and its datasheet gives you a fuse value and an isolation figure to design around.

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

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