I have an RPi 3 B+ hooked up to a 4 channel sainsmart 5v relay, and the relays are hooked up to three 24v DC solenoid valves and one AC 115v compressor.
The relays have their own power supply so they are isolated by the board, and the 24v circuit has a separate power supply.
The AC motor causes some kind of feedback or noise when the relay is switching it on or off which is causing undesirable effects, like buttons and the relay double firing and false signals going to the RPi.
I know that when I had this same / similar issue with the DC solenoids, adding a flyback diode at the solenoid mitigated the problem. Tried that with the AC motor and the diode exploded (learned that you can't use those diodes with AC ).
Is there something I can put in the AC circuit to prevent the feedback similar to a diode in a DC circuit? Also, I would prefer to do it at or near the relays or RPi rather than near the motor if possible.