can I replace a 3-way switch with an input?

my apologies first, this is my first time writing on a forum

I'll try to make this long story short...
Greenhouse run by arduino mega...

Water valves are controlled by arduino via various soil moisture sensors...
I have built a very complicated "Switch Box" with 3-way switches to provide manual over-ride for all valves ("ON"-"OFF"-"Arduino Control"), for use during maintenance.

Recently I discovered using IR remote controls to manage relays.

My question, "Can I use IR inputs to provide same function as my 3-way switches?"

3 way switches are not unusual when you also want manual control over an appliance. Like for instance, a light with a PIR sensor which sometimes you want always on, or sometimes always off even if most of the time you want it to come on automatically. Or the water valves that you have described.
If you fully trust the Arduino to control these valves, you could have the switch controlling the Arduino (automatic / manual on / manual off) instead of directly controlling the valves.

I expect others will let you know all about IR control, its sounds quiet reasonable to do it that way.

However, you clearly have some coding experience so why not do it in a more modern way than IR and use your mobile to control things ?

It would allow you to get condition reports and send control replies when out of range of IR , even further by SMS

There are free App creators, eg AppInventor etc, that is quiet easy to do simple on /off control, and a lot more.
Plenty of web and Ytube tutorials around

6v6gt
The valves are currently controlling my relays, not the valves directly...

up - ON
center - OFF
down - Arduino Control

ricky
my coding experience is very limited, my program is pieces and parts of many programs all conglomerated into one abyss of a mess....(I am actually a little ashamed of it's disarray)

not using IR for sensors, I want IR to "interrupt" the program with inputs from IR

eg. turn off zone 8 (while I repair plumbing) while other zones continue to function normally, or, say, turn zone 4 "on until I turn it off" because I think it needs a bit more water.

greenhouse1234:
My question, "Can I use IR inputs to provide same function as my 3-way switches?"

You should consider that question in two stages

First, can your Arduino take the place of the 3-way switches
Second, can the IR send a command to the Arduino that lets it know to change the switch.

I suspect the answer to both questions is YES.

When you break it up like this you can try out both parts separately - which will be much simpler.

...R

greenhouse1234:
6v6gt
The valves are currently controlling my relays, not the valves directly...

up - ON
center - OFF
down - Arduino Control
. . .

OK. The water valves are controlled with relays. What controls the relays ? The 3 way switch ?
Maybe a schematic would be good. Even hand drawn, and snapshot attached to this thread is enough.

sorry, had only a very simple program for this, hope it works out...

It really helps to see wiring schematics.

FYI
NEC remotes:
http://forum.arduino.cc/index.php?topic=317625.0

@6v6gt
You are into different valves?

greenhouse1234:
sorry, had only a very simple program for this, hope it works out...

The relay looks a bit bare. Have you only shown the wires to the coil ? Or is the "switch" really the relay contacts ?

LarryD:
@6v6gt
You are into different valves?

That is a lovely picture. An octal beam tetrode. I think I'll use that as my Avatar, that is if I can find out how to upload it.
Yes. As I have explained to someone else here, it was an important component of my first 'big' electronics project and probably cost a few weeks pocket money then.

Edit your profile, then on Upload New Photo.

2016-03-04_13-21-37.png

well this drawing stuff is painful...hopefully this will make more sense
keep in mind that the switch positions have no coordination with conductors on back of switch

If I turn the switch UP, the valve is open, and the plants get watered till I flip the switch
If the switch is in the center, the valve is closed.
If the switch is DOWN, the valve is controlled by the relay

This allows me to turn on, or off any "zone" as I please, and the rest of the zones keep running the course of the program...

my goal is to use IR remote to do the same thing, without the switches, currently the remote works on the relays, but it is only a temporary change, as soon as the program loops back to "read sensors">"adjust relays accordingly", the change by the remote is then void in about a second

Image from Reply #12 so we don't have to download it. See Image Guide

...R

Can't you get the Arduino to behave like your manual switch without changing any of the wiring or switches ?

Just send a command to the Arduino to turn on the valve and another command to turn it off and a third command to let the Arduino follow its routine.

Then you can still override things manually if required.

...R

I suggested an idea here for a different project, didn't hear back. Needs some simple code to work.

any ideas how on this could work?

well, at this point, the switch-box stays...The switchbox seems to me excessive, but, at this point I gotta go with what works....thanks for all the help...

greenhouse1234:
well, at this point, the switch-box stays...The switchbox seems to me excessive, but, at this point I gotta go with what works....thanks for all the help...

Did you read Reply #14?

Maybe you missed it because it is at the bottom of a page.

...R

Robin2:
Maybe you missed it because it is at the bottom of a page.

He may have. I wouldn't as I have long ago set my page length more sensibly. :roll_eyes: