Yes — one outdoor box can carry the 120 V receptacle and the 5 V feed. Between them goes either a solid, fixed divider, or a kept separation under the NEC's Class 2 rules. For a surface-mounted two-gang at 2 in [50 mm] deep, the clean build is a two-compartment stainless box: divider welded in full height, each side with its own entry, every cutout done at the factory, delivered in 10 business days. What has no place in it is a plastic divider trimmed and glued into a weatherproof box — that trick costs the listing and the seal together.
What the NEC asks when line voltage meets Class 2
The output of a listed USB adapter is a Class 2 circuit, and the adapter's label says so. That label is what lets your low-voltage wiring follow the limited-energy rules. Those rules keep Class 2 conductors out of an enclosure or raceway shared with power conductors. What separates the systems is a solid, fixed barrier — or separate paths end to end.
Then there is the exception written for exactly this case: an outlet whose only job is to power the small supply. When the power conductors enter solely to feed the Class 2 equipment, they may share the compartment within conditions the code prints — 6 mm [1/4 in] of separation kept between the systems, on circuits at 150 V to ground or less, which your feed clears with 30 V of margin. The separation is yours to hold by routing.
Outdoors, two more rules shape the box. The enclosure carries a type marked for the location per the NEC's Table 110.28: 3R at a minimum, 4X where hose water or driven rain can reach it. An IP code alone will not satisfy a US specification that calls for a type (NEC 110.28). The receptacle also needs a cover that stays weatherproof with the plug inserted — the in-use bubble — which is why the divided recessed boxes on the market run deep: they bury it in the wall. On a column under a roof, settle the covered-versus-exposed question before you pick the type. The separation logic that governs 24 V control wire beside power wiring is the same logic that governs your Class 2 cord.
Three compliant ways to build it
| Build | What goes in it | Where it wins | What to watch |
|---|---|---|---|
| Two boxes | A weatherproof receptacle box for the line side; a small junction box for the Class 2 side | Nothing to measure: each enclosure holds one system | Two fixtures on the wall, and the run between them needs jacketed cable or its own conduit |
| One box, gap kept | Single compartment; line-side conductors down one wall, the Class 2 cord down the other, separate entries | Fewest parts; works in a box you already have | The gap is yours to hold at every bend, for the life of the install |
| One box, factory divider | A divided weatherproof box, barrier built in | The divider is the barrier; the exception never comes into play | Outdoor divided boxes are recessed types and run deep |
| One box, welded divider | Custom two-compartment stainless, your depth — 2 in [50 mm] holds — factory cutouts | Both systems in one surface footprint, divider full height, one gasketed door | The order drawing has to carry every entry, the grommet and the type |
Our stainless junction boxes — nine wall-mount sizes, rated NEMA 4X / IP66 by the manufacturer and not UL listed — carry the single-compartment route. The divided build goes through custom enclosures: you set the material, the depth and every cutout, and delivery is 10 business days from your approval of the drawing. How a board 3D model becomes a custom enclosure in 10 business days shows that same path from a drawing you already hold.
When the camera side grows into coax or a PoE run, the shared-box logic is unchanged: coax and power in one weatherproof junction box and a PoE camera with a 120 V floodlight in the same box start from the same separation question. For the hardware side of a two-gang — device depth, cover fit — mounting devices in a two-gang weatherproof box covers it.
Why a trimmed, glued divider is the wrong answer
A barrier under the Class 2 rules has to be solid and fixed, and it has to belong to the box. Plastic dividers sold for indoor new-work boxes are the wrong footprint for a weatherproof two-gang, so the fit becomes a cutting job. Every notch you open is a hole in your barrier, and glue holds position without being a fixing — in a box that cycles hot behind afternoon sun, it lets go.
The bigger loss is the rating itself. A listed wet-location box is tested as it leaves the factory, and a manufacturer rating covers that same assembly; once a foreign part is bonded in, neither speaks for the box. You can feel the failure at the gasket too: a divider standing proud keeps the cover from seating flat, and the first driven rain finds the leak. The custom route replaces all of it with a divider welded in before the box is finished, so the cover seals on one continuous flange.
Building it: the steps
With the breaker off and the feed proven dead, work in this order:
- Read the adapter. Look for the Class 2 marking on the supply. An unmarked supply gets replaced with a listed one, because that marking is what the whole layout stands on.
- Count the low-voltage joins. A cord running from the adapter straight out to the camera, with nothing spliced inside, fits the single-compartment route. Any splice, terminal block or extension on the low-voltage side moves you to the two-compartment build.
- Give each system its own entry. The line-side feed lands through a 1/2 in or 3/4 in trade knockout — the sizes UL 50's Table 71-1A covers for knockouts and fitting dimensions — and the Class 2 cord leaves through its own cord grip at the other end of the bottom. One gland shared by both systems puts them in contact at the exact point the rule watches.
- Route for the gap. On the single-compartment route, keep the power conductors to one wall of the box and the cord to the other, holding the code's separation through the bends behind the receptacle. Straights take care of themselves; bends are where a gauge finds you.
- Pick the type by what reaches the box. Under a covered porch, 3R answers. Anywhere a hose, a sprinkler or wind-driven rain can hit it, order 4X and keep it sealed — sun, breathers, heaters and condensation in a sealed outdoor box are covered in the outdoor enclosures guide. Feed the receptacle through GFCI protection, as the NEC's outdoor-receptacle rule calls for.
- Put the cutouts on the order, then bond the box. Send the entry sizes and positions, the cord-grip thread and the divider grommet on the drawing; factory-cut holes arrive sealed and burr-free, which is what keeps the rating, and repeat orders benefit the same way — choosing factory enclosure cutouts for repeat work lays out what to send. Bond the stainless body to the equipment grounding conductor, sized from the overcurrent device ahead of it per the NEC's Table 250.122, with paint-free contact surfaces at the bonding points (NEC 250.12).
Divider or gap: a porch-column box at 2 in [50 mm] deep
Inputs for this layout:
- One receptacle circuit at the supply voltage, feeding a listed Class 2 adapter.
- A two-gang surface box, 2 in [50 mm] deep, on a column rain can reach.
- The code figures for the shared-compartment exception: the separation distance and the 150 V-to-ground ceiling.
The rule in words: with no divider, the exception carries the install while the power feeds only the adapter, and the gap holds at every point where the two systems share the compartment.
The arithmetic, written out:
- Voltage condition: the feed's volts-to-ground against the 150 V ceiling, met with 30 V of margin.
- Depth budget: the separation out of 50 mm of routing depth is 6 ÷ 50 = 0.12, so 12 % of the working depth is spoken for at every shared point. Call the shared points three — the entry, the loop behind the receptacle, the cord's exit — and each has to hold that gap after every future re-wire.
- Divider route: the systems share 0 mm of compartment, so the gap rule has nothing to measure. The cord crosses at a grommet sized to its diameter, snug in the hole.
Result: at these numbers both routes pass. The divider is the one that still passes after someone else opens the box in five years and re-routes a conductor.
Decision: a cord running straight through with disciplined routing — take the gap route in a single-compartment box. Any splice on the low-voltage side, a second device in the box, or wiring other hands will touch — order the welded divider.
Checks when the box is up
- The cover seats fully with the adapter plugged in, and the in-use cover latches over the plug.
- On the gap route, re-check the separation at the bends, not the straights.
- Every entry is sealed: cord grip tight on the cord, conduit or glanded entry tight on the line side.
- The divider runs full height with no open notches, and the grommet grips the cord.
- The body is bonded to the equipment grounding conductor, with clean metal under the bonding hardware.
Mistakes that cost the rating
- Sharing one gland or one conduit between the power feed and the Class 2 cord. The separation rule follows the raceway too; keep the paths apart or put a barrier between them.
- The glued divider, covered above: it costs the listing, the manufacturer rating and the gasket seal in one move.
- Drilling entries in the field when the box could have been ordered with them cut. A burr tears a gasket, and an unglanded hole weeps; the cutouts and glands guide lists what belongs on the drawing.
- Putting a drain in a 4X box. The small drainage opening the NEC permits in boxes listed for wet locations (NEC 314.15) belongs on a 3R build — in a sealed 4X you handle condensation with heat, not holes.
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.
| Enclosure | Material | Outside H x W x D / display | Rating |
|---|---|---|---|
| 16 × 12 × 8 in | 304 stainless | 16 x 12 x 8 in | Rated NEMA 4X / IP66 by the manufacturer; not UL listed |
| 20 × 16 × 8 in | 304 stainless | 20 x 16 x 8 in | Rated NEMA 4X / IP66 by the manufacturer; not UL listed |
| 24 × 20 × 8 in | 304 stainless | 24 x 20 x 8 in | Rated NEMA 4X / IP66 by the manufacturer; not UL listed |
Questions
Can 120 V and 5 V wiring share one outdoor box without a divider?
Yes, when the line side is there only to feed the Class 2 supply and you hold the code's separation at every point, on a circuit at 150 V to ground or less. In a 2 in [50 mm] deep box that means separate entries and opposite-wall routing through the bends. Any splice on the low-voltage side, or a second device in the box, and the divider is the honest route — or two boxes, which meets the same rule with no barrier at all.
Does the divider have to be made for the box it goes in?
Yes. The barrier has to be solid and fixed and part of the box as manufactured, or a barrier the box maker qualifies for it. A divider trimmed from an indoor new-work box fails on all three counts, and the modification ends the listed box's rating. On a custom stainless box the divider is welded in before the gasket flange is finished, so the question never comes up.
How deep does a divided outdoor box need to be?
Surface mounted, 2 in [50 mm] of body depth carries a receptacle, its wiring loop and a full-height divider, with an in-use cover on the front for the plug. The recessed divided boxes on the market run deeper because they bury the divider and the in-use cover inside the wall. On a column or a flat wall you keep the 2 in and let the cover project.
Should the divided box be Type 3R or Type 4X?
Under a roof, 3R answers, and each compartment can carry the small drain opening the NEC permits in boxes listed for wet locations. Anywhere hose water or driven rain lands on it, go 4X and keep it sealed: ours are rated NEMA 4X / IP66 by the manufacturer, not UL listed, and an IP code alone does not satisfy a US spec that calls for a type (NEC 110.28).





