For a while I'm looking for an arduino code and a (fritzing) scheme to control a relay in two ways: a physical push on a button (on/off) and a remote trigger (ethernet) to control the same button.
At this moment I'm using Blynk.cc to control some relays of my aquaponic systen (pumps, light, ventilation,...). This works well, but it would be useful to start/stop the relay with a physical button.
Does anyone have a clue if this is possible, can a relay get triggers from two sources (physical and remotely)?
Yes, its possible. Would the manual control act like an override to the software control? Which has priority? Lots of possibilities, but if you could provide a truth table of how you need it to work, that would be helpful.
Priority is not important, but the button state should be updated from both sides.
If the button is pushed ON physically, the ethernet application should also show that the button is ON.
If the button is pushed OFF remotely, the physical push button should be OFF.
I saw a nice post on StartingElectronics.org ([u]404 Error Page). It more or less what I want to do, but as a novice I can't figure out how to make my circuit out of the the circuit diagram.
The idea would be to have all controls work together concurrently without limitations.
The first 3-way switch would be inherent (virtual) in the Arduino for software control, the second 3-way switch would be a paddle or push-ON, push-OFF pushbutton (SPDT) type for manual control. The Arduino 3-way switch would need 2 inverted outputs for control and one analog input to monitor the relay status.
Here's a completely untested circuit (needs code):
Dout and DoutInv (inverted) are the 2 outputs for software control. A0 monitors the relay status. Reads 0 or 1023 when OFF, approx 580 when ON.