Hi, rave

@ 50 Hz ... 0...180° equals 0 ... 10 ms ...

just delay the gate supply from 0 to 10 ms ... after detecting mains zero cross.

NOW

I think a guy called Steve Monfette wrote something about that in the MeLabs Example programs ...

So, ... http://www.melabs.com/

Alain