Author Topic: Measuring sub 2Hz frequency with high accuracy  (Read 5425 times)

0 Members and 1 Guest are viewing this topic.

Offline ricko_ukTopic starter

  • Super Contributor
  • ***
  • Posts: 1158
  • Country: gb
Measuring sub 2Hz frequency with high accuracy
« on: June 05, 2020, 07:40:48 pm »
Hi,
I need to measure a steady 5V square wave frequency between 2 and 5 Hz with the precision of at least 2 decimal points, better if 3.

1) I tried using the digital oscilloscope Rigol MSO1104 but unless the whole signal fits in the display it does not measure it and if I set the scope's timescale to fit the whole period in the display then the accuracy is not there. Any suggestion to doing such measurement with a scope?

2) I tried using a frequency counter part of a Rigol DG1032Z but despite the waveform being very clean for some reason the reading keeps moving around by a lot (sometimes even several Hz) despite having tried various settings. Any suggestion why that is and what settings to do such measurement?

3) any other suggestions?

Many thanks
« Last Edit: June 07, 2020, 07:41:59 pm by ricko_uk »
 

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 4034
  • Country: us
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #1 on: June 05, 2020, 07:52:03 pm »
What settings have you tried?  I haven't used the frequency counter on the Rigol generator but according to the manual it can be DC or AC coupled and AC is default.  Make sure you are DC coupled.
 
The following users thanked this post: ricko_uk

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 2183
  • Country: is
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #2 on: June 05, 2020, 08:36:00 pm »
One way slow signals were counted was measuring a PLL that
was running 10 or 100 times the base frequency and measuring
PLL frequency. Not very stable unless the input is stable. Another way
was gating the counter for 10 seconds or more also not good as
it averages the signal over time. The best way I found was to set
the counter up in more of a 'timer' fashion and gate the counter
from the signal you want to measure and have the counter counting
a fast signal like 10khz or 100khz that way you measure your
frequency as a time interval of 100us or 10us or even 1us steps
and then do the reciprocal calculation to get frequency with
resolution two or three digits to the right of the decimal. The
square wave is in your favor because the gate circuit will be
less effected by noise and decision point on the slope.
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 
The following users thanked this post: ricko_uk

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 9003
  • Country: us
  • Retired, now restoring antique test equipment
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #3 on: June 05, 2020, 08:39:32 pm »
Most “universal” digital counters have a “period averaging” mode, where it times 10 or 100 cycles.  Some will compute the frequency from that period.
 
The following users thanked this post: ricko_uk

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #4 on: June 05, 2020, 08:50:02 pm »
I need to measure a steady 5V square wave frequency between 2 and 5 Hz with the precision of at least 2 decimal points, better if 3.
1) I tried using the digital oscilloscope Rigol MSO1104

I'd say trigger off one edge of the square wave with the trigger X position in the center of the screen, then keep moving the trigger position until the next edge is in the screen center, the period is then the X position off-set, ..or something.
.  That took much longer than I thought it would.
 
The following users thanked this post: ricko_uk

Offline magic

  • Super Contributor
  • ***
  • Posts: 7454
  • Country: pl
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #5 on: June 05, 2020, 09:04:57 pm »
3) any other suggestions?
Record with a soundcard and analyze ;)
This is below audio bandwidth so it likely won't be captured faithfully, but nevertheless there will be distinct peaks where the edges are.

If you are worried about accuracy, calibrate the soundcard by measuring some higher frequency which can be verified by other gear. But I think it will be good for two or three digits.
 
The following users thanked this post: ricko_uk

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 28429
  • Country: nl
    • NCT Developments
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #6 on: June 05, 2020, 09:31:11 pm »
This shouldn't be hard with a decent time interval / frequency counter. You require 200us of time resolution for your measurment.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 
The following users thanked this post: ricko_uk

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #7 on: June 05, 2020, 09:47:42 pm »
What you need is a counter that does reciprocal counting, it's much better for providing reasonable resolution when measuring low frequencies without absurdly long gate times. You could also hack together something with something like an Arduino or other micro of your choice and measure the period and from that calculate the frequency. The accuracy is determined by the accuracy of the reference clock on which you are basing your measurements.
 
The following users thanked this post: ricko_uk

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2331
  • Country: 00
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #8 on: June 05, 2020, 10:12:24 pm »
This is very easy to make with any microprocessor including Arduino, Using timers,  Your accuracy will be similar to the crystal used( if you really wanna accuracy use a GPS disciplined oscillator as a processor cook).
 
