Yes, one enclosure carries the stepper drive, the motion controller and the 120 VAC relay — machine builders pack all three into one box every day, and the layout does the work. Keep 4 in [100 mm] between the drive's motor outputs and the controller's signal wiring, run the relay and its line wiring in a duct of their own, and hold 120 VAC at least 2 in [50 mm] from step-and-direction and limit-switch runs, or put a grounded divider between the ducts. Size the body for heat and for 30% spare rail, bond it to the machine frame, and the noise you are worried about has nowhere to go. Zones first, then the sizing arithmetic, then the build.
What you need
Start with a 304 stainless body for a dry shop, and move to 316L when coolant mist or chlorinated cleaning chemicals reach the machine. Our enclosures are rated NEMA 4X / IP66 by the manufacturer and are not UL listed. The worked example below lands on a 20 x 16 x 8 in [508 x 406 x 203 mm] body. Around it you want:
- a mounting panel with two DIN rails;
- two runs of slotted wiring duct, one for power and one for signal — NFPA 79-2015 13.3.1 permits nonmetallic duct inside an enclosure only when it is flame-retardant to the IEC 60332-1 test, and NFPA 79-2012 13.5.2 tops duct fill at 50% of the interior cross-section; round cables never stack tighter;
- metal cable glands for the bottom row — four for motor pairs, one for line in, one for the router feed out — plus a small one topside for Ethernet and USB;
- an RC snubber for an AC relay coil, or a flyback diode for a DC coil;
- shielded twisted pair for motor phases and for limit-switch and probe runs.
Where everything goes on the backplate
Put mains in low and signals high. Line power enters the bottom glands, so the bottom rail carries the breaker, the 48 V supply and the relay or contactor. The top rail carries the electronics: the drive at one end with its motor outputs facing the nearest bottom corner, the motion controller at the far end, 4 in [100 mm] or more away. Heat rises, so the top third of the box belongs to the part that tolerates heat least, and the chopped motor currents leave by the shortest path out of the box. The same zoning settles a servo drive beside a panel PC, as the servo drive and computer wiring separation write-up shows, and the backplate and DIN rail layout guide covers rail spacing and duct sizing fundamentals.
| Zone | What lives there | Cables leave through | The clearance that matters |
|---|---|---|---|
| Bottom rail, power | Breaker, 48 VDC supply, relay or contactor | Bottom glands: line in, router out | Its own duct, shared with nothing |
| Top rail, drive end | 4-axis stepper drive | Four motor glands at the bottom corner | 4 in [100 mm] to any signal wiring |
| Top rail, far end | Motion controller, 5 V supply, signal terminals | Top-side gland for Ethernet and USB | 2 in [50 mm] to any 120 VAC run |
Two rails give you that split without crowding, and the sizing section below checks the rail arithmetic against the body.
Sizing the box for a 4-axis stepper system at 35 C ambient
Inputs, each with its source. Four stepper motors on a desktop router average about 60 W of electrical draw while cutting, and a typical 48 V switching supply wastes 15% of what it delivers, so figure 9 W in the box: 60 x 0.15 = 9 W. The drive adds about 10 W of switching and fixed loss; motor heating stays in the motors, out on the machine. The controller and its 5 V supply dissipate 4 W, and a held relay coil about 1 W. Total: 9 + 10 + 4 + 1 = 24 W.
The rule in words: a sealed box in still air sheds about 5.5 W per square metre of exposed surface per degree of internal rise when it is painted, and about 4 W/(m²·°C) in bright stainless, which radiates less. Count only the surfaces that see air. Bolted flat to the gantry upright, your back wall does nothing.
The arithmetic for a 20 x 16 x 8 in body: door 320 in², top and bottom 160 in² each, two sides 128 in² each, so 896 in² [0.58 m²] of exposed surface. Rise = 24 W ÷ (0.58 m² x 4 W/(m²·°C)) = 24 ÷ 2.3, about 10 °C. Inside air at a 35 °C shop sits at 35 + 10 = 45 °C, comfortably under the 60 °C ambient most drives and supplies carry.
The decision, with its threshold: in this body, heat stops being the constraint at 46 W — 0.58 x 4 x 20 = 46 W at a 20 °C rise — so everything below that stays sealed with no moving parts. Above it, take the next body size or move the 48 V supply out of the box. Rail space checks out in the same panel: the drive takes 5 in [127 mm] of rail, the controller 3 in [76 mm], the supply 4 in [102 mm], the relay socket 1.5 in [38 mm] and the breaker 1 in [25 mm], so 14.5 in [368 mm] across two rails in a 20 in [508 mm] panel — better than 30% spare for a fourth axis later. The CNC control enclosure size article runs the same arithmetic for a full control set, and the enclosure selector turns the finished numbers into a body.
Grounding: where the noise actually goes
Two things make noise here: the relay coil, and the drive's phase currents, chopped 20,000 to 40,000 times a second, whose edges couple into any parallel wire like small transmitters. Distance beats filters. The 4 in [100 mm] zone does most of the work, and twisting each motor pair cancels much of what is left. Keep signal leads short, and bring every signal return back beside its signal in the same duct, because pickup grows with both length and loop area. If your drive offers optically isolated step-and-direction inputs, use them; that isolation breaks the ground loop between controller and drive.
Bond the metal as one system. Toothed hardware at two points bonds the backplate to the enclosure wall, and NEC 250.12 requires coatings such as paint removed at contact surfaces, so let the teeth bite through to bare metal. NEC 250.96(A) requires enclosures and other metal parts that carry fault current to be bonded into one conducting path, and NEC 250.4(A)(5) says the earth by itself is never that path — bond the box to the machine frame with a strap rather than trusting mounting bolts through paint. Land cable shields at the drive end only. The third noise path rides the supply itself, and switching power supply noise in an enclosure covers it.
Build it in eight steps
- Dry-fit everything on the bench with its real connectors attached. A right-angle Ethernet or USB plug wants about 2.5 in [64 mm] of clearance behind the door; find that out on the bench, with the parts in hand.
- Lay the gland row and the rail positions in the cutout designer, keeping holes at least 1 in [25 mm] from any bend and about one gland diameter apart for wrench room. Send that drawing with the quote: factory-cut custom stainless enclosures are delivered in 10 business days, counted from your approval of the drawing, and every gasketed factory hole is one less field hole in a stainless wall.
- Bolt the panel in with the power rail low and the electronics rail high, then fit both ducts, holding 2 in [50 mm] between them or a grounded divider where runs must come close.
- Bond the metal: backplate to wall, wall to machine frame, with toothed hardware through the coatings.
- Wire power first — line in, breaker, supply, relay with its snubber across the coil — and give the line terminals 3 in [75 mm] of straight run before the first duct. NEC 312.6 sets wire-bending space at terminals by conductor size; the small-wire values sit inside 3 in with room to re-land anything later.
- Wire the drive: four twisted shielded pairs out through the bottom-corner glands, within 8 in [200 mm] of the terminals, shields on the drive-end lug only. The controller enclosure cable entry article carries the gland-row detail for machine wiring.
- Wire signals last, in the top duct: step-and-direction, limits and probe, each at least 2 in [50 mm] from any 120 VAC run, each return beside its signal. For the topside gland, the waterproof USB and ethernet ports article shows the coupler arrangement.
- Close up: snug the gland nuts, seat the door gasket evenly, latch the door, and label the two ducts power and signal.
Checks when it runs
- Heat: run a 30-minute program with all four motors and the router on, then measure the air just above the drive. You sized for a 10 °C rise; accept up to 15 °C, and above that lower the drive's standby current or stand the box off the gantry.
- Bonds: door to backplate to machine frame should read well under 1 Ω on a low-ohms meter. Whole ohms means a joint still has coating in it.
- Noise: cycle the relay 20 times while a program streams over Ethernet. Zero dropped connections and zero missed steps is the pass mark.
- Sealing: after the first week of cutting, open the door and look for wood-flour streaks at the gasket and the glands; dust maps every gap you have.
Mistakes that cost the margin
- One duct for everything. The 50% fill cap and the 2 in [50 mm] separation solve different problems; when they collide, add a divider or a second duct.
- Shields landed at both ends, which builds the loop the twisted pairs were there to cancel.
- A 10 A general-purpose relay on a router motor, whose inrush welds contacts sized for resistive loads — the FAQ has the numbers.
- The box bolted flat to the gantry, giving up its back wall as a radiator; 0.25 in [6 mm] standoffs win it back.
- A right-angle connector discovered behind the door at commissioning instead of at dry-fit.
Enclosures for this job
Catalog sizes that suit the job this article answers, picked from its subject; open one for its full specifications.
| Enclosure | Material | Outside H x W x D / display | Rating |
|---|---|---|---|
| 20 × 16 × 8 in | 304 stainless | 20 x 16 x 8 in | Rated NEMA 4X / IP66 by the manufacturer; not UL listed |
| 60 × 36 × 16 in | 304 stainless | 60 x 36 x 16 in | Rated NEMA 4X / IP66 by the manufacturer; not UL listed |
| 48 × 36 × 16 in | 304 stainless | 48 x 36 x 16 in | Rated NEMA 4X / IP66 by the manufacturer; not UL listed |
| 60 × 36 × 12 in | 304 stainless | 60 x 36 x 12 in | Rated NEMA 4X / IP66 by the manufacturer; not UL listed |
Questions
Can the relay switch a 1.5 hp router motor directly?
Size the contacts to the motor, not to its running current. A 1.5 hp router draws about 12 A at 120 VAC running and 5 to 8 times that at startup, so a 10 A general-purpose relay welds within months. Use a contactor rated 1.5 hp or more at 120 VAC, or let the small relay drive the contactor coil — that coil draws under 100 mA, which any controller output can handle.
How far can the enclosure sit from the stepper motors?
Plan on up to 10 ft [3 m] per motor with shielded twisted pair on a 48 V drive. Current regulation absorbs the cable resistance, but the chopped edges radiate harder the longer the run. Route motor cables along the frame away from limit-switch and probe wiring, land each shield at the drive end, and clamp the cable at the gland so machine vibration loads the clamp rather than the terminations.
Is NEMA 4X overkill for an indoor CNC router?
A NEMA 12 gasket keeps ordinary shop dust out and would pass indoors, but wood flour and coolant mist coat everything, and a 4X-rated 304 stainless body shrugs off wipe-downs and a spilled coolant bucket for years longer. Save 316L for machines washed with chlorinated cleaners or sited near salt. Either way the rating is the manufacturer's, not a UL listing.
What coil suppression does the relay need?
For a 120 VAC coil, an RC snubber — about 0.1 µF in series with 100 Ω — wired across the coil clips the collapse spike. For a DC coil, a flyback diode rated above the coil current; a 1 A 1000 V rectifier covers a small socket relay. Leave the coil bare and the spike lands on the 5 V logic rail, showing up as dropped steps at the exact moment the router starts.





