[time-nuts] 60Hz zero-crossing

Tom Van Baak tvb at LeapSecond.com
Sun Jul 3 15:57:45 UTC 2011


> BUT, before you get carried away, here is a worthwhile article to read about a
> descrete circuit.  The important thing is to read his description about how the
> circuit works and why he chose this particular circuit layout.  It is quite
> interesting !
> 
> http://www.dextrel.net/diyzerocrosser.htm
> 
> Bill....WB6BNQ

Hi Bill,

One quick note before I leave.

Thanks for that link too. Had not seen that one before. Nicely done.

If one were making a hardware-only clock and needed reliable 60 Hz
timing pulses that circuit looks to be a good one.

But there's a story here and since the topic of zero-crossing detectors
and time interval or frequency counters comes up often, let me explain.

The goal of this 60 Hz party is to accurately count cycles; to compare
"power line time" against UTC and watch it gain and lose over time.
And hopefully all watch with delight when it goes off the chart during
the July test. An engineering goal would be to never miss or double
count a cycle.

At first this sounds a bit bold. I mean, there's lots of noise on the power
line. Sometimes horrible spikes and all that. Surely, at some point a
cheap counting circuit is going to be confused. And if you want 100%
perfect data, perhaps you need fancy signal conditioning and clever
circuits? It turns out the answer is no.

The reason is 60 Hz power is a CW signal and the frequency is quite
constant, especially over a few seconds. You know the cycles are all
about 16 ms apart. It cannot suddenly speed up or slow down over a
few cycles or seconds.

The nice thing about using a time-stamp detector (such as a PC with
serial port) is that you are totally immune from count errors. In other
words no external hardware is required; no signal conditioning.

The reason is simple. If in software you see that two time-stamps are
about 16 ms apart then you know there are no missing or extra pulses.
If you get two counts within 16 ms you can throw one away. If you
see 32 ms between pulses you add the missing pulse back. And thus
with a few lines of software you solve the signal conditioning problem.
The mental model here is a comb.

Another approach is using a software PLL to track 60 Hz. But from
what I've seen so far the data is already so clean that this isn't needed.

As Hal observed even one extra pulse a day is easily spotted in the
raw data, and can be eliminated.

Anyway, guys, have fun. I will be on vacation and letting PIC's, PC's,
and security webcams do my logging for me. It will be interesting to
see what happens with the TEC experiment in mid-July. Remember
to get your +/- signs right. Sub-millisecond or cycle accurate counts
should be possible. And if everyone uses MJD time-stamps then it
will be easy to inter-compare data.

/tvb





More information about the Time-nuts_lists.febo.com mailing list