I'm trying to control an AC motor with an ESP32. Here it is the schematics on https://falstad.com. I've simplified the AC motor coils with 2H coils, maybe I should place a resistor to make it more realistic but I'm not sure if that would change something for this question.
I've found several problems which I don't know how to solve:
The Main Circuit Breaker goes off every once and then (I've even burned some low isolation relays). I'm almost sure this is because of voltage spikes when switching on and off the relays which powers the motor. Playing with falstad it seems that depending on the current phase, the voltage could raise up to some thousands of kV. I've been searching on how to place a snubber, found question here Designing a AC Snubber circuit for 2 hp using AC snubber but I'm not sure on how to place it in this circuit. I'm asking if someone could help me to place it, any example circuit or falstad schematic would be very helpful.
I'm not sure if this circuit is introducing some harmonics/interferences or reactive energy, in this case, how could it be corrected?
The controller is placed inside a garage with some old neon lights. When switching off some of the neon lights, suddenly the motor starts spinning. I'm not sure on what could be done in order to filter the interferences. Also not sure on how to detect them and who is being affected, if it is the relays or the MCU.
EDIT
Schematics:
Layout, this is approximate, as for the prototype I'm wiring with manual soldering with cables: