[time-nuts] Simple AC mains zero-cross detector

Charles Steinmetz csteinmetz at yandex.com
Thu Dec 18 04:26:22 EST 2014


Gary <nuts at lazygranch.com> wrote:

>Why not use a lower voltage transformer, preferably not at a lethal
>voltage. You only need a couple of volts to drive the rest of the
>circuit.

As you can see from the schematic, the voltage is diode-clamped 
almost immediately to ~ +/- 1.5v.  The reason for using a 120v 
winding is to take advantage of the free slope enhancement provided 
by the higher voltage.  The 120v winding provides a signal with a 
zero-cross slew rate of ~65mV/uS.  A 12v winding would slew only 
~6.5mV/uS.  The faster the slew rate, the more accurately one can 
locate the zero crossings.

>If you are going to look at glitches, that should be done by sampling
>the AC (transformer coupled obviously). Basically the circuit to detect
>period is dedicated to that function. Since the frequency won't vary
>significantly, a high order filter wouldn't be an issue, as long as
>you don't care about delay.

You are suggesting two separate data collections, one geared toward 
grid frequency and one geared toward glitch detection.  That's fine, 
and might be preferable if it provided better results than using just 
one data collection.  But using a higher-order hardware filter does 
not provide better frequency determination than post-processing the ZCD data.

The circuit presented allows one data collection to do both functions 
well.  It has enough filtering to prevent local interference from 
corrupting the data, it can locate 60Hz zero crossings to within 1uS 
(i.e., frequency resolution significantly better than 0.01 Hz, 
single-shot, which can be filtered/averaged to get whatever 
resolution you want in post-processing), and it can locate transient 
events to within 1uS.  Win-win.

Best regards,

Charles





More information about the time-nuts mailing list