zero crossing detector?

@Runaway Pancake,
I understand your circuit , but not to nit pick but shouldn't the opto led be the diode next to the transistor with the reverse polarity diode being to the left of it instead of the other way around as you have drawn it ? (I am of course assuming that one of the two diodes , namely the one with the cathode connected pointing downward is the led opto)