This is a circuit widely used in power controls. When the alternating supply voltage goes through zero, a clock is generated for a thyristor, as shown in the figure. In the same figure we show how to implement this circuit using an LM339 type comparator. The presented circuit uses a simple power supply. With sinusoidal signals, the circuit will generate a positive pulse of short duration in its passage through zero.
