I'm in Oregon, USA, and trying to figure out a code-compliant way of hiding a wall wart (AC/DC transformer) behind a small device (about 3"x3"; if it matters, the specific device is a smart garage door opener).

My (possibly XY) solution to this problem is to put a 2-gang box in the wall with a high/low voltage divider plate, wire in a snap-in outlet (or similarly small outlet) and mount the outlet in the divider plate, and plug in the wall wart (inside the junction box) to this outlet. I'll mount my device to a blank 2-gang plate, and run the 5v barrel connector through the blank plate.

However, my spidey senses say that this would be all sorts of a code violation. But I'm not sure what, if any, violation this would be. I'm separating high/low voltage with the divider plate, and the only wires I'm running through are the low voltage (5V) wires. Would this setup be legal under code?

  • Does this device come with said wall wart, or expect you to provide a DC supply? Nov 27, 2018 at 5:11
  • The device does indeed come with said wall wart. However, it's a 5V/2A connector, so it could easily be replaced with something equivalent. I thought about making a circuit to power it, but I'm not sure what advantage that would have over the wall wart, either for complexity or code compliance.
    – Nick2253
    Nov 27, 2018 at 5:20
  • 1
    do a web search for wall clock power outlet ..... also, i wonder if a power outlet with a builtin USB charger would work as a power supply
    – jsotola
    Nov 27, 2018 at 7:18
  • FYI, while the phrase "two-gang box" is used to describe the nominal size of junction boxes, "gang box" refers to something altogether different (jobsite storage containers).
    – isherwood
    Nov 27, 2018 at 13:56

1 Answer 1


As long as you have the high voltage separated from the low voltage and you do not over fill the box it would be legal as long as it is accessable, I use deep 4 square boxes with a blank cover plate regularly to encase small camera power supplies and I have not had any code issues in Lynn, Benton, or lane counties.

  • 1
    It's legal to put a plug-in device in-wall behind a removable plate? #TIL...
    – FreeMan
    Nov 27, 2018 at 20:43
  • 1
    In a listed box you can do all kinds of neat stuff that would not be legal without a box. I not only install small power supplies but also timers , lighting control relays so a simple 15 amp switch can controll many times that amount even having multiple circuits (these take larger boxes). By doing this we are working with code not trying to go around.
    – Ed Beal
    Nov 27, 2018 at 21:08
  • good to know, +1
    – dandavis
    Nov 27, 2018 at 21:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.