Close

More hardware PD design

A project log for GPS Disciplined xCXO

A DIY GPS disciplined 10 MHz reference clock

nick-sayerNick Sayer 02/26/2016 at 15:240 Comments

I've been working through the details of the hardware phase detector add-on. One part that needs designing is the low-pass filter that converts the variable width pulse into a voltage. Ideally, what you'd like is a linear relationship between the pulse width and output voltage, with 1 µs resulting in exactly 5 volts. In practice, it's not going to be so perfect. The Schottky diode that blocks the cap from discharging once the pulse is over will contribute some voltage drop from the maximum, and the curve is not going to be linear. But that's ok - any granularity increase we get will be a bonus.

Picking values for the cap, charging resistor and discharging resistor are the first step. We want the time constant to be around 500 ns or so. Two time constant periods will charge the cap up to only 86% or so, but going for three time constants will mean the curve is even more logarithmic. We already have a 6800 pF cap in the BOM, so we can use that for the cap. A charging resistor of 100 Ω gives us a time content of 680 ns. Using the 4.096 volt reference in the firmware will still give us 10 bits of resolution over a fairly linear region of the charging curve. We also need to specify the discharging cap. In this case, we want the time constant to be on the order of a few milliseconds. We want it long enough so that the timing of when the pulse is read is not critical, but short enough to insure that by the time the next PPS pulse arrives, the cap is fully bled. 1 MΩ gives us a TC of 6.8 ms, which is close enough.

In the firmware, we will aim to discipline towards an ADC mid-scale value. This will actually represent a completely arbitrary phase shift, but for any given set of components, it should be a constant one, which is the whole point. As presently written (in the absence of actual hardware), we attempt to scale the phase shift into a ±100 point value, which gives two more orders of magnitude (or two significant fractional digits) to our error detector. At 10 MHz, this means that every second we will have a granularity of 1 ppb. That should make for a fairly dramatic improvement to the tau from 10^0 to 10^3. If it works as well as promised, we might attempt to obtain a third order of magnitude, meaning a discrimination granularity of 100 ppt per second. I'm not convinced yet that noise at that level will not dominate the readings, but we'll have to see.

Discussions