The following users thanked this post: ricko_uk

Offline trobbins

  • Frequent Contributor
  • **
  • Posts: 826
  • Country: au
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #9 on: June 05, 2020, 10:47:48 pm »
I'd concur with magic, as my USB soundcard interface and REW software will display down to 2Hz in RTA display, and will calculate the frequency of the fundamental.

I also have a HP3325A frequency synth that has crystal locked frequency generation, so could use an X-Y scope to display synchronous operation.
 
The following users thanked this post: ricko_uk

Offline max_torque

  • Super Contributor
  • ***
  • Posts: 1327
  • Country: gb
    • bitdynamics
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #10 on: June 06, 2020, 01:35:37 pm »
The answer depends on how quickly / often you need to know the frequency?

If you can afford to measure lots of pulses, and wait a while, then you can simply calculate the time for say 1000 pulses, by counting say the rising edges, and using a stopwatch.   Your edge count has a max error of 1 (either an edge has happened or it hasn't) and even a hand held stop watch is good to around 1 sec resolution (mainly the  latency  in the wetware jelly (<<  you!) pressing the stop button)

At a true 2.000000 Hz 1000 pulses takes 500 seconds, so you pulse counting worstcase error is 1/1000 and your time counting 1/500.  So the longer you time for, the better your resolution!

Of course, this tells you nothing about jitter and repeatability, just about the average frequency over the counting time period
 
The following users thanked this post: ricko_uk

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6420
  • Country: de
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #11 on: June 06, 2020, 04:52:34 pm »
Universal frequency counters always have a "Period" function. That's the one to use.

 
The following users thanked this post: ricko_uk

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #12 on: June 06, 2020, 06:35:43 pm »
If the reading is unstable, it indicates noise - including phase noise.  An unsteady frequency won't give steady readings.
 
The following users thanked this post: ricko_uk

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4315
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #13 on: June 06, 2020, 06:49:18 pm »
1) I tried using the digital oscilloscope Rigol MSO1104 but unless the whole signal fits in the display it does not measure it and if I set the scope's timescale to fit the whole period in the display then the accuracy is not there. Any suggestion to doing such measurement with a scope?

The built in measurements on a scope are quick and easy to use but are never the right way to measure time as accurately as possible.

The way to measure the period of a wave with a scope is to start by capturing a single period using as much of the scope's horizontal memory as possible. Zoom in on one edge and position a cursor, then zoom out, scroll to the other edge, then zoom in on that one and position the other cursor as accurately as you can. The distance between the two cursors is your answer.

If your scope won't let you capture, freeze and zoom in this way, then the other option is to trigger one one edge but move the trigger point one whole cycle off to the left of the screen, then measure the time between the trigger event and the next rising edge. Any scope should let you zoom right in on the second edge so you can position a cursor accurately. This is also the way to measure cycle to cycle jitter.
 
The following users thanked this post: ricko_uk

Offline mino-fm

  • Regular Contributor
  • *
  • Posts: 152
  • Country: de
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #14 on: June 07, 2020, 08:40:54 am »
Using a reciprocal counter it is no problem to get 5-6 digits resolution. Accuracy can be the same, if a calibrated quarz or TCXO is used.
Are you able to programm AVR8 devices like ATtiny4313, ATmega48, ...?

Here you can find examples in C for AVR and even for Arduino Uno (Fmeter_UNOR3.ino) or Bascom (fm48_bas): http://www.mino-elektronik.de/fmeter/fm_software.htm
Examples for ATtiny44 or ATtiny45/85 with 4-digit LCD are shown here: http://www.mino-elektronik.de/7-Segment-Variationen/LCD.htm
« Last Edit: June 07, 2020, 08:51:04 am by mino-fm »
 
The following users thanked this post: coromonadalix, ricko_uk

Offline ricko_ukTopic starter

  • Super Contributor
  • ***
  • Posts: 1158
  • Country: gb
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #15 on: June 07, 2020, 02:02:37 pm »
Thank you all for the suggestions, all very interesting and useful!! :)
 

Offline bdunham7

  • Super Contributor
  • ***
  • Posts: 8178
  • Country: us
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #16 on: June 07, 2020, 02:57:38 pm »
To use your scope, slow it down so that there is at least one period on the screen and use cursors to measure the time from one edge to the next.  If your Rigol is like my old one, there are two different frequency counters--have you found and tried them both?

