# Why is the output frequency of the zero crossing detector (square wave generator) double that of the input signal?

I have built a zero crossing detector that acts as a square wave generator according to the circuit diagram shown.

It is connected to a potential transformer.

The output from the potential transformer is measured to be 6V at 50 Hz.

However, the output from the ZCD is measured to be 100 Hz. How has this frequency doubled?

BTW, when I connect a current transformer to the same ZCD set up, the output from the current transformer is 50 Hz and the output from the ZCD is also 50 Hz.

The IC used for the Op Amp is LM358 and the diodes are 1N4148.

You are violating the common mode voltage range of the input of the LM358 when $$\V_{in}<0\$$: in this case, $$\V_{A_{D_2}}\simeq 0.6\mathrm{V}\$$ thus $$V_{CM}=\frac{V_{i+}+V_{i-}}{2}=\frac{-V_{A_{D_2}}+0}{2}\simeq -0.3\mathrm{V}<0\mathrm{V}$$ This implies, especially in such old design operational amplifiers, that the inputs latches up so, possibly, the non inverting input behaves as an inverting one making the OPAMP output going high.
Said that, the following circuit is an improved version of yours, which should work for your purposes:

simulate this circuit – Schematic created using CircuitLab

For this circuit, the common mode voltage $$\V_{CM}\$$ is $$\\frac{V_+}{2}\$$ thus you should not incur the problem you noticed: also, if you need to have a defined output, whatever high or low, when there is no $$\V_{in}\$$ ,you can add a resistor in parallel to one of the inputs of the OPAMP in order to unbalance the circuit in order to have the desired output.

Sorry, but your circuit is not a ZCS. It is just a bidirectional diode clamp going into a comparator. The LM358 has PNP inputs so it can handle signals at and near below Vee and operates ok.

A ZCS rectifies an input signal or compares a delayed version of the same input so that the output pulses only during input transitions. Both of them. Hence a frequency doubler.

(see what others have written above)

But the answer to your question is that an AC signal of freq N has two zero crossings per cycle so the output will be 2*N

• 'above' doesn't really work in Stack Exchange answers. Right now, yours is at the top of the list. This isn't a forum where posts are shown in date order. – brhans Mar 7 at 12:15