I'm working on a greenhouse automation project. I got two water solenoid valves connected to a standard 2xRelay board with optocouplers to control them. I need some help on how to solve it electronically so that the Relays turns off automatically (failsafe) if the python program crashes or the RPi hangs for some reason. The relays are active low and I can turn them on and off with python but if i exit the program with ctrl-c for example the relays are still on.
Is there a way to make a failsafe electronically?
Just running the python program in a bash-script with an extra "turn off" script after the solenoid script is not ideal and might not work all the time. And I'd like to keep using the relays if possible because I like the optocouplers and runring the solenoids on a separate power supply. I got a lot of sensors, both analog and digital that might not work so good with the 3A solenoids turning on and off.
Any ideas?
Thanks in advance!
