Feedback pin to operate relay

Hi,

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?

Appreciate your suggestions.

voltage sens

A double pole double throw push button switch could do the trick.

1 Like

Take a look at how 3-way switches are wired: 3-Way Switches - Electrical 101

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.

please advice if its clarified?

Before you set Pin 13 HIGH (to switch the relay on), check if A0 is already HIGH.

If it is, then the manual switch must be on... so then don't set Pin 13 HIGH.

This doesn't stop the problem of someone manually switching on after the relay has already switched on.

What problem are you actually trying to solve?

Hi,
What is the application?
Why can't you have both switch and relay contacts operate?
How in your circuit will you measure AC voltage on A0?

Thanks.. Tom... :smiley: :+1: :coffee: :australia: