[...]
The new one uses simple divide-by-four circuits to provide in-phase and quadrature of the 10MHz input signals (now at 2.5MHz). These are fed into simple XOR gates and RC lowpass filtered. You get two triangle waveforms at 90° phase shift, these are input to an AD7793 high-resolution ADC. Do the math and get the frequency difference.
The new unit has three inputs, one reference and two frequencies that are compared to the reference. So I can monitor two devices vs. a third one at the same time (hopefully saving a few of these 24h debug sessions ).
Great results and project in general
To me it sounds like it is related to a Dual Mixer Time Difference DMTD?
Where the two signals to be measured are mixed with an offset oscillator and the resulting waveforms LPF'd and compared by a counter?
With your contraption they are mixed each with the reference as well? but as I and Q components and the output digitized,
but you have no amplitude difference (it's all square anyway?) so only phase information is what is relevant and used?
Thanks!
I've read some papers about the DMTD (before and while I built the first one).
Anyway, the first one (100MHz PLL) isn't a DMTD, I've had some ideas on my own that I wanted to test:
One 100MHz PLL is offset by a slightly variable 125Hz signal, the other one is just 10x the input frequency. Then it's mixed down to a 125Hz beat frequency. Within the uC, there's another I/Q mixer that mixes the 125Hz beat frequency down to DC. Its output drives a control loop that keeps the phase constant (e.g. Q is alway zero) by varying the 125Hz signal frequency. As a result, the 125Hz offset signal frequency minus 125Hz equals 10 times the frequency difference of the inputs. The problem is the not-so-good 125Hz subtraction stage (by an I/Q mixer) to offset the first 100MHz PLL, it produces quite an amount of noise.
Next iteration will use DMTD principles.
The new one directly compares the input frequencies by mixing them down to DC (all digital). Each input is fed into an divide-by-four circuit with I/Q output. Two XOR gates do the mixing part (one input I / Q, other input I only), after RC filtering in a triangle wave proportional to the phase difference of the input signals. ADC and software measure du/dt of the mixed down signal and calculate frequency difference. Theoretically one needs only the I (or Q) part, but the triangle isn't very linear at the ends (near GND / VCC), so software automatically switches between them, and by having both signals one can derive the sign of the difference. Amplitude is "1" by definition.