Hi there, I'm thinking about running CAT5 cabling (don't need all wires, I know, just thinking about shielding) from a switch on the wall to an Arduino Mega 2650, then run another CAT5 cable to a relay which is also connected to 240V circuit to turn a light on and off. Basically it's a prototype of home automation for lighting, I want to be able to prove this works and then:
Control multiple relays from 1 input button
Control one relay from multiple input buttons
Add motion sensor inputs to turn on lights for a period of time (i.e. 10 minutes)
Add time of day / clock library code (saw this is available)
Add dimmers (saw the Velleman ones - they look good)
Program the thing to control an entire house of lighting
I think I'll need around 25-30 input buttons, 2-3 motion sensors, and about 20 relay outputs. My biggest concerns are:
Powering all this, I assume I'll need to add some sort of external power because the draw through the Arduino may not be able to power all this (??)
Distance between Arduino and buttons /relays
Amount of I/O ports on the Arduino to communicate with everything
Any feedback / thoughts are welcome! Thanks in advance...
Simplest form, use a 5V coil relay with 240V contacts. Length of wire will be regulated by coil latching current of the relay and ohms law. Everything else is is programming.
When you say control 1 relay with multiple buttons, I assume you're wanting to emulate a 3-way circuit, but with motion detectors or otherwise? Shouldn't be too difficult.
The MEGA 2560 is a good choice for Home Automation. Simple now and more complex later. It has 48 Digital Inputs or Outputs and 16 Analog inputs (which can also be used as Digital). And lots more memory.
DISCLAIMER: Warning! Mentioning stuff from my own shop… (which is what I know the most about).. Lots of other sources on the Web.
That makes it easy to plug things together like this:
Switches and buttons: You can distribute switches out a ways with a twisted pair in CAT5 cable. Use a smaller value pullup resistor like 2.7K or 4.7K and put some bypass capacitor at the Arduino end, like .01 uF or so IF you are getting false triggers. Search here and elsewhere for “3-way switch” and “Multiple Pushbuttons”. And learn about “Debouncing”. There are some good libraries for all this switch stuff; don’t reinvent it all.
Home Automation is a great project. You can start simple and keep adding things.
And you have good “User Feedback”! The Pro Software guys (which we Ain’t) might call this “Agile Development”.
And think about adding a Real Time Clock module so you have months-long time accuracy and maybe set up scheduling.
How many switches?? Up to you.. My OldSkool Home Automation system in Vermont USA has only 1 switch (Actually several switches around the house in parallel into 1 digital input). But you have to use the switch to send Morse Code.. like “W” for “Weather Info” or “O” for Outdoor Light ON/OFF. The only human output is Voice Synthesizer. So I can run the whole thing at night. From Bed. In the dark, with my eyes closed. Next I need to convert all that to Arduino from the very aged IBM AT running it now.
magnethead794:
You say 240V so I assume you are not in the US.
Simplest form, use a 5V coil relay with 240V contacts. Length of wire will be regulated by coil latching current of the relay and ohms law. Everything else is is programming.
When you say control 1 relay with multiple buttons, I assume you're wanting to emulate a 3-way circuit, but with motion detectors or otherwise? Shouldn't be too difficult.
Thanks for the info, and yes, I'm in Australia, hence the 240V 3-way circuit sounds right, might want to have two buttons to control one of the relays (which will be connected to 1 light).
The MEGA 2560 is a good choice for Home Automation. Simple now and more complex later. It has 48 Digital Inputs or Outputs and 16 Analog inputs (which can also be used as Digital). And lots more memory.
Wow, thanks! Awesome information, great links, I don't mind if it's your shop or from someone else - appreciate the help!
And you've certainly started me thinking about what can be done, I've got a lot more reading to do
Thanks again, and I'll post my progress on the forums so that others can hopefully get a head start as well, and learn any pitfalls, etc.
My Arduino Mega 2650 should be arriving tomorrow, so time to play over Christmas
You might want to look into getting some X10 devices, which have been around for years. There's code and devices available for the Arduino, and you could even operate them on something smaller than a Mega, like an Uno. It might also be safer, as the X10 devices would shield you from the current.
scoopjones:
You might want to look into getting some X10 devices, which have been around for years. There's code and devices available for the Arduino, and you could even operate them on something smaller than a Mega, like an Uno. It might also be safer, as the X10 devices would shield you from the current.
I had a look at X10 and C-BUS before deciding on this path. I really like the C-BUS system, except for the price. I like the fact that it's low voltage cabling going to switches / buttons, sensors, etc.
I also have a unique opportunity right now because I'm renovating, so I don't have to worry about existing cabling, which will all be removed / replaced. For any current house I agree, it would be much easier to implement X10 and keep the existing wiring.