I had a problem with AC voltage spikes using an opto-isolated relay and used a MOV to clear things up, the EMI gets through the relay to the board even with the isolated relay.
Heres the post if you want to look, maybe this might be your problem.
relay isolation problems - General Electronics - Arduino Forum
I have to agree. I think snubbing is my best bet but just looking for recommendations at this point. I don't wanna spend money on a part that isn't "fit" for the values my circuit will be using.
P.S. Nice post! I actually grabbed some links from your OP from that thread. Had some very descriptive information that will defiantly help going forward.
The relays are made for mains power (100-240volt).
Specs of the actual relay state an absolute minimum of 75volt AC.
There are three versions of the relay. Some already have buildin snubbering.
Yes, agreed, the relay board isn't "rated" for that amount of low voltage but I was unable to find a relay board for that low of voltage while staying within the same similar design and solid state. So kinda hoping that isn't the issue.
I suspect several things. I agree with Wawa that the relays are not rated for 24vac. This may be causing slow turn-on since the triac gate current is obtained from the supply voltage. This can make turning an inductive load on very problematic.
Unless you can verify turn-on with a scope (don't do it unless you understand the danger and the need for additional isolation), I would try using electromechanical relays for the 24vac voltage switching (with subbers across the contacts).
The other unknown is what your wiring looks like. If you wire things anything even close to the horrible way Fritzing draws schematics, you could be creating yet more grief for yourself with series connected GND points without regard to the current in those wires. Ideally, there should be one common ground point with all common GND's coming to that point in a star fashion, not wires that go in series from point to point to point.
Lastly, your LCD contrast pot is shown incorrectly. The correct pot wiring is in voltage divider mode to place a variable voltage on the V0 pin. The way the schematic shows it, it can take your +5 supply from the Mega to ground when rotated to one end. VDD only goes to the pots CW end, it is shown connected to both the CW end and the wiper.
I wish I had access to a scope. (Long story short, the company I work for doesn't see it as a "priority" to invest in. So I have to tackle issues like this blindly. My wiring isn't the best by any means, but I've kept it as clean as I can. I have all my grounds attached to the ground rail of my breadboard which I think is "ok"? correct me if i'm wrong. Then from the ground rail to the arduino, so the ground rail acts as my common point. Again if this is bad practice please do let me know.
The pot is most likely just an issue in the diagram. It is tested and working properly the way its wired, with the adjustment screw controlling the brightness of the LCD. So I'll be fixing this on the schematic very soon.
---- Continuing discussion ----
What would be better for fast acting switching? MOV's or a RC snubber? The loads are switching very fast so speed is very important. The load is a 24VAC solenoid, and pulls 1.3 amps when switched ON.
Looking at DigiKey for MOVs and ratings. I found these two: MOV1 MOV2
The main difference between the two is the "Energy" rating. Can someone please explain this?