Frequency counter resolution - Page 1
Forum section: electronics / general

author: grumpydoc
author_rank: Super Contributor
timestamp: July 08, 2012, 08:36:14 pm
content: So, just putting the finishing touches to the latest repair project - a Racal Dana 1998 1300Mhz frequency counter. No photos of this one I'm afraid - partly because I forgot to take any "pre" photos and partly because there's already been adetailed teardownof a 1992 universal counter timer on the forum. The 1998 is very similar apart from the front panel and firmware.I think this one is ex MOD, probably Navy because it looks as though it has been used on board ship, or at any rate a damp and possibly salty environment - heavily corroded around the transformer and back of the PCB but fairly easily rescued with a good clean and resoldering a few joints.Anyway, I was testing it and all seemed well. It has the 04E high stability oscillator which is nice and without touching the calibration it's accurate to about 5 parts in 108- sadly my GPS disciplined oscillator has died so full calibration will have to wait. I'll check it against my FE-5680A when I get chance.However- and the real reason behind the post, at 1kHz there was a lot of difference between successive readings - initially I thought it was a fault but tried two signal generators and also a 1991 counter-timer that I picked up at the same time. All four combinations yielded the same result - the last three or four digits were effectively random.But then I started thinking about it. How do frequency counters produce 8, 9 or 10 digit resolution at frequencies of 1kHz or so? Or any frequency for that matter?I know there are two basic techniques . First the traditional count the input signal for a fixed period. Well, count 1kHz for 1 second and you've got a resolution of 1Hz or 1 in 103, to get 9 digit resolution would require a gate time of 1x106seconds - personally I'd rather not wait 11 and a half days for the frequency counter to produce a result.Alternatively count timebase pulses - the 1998 has a 10MHz reference. That's 1x104pulses per period of the input signal. Great, we've gone from three to four digits :-/I can see that counting multiple input signal periods can be used, so you could get 7 digit resolution by counting 1000 cycles of the input signal with a 1 second gate time - but the 1998 will display 9 digits at a 1s gate time - I don't understand where the extra resolution comes from.Maybe a modern FPGA based design could multiply the reference clock up to a GHz to get that sort of resolution but this is a late 1980's design ( the 1991 I have was built in...... 1991 and the 1998 was built in 1994) so I doubt it's taking that approach.How does it come up with 8 or 9 digit resolution for a 1kHz input?

author: pickle9000
author_rank: Super Contributor
timestamp: July 08, 2012, 08:39:57 pm
content: Does it have a 1 / 0.1 gate speed switch?...mike

author: tekfan
author_rank: Frequent Contributor
timestamp: July 08, 2012, 08:46:56 pm
content: This should explain how high resolution at low frequency is achieved:http://www.best-microcontroller-projects.com/article-frequency-counter.html

author: grumpydoc
author_rank: Super Contributor
timestamp: July 08, 2012, 08:56:22 pm
content: QuoteIt has several gate times/resolutions but the resolution always seems higher than it should be for the gate time.QuoteYes, I described that but I don't see how you'd achieve the resolution that the counter is displaying.I suppose that if you just calculate the reciprocal to 9 digits and display it +/- 1 or two counts of the timebase pulses would cause the least significant three or four digits to change quite a bit - thatcouldbe what's happening. In which case you might as well not have a 10 digit display.....

author: Unknown
author_rank: Unknown
timestamp: July 08, 2012, 09:22:29 pm
content: Reciprocal counting with a 10 MHz reference frequency gives you 7 digits of resolution per second of gate time. If the input frequency is not an integer multiple of the reference frequency, then there will be a small time lag between the last trigger from the reference signal and the last trigger from the input signal. Racal has a Timing Error Circuit (TEC) that measures this time lag and uses it to gain two extra digits of resolution. You may be able to find more details on this if you can find a patent for this technique.

author: w2aew
author_rank: Super Contributor
timestamp: July 08, 2012, 09:24:57 pm
content: Some counters use a reciprocal counting method. They'll count the number of internal clock cycles inside a period of the input signal. In many cases, the 'partial' bits at either end are measured by starting controlled current source into a fixed capacitor at the trigger points (start of signal, start of each clock pulse), and then stop the charge current at the next trigger point (start of next cycle, start of next clock). The voltage across the capacitor is directly proportional to the amount of time between the trigger points. The two partial clock periods (one at the beginning and one at the end) are added to the clock period counter. The voltage achieved during a full clock cycle is used as a calibration to measure the partial periods at the edges of the input signal.

author: grumpydoc
author_rank: Super Contributor
timestamp: July 08, 2012, 09:47:16 pm
content: QuoteQuoteOK, thanks - that sounds interesting. The very brief mention of this technique in the service manual (no real detail) makes a bit of sense now.The first 6 or 7 digits are stable, it's the last three which change significantly from reading to reading - does that suggest there could be a fault in this measurement?That said I presume this is all handled in the Racal custom chip or in the firmware so I'm not sure how it could fail if the counters otherwise work and for two to fail in the same way also seems a bit of a stretch.I'll review the schematic & have a look if there are any discreet components involved in the measurement.

