I have a logic/code issue to solve, activating a motor with two options, manual switch and also a Relay by the Arduino pin #13 - both from the same power source(ac).
I would like to avoid a case that the relay will activate the motor in the same time as the manual switch is pushed on. for that, pin#A0 is used to sense the voltage( if A0>0V, the relay should be Disabled).
issue is, the relay gets the power source to the motor from the same wire - is there a way to solve this?
Thanks for the advice but I cannot change the mechanic nor the switch.
just to clarify the issue, A0 pin should sense if >0v from the ac line to the motor, in that case- if the manual switch is on- if so the relay will be disable.
this is the same line that the relay will operate the motor (if A0<0V).
so the point here - when the relay will be enabled- operate the motor(manual switch is off) A0 will also sense >0v... so there must be a logic/ code solution here to determine for A0 that when its>0v only that the relay is working to allow to keep working for the relay.