I am adding a LED light to a waterfall, the transformer is located about 70 ft away, I have an indoor transformer/adaptor that I want to use. is it OK if I install it in a PVC electrical box? Is is OK with the electrical codes?
It depends. Generally I would say not. The problem is heat. Transformers get hot. Hot PVC melts. You need to find the max temperature (or temp rise) of the transmformer. Also the temperature rating of the PVC box. If the temp of the transformer is lower then the box OK, if not nyet.