Tell us about yourself!
This is probably one of the most fun and well documented theory, circuit and software project. In mine, I am using an esp8266, so I had to really spend lot's of time to figure out the interrupt handling on esp8266. My goal is to build a homekit (aka Siri) dimmer! and now I am integrating both software parts of that project and will publish a gist. Big Thanks to the OP. My circuit is a temporary prototype where I am trying to squeeze as much as possible in small area. Nothing will heat up as I will be driving at most 40W worth of LEDs and using a 1W resistor and a LittleFuse for protection.
Given you are using an esp32, I am wondering if you are using interrupts for both zero crossing check and the timer, do that and make sure nothing else is running on the esp32 to isolate issues. I used the same circuit w some minor modifs and I can dim two different 7W LED dimmable lamps successfully with no flicker, but they buzz slightly at certain levels which is expected w this circuit and LEDs.If you get an issue with incandescent, then definitely check your circuit. There are clearance rules when having AC and DC circuitry, and lot's of bad things can happen if you don't respect that. Post a pic of your PCB. GL and be safe :-)
Low Power Door/window Sensor
The Only Knot You Need to Know.
AC PWM Dimmer for Arduino
Multichannel Wireless Light Dimmer
Arduino Controlled Light Dimmer