vgvgvg:
Yes but I was trying to make sure the light keeps working even if the arduino runs out of battery.
Your switch will work properly the way you have it drawn. Even if the Arduino closes the relay, there is no problem with having two switches in parallel.
But you will wonder why the Arduino does not turn the light off and later discover it is because you turned the switch.
Yeah I understand the physical switch takes precedence over the automatic. First iteration wanted to get the basic scenario somewhat working.
To make the fail-back scenario working (no battery) AND
To be able for the Arduino to turn OFF the light even when the manual switch is ON
... is something I wanted to think about and research ... if there is a straightforward way to do..
Not 100% sure how to wire it so it works 100% as I want it.
If I connect the relay in this way:
NC -> switch -> light
NO -> light
Then if
Switch is ON
Relay is ON (power flowing through the Normally Open)
Then if I turn OFF the switch it won't have an effect since the relay is ON
Wonder if there is a way to write it that will allow the switch to function even if the relay is out of power.
....
Basically if I imagine a normal mechanical switch, like the one you use to run on/off the lights, is there one like that but with 2 electromagnets that can pulse turn the mechanical switch ON or OFF. Something like this will very simply solve the scenario 100% with all edge cases for me. If there is such a device I would love to know. Or maybe there is a type of a relay that can do this (note no power mode) that I don't know about?
can work with no power
can turn on/off using the mechanical switch
arduino can change the switch at the proper times too
Yeah have been looking around at latching relays after your initial comment MarkT but unable to find or think of how to write it in a combination with a switch... so that the switch is functional even when the arduino controlling the relay has no power/battery...