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

Tim Shoppa tshoppa at gmail.com
Fri Dec 19 07:45:34 EST 2014

Historically the problem with "grass" causing double counts has been dealt
with by having a one shot that disables retriggering for almost a whole
cycle. This is pretty much every line powered digital clock from the 70's.

If you set the one shot to be for 9.5 cycles then you just invented a whole
class of frequency dividers as illustrated in a couple chapters of the MIT
Rad Lab books. "Phantasmotron" is what I recall but google produces nothing
useful from that.

You can further enhance stability in grass by low-pass filtering and
detecting slope as a precondition. Then the circuit looks a lot like an
oscilloscope trigger and timebase. indeed certain brands of scope had truly
ecexcellent triggers while others that had similar specs were crap.

If you super duper want to lock to a noisy line you just dust off the "lock
in amplifier". Seems like overkill because these are traditionally used
when the signal is much smaller than the noise.

Tim N3QE

On Thursday, December 18, 2014, Charles Steinmetz <csteinmetz at yandex.com
<javascript:_e(%7B%7D,'cvml','csteinmetz at yandex.com');>> wrote:

> Hal wrote:
>  What sort of interference do you see?
> There is a general "grass" on the entire waveform.  At our location, the
> tops of the sine wave are clipped off (as the power is delivered).  See
> attached image (the orange trace is the AC we receive from the grid; cyan
> is the distortion residual from a distortion analyzer -- there are rich
> harmonics out to the 20th or so within -50dB of the fundamental).  The
> image is not properly scaled to show the high-frequency "grass."
>  What does an interesting transient event look like?
> It all depends.  They are not all that fast (unless your house feed gets
> struck by lightning, in which case "what does it look like in the data
> collection" is the least of your worries), and usually comparable in
> amplitude to the power signal +/- 10dB (again, unless there is a very close
> lightning strike), so they generate extra zero crossings spaced anywhere
> from low mS to tens of mS.
>  If you are going to post-process the data anyway, why not collect raw data
>> and let the post-processing take care of the local interference?  That
>> lets
>> you defer decisions about the appropriate filtering.
> There is enough high-frequency "grass" to reduce the precision of your
> zero crossing determinations.  Since there is no useful information on grid
> behavior at these frequencies, it is better to remove it to improve your
> zero-cross precision.  You can do a lot with post-processing, but you can't
> fix EVERYTHING in the mix.  You have to start with the best data collection
> you can get, which in this case means filtering out the low-amplitude stuff
> above 1kHz or so.
>  Is there any database of events that I can check when I see something
>> interesting?  Or turn things around and pick an event and see what it
>> looks
>> like when it gets here?
> Not that I'm aware of.  (But as I noted previously, I'm not personally a
> grid-nut).
> Best regards,
> Charles

More information about the time-nuts mailing list