4

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

ajdede
  • 41
  • 1
  • 1
  • 2
  • 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? – Joe Hass Sep 16 '13 at 20:09
  • i plan to use one arduino mega, to control lights in different rooms – ajdede Sep 16 '13 at 21:07
  • 1
    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. – Kurt E. Clothier Sep 16 '13 at 22:25
  • 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 – ajdede Sep 17 '13 at 14:05

3 Answers3

2

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

Basically the most convenient consumer option.

Passerby
  • 72,580
  • 7
  • 90
  • 202
1

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!

vlad b.
  • 323
  • 2
  • 4
  • 11
  • your implementation is ok, i just wanted to know can i use spdt relay instead of ssr relay and 220v relay you are using – ajdede Sep 17 '13 at 09:01
  • 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. – vlad b. Sep 17 '13 at 15:30
0

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.

gdw2
  • 101
  • 1
  • 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 – ajdede Sep 16 '13 at 21:02
  • 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! – gdw2 Sep 16 '13 at 21:06