I'm not familiar with your frequency counter, but even my ancient HP 5316B correctly reads a 2 Hz square wave (I just tried it) to 7 or 8 decimal places with no special settings. 

Just for fun I plugged in my joke-quality FeelTech 6900 and it promptly read the frequency correctly, as shown.  You have to increase the gate time to 100s to see two decimal places, but if you just look at the cycle time of 4.99994 million nS (FeelTech wants you to be able to move decimal points in your head...) you can infer the Hz quite accurately and quickly.

I've no idea why, but Rigol probably owes you an apology.  Any reasonable device should handle this without any problem.
EDIT:  Check and see if the Rigol counter has a HF Reject option and try it if it does. 
« Last Edit: June 07, 2020, 03:17:26 pm by bdunham7 »
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Offline ricko_ukTopic starter

  • Super Contributor
  • ***
  • Posts: 1158
  • Country: gb
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #17 on: June 07, 2020, 03:50:17 pm »
Thank you bdunham7,
I just checked me Rigol MSO1104z and if the frequency is lower than 15Hz it just shows "< 15Hz". I assume because the internal counter overruns/rolls-over...
 

Offline bdunham7

  • Super Contributor
  • ***
  • Posts: 8178
  • Country: us
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #18 on: June 07, 2020, 04:31:22 pm »
Thank you bdunham7,
I just checked me Rigol MSO1104z and if the frequency is lower than 15Hz it just shows "< 15Hz". I assume because the internal counter overruns/rolls-over...

The hardware counter on scopes is typically a simple gated counter, no frills.  There should also be a frequency entry under 'measurements'.  Set your trigger to DC coupled, HF reject (or noise reject) ON and timescale to 100ms (for 2 Hz) or whatever gives you 2 to 4 complete cycles on the screen.  Make sure it triggers reliably on the rising edge of the square and looks stable on the screen.  Then find Frequency and Period in your measurements menu and turn them on--you should get a two-decimal readout on each.  Not super accurate or precise, but good enough for most things.
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Offline ricko_ukTopic starter

  • Super Contributor
  • ***
  • Posts: 1158
  • Country: gb
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #19 on: June 07, 2020, 05:10:34 pm »
Thank you bdunham7 :)

I just checked the manual and I think that's by design. Have a look at page 145 of the manual: https://www.batronix.com/pdf/Rigol/UserGuide/MSO1000Z_DS1000Z_UserGuide_EN.pdf
 

Offline bdunham7

  • Super Contributor
  • ***
  • Posts: 8178
  • Country: us
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #20 on: June 07, 2020, 05:22:38 pm »
OK, that's the hardware counter.  Scroll up to 6-25 and 6-26.  If the waveform is displayed on the screen, the measurement parameters 1 and 2 should give you what you want.  Did that work?
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Offline ricko_ukTopic starter

  • Super Contributor
  • ***
  • Posts: 1158
  • Country: gb
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #21 on: June 07, 2020, 05:36:32 pm »
yes I just tried it and as soon as I increase the frequency above 15Hz not only it shows the correct period value but it does so with four decimal points. But as soon as it goes below 15Hz it suddenly changes the value to "<15Hz"
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 12280
  • Country: us
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #22 on: June 07, 2020, 05:55:17 pm »
Old HP5328A attached to a GPS.  The GPS runs 24/7 and is the reference for my lab.   Note, there are two more ranges, if needed.   

Offline bdunham7

  • Super Contributor
  • ***
  • Posts: 8178
  • Country: us
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #23 on: June 07, 2020, 06:42:32 pm »
yes I just tried it and as soon as I increase the frequency above 15Hz not only it shows the correct period value but it does so with four decimal points. But as soon as it goes below 15Hz it suddenly changes the value to "<15Hz"

This is in the measurements menu?  Can you post a picture of how your screen looks?  If that scope can't do this measurement then Rigol owes you another apology.

The photo is my ancient dinosaur Tek 2221.

A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 
The following users thanked this post: ricko_uk

Offline ricko_ukTopic starter

  • Super Contributor
  • ***
  • Posts: 1158
  • Country: gb
Re: Measuring sub 2Hz frequency with high accuracy
« Reply #24 on: June 07, 2020, 06:47:32 pm »
Thank you bdunham7,

it does measure it if I put the entire waveform on the screen but as per my oy original post then the resolution is very low. I needed to measure it with a high precision (as high as possible, ideally 4 or more decimal digits).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf