[time-nuts] Logging the grid frequency....

Tom Van Baak tvb at LeapSecond.com
Fri Feb 22 23:16:37 UTC 2013


> There is a lot of noise on the line.  I'm not sure if frequency makes sense 
> on a cycle to cycle basis.

Hal, it might make sense since the OP is designing a PLL and wants to get a feel for (short-term) frequency excursions. I would guess the whole point of his experiment is to quantify this; not just say there is "a lot" or "not much" noise over some number N of cycles.

So that's why I posted the ADEV plot, which itself was based on timing every zero-crossing (using a time-stamping counter, not a frequency counter).

> Two suggestions:
>
> With a transformer and a few resistors, you can feed the line into the audio 
> input on a PC.  Then you can search for zero crossings, run it through a 
> filter, feed it to a FFT...
>
> You can also feed the line into a modem control signal on a PC serial port.  
> (USB probably won't work.)  The PPS logic from NTP will count cycles and 
> record a timestamp on the last one.

For those of you using plain old Windows instead of NTP/PPS/Linux I have a DCD pin serial port time-stamping tool which works pretty well (on an idle system) to measure every cycle, 60 lines per second:
    http://leapsecond.com/tools/pctsc.c
    http://leapsecond.com/tools/pctsc.exe
Since the DCD pin is bipolar by design one can connect the secondary of, say, a 6 or 9 or 12 VAC wall transformer directly to pins 1 and 5. Use a 1k resistor if you're paranoid. It works fine with direct COM ports or USB/serial adapters.

/tvb





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