I currently have an ESP8266/ESP32 that is connected to a 40A SSR. that SSR switches a 120v load that goes to a heating element.
I have a requirement to be able to control how much power goes to that element. Currently I have a loop in the software that will run every 500ms. if the power is 50%, it will be on 250ms and off 250ms. if the power is 25%, on 125ms, off 375ms. this causes a bit of a surge that I dont like. I have looked at SCRs and Triacs to clip the sine wave, but those take variable resistors or potentometers to control. I would like to control on a GPIO pin of an MCU, specifically the ESP32. I can either replace the SSR with something more fitting, or add a circuit to my prototype that will control that SSR.