The stairs to my basement has one light fixture at the bottom, and that casts a shadow on the rest of the stairs. I want to run a strip of LED lights up the crown molding or on top of the upstairs door to illuminate the whole area better. The plan is to aim them at the brightly painted walls for light diffusion.

I don't want the transformer to be showing though. In Massachusetts, I know low-voltage wiring is legal inside walls without a permit or inspection. And I'm confident in my abilities to run those wires safely.

My concern is piggy-backing the light fixture at the bottom of the stairs. Is it legal to strip the AC wires that go to the transformer and just wire them in with a wire nut, in parallel, to the existing wires? Or would I have to actually wire up an outlet and plug it in? Is it legal to have an in-wall outlet? Is there such a thing as in-wall rated 12V transformers?

  • Would something like this work? The transformer would still be visible, but wouldn't be jutting out into the stairwell.
    – Niall C.
    Apr 19, 2013 at 16:10
  • 2
    At the very least any wiring junction must be accessible so you must have an access panel if you put it inside the wall.
    – Craig
    Apr 19, 2013 at 17:04
  • @Craig - I was planning on making the connection inside the existing light fixture junction box
    – kavisiegel
    Apr 19, 2013 at 17:27
  • 2
    Do you have any unfinished areas nearby, eg under the stairs? I'd mount the transformer there so it's accessible for servicing/replacement and has some cooling, and then just run the wires down there. May need a surface-mount junction box or receptacle to get 120V. It's quite common to remotely mount transformers -- eg, it's very common for low-voltage under-cabinet lighting in kitchens that the transformer is located in the basement near the electrical panel or other unfinished (serviceable) area.
    – gregmac
    Apr 19, 2013 at 18:43
  • 3
    transformers often don't last forever. if you are putting it in your wall with no access it will be a nightmare for maintenance, especially if you forget where you put it or sell the house to someone else who has no idea where you put it. Apr 23, 2013 at 3:38

2 Answers 2


Regarding your code question: no, you cannot hardwire the transformer.

I believe this falls under NEC 400.7:

400.7 Uses Permitted.

(A) Uses. Flexible cords and cables shall be used only for the following:

  1. Pendants
  2. Wiring of luminaires
  3. Connection of portable luminaires, portable and mobile signs, or appliances
  4. Elevator cables
  5. Wiring of cranes and hoists
  6. Connection of utilization equipment to facilitate frequent interchange
  7. Prevention of the transmission of noise or vibration
  8. Appliances where the fastening means and mechanical connections are specifically designed to permit ready removal for maintenance and repair, and the appliance is intended or identified for flexible cord connection
  9. Connection of moving parts
  10. Where specifically permitted elsewhere in this Code

At a stretch, if you could permanently attach the transformer, you could maybe consider this to be under 400.7(A)(8), but then you're still required to have a removable plug:

(B) Attachment Plugs. Where used as permitted in 400.7(A)(3), (A)(6), and (A)(8), each flexible cord shall be equipped with an attachment plug and shall be energized from a receptacle outlet or cord connector body.

Additionally, I think this could be interpreted as violating 400.8:

400.8 Uses Not Permitted. Unless specifically permitted in 400.7, flexible cords and cables shall not be used for the following:

  1. As a substitute for the fixed wiring of a structure
  2. Where run through holes in walls, structural ceilings, suspended ceilings, dropped ceilings, or floors
  3. Where run through doorways, windows, or similar openings
  4. Where attached to building surfaces Exception to (4): Flexible cord and cable shall be permitted to be attached to building surfaces in accordance with the provisions of 368.56(B)
  5. Where concealed by walls, floors, or ceilings or located above suspended or dropped ceilings
  6. Where installed in raceways, except as otherwise permitted in this Code
  7. Where subject to physical damage

So I'd say, no, you cannot just hardwire the transformer in any way.

Additionally, you need to ensure the transformer (and all connections) are accessible for servicing. Transformers also get hot and need cooling - failure to have adequate cooling could cause the transformer to prematurely malfunction and/or lead to all the other problems of hot things in contact with flammable materials like your walls.

I'd find some area (such as under the stairs) that is accessible and unfinished, and run a new receptacle there. Then you can plug in the transformer, run the low voltage wires back to the LED strips, and you're good to go.

It's quite common to remotely mount transformers -- eg, it's very common for low-voltage under-cabinet lighting in kitchens that the transformer is located in the basement near the electrical panel or other unfinished (serviceable) area.

  • Thank you for the very thorough and informative answer. Real quality stuff. I think my plan is to use the existing location of the light as just a junction box, run wire from there to under the stairs and to an outlet where I'll plug in the transformer. Covers for those boxes do exist, correct? If not I'll replace the box with another in the same place. Of course this will be inspected by local code enforcement now, since I'm doing work on my bathroom as well...
    – kavisiegel
    Jul 11, 2013 at 3:32
  • I assume the existing box is a standard octo (round) box; if so, yes, you can get blank covers for those at any of the box stores (as well as blanks for most receptacle boxes).
    – gregmac
    Jul 11, 2013 at 3:49
  • I wonder about this transformer. solidapollo.com/in-wall-power-supply-12v-0.2a-9w.html. It is specifically built for in-wall gang box installation. Is it illegal?
    – Peter
    May 16, 2018 at 8:22
  • @Peter that one is illegal because it doesn't have a UL Listing, nor that of any reputable testing lab (NRTL). CE and RoHS are not testing labs at all, they are voluntary "honor system" marks. Totally unenforceable unless the builder or importer is actually inside the EU. Mar 4, 2019 at 3:45

You can't apply the low-voltage rules to transformers. Because half of the transformer is not low voltage, it is mains voltage.

Anyway, you are talking about LED drivers or power supplies, not transformers. (a transformer is a real thing, it is a different thing.)

Also, remember, the easy Class II rules for low voltage circuits do not apply if the circuit is over 55 watts.

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.