# Providing house wall switches with 3.3v/5V supply?

It's a bit non-technical, but I'd love to hear the opinions of the pros.

I'm trying to figure out what is the best way to connect my home's wall switches (lights, etc.) to 3.3V/5V. The plan is the embed a tiny wireless module and a relay into each switch's housing, and allow the switch to be remotely controlled.

I can think of three options to do that:

1. Try to find a small and cheap Chinese phone charger and copy its design
2. Deploy 3.3V/5V wires in the walls, next to the mains wiring
3. Using batteries

The 1st option is preferred, since I don't want to handle maintenance or do major infrastructure change.

I looked into solutions from Power Integrations but not sure if it's compact enough.

• amazon.co.uk/Connekt-Gear-Power-Socket-Charging-white/dp/… Jan 6, 2015 at 22:23
• righto.com/2014/05/a-look-inside-ipad-chargers-pricey.html is a good reference for charger design teardowns with safety consideration. Jan 6, 2015 at 22:24
• I would avoid #2 and 3. My friend has those wall outlets with 5V usb ports. It just has built in adapters to take mains and get out 5V. The best solution would be to do that. Put an adapter and the wireless relay switch into the wall outlet. Or you can go the smart route and just use existing plug-in switches and then plug adapters into those to power your devices. Jan 6, 2015 at 22:33
• Dangerous to the uninitiated - a transformerless capacitor fed power supply would work well | A CT will work given enough quiescent load on main cct - which need not be much.| Don't copy psu - use one. They can be small enough. | Note that the required relay may be non trivially sized for some loads - will it survive a heater or hair dryer or ... . | Be sure what your insurance conditions are !!!!!!!!!!!!!!!!!!!!! Jan 6, 2015 at 23:56
• @RussellMcMahon Maybe needs more exclamation marks!!!! ;-) Jan 7, 2015 at 0:19

My opinions:

1. Don't trust a cheap Chinese design. They are sometimes lethal. Copy a good design from a respectable source
2. Depending on your country there may well be regulations preventing you from running low and high voltage cables together.
3. Nah, you'd be changing them every couple of days.

What I would do: Just buy the plug-in remote switches - they're 10 a penny these days.

All this stuff already exists. Important thing to watch for is the approval for your country. Typically home made, devices can't be permanently installed in the home. For example, In North America UL or CSA approval is required. Any approved device was tested for transient spikes, fire suppression, and anything else and was deemed safe. Even a device approved elsewhere may not be used, if your country doesn't recognize the testing agency.

If what you want to do is remotely short the switches, you usually don't need to tamper with them. Just put your relays in a safe (implying, but not limited to, not too crowded) box, close to where the wire to the switch is connected to mains and wire to plug/light. Same goes if you want your relay in series with the switch.

Since that's probably a rather central location, you can use a single psu for several relays. Less space, less maintenance, less trouble.

Again, be sure to tamper with mains voltage only if you are competent enough - those nice colorful wires do contain death.

Option 1 may not be possible due to no neutral or earth being present at a wall light switch. It will depend on the applicable regulations, the electrician's preference and a bit of luck.

Here in New Zealand, it is common for a lighting circuit to run phase, neutral and earth to the ceiling rose, with a 2-wire cable from the rose down to the switch. One wire will be phase, and the other is the load. That makes it difficult to power electronics that physically live in the switch, especially when the switch is on.

An option is to use a commercial infrared controlled switch, and have your control system emulate the remote. I use something similar to control a Mitsubishi heatpump. There are articles on the web on how to analyse and re-create these protocols. This has the huge advantage that you are not working with mains, and there is no insurance problem.