Chris_P said:Stupid question .... if I use latching relays, how will I determine the previous state with my microcontroller?
Just treat them like switch inputs. On the relay you have the switch common pin, the contact "a" pin and contact "b" pin. Connect the switch common to ground and contact "a" to a uC input pin. Use a pull-up resistor (like 10K) on contact "a" (either external or, if your uC supports it, activate an internal pull-up).
When the switch common is connected to contact "a", your uC input will read 0; when it is connected to contact "b", your uC input will read 1 (pulled-up to Vcc by the resistor).
I would use the latching relay to store the state and have the nozzles controlled by ordinary relays which themselves are controlled by the uC.
Last edited: