Push button physically AND remotely to control a relay

Hi there,

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)?

Thank you for helping me out.


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.

Thank you dlloyd for your quick answer.

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.

I stumbled also on a post On the Blynk Community, but same here, I can't figure out how they managed to wire everything on their breadboard. [u]http://community.blynk.cc/t/solved-turn-on-and-off-relay-with-blynk-button-and-or-physical-button/3883[/u]

I know all the elements are there, but I just need a starting point on how the wire the connections.

Kind regards

How about trying a method of control similar to the way several 3-way switches work?

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.