Close

PWM

A project log for Air Gesture AC Dimmer/Switch

A Touchless Gesture Mains AC Dimming Switch

johnnyJohnny 03/16/2015 at 06:030 Comments

PWM now tested and trailing-edge looks good. Leading-edge is also achievable by inverting the PWM signal :). That premature trigger (glitch) you see is due to the zero-crossing pulse being centered (not starting) at the zero-cross, therefore the rising edge of the pulse happens just before the zero-cross. This can be corrected by adding a small delay after the rising edge of the pulse in software, to know real position.

Discussions