I want to put a series of LED tape lights under the bathroom medicine cabinet.

My bathroom has a series of lights above the medicine cabinet that are controlled by a switch, and I'd like to tie the under-cabinet lights into this circuit.

The thought I had was to tie a small transformer into the line voltage and stuff it into the junction box that holds the light fixture, and run low voltage wires down and behind the medicine cabinet to the LED tape. I only need a watt or two.


  • Are there transformers that are small enough to put in junction boxes?
  • Is this against the electrical code, and if so, how do most people deal with this?
  • As long as the transformer is not going to be creating heat above the wire and switch rating it Might be able to be put in a box. The trick is the Box fill calculation. In homes most existing boxes are not large enough to add a 2nd device. What I have done in the past is use an old work box close to the outlet that I had power, feed romex to that outlet / light fixture wire up my transformer then drop the low voltage to the lights. The only negative is now you have a cover plate over the old work box, but it can be painted to match. The wiring and transformer are accessible as required by code
    – Ed Beal
    May 2 '16 at 23:13

Some are. You can also get transformers designed to mount into a 1/2” knockout in a junction box. The transformer proper sits outside the box. You can also find transformers which sit on the outside of a metal box cover. These are very common in 24VAC.

These are typically true transformers. You may be using the word "transformer" loosely to mean any low voltage power supply. That may be a bit harder to find.

Any device you put on 120V power should be UL listed for the purpose, or inside a listed metal enclosure.

Another option, if there is a metal fixture involved, is to mount the power unit inside the fixture.

You do need to watch out for box fill limitations. Don't overstuff the box.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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