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

nuts nuts at lazygranch.com
Fri Dec 19 22:23:24 EST 2014

On Thu, 18 Dec 2014 04:26:22 -0500
Charles Steinmetz <csteinmetz at yandex.com> wrote:

> 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.

I try to minimize dangerous voltages. Anyway, the filtering reduces the
slew, so you can't have it both ways. 

> >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.

If by post processing you are averaging, then you certainly have lost
frequency variation data. Averaging is a filter. 

> 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.

If the event is due to noise, you resolved essentially garbage to a
microsecond. If you average, you have done filtering. I don't see this
as a win-win. 

> Best regards,
> Charles
> _______________________________________________
> time-nuts mailing list -- time-nuts at febo.com
> To unsubscribe, go to
> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts and follow
> the instructions there.

More information about the time-nuts mailing list