High resolution frequency measurement with an oscilloscope (Rigol DS1104z) - Page 1
Forum section: electronics / testgear

author: alexwhittemore
author_rank: Frequent Contributor
timestamp: July 02, 2014, 11:52:30 pm
content: I've got some interesting equipment here including a 4-decade KV divider and a good ol' analog function generator with a voltage control input (primarily useful for modulation).Well, I was thinking, here I've got this effectively super high-res pot, so I could have pretty high resolution control over the actual output frequency. Of course, given that there's no precision component of the system (the knob on the generator is low accuracy and not really calibrated or anything, the power supply to the KV divider isn't precisely known, and it wouldn't matter anyway since the VCF input is 0-10V, 1-1000x the dial setting).So now I'm thinking it'd be neat if I could use an oscilloscope to precisely measure output frequency to dial it in. In theory, with 24Mpt memory, it SHOULD be possible to capture, say, those 24Mpts over one cycle of the output and measure frequency with high precision, but it seems on the Rigol I can't position cursors any wider than 1 window apart, I can't zoom back and forth through the capture.Any thoughts on how to make this kind of a measurement? Besides the obvious, "buy a high precision frequency counter" - the point of the question is an oscilloscope measurement riddle.

author: Vgkid
author_rank: Super Contributor
timestamp: July 03, 2014, 12:11:09 am
content: Looking at a couple wavetek units, the vcf ability does not give great frequency accuracy for those inputs, less than 1%.

author: alexwhittemore
author_rank: Frequent Contributor
timestamp: July 03, 2014, 01:26:18 am
content: Absolute accuracy of the VCF input is pretty much irrelevant. Like I said, on my generator 0-10V corresponds to a 1-1000x multiplier of the dial reading, where the dial reading is highly inaccurate.The point is getting a high resolution frequency measurement on the scope.

author: w2aew
author_rank: Super Contributor
timestamp: July 03, 2014, 03:07:18 am
content: Quote from: alexwhittemore on July 03, 2014, 01:26:18 amAs you're already aware, a scope is not the best tool to make high resolution frequency measurements. There are scopes that allow you to precisely position cursors in separate zoom windows, but apparently yours isn't one of them.That being said, maybe the automated frequency measurement can show average results, which will improve the resolution and reduce the random noise variation in the measurement.

author: alexwhittemore
author_rank: Frequent Contributor
timestamp: July 03, 2014, 03:41:56 am
content: Quote from: w2aew on July 03, 2014, 03:07:18 amI guess that's kind of what I'm getting at. Given a huge memory depth, it seems like one should pretty easily be able to do one or both of the following: A) use the highest sample rate possible to capture one cycle, then measure the peaks of that cycle with cursors, giving effectively 1/(samplerate) second accuracy in the timing measurement. B) you could sample for say 1 full second and count the number of peaks or edges across that span, effectively averaging any jitter across that full sample.Of course, both of those have different sources of error and thus different measurement precisions given the type of signal. For example, for a 100Mhz signal the latter will be quite precise (to 1 hz), but the former will be very inaccurate (without interpolation, there are only 10 samples across that cycle). But between either of them, you should be able to get very good precision and/or accuracy if you select one appropriately.I suppose at the end of the day, you could implement both of them with the scope connected to a PC and some python data processing. But you know, lots of effort. Maybe a cool add-on tool for relatively low-cost but PC connected scopes though.

author: VK5RC
author_rank: Unknown
timestamp: July 03, 2014, 04:30:08 am
content: I don't know the Rigol, but most Oscilloscopes time bases are pretty rough, 1 part in 10 5 lucky at best, once digitised incorrectly you can't recorrect (easily) unless you record with a known reference.

author: alexwhittemore
author_rank: Frequent Contributor
timestamp: July 03, 2014, 05:32:18 am
content: From the datasheet for this one, time base accuracy is 25ppm. Definitely good enough to do better than the 3 digits of precision the auto measurement shows.

author: jpb
author_rank: Super Contributor
timestamp: July 03, 2014, 10:59:51 am
content: My scope (WaveJet 334) has a pretty accurate timebase as scopes go, and it has both a hardware counter and the normal software option.Comparing the two the hardware one is within about 2ppm (for a GPS 1pps it reads 999.998 mHz) but the software one is much less accurate. The software one gets better with averaging and real time sampling. So your idea of using the large memory and post processing will probably give much better results than the normal 3 digit output which is probably based on just one wavelength.So if you capture a large number of wave lengths and average (i.e. get the time difference for say a 1000 wavelengths) you'll do better than the scopes own output.

author: tld
author_rank: Regular Contributor
timestamp: July 03, 2014, 01:31:05 pm
content: A bit more work perhaps, but what about grabbing the raw waveform, exporting to a PC, and analysing it there?tld

author: dannyf
author_rank: Super Contributor
timestamp: July 03, 2014, 01:45:32 pm
content: It is very easy to use a dual trace scope to compare two oscillators, down to 0.1Hz: trigger one one oscillator output and adjust the frequency of the other until it stops moving relative to the first oscillator's waveform.In this case, your divider box can be used to generate a voltage that alters your signal generator's output.The downside of this approach is that you have to have two oscillators, and you can only measure at one frequency point.

author: Orange
author_rank: Frequent Contributor
timestamp: July 03, 2014, 01:46:41 pm
content: Quote from: alexwhittemore on July 02, 2014, 11:52:30 pmWhy don't you use the hardware counter of the DS1104Z, it gives you 6 digits of resolution.

author: alexwhittemore
author_rank: Frequent Contributor
timestamp: July 03, 2014, 04:47:29 pm
content: Quote from: tld on July 03, 2014, 01:31:05 pmDiscussed above. Definitely an option for making the most of the temporal sample resolution and timebase accuracy, if a bit more effort than I think it should be.Quote from: dannyf on July 03, 2014, 01:45:32 pmOf course, this technique lets you very precisely COMPARE two oscillators. Consider that you have two voltage sources and a low-ish precision multimeter, maybe 4kct. you can KNOW the value of either source pretty inaccurately, but you can adjust them using a null configuration to within one least significant bit on the lowest range of your meter, which might be quite small indeed. That's basically what you're suggesting for the scope.Of course, that's interesting in its own right, considering that you tend to have a number of pretty high accuracy oscillators hanging around in the form of clock crystals for various dev boards. But it's not really the question at hand.Quote from: Orange on July 03, 2014, 01:46:41 pmThat is certainly on-par with what you could hope for given a 25ppm timebase accuracy. The DS1104z has a hardware counter? Where?!

author: alexwhittemore
author_rank: Frequent Contributor
timestamp: July 03, 2014, 04:56:18 pm
content: Ahh. Measurement menu > counter. Duh.

author: GeorgeOfTheJungle
author_rank: Super Contributor
timestamp: July 03, 2014, 05:01:51 pm
content: Quote from: Orange on July 03, 2014, 01:46:41 pmIs it a hardware counter really? I ask because mine always reads *** unless there's an entire wave on screen, I took it means it infers ƒ from on screen data?

author: alexwhittemore
author_rank: Frequent Contributor
timestamp: July 03, 2014, 05:28:07 pm
content: Quote from: GeorgeOfTheJungle on July 03, 2014, 05:01:51 pmThis is the same thing I was thinking. The frequency measurement you get by clicking "freq" in the LEFT HAND menu that's always there is a software counter that requires one full cycle on screen and only displays 3 digits. If you click the "measure" button and then "counter," you get the high-res hardware frequency counter that isn't dependent on screen display.