zero crossing detector?

why did you consider the output current to be 0.02A for 4n25 opto.

From the datasheet on the opto, page 2, with a forward voltage of 1.3V, the forward current is 50mA so 20mA is already a low estimate.

4n25.pdf (125 KB)