4
\$\begingroup\$

I am starting to build new house and want to add some home automation features, for now, turning lights and sockets on and off. i bought arduino mega, ethernet shield, current sensors to see if the light is on, and relays. Can you tell me what is the best practice to get this working, and other thing, i want lights to be turned on and off from the wall switches and in the same time from the arduino. if the arduino is not working or off, lights should still work from the wall switches, thanks a lot

\$\endgroup\$
4
  • \$\begingroup\$ Are you planning to use a single Arduino to control multiple lights and sockets? If so, how many and how do you plan to connect the Arduino to all of these relays and all of these current sensors? \$\endgroup\$
    – Joe Hass
    Sep 16, 2013 at 20:09
  • \$\begingroup\$ i plan to use one arduino mega, to control lights in different rooms \$\endgroup\$
    – ajdede
    Sep 16, 2013 at 21:07
  • 1
    \$\begingroup\$ Using Arduino for this is fine for developmental purposes, but you'd have to be out of your mind to use an actual Arduino board as a permanent solution, and especially to use more than one because you ran out of I/O lines (as done in the answers below - seriously, research "shift registers"). To start, you need to make sure your current sensors can handle AC level power - most are for DC. Second, you need a way to control AC power such as an AC relay or Triac. If you don't know what any of that is, then you are in way over your head and should just buy a solution already on the market. \$\endgroup\$ Sep 16, 2013 at 22:25
  • \$\begingroup\$ As I wrote in my initial question, i already have relays, both solid state relays and spdt relays, current sensors are ACS712 for arduino(5A range), what i only need is how to connect spdt relay(3 connectors, no, nc and com) with wall switch, so both will be working independent one from another \$\endgroup\$
    – ajdede
    Sep 17, 2013 at 14:05

3 Answers 3

2
\$\begingroup\$

http://en.wikipedia.org/wiki/X10_(industry_standard)

Basically the most convenient consumer option.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Wheels were invented for a good reason - so you don't have to. +1 \$\endgroup\$ Sep 16, 2013 at 20:59
  • \$\begingroup\$ In my experience, that X10 wheel has a few corners on it that make a smooth ride difficult to achieve. \$\endgroup\$ Sep 17, 2013 at 17:43
1
\$\begingroup\$

This is what I'm doing

demo: http://www.youtube.com/watch?v=BmsdXMbd2vo

more details here: Any obvious problems with this DIY home automation?

This is the cheapest and fail-safe solution I found. Right now I'm still searching for a good on/off current detector but I will probably use a led in parallel with any consumer to detect on/off status.

I am using around 12 arduino boards (mega and uno right now, but more will come) with ethernet or radio shields to communicate.

If you find something better I'm open to any and all ideas.

Good luck!

\$\endgroup\$
2
  • \$\begingroup\$ your implementation is ok, i just wanted to know can i use spdt relay instead of ssr relay and 220v relay you are using \$\endgroup\$
    – ajdede
    Sep 17, 2013 at 9:01
  • \$\begingroup\$ You can connect all your switches to 5v in paralel to the arduino. So you have 5v - arduino pin - relay - arduino ground and separate wires for arduino 5v - normal switches - relay - resistor - arduino ground. This way the manual switches are doing what a write high on a normal pin would do. \$\endgroup\$
    – vlad b.
    Sep 17, 2013 at 15:30
0
\$\begingroup\$

I don't speak from experience, but this came to mind:

http://en.wikipedia.org/wiki/Multiway_switching

Most people are familiar with a three-way switch -- a light controlled by two different wall switches. Do something similar, but replace one of the wall switches with a relay, etc.

\$\endgroup\$
2
  • \$\begingroup\$ that is exactly what i want to do, to replace a 3-way switch with relay, i just need to know exactly the wiring of the switch and the relay, which wire goes to nc, no and com \$\endgroup\$
    – ajdede
    Sep 16, 2013 at 21:02
  • \$\begingroup\$ Looking at the first image on the wikipedia page, replace one of the purple boxes with a relay. com in the middle, nc and no would be top and bottom (order doesn't matter). But like I said, I don't know what I'm doing! \$\endgroup\$
    – gdw2
    Sep 16, 2013 at 21:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.