I've recently gotten into Arduino's, and wanted to make some lights in my house controlled by them (so they can respond to motion or timers, or whatever). However, I'd require any solution to meet the following conditions:
- I should be able to turn on or off the light using a physical switch, independent of what state the Arduino puts the light in.
- The physical switch should work even if the Arduino crashes/malfunctions/whatever.
- The final setup should look professional and function intuitively.
My ideal solution would be the following. Have a normal looking (and purely mechanical) light switch that has on/off/auto states (auto would just be centered). When the switch is in the on or off position, the light is on or off accordingly. When it's in auto, the state would be determined by the state of a relay controlled by the Arduino. Unfortunately, I haven't been able to find a commercially available switch like this, and without one I don't know a good way to create this set-up.
Every other solution I can think of is less good. Here are two:
-
Have two normal light switches: if the first one is on then the light is controlled by the Arduino; otherwise the light is controlled by the second switch. So typically you'd leave the first switch on, which would put the light in "auto" mode. This isn't a great solution though since you need two switches for every light, and furthermore, to control the light manually would potentially require flipping two switches.
-
Have one normal on/off light switch and wire it up with the Arduino-controlled relay in SPDT fashion. The problem here is that the switch wouldn't necessarily override the relay, since changing the state of either would toggle the light. For example, if the relay were off and you turned the physical switch on, the light would come on; but if a minute later the Arduino turned the relay on then the light would actually turn off, despite the physical switch being set to the on position.
There are hundreds of articles and videos giving tutorials on Arduino controlled lights, but I haven't seen any that meet all the conditions I give. It's a bit frustrating, since I feel like these conditions really are necessary for a solution that I'd actually want in my home. I'd love to hear if anyone here has any thoughts. Thanks!