I'm trying to drive a bunch of motorized ball valves from an ESP32.
These valves have a 230V AC motor with one common wire, and two wires to set direction (open/close). When powered between common and red, it closes ; when powered between common and blue, it opens. They use very little power, just a few watts, but being AC motors, they're inductive.
There are two limit switches inside the motor assembly to turn it off once it has reached the desired position.
It didn't work with relays, so I wired up a triac instead, using a simple static relay schematic, with a MOC3020 and a BTA08-700 triac I had available. It's a snubberless triac, so I didn't use a snubber.
This works fine, and without EMI from relay contacts arcing, I'm no longer having problems with the ESP32 rebooting.
However, I'm worried about the limit switch:
When the micro stops driving the MOC3020, the triac will stay on until current drops to zero, which means no problems with the inductive motor.
However, I want to run the motor until the valve is open and the limit switch opens. In this case, when the switch opens, it will bounce and arc. At some point the triac should turn off, but I'm not sure all the energy in the inductance will have been dissipated by then. I'm worried this will cause a spike that will exceed the triac's maximum voltage.
So, should I put a MOV or other protection component across the load, or across the triac, to catch this spike? I could also put a MOV or snubber across the motor inside the valve assembly, because currently there are none.