[sdiy] measuring pulse width with ns accuracy...
Magnus Danielson
cfmd at swipnet.se
Mon Apr 21 01:32:39 CEST 2003
From: "Bert Schiettecatte" <bert.schiettecatte at esat.kuleuven.ac.be>
Subject: [sdiy] measuring pulse width with ns accuracy...
Date: Mon, 21 Apr 2003 00:36:07 +0200
> hi all,
Dear Bert,
> i'm trying to find a way to measure phase difference between 2 clock signals.
Which frequencies?
> They have a phase difference anywhere between 3ns and 10ns. I thought about
> OR-ing these 2 signals and then using the result to charge a capacitor.
> I could then measure the voltage across the cap. Does anybody here have any
> idea if this will work?
In principal this is pretty darn close to what interpolating reciprocal counters
do, like mine for instance.
The basic reciprocal counter acts on start and stop signals from the analog
front-end. The time between the start and stop events is measured by counting
the number of reference clock cycles from the start event to the stop event.
Gate-time prolongs this period so that averaging occurs, but the reciprocal
counter checks out how many cycles have occured, so for frequency/period
measures proper compensation can be handled.
Now, to get high time precission with a straight counter setup you would go
into insane frequencies eventually. But there are tricks around it, many of them
infact. The winning contender in contemporary counters is analog interpolators.
They will measure the trime from the start/stop event (as received as a signal
edge) to the next reference-frequency edge. This is done by charging a capacitor
with a reference current. Then, the capacitor is discharged with another (much
lower) current. The time for the capacitor to discharge is measured by a
separate counter as a number of clock cycles. By this technique will the
pulse-differance be prolonged and the ratio is the ratio between the load and
discharge currents.
So, this is pretty much what you are thinking about, right?
Now, a neat little trick is to let the charge period be the time differance
between input pulse and reference clock with one additional cycle of the
reference clock. This would put the curicuit working in a octaves range
insteade of many decades of range.
Does this work? Well, my counter has an internal 10 MHz reference clock which is
directly used in all counters. A 200 times pulse-strecher (100-200 clocks being
used) gives about 1 ns single-shot resolution (2 ns advertised in HP catalogue).
At work I have a device which is a little more extreme in that the
pulse-stretcher only do an effective 10 times longer pulses, but the reference
clock there is 500 MHz, so 200 ps resolution is acheived.
People have done stretches into 100 fs or so in commercial devices.
> If yes, are there certain recommendations you could give me concerning what OR
> gate to use (I suppose the one with the shortest propagation delay I can
> find...) and what capacitor type and size?
Well, use one of the tricks that I showed, this doesn't forces you to use
extremely quick curcuits, just curcuits in about the same speed as your
reference clock. Naturally, you don't want a capacitor with any effective
induction in the range of frequencies you are considering. This is also a
strength of the extra-pulse technique, you have a limited frequency range,
where the upward corner is _really_ important. Effectively you let the capacitor
and other curcuits have at least a cycle of the reference clock to settle and
only after this period you actually do your measurement.
So, you want a rather small cap, with low parasitic induction. Also, for
repeatability you probably would consider a fairly stable capacitor.
There are naturally other ways to go about and measure phase differances between
two clock signals. One way is to frequency-convert them by mixing them
individually by a frequency being slightly less than the frequency of the
clock signals. The differance frequencies will have the phase differance
intact, but now at a lower frequency, so a phase measurement of those
frequencies would give the phase differance of the original signals.
Still more methods is at hand, all with their ups and downs. Consult frequency
control literature to learn more... or ask me ;O)
Hmm... one of these days I just *HAVE* to do my own counter-project.
Interpolators and all.
Cheers,
Magnus - slightly nuts about time and frequency
More information about the Synth-diy
mailing list