Hi all I have written the coding to detect zero cross over, it does this by using a square wave derived from a 60 V ac input. If anyone could point me in the way of a suitable circuit to output this square wave. I have a few circuits, but there wasn't a nice clean square wave outputted. Thanks Andy B