Whole home is wired

Hello everybody.

I am a software engineer just barely starting with Arduino. I’ve been through a journey of building a house. From start, i wanted to automate all lighting and other stuff as alarms and garate gate.

Unfortunately, I didn’t have much time to decide exactly what technology I’d use, but I followed a guide I found online to have everything pretty much ready to be automated.

What I did following the guide is preparing all wall outlets to use push buttons, mmeaning to use relays. So I have one phase bus crossing all outlets and every button has a dedicated wire retuning to the central. The lamp wires also all get down to this same central. That was a lot of wiring that almost made my electrician crazy.

Everything looked good in theory, as I’d have signals to drive relays. Although now thinking further about what I really want to accomplish, I feel I may not have all the flexibility I’d like. For example, I want to be able to program what outlet turns what light, also to be able to detect things as double clicks to have different lighting scenes, maybe holding the push button to control a few dimmers would also be nice. So clearly the simple relay setup wouldn’t be enough.

I am little bit stuck on where to start. It seems I could have ac phase detectors for wall wallets and the software would drive the light relays or dimmer, but having one for each push button could make all very much expensive… as I have a lot of them. Also thought about feeding the outlets with a 12v bus… not sure.

Any thoughts about what I should go for? All I have is a lot of wiring atm.

Thank you

You added 1 wire to each outlet or did you add 2 wires?

Hello every switch is like a doorbell one wire return only.

For example, with a double switch I have:

Incoming: One phase, one neutron (not realy needed, but is there)

Outcome: two wires (one per switch)

I don't get it. Please provide a schematic and/or photo.

Hi. Thanks for your support. I made a draw of my installation. Of course this is actually dozen lamps and switches, but that’s the idea.

If that was a simple relay scenario, R1 would command a switch to P1 (releasing H), same for R2 → P2. Now, what if I want to do something as : Double click on Bell 2 shutdowns P1 and P2, and things like that…

Ok. But R1/R2 carry mains, so not the stuff you want to use with a microcontroller for input.

Yes, it is all 220v power running through... what would you suggest?

Since everything comes out of a central point, that wouldnt be hard to to stream something else as 12v dc through the outlets... not sure if that makes sense tho

Don’t mix 220V and “something else” on the same kind of wires. “Somebody” will connect the wrong stuff, and if you are anything like me you’ll be that “somebody” in a few years from now :smiley:

The easy way: Use relais that accept 220V on the coils → the switch-side is totally seperated from the mains. Livetime ~ 100.000 cycles.

Agreed.

I am not sure I really follow the idea tho. If i'd add relays that would be fairly easy. These multi channel relay boards for Arduino are pretty cheap, and it looks easy to connect r1 and r2 with these boards on high voltage.

The point is, i wanted to be able to program what each outlet will control. Using relays, my understanding is I would physically attach a switch to a lamp. That means any changes to the schema, means wiring changes. Also, using relays i am not sure how I'd collect the click samples like double pushes (clicks) or prolonged pushes (time samples)

Thoughts?

Ah, ok. I was thinking that you want to use "Doorbell Push" as an input to the microcontroller/whatever (in that case you would use https://at.rs-online.com/web/p/monostabile-relais/1864154/, coil connected to R and N).

That relaisbords are OK for switching 220V units, but you need to take a close look at the datasheet: if it's advertised as "15A" than that's the max. current in ON-state, not the current allowed while switching - that is much lower. Better get some solid state relais.

Just use the wall outlets for gizmo power and do everything else wireless.

I am still unsure about how to make this in a safe and cost effective way.

Today I've learned more about this Shelly 1 device. That looks really amazing. It supports momentary push buttons with mains input, and can be setup to watch for long presses and do something else instead of necessarily toggle its own relay. For example, a single click could trigger its relay, but a long push could send a mqtt message around.

That costs around $15 dollars each. Problem is I need a lot of them.

I really wonder what it uses to support mains momentary switch pushes. All arduino examples I can find around just use these regular small ones 5v.