I have a solid state relay that I'm controlling with this. The default state is off, but it has inputs for both on and off. (the "off" input is meant as an override.)
So my system has three inputs to the relay. A toggle switch, a timer relay, and the arduino. I want the arduino to be in control unless I need to override it with the timer relay. I would also like to override both of those using the toggle switch.
So technically, there are two possible states, but I'm just not lucid enough to describe them appropriately.
"null" is open, but it doesn't override anything, whereas "off" is open and will override.
Is your timer relay really "on/off"? Or is it "on/don't care"? I.e., do you want the SSR to work when either the Arduino or the timer is "on"? Or only when both are 'on"?
It seems like your toggle switch is actually 3-state, not binary: "force on", "force off", and "don't care". Is that the case?
So here's another description of my system now that I'm not all strung out on cold medicine:
I am controlling a solid state relay with three states: off, on, and force off. (kind of a break-before-make-before-break) It's normally off. If you close the "on" circuit, it goes on, but if you close the "on" and "off" circuits, it will go off.
Currently I have the "on" circuit jumpered, and I am controlling the "off" circuit with a SPCO switch.
The idea is that if the switch is open (center), then the relay is closed, if the switch is closed (up), then the relay is open, and if the relay is closed (down), then state is determined by a timer relay.
The timer relay I have is timed SPDT relay, but it kind of has a third state; off. I think perhaps I could put an OR gate on both L1 and L2 to determine whether to delegate to the Arduino.
The Arduino is the low man on the totem pole. If the relay is off and I haven't used the switch, then the Arduino should determine state.
Sorry, I know I'm being clear as mud here. Thanks for your input though!
I am controlling a solid state relay with three states:
That is the bit that still doesn't make sense, can you post a link to the data sheet of the controller you are using.
It depends on how this controller works, current, voltage and so on as to where the pull up and pull down resistors should be placed in the circuit.
But basically there should be a weak pull on the SSR input with a strong pull (in the other direction) on one of the switch poles with the other switch pole going to a driver circuit controlled by the arduino. The centre of the switch going to the SSR.
To do this with Boolean logic, you should define 5 binary inputs:
Switch up
Switch down
Relay NC contact
Relay NO contact
Arduino
Separating out the NO and NC contacts allows for the conditions where the relay isn't powered or the switch is centered: in those cases, both variables will be "0".
Then you can make a truth table to identify the action for all possible states (of which only 18, not 32, will be valid, because the relay and switch each have a "11" state which is theoretically impossible).