Hi All,
I've been playing with Arduino for a little while and managed to get my relay to work from a web browser rather well. So I wont be asking how to connect that up! My next step is to get it actually wired to the lighting in my house.
What I would like to do though is be able to see from a browser the status of the lights, are they on or off. I would then be able to control my home lights from anywhere I have internet and be able to see if I had left a light on in the kitchen for example. This would also eventually apply to some other devices I have that I will control but for now lets stick to the lights.
Each light circuit (in most cases in my home this is a single lamp with a single switch on the wall) will retain the original light switch on the wall, these I will re-wire in a 2 way design that allows the relay or the light switch to control the light. The relay is then to be controlled by the Arduino connected to a PC running a web server. So using the switch or the browser interface I can control the light.
The interface on the web pages will show a top down layout of my home where you can click on each area to turn the light on or off. I intend on making this usable for touch screen devices so I can use my tablet or smartphone to control the house as I carry either with me all the time.
This will obviously require a single output pin for each relay.
With the easy part planned, I now have a number of ideas for checking if the lights are on but cant decide which is best for what I want:
Option 1: Check if the circuit is open or closed - I have no idea how I would attempt this with an Arduino on a mains voltage circuit and think this may require a number of precious I/O pins for each circuit. I don't know how to pass readings to the web server either.
Option 2: Check for a load on the circuit - This seems like the easier option and I think it would only require a single pin for each circuit on the Arduino, and again I'm not sure how to do this and pass the output to the web server.
Option 3: Make the switch also control the Arduino and store the changes in a db - More complicated wiring and means the lights cant be controlled if the Arduino isn't working.
I'm starting this project small with only 4 lights to begin with and will add more on eventually. Im using an Arduino Duemilanove at the moment but the current code appears to work on my nano as well. I am possibly thinking of using a Mega but may just use multiple small units for the different areas. Switching, and Sensing. The web server will eventually be a Linux ITX box but for now its a Windows box with Apache.
I'd appreciate your comments on the above options and if anyone has some suggestions for how I would do option 2 that would be awesome.
Thanks in advance