I am trying to design a circuit that allows an ESP32 module to control an AC output. I basically want to dim the output by cutting off part of each phase. I have a circuit that feeds the signal back to the MCU to detect zero crossings. I have verified this is working and I'm generating interrupts based on this input to the MCU. I also have a timer that is running and I count so many ticks of this timer before turning on the TRIAC output. The output gets turned back off at zero crossing event.
Here is my circuit:
Here is my circuit: