[time-nuts] quick and very dirty phase comparator
bruce.griffiths at xtra.co.nz
Sun Jun 1 19:30:09 EDT 2008
Kasper Pedersen wrote:
> This is to poke my head in, and to share a simple multichannel
> phase comparator/monitor that turned out to be useful.
> I have a few homebuilt boxes that will do ~100ps timestamps,
> I have other uses for them, and tying them up with a single
> long term experiment is unacceptable. So I needed a phase
> comparator that I could rebuild in an hour if I wanted to,
> something in the spirit of TVB's PIC16 divider.
> Something simple.
> The idea is this:
> Beat a number of 10MHz inputs against another clock frequency
> using the input flipflops in a microcontroller as samplers,
> sample a number of times to cover the phase circle, and
> calculate the phase. Beating against 11.0592MHz gives a period
> of 3456 clocks, sampling every 8 clocks gives 432 samples, that
> should give 230ps resolution. Add clock jitter and aperture
> jitter, and precision should be around 500ps.
> How much performance can one get for $10?
> schematic: http://n1.taur.dk/timenuts/phasecomp8.pdf
> samples: http://n1.taur.dk/timenuts/phasesamples.png
> When comparing a 10MHz source with itself through
> a cable delay, the peak noise is 400ps. That's for a
> 300-microsecond acquisition time, which means the
> update rate is limited by how fast I can compute the
> vector and shovel data over to a PC. When monitoring
> beating 10MHz sources with an adjusted (-3ppm)
> microcontroller clock, it's about 600ps peak.
> When misadjusted to be -30 ppm off, it's 1.1ns peak.
> At the moment there is only a crude windows program for
> turning the output into decimal plottable data, so some
> programming skill or beer drinking friend with programming
> skill is required, as well as knowledge of what one wants to
> measure (that's usually the hard part).
> source, hex: http://n1.taur.dk/timenuts/phasecomp.zip
> converter: http://n1.taur.dk/timenuts/phasehex2dec_win.zip
> I'm aware that 600ps is a very large figure in a lot of
> cases but for my oscillators it's good enough.
> /Kasper Pedersen.
Another option is to add a 10MHz gated delay line oscillator which
could be phase shifted (as in a 5370A) by the PPS output of a GPS receiver.
The leading edge of the PPS pulse could then be timestamped with
subnanosecond resolution using this technique.
More information about the time-nuts