Electrical – Are AC-DC 5V power supply modules legal in USA if mounted inside an outlet box

electricalreceptacle

I'm wall mounting a tablet and need to supply 5V. I've seen posts on how this can be achieved but my question is specifically about these types of power supply modules:
enter image description here

https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=AC-DC+Power+Supply+Module+AC+1A+5W+220V+to+DC+3V+5V+9V+12V+15V+24V&_sacat=0

Is it legal in the USA to add an inline power supply like this behind a light switch or outlet in an outlet box?

EDIT:
So from all the great discussion here the best solution is to use a recessed electrical box plus an outlet with USB
enter image description here
enter image description here

Best Answer

No, because of the source.

Generally anything you find on eBay or Amazon Marketplace is from the endless junkstream from Alibaba. These things are firestarters.

There are two things you need.

Must have a UL listing (or other recognized testing lab; not CE)

Equipment used in mains wiring must meet basic quality standards. That is called out on literally the first page of the National Electrical Code, in section 110.2.

In practical terms, that means approved by Underwriter's Laboratories, or a list of other "Nationally Recognized Testing Labs" seen to be of equal reliability: this list is maintained by OSHA. These include CSA, ETL, Intertek, BSI, TUV and a few others.

Notably, the list does NOT include CE, CCC, FCC or ROHS; none of these things are testing labs. These marks are typically used when the Chinese maker can't qualify for an NRTL. They certainly try to make people think CE is a meaningful mark; it's not, except for one context for items shipped from the manufacturer within Europe. Outside that, the mark is certainly fraudulent.

All this is because the device is interacting with mains voltage, and so has the possibility of starting a fire.

Must use according to instructions and labeling

This is in the NEC in the next section, at 110.3(b). The reason is that the testing labs (UL etc.) only test the item for certain uses - those discussed in the instructions and labeling. Using it "off-label" means the item has not been tested for that use.

A related issue is "electronic components" vs "equipment/devices". Equipment makers have the option of using electronic components that have already been UL-certified, which speeds up certification of the equipment. UL calls this component certification "RU" - we call this "Really Useless" (thanks ThreePhaseEel) because the component is simply not rated for direct use in building wiring. And obviously, the labeling and instructions say nothing about using that way.

So your idea of using a module is fine; however you must use a module that is UL-listed for that purpose.