I am going to build a stage box, and I need 5V for that (to add some logic, maybe even later an STM32).
I also need mains (220V) for a 12W RGBW LED PAR light.
At first I thought to put in the box a 'wall socket' with two 220V plugs, but since the 12W needs to be switched by a relay, only for 5V I need a solution.
My thoughts were:
Using a buck converter like this. However, I don't see any holes, so I don't know how to fix it inside an enclosed box.
Using an already enclosed converter like this. I also don't see holes here, but at least I can glue it on one side. This one is twice as expensive (but still cheap).
Using a switching power converter like this. This one has holes, but cost even more. And I don't need the power it can deliver.
I'm quite a novice, so these questions might be trivial but not for me:
About option 1: How can I 'fix' this part in an enclosure? With using glue? I don't think it will be safe for 220V, especially if I want more in the enclosed box (like the STM32 later).
About option 2 (but also 1/3): Can I safely put this in a 'closed' enclosure? I think I can since the power usage is quite minimal (200 mA, maybe even less). So actually option 2 is already an enclosure, but I want to put it in a bigger enclosure with all logic (STM32 possibly and the relay).
About option 3: I like the holes, but that's it. Feels awkward to buy this just because it is the only solution with holes to fix it.
About option 4: I feel more comfortable with an adapter, however, I really don't like the idea to put inside my stage box a wall outlet, just to put the adapter in. I though about cutting of the 'adapter' part, but still what I keep is essential option 2.
(Actually all questions come down to: how should I fix/consolidate them in an enclosure and will I get problems with heat?)