Hi, I would like to develop a AC light dimmer with ESP32. I am trying to use the Led controller pwm, but I need to sync with the zero cross input on falling edge. Can anyone help me telling me how to sync the pwm with input?
Regards
AC light dimmer
Re: AC light dimmer
I've built an AC dimmer using interrupts. One external interrupt get triggered by the zero cross of the mains voltage and from the ISR function I scheduled a pre-configured timer to turn a pin HIGH, so that the activating the triac.
Why are you using pwm with zero cross?
I know that there are some circuits that uses mosfets and pwm as control, and do not require zero cross synchronization... But I never built one of those and particular prefer using triacs.
Why are you using pwm with zero cross?
I know that there are some circuits that uses mosfets and pwm as control, and do not require zero cross synchronization... But I never built one of those and particular prefer using triacs.
-
- Posts: 2
- Joined: Tue Jan 28, 2020 10:35 pm
Re: AC light dimmer
Hello Gardin,
I was trying to make a 60hz pwm sincronized with the zero cross of main voltage. Basically the same you did. I tried to make with interrupt, I could make on Arduino IDE using the attachinterrupt function, but in ESP IDF I could now understand how the interrupt function works, I read the resources but I did not understood...
Is it possible you share with me your code for the dimmer?
Regards,
Jean Grim
Who is online
Users browsing this forum: Bing [Bot] and 127 guests