Cheapest safe way to power nodemcu through 220AC to 5vDC

Hi,
I am trying to build a smart relay plug and would like to power the Nodemcu, connected to the relay, directly through the 220V ac mains power. Currently I am using a mobile phone charger to do the same. I want to make it smaller to fit inside a box which can be hidden behind the main plugs.

What is the best, cheapest and SAFEST option?

I believe the manufacturers are doing the chargers as cheap, small and safe as possible. I doubt you can do better. If it will be safely hidden, you may remove the plastic housing, cut the cable to solder it directly etc.

you can use 5V / 5W SMPS Module (Hi-Link).

bhavikbhansali:
you can use 5V / 5W SMPS Module (Hi-Link).
https://www.rhydolabz.com/miscellaneous-miscellaneous-c-205_82/5v-5w-smps-module-hilink-p-2292.html

Check the price. We can buy a mobile charger for less!

What about printing a cover for your phone charger to hide both charger and arduino in the cover?

Yes, using the mobile chargers is an option. Just seeing if we can do with anything cheaper and equally safe.

Temerity:
Yes, using the mobile chargers is an option. Just seeing if we can do with anything cheaper and equally safe.

Many generic mobile chargers are cheap but not safe, FYI.

liuzengqiang:
Many generic mobile chargers are cheap but not safe, FYI.

What means "not safe"? Shock hazard? Fire? Or "only" poor regulation?

Smajdalf:
What means "not safe"? Shock hazard? Fire? Or "only" poor regulation?

Each country has their own regulations so safe would mean safe as in not catch fire, shocks etc. :slight_smile:

Need to ensure your charger does not overheat if it’s inside an enclosure.