author: Unknown
author_rank: Unknown
timestamp: July 08, 2012, 10:13:21 pm
content: I believe the TEC is in a dedicated ASIC, no idea what the failure rate of this part is. Does it do the same when you feed it a signal from its own 10MHz reference output? Are you sure it's not jitter in your signal generator? I wouldn't expect the frequency from a basic RC oscillator (as found in many analog function/pulse/sinewave generators) to be stable down to the 1 ppm.

author: Rufus
author_rank: Super Contributor
timestamp: July 08, 2012, 11:07:01 pm
content: Quote from: grumpydoc on July 08, 2012, 08:36:14 pmMeasuring what at 1kHz?Consider a 1kHz sine wave of some amplitude and the voltage slew rate as it passes through the counter trigger level. A tiny amount of noise or uncertainty in trigger threshold detection results in a lot of digits of jitter when you have an effective 1GHz clock from the interpolation thing the Racals have.Try measuring a square wave and see how/if the jitter changes.That said I have a 1992 and it does seem to have this problem worse than other counters, perhaps the trigger circuit is a bit noisy. Also other counters tend to have gate time controls accumulating over a varying number of input cycles which divides the threshold uncertainty by the number of cycles. The 1992 seems to use the minimum gate time required to achieve the set resolution.

author: grumpydoc
author_rank: Super Contributor
timestamp: July 09, 2012, 07:30:33 am
content: QuoteNo, that reads 10MHz exactly to whatever precision is selected. External signals in the 10-100MHz range produce stable readings as well.QuoteI've considered this, neither source is a simple RC oscillator though. I have an OR-X 660 50MHz AWG - that has a 10MHz TXCO reference and the 2nd sig gen is a Marconi 2022 which has an ovened reference. In the case of the Marconi the measurements were done at 10KHz as that is the lowest frequency it will generate. Output from either gives stable readings at 10MHz (and 100MHz for the Marconi) but it's certainly possible that at 1 or 10kHz there could be timing jitter.QuoteTrigger jitter is certainly also possible. I've measured sine from the Marconi, sine and square from the OR-X - perhaps a slight improvement with square but it doesn't make the problem just vanish. Rise time from the OR-X is 4-5ns when producing square wave output.One thing it isn't is the oscillator in the 1998 warming up - it takes about 20-30 minutes for it to settle down and I've allowed for this before taking measurements. It's obvious when the warm-up is taking place as the readings change continuously but always in the same direction. Then there's a bit of overshoot and the readings change in the opposite direction before settling down.QuoteAh, that's interesting - almost certainly not a fault if a totally unrelated 1992 shows the same behaviour. Perhaps just something to be aware of with these counters.

author: Rufus
author_rank: Super Contributor
timestamp: July 09, 2012, 12:49:55 pm
content: Quote from: grumpydoc on July 09, 2012, 07:30:33 amActually I just checked and it is a 1991. With it set to show 5 decimal places of Hz at 1kHz I feed a 1v pk-pk sine ware and it shows around 500 digits of jitter. 1v pk-pk square wave from the same generator shows about 50 digits of jitter (it is an arb so the square wave will have some jitter, not sure on the rise time). 1v pk-pk pulse from the same generator shows 1 digit of jitter. Pulse from the generator isn't arb-derived so it doesn't have much jitter and it has controlled rise/fall times of about 5ns.When I set the pulse rise/fall time to 20us the counter shows about 40 digits of jitter.

author: grumpydoc
author_rank: Super Contributor
timestamp: July 09, 2012, 09:43:28 pm
content: I was thinking how to check this - one idea I hit upon was to hook the 1991 and 1998 to the same signal (1kHz square from the OR-X) and observe the correlation (or not) between the changes in the two readings. The idea being that if the jitter were in the input signal both counters would show similar reading to reading deltas, even if slight differences in the timebase oscillators made the absolute readings differ a little.I videoed half a minute or so to play back in slow motion so I could actually jot down the readings.Here is the result. Both counters were set to 10 digit resolution (ie 1kHz would display as 1000.000000Hz) and just the last four digits are shown1991 Delta 1998 Delta9899 98439887 -12 0038 +959890 +3 9861 -1779801 -89 9953 +929889 +88 0043 +909893 +4 0032 -119800 -93 9948 -849901 +101 0071 +1230005 +104 0035 -369989 -16 0052 +179999 +10 0065 +139910 -89 0054 -119916 +6 9958 -969796 -120 9859 -999913 +117 0053 +1949921 +8 9968 -850019 +98 9863 -1059984 -35 9966 +1039917 -67 9976 +109916 -1 9966 -100019 +103 9965 -19925 -94 0098 +1339910 -15 0069 -299931 +21 9976 -93Ideally the display updates would be simultaneous - I'd got them about the same by eye but the video showed that the 1998 was updating about 100ms after the 1991.I don't really see a close correlation between the deltas which makes me doubt that the jitter is in the input signal. Having said that we're talking about an 0.2ppm change reading to reading which isn't large. Sine vs square wave showed more variation in the sine wave - perhaps up to 500 counts between successive readings. Like Rufus using the pulse output on the generator I could get the variation down to single figures. Slowing the input signal to 10Hz gives very large deltas between readings.I'm not quite sure if I've proved it but it looks like trigger jitter is the culprit. I might connect both counters to a single 10MHz reference and repeat the exercise.Thoughts?