Replacing multiple wall switches with relay shield?

I have a few rooms in my house that need to be rewired and I’m considering making all the switches/sockets smart while I’m at it. I’m trying to stay away from using premade wifi/zwave devices, they’re too expensive and it seems redundant.

My current plan is to have a spark that covers each room (or multiple rooms) with a relay shield to get the job done. I would run a single hot line up to the spark and from there run separate lines to the various devices for individual control. I want to build it into the wall and have a face plate with multiple buttons or switches to give in-room controls in addition to cloud control.

I’m running into 2 hurdles that I haven’t figured out yet…

  1. how best to power the spark with a 110v line coming in? Could I just gut a cell phone charger and wire it straight into the 110v line?
  2. how to handle the physical button controls? I want them to work when wifi is down so the lights can still be controlled manually. My first thought is to wire 4 buttons into the spark and have each one toggle the on/off state of a relay, are the i/o pins accessible while using the relay board? Is there a better way to do this?
  3. do I need to be worried about overloading the relay or spark? The most power hungry device I would be controlling would be a plasma tv, I’m not looking to hook up kitchen appliances with this project.

Thanks!

Sounds like something I want to accomplish in the coming weeks!

The :spark: Core is powered through the relay shield and does not require a separate power supply. The relay shield can be powered via a standard 9V DC walwart. The phone charger is a nice a to power the Core in general.

I would suggest a manual over ride for each switch. This switch can be connected in parallel to the Relay. (OR configuration)

As long as the device does not consume more than 10Amps, you should be fine.

Disclaimer: Please take proper precautions when dealing with high voltages. There is always a risk of electrocution/ fire!!

Great information, thanks! A few more questions, forgive my novice understanding I’m a software engineer with little hardware experience :). That said I’ve done plenty of home projects with mains and am comfortable working with 110v lines.

Forgot the shield had a dc input for power, but still a similar question. Since I want to mount this in the wall I would rather not need a wall outlet for power. Is there a good inverter or similar that I can use to get 9vdc from the 110vac main?

My concern with a manual relay is that the spark won’t actually know the state of the light/socket. If I can use a button to signal the change to my core then it would be the single point of control for the main and therefore always know the on/off state. Basically the spark would have 2 inputs for changing each relay, 1) via the spark cloud setting the state to on/off and 2) a local button that requests the current state to be toggled. Is it possible to get at the io pins while using the relay shield to do this?

Thanks!

@sullitf,
The relays on the relay shield are only rated 10A, whereas the typical residential receptacle is rated 15A or 20A. Even though you only intend to run your plasma TV on that line, it is still possible to plug other things in and overload the relay. Overloading could cause the relay and traces to overheat and burn up.
If you are planning on selling your house anytime in the near future, you would probably need to restore any wiring modifications back to its original code-compliant configuration. Inspectors will flag non-code-compliant installations.
Lighting loads can also be damaging to some relays; it all depends on how many lights, and what kind you are controlling.
Those pre-made WiFi/Z-Wave devices probably took the manufacturer months to design and test, and each one carries the various UL, CSA, or ETL certifications. Those certifications state that the product is safe to use and in the event of a fault, will fail safe. You are essentially paying for all of this work (plus a little extra for the manufacturer’s profit margin). Take extra precautions when hacking together your own designs because fire and electrocution are two possible risks here.

IMHO, the relay shield is probably not the most ideal piece of hardware for permanent (in-wall) applications due to the relay ratings and the size of the relay traces on the relay shield PCB, the large size of the relay shield itself, and its need for an external class 2 power supply.

I am looking into the same thing. I’m building my own relay board with SSR relays, I tried it with a small device @ home and it worked well. For the switch, why don’t you use a TouchPad. This way you can set and keep track of your On/Off state variable from both the pad and the cloud from inside your firmware.

Hope this helps

I’m as weel looking to do the same thing
Until now, I did made a “powerbar” with 4 output spark controled, the casing was 3d printed (i could upload the files is I see some request) and work very well. One input is spit into 5 (4 relay and one phone charger) all inside the 3D printed case, with 4 standard wall outlet
I’m now planing to do the same thing but in the wall itself

What I was able to do until now:

  • use a 3 way switch setup with 1 switch and 1 relay (google it up, it’s the same as a hallway with 2 switch)
  • use a tension divider (2 resistor) to read the switch status. I do not read the switch status and then activat the relay. the switch light up the lamp by itself (using the 3 way setup), but the spark know if the light is on or not

This setup still work with no wifi, or even if the spark is dead (the switch will still work)
this allow to control the light using the spark OR the switch,
someone not knowing the spark is there will still be able to use the light as normaly

hope this help other

PS: sorry for my bad english

@boblebob i am late to the party but I am interested in seeing what you have made. Did you upload it somewhere?