Re: [time-nuts] Frequency counter questions

2017-06-10 Thread Magnus Danielson

Hi,

Many modern counters use this trick too, but much more gift-wrapped, in 
that they themselves shift their oscillator to measure the shift and 
hence figure out which overtone is being used and hence derive the 
correct frequency. With HP5245 etc you had to do a little work on your 
own for post-processing. The same basic trick is also fundamental to 
frequency comb measurement of optical frequencies.


Heterodyning remains one of several approaches to design high frequency 
counters.


Cheers,
Magnus


On 06/08/2017 02:35 PM, Scott McGrath wrote:

The heterodyne trick has been done before the first
'Modern' frequency counter the HP 5245 used plug ins to extend its range to 18 
Ghz by doing exactly that.   The plug in contained a tunable LO  mixer and 
indicator to show tuning lock

These were a pain to use but they beat the 'frequency meters' by a mile

Content by Scott
Typos by Siri


On Apr 26, 2017, at 2:52 PM, al wolfe  wrote:

such

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-06-08 Thread John Franke
And there was the HP 540 and the HP 2590B... I still use a HP 2590B for 
frequency measurement and in conjunction with a HP 851B display as a spectrum 
analyzer.


John WA4WDL

> 
> On June 8, 2017 at 8:35 AM Scott McGrath  wrote:
> 
> The heterodyne trick has been done before the first
> 'Modern' frequency counter the HP 5245 used plug ins to extend its range 
> to 18 Ghz by doing exactly that. The plug in contained a tunable LO mixer and 
> indicator to show tuning lock
> 
> These were a pain to use but they beat the 'frequency meters' by a mile
> 
> Content by Scott
> Typos by Siri
> 
> > > 
> > On Apr 26, 2017, at 2:52 PM, al wolfe  wrote:
> > 
> > such
> > 
> > ___
> > time-nuts mailing list -- time-nuts@febo.com
> > To unsubscribe, go to 
> > https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> > and follow the instructions there.
> > 
> > > 
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-06-08 Thread Bob kb8tq
Hi

The heterodyne approach dates back at least into the 1930’s in general lab use. 
I’m
sure it dates well before that on an experimental basis. The LM and BC-221 
frequency
meters are good examples of it’s use. Adding an “error multiplier” to the setup 
could
give you a very impressive resolution. Accuracy (or course) still deepened on 
what 
you had as a standard driving the error multiplier. 

Bob


> On Jun 8, 2017, at 8:35 AM, Scott McGrath  wrote:
> 
> The heterodyne trick has been done before the first 
> 'Modern' frequency counter the HP 5245 used plug ins to extend its range to 
> 18 Ghz by doing exactly that.   The plug in contained a tunable LO  mixer and 
> indicator to show tuning lock
> 
> These were a pain to use but they beat the 'frequency meters' by a mile 
> 
> Content by Scott
> Typos by Siri
> 
>> On Apr 26, 2017, at 2:52 PM, al wolfe  wrote:
>> 
>> such
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-06-08 Thread Scott McGrath
The heterodyne trick has been done before the first 
'Modern' frequency counter the HP 5245 used plug ins to extend its range to 18 
Ghz by doing exactly that.   The plug in contained a tunable LO  mixer and 
indicator to show tuning lock

These were a pain to use but they beat the 'frequency meters' by a mile 

Content by Scott
Typos by Siri

> On Apr 26, 2017, at 2:52 PM, al wolfe  wrote:
> 
> such
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-27 Thread Bob kb8tq
Hi

Single mixer into a computing counter was the way this stuff was done for a
*lot* of years. The sort of resolution you needed a fancy counter for back in 
1969 is well within the F7 board’s capabilities. What you get for resolution
is often less of an issue than the accuracy of the readings. (= you can get a 
lot 
of digits ).  We certainly did ADEV work into the parts in 10^-13 range (one 
second tau)  
with single mixer systems for a lot of years. No fancy (today) state of the art 
limiters involved …Cheap setups to run thousands of oscillators through. 

Bob

> On Apr 26, 2017, at 7:10 PM, Bert Kehren via time-nuts  
> wrote:
> 
> We do it and get at 1 sec 1 E-13 resolution and 1 E-12 accuracy for the  
> work we do. 
> Bert Kehren
> 
> 
> In a message dated 4/26/2017 3:00:54 P.M. Eastern Daylight Time,  
> alw.k...@gmail.com writes:
> 
> I am  surprised that no one has mentioned the idea of heterodyning a
> known  frequency with the unknown to measure the unknown. I use a
> Minicircuits  doubly balanced mixer fed on one port from a PTS160
> synthesizer that is  locked to 10 mhz. from a TrueTime xl-ak GPS locked
> receiver. The second  port is fed by the unknown though an attenuator.
> The third port of the  mixer gives me the sum and difference. If the
> difference is an audio note  then a cheep but frequency locked counter
> will read out the difference or  measure the period of the beat note
> which can be added to the frequency of  the synthesizer. A program such
> as Lady Heather can also be used to  determine the audio frequency to
> much less then sub-cycle accuracy. The  only fly in the ointment is
> figuring out which side of the unknown the  synthesizer is set to.
> 
> Alternatively, the PTS160 with 0.1 cycle control  can be set to nearly
> zero beat with the unknown. Then watching either  lissajous or dual
> trace scope patterns and timing the beat notes one can  get the unknown
> frequency very close.
> 
> Al, retired, mostly
> AKA  k9si
> ___
> time-nuts mailing  list -- time-nuts@febo.com
> To unsubscribe, go to  
> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the  instructions there.
> 
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-27 Thread Bert Kehren via time-nuts
We do it and get at 1 sec 1 E-13 resolution and 1 E-12 accuracy for the  
work we do. 
Bert Kehren
 
 
In a message dated 4/26/2017 3:00:54 P.M. Eastern Daylight Time,  
alw.k...@gmail.com writes:

I am  surprised that no one has mentioned the idea of heterodyning a
known  frequency with the unknown to measure the unknown. I use a
Minicircuits  doubly balanced mixer fed on one port from a PTS160
synthesizer that is  locked to 10 mhz. from a TrueTime xl-ak GPS locked
receiver. The second  port is fed by the unknown though an attenuator.
The third port of the  mixer gives me the sum and difference. If the
difference is an audio note  then a cheep but frequency locked counter
will read out the difference or  measure the period of the beat note
which can be added to the frequency of  the synthesizer. A program such
as Lady Heather can also be used to  determine the audio frequency to
much less then sub-cycle accuracy. The  only fly in the ointment is
figuring out which side of the unknown the  synthesizer is set to.

Alternatively, the PTS160 with 0.1 cycle control  can be set to nearly
zero beat with the unknown. Then watching either  lissajous or dual
trace scope patterns and timing the beat notes one can  get the unknown
frequency very close.

Al, retired, mostly
AKA  k9si
___
time-nuts mailing  list -- time-nuts@febo.com
To unsubscribe, go to  
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the  instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-26 Thread jerry


I can measure to .001hz using my scope.  I thought I mentioned that the other 
day?  It depends on frequency and how much time you want to wait, I think the 
low frequencies take a lot longer to stabilize.




Sent via the Samsung Galaxy Note® Edge, an AT 4G LTE smartphone

 Original message 
From: Bruce Griffiths <bruce.griffi...@xtra.co.nz> 
Date: 4/26/2017  2:19 PM  (GMT-08:00) 
To: Discussion of precise time and frequency measurement <time-nuts@febo.com>, 
al wolfe <alw.k...@gmail.com> 
Subject: Re: [time-nuts] Frequency counter questions 

Use a USB or LSB mixer, it only requires a few more parts and a little 
ingenuity.

Bruce

> 
> On 27 April 2017 at 06:52 al wolfe <alw.k...@gmail.com> wrote:
> 
> I am surprised that no one has mentioned the idea of heterodyning a
> known frequency with the unknown to measure the unknown. I use a
> Minicircuits doubly balanced mixer fed on one port from a PTS160
> synthesizer that is locked to 10 mhz. from a TrueTime xl-ak GPS locked
> receiver. The second port is fed by the unknown though an attenuator.
> The third port of the mixer gives me the sum and difference. If the
> difference is an audio note then a cheep but frequency locked counter
> will read out the difference or measure the period of the beat note
> which can be added to the frequency of the synthesizer. A program such
> as Lady Heather can also be used to determine the audio frequency to
> much less then sub-cycle accuracy. The only fly in the ointment is
> figuring out which side of the unknown the synthesizer is set to.
> 
> Alternatively, the PTS160 with 0.1 cycle control can be set to nearly
> zero beat with the unknown. Then watching either lissajous or dual
> trace scope patterns and timing the beat notes one can get the unknown
> frequency very close.
> 
> Al, retired, mostly
> AKA k9si
> 
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to 
>https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
> 
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-26 Thread Bruce Griffiths
Use a USB or LSB mixer, it only requires a few more parts and a little 
ingenuity.

Bruce

> 
> On 27 April 2017 at 06:52 al wolfe  wrote:
> 
> I am surprised that no one has mentioned the idea of heterodyning a
> known frequency with the unknown to measure the unknown. I use a
> Minicircuits doubly balanced mixer fed on one port from a PTS160
> synthesizer that is locked to 10 mhz. from a TrueTime xl-ak GPS locked
> receiver. The second port is fed by the unknown though an attenuator.
> The third port of the mixer gives me the sum and difference. If the
> difference is an audio note then a cheep but frequency locked counter
> will read out the difference or measure the period of the beat note
> which can be added to the frequency of the synthesizer. A program such
> as Lady Heather can also be used to determine the audio frequency to
> much less then sub-cycle accuracy. The only fly in the ointment is
> figuring out which side of the unknown the synthesizer is set to.
> 
> Alternatively, the PTS160 with 0.1 cycle control can be set to nearly
> zero beat with the unknown. Then watching either lissajous or dual
> trace scope patterns and timing the beat notes one can get the unknown
> frequency very close.
> 
> Al, retired, mostly
> AKA k9si
> 
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to 
> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
> 
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-26 Thread al wolfe
I am surprised that no one has mentioned the idea of heterodyning a
known frequency with the unknown to measure the unknown. I use a
Minicircuits doubly balanced mixer fed on one port from a PTS160
synthesizer that is locked to 10 mhz. from a TrueTime xl-ak GPS locked
receiver. The second port is fed by the unknown though an attenuator.
The third port of the mixer gives me the sum and difference. If the
difference is an audio note then a cheep but frequency locked counter
will read out the difference or measure the period of the beat note
which can be added to the frequency of the synthesizer. A program such
as Lady Heather can also be used to determine the audio frequency to
much less then sub-cycle accuracy. The only fly in the ointment is
figuring out which side of the unknown the synthesizer is set to.

Alternatively, the PTS160 with 0.1 cycle control can be set to nearly
zero beat with the unknown. Then watching either lissajous or dual
trace scope patterns and timing the beat notes one can get the unknown
frequency very close.

Al, retired, mostly
AKA k9si
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-26 Thread David
High end frequency counters usually go to some effort to prevent
synchronization between the input signal and the gate.  Some DSOs do
as well.  Synchronization can exasperate certain errors and
asynchronous operation provides better results when many measurements
are averaged.

On Tue, 25 Apr 2017 21:29:11 -0700, you wrote:

>Do typical  frequency counters start their gate in phase with the incoming 
>signal?  I guess the 
>answer would be, "It depends."  I was just thinking about how I would program 
>the STM32F7 
>counter I am designing.
>
>btw, Gilbert, a local time-nut, sold me a 5335 today so I will be able to 
>buiild one great one 
>out of the two I will have.
>
>Jerry
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-26 Thread Jerry Hancock
I don’t know what I was thinking when I asked this question as we don’t control 
the gate timing in a referenced counter.


> On Apr 26, 2017, at 3:59 AM, Bob kb8tq  wrote:
> 
> Hi
> 
>> On Apr 26, 2017, at 12:29 AM, Jerry Hancock  wrote:
>> 
>> Do typical  frequency counters start their gate in phase with the incoming 
>> signal?  I guess the 
>> answer would be, "It depends."  I was just thinking about how I would 
>> program the STM32F7 
>> counter I am designing.
> 
> Since they don’t start (or stop) the gate in any specific relation to the 
> input signal, the trick is to
> make sure you don’t get an extra count when the gate opens or closes. This is 
> right back to the
> edge triggered vs level triggered issue. It also gets indirectly into the 
> rechecking process in the
> MCU. Some of the “edge trigger” stuff is done in odd ways ….(= got two of the 
> same after rechecking
> into a shift register …).
> 
> Bob
> 
> 
>> 
>> btw, Gilbert, a local time-nut, sold me a 5335 today so I will be able to 
>> buiild one great one 
>> out of the two I will have.
>> 
>> Jerry
>> ___
>> time-nuts mailing list -- time-nuts@febo.com
>> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
>> and follow the instructions there.
> 
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-26 Thread Bob kb8tq
Hi


> On Apr 26, 2017, at 2:31 AM, Mark Sims  wrote:
> 
> If your frequencies of interest can be divided down to to the 1PPS range,  
> the TAPR TICC makes for an excellent frequency counter.  The TADD-2 Mini 
> divider handles 1/2.5/5/10 Mhz or with a PIC chip swap 1/5/10/15 MHz.  The 
> TICC has around 100 ps of jitter so you can get 1E-10 resolution at 1 
> second... the TICC noise  floor at 1000 seconds is less than 1E-13.
> 
> I used the TICC to adjust my 5065A and FTS-4060 cesium C-fields.  Referenced 
> to a 5071A, the results are better than 0.2 Hz (the spec'd limit of the 
> devices).
> 
> Attached is a plot of the FTS-4060 using a 5071A as the reference.  Over a 
> 1000 second interval the average frequency is off 0.02 Hz.  

This gets one off into the area of “how do I build a 9/10/11/12 digit a second 
counter?”.  As everybody has guessed by now,
that’s the project I would do rather than a straight counter. TICC, F7, a dirt 
cheap FPGA card ….

Bob


> 
> Ignore the yellow debug output in the plot...  I'm currently working on how 
> to scale and plot the new MTIE (Maximum Time Interval Error) data that 
> Heather can now 
> calculate.___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-26 Thread Bob kb8tq
Hi

> On Apr 26, 2017, at 12:29 AM, Jerry Hancock  wrote:
> 
> Do typical  frequency counters start their gate in phase with the incoming 
> signal?  I guess the 
> answer would be, "It depends."  I was just thinking about how I would program 
> the STM32F7 
> counter I am designing.

Since they don’t start (or stop) the gate in any specific relation to the input 
signal, the trick is to
make sure you don’t get an extra count when the gate opens or closes. This is 
right back to the
edge triggered vs level triggered issue. It also gets indirectly into the 
rechecking process in the
MCU. Some of the “edge trigger” stuff is done in odd ways ….(= got two of the 
same after rechecking
into a shift register …).

Bob


> 
> btw, Gilbert, a local time-nut, sold me a 5335 today so I will be able to 
> buiild one great one 
> out of the two I will have.
> 
> Jerry
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-26 Thread Magnus Danielson

Hi,

On 04/26/2017 06:29 AM, Jerry Hancock wrote:

Do typical  frequency counters start their gate in phase with the incoming 
signal?  I guess the
answer would be, "It depends."  I was just thinking about how I would program 
the STM32F7
counter I am designing.


No. The start of the gate arms the "start" event where you time-stamp 
the start event. The end of the gate arms the "stop" event. Variation 
can be that you start counting the gate time and arm it with a start 
event. Typically the internal gate time is counted in the coarse clock, 
so the time-resolution as given by interpolators always guarantee that 
the wished gate-time and actual gate time is never really the same. 
Rather, gate time is a guidance value but you then measure the actual 
length, and neither start or stop is on the same edge.



btw, Gilbert, a local time-nut, sold me a 5335 today so I will be able to 
buiild one great one
out of the two I will have.


Not a bad first counter. It still does some tricks that none of my other 
counters do, and I kind of have a bunch of them by now.


Cheers,
Magnus
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


[time-nuts] Frequency counter questions

2017-04-26 Thread Mark Sims
If your frequencies of interest can be divided down to to the 1PPS range,  the 
TAPR TICC makes for an excellent frequency counter.  The TADD-2 Mini divider 
handles 1/2.5/5/10 Mhz or with a PIC chip swap 1/5/10/15 MHz.  The TICC has 
around 100 ps of jitter so you can get 1E-10 resolution at 1 second... the TICC 
noise  floor at 1000 seconds is less than 1E-13.

I used the TICC to adjust my 5065A and FTS-4060 cesium C-fields.  Referenced to 
a 5071A, the results are better than 0.2 Hz (the spec'd limit of the 
devices).

Attached is a plot of the FTS-4060 using a 5071A as the reference.  Over a 1000 
second interval the average frequency is off 0.02 Hz.  

Ignore the yellow debug output in the plot...  I'm currently working on how to 
scale and plot the new MTIE (Maximum Time Interval Error) data that Heather can 
now calculate.___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Re: [time-nuts] Frequency counter questions

2017-04-25 Thread Jerry Hancock
Do typical  frequency counters start their gate in phase with the incoming 
signal?  I guess the 
answer would be, "It depends."  I was just thinking about how I would program 
the STM32F7 
counter I am designing.

btw, Gilbert, a local time-nut, sold me a 5335 today so I will be able to 
buiild one great one 
out of the two I will have.

Jerry
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-25 Thread Bob kb8tq
Hi

Keep in mind the previously stated limitation - Your GPSDO is only just
so accurate. If you *could* read 0.001 Hz on a 100 MHz signal in a second, 
the GPSDO would not be anywhere near good enough as a reference. Keeping
track of that sort of stuff is one reason a lot of companies train you very 
early
in converting everything to PPM / PPB / PPT rather than talking about Hz. It’s 
a lot easier to note that 1 ppt is past what a GPSDO will do at 1 second than 
listing out all the various fractional Hz / MHz signals that are at the limit. 

——

The main weak point on the 5335 is the input circuit. With the attenuator set
to 0 db, you can fry it with a 5V signal. Back when it was new and 5V TTL 
was all over the place, it was a major risk. Today it’s less of a risk, but 
still 
worth being aware of. An accidental connection to +12 is also a good way 
to nuke it ….With the attenuator set as you normally would for a 5V or 12V 
signal there really isn’t much risk. 

Bob

> On Apr 25, 2017, at 2:41 PM, Jerry Hancock  wrote:
> 
> So the STM App note An-4776 teaches how to use an external clock and it looks 
> pretty accurate in implementation.  I’ve read thru the code and it looks easy 
> to implement.  Now I just need to bring another signal in and count it.  I’ll 
> be working on some code this afternoon to implement the method. 
> 
> I also found a 5335 for cheap and ordered it.  It was listed on eBay as being 
> in “excellent” condition though both pictures had all the lights lit so I can 
> only assume it is stuck in power on reset or test.  I’ll see when it gets 
> here.
> 
> As far as measurement techniques, if I use my scope and sync to a known 
> signal using the trigger on my 3336, it looks like I can measure to .001hz 
> pretty reliably.  So using the STM application, the 5335 and the scope + 
> 3336, I should be off and running.
> 
> I’ll report back in a few days.
> 
> Jerry
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-25 Thread Jerry Hancock
So the STM App note An-4776 teaches how to use an external clock and it looks 
pretty accurate in implementation.  I’ve read thru the code and it looks easy 
to implement.  Now I just need to bring another signal in and count it.  I’ll 
be working on some code this afternoon to implement the method. 

I also found a 5335 for cheap and ordered it.  It was listed on eBay as being 
in “excellent” condition though both pictures had all the lights lit so I can 
only assume it is stuck in power on reset or test.  I’ll see when it gets here.

As far as measurement techniques, if I use my scope and sync to a known signal 
using the trigger on my 3336, it looks like I can measure to .001hz pretty 
reliably.  So using the STM application, the 5335 and the scope + 3336, I 
should be off and running.

I’ll report back in a few days.

Jerry
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-25 Thread Bob kb8tq
Hi
> On Apr 25, 2017, at 8:53 AM, jimlux  wrote:
> 
> On 4/25/17 4:42 AM, Bob kb8tq wrote:
>> Hi
>> 
>>> On Apr 25, 2017, at 1:24 AM, Orin Eman  wrote:
>>> 
>>> On Mon, Apr 24, 2017 at 5:16 PM, Bob kb8tq  wrote:
>>> 
 Hi
 
 
> On Apr 24, 2017, at 6:54 PM, Hal Murray  wrote:
> 
> 
> kb...@n1k.org said:
>> You have a “gate” from the GPSDO and a “signal” from somewhere else. If
 you
>> want the STM to do the whole thing, the “gate” pin needs to get the job
 done
>> in  X +/-  1 cycles of the “signal” pin. Delay X (if it’s consistent)
 isn’t
>> a problem. Having a
>> +/- 1 cycle delay *is* a problem. The interrupt servicing structure in
 the
>> MCU may or may not be able to hit things +/- 10 ns or even +/- 100 ns.
>> Sometimes a “lower power” MCU with simple code is better at this than a
>> multi core gizmo running a high level operating system.
> 
> Some of the counter/timer hardware has another register where the
 hardware
> will save a copy of the main counter when another signal happens.  If
 your
> gate time is the time between two pulses rather than the width of a
 single
> pulse, then all the software has to do is read that copy-register before
 the
> next pulse happens.
 
 Works a bit better if the input is edge sensing rather than level sensing
 ….
 (copy on positive edge vs keep copying the whole time the input is high)
>>> 
>>> 
>>> 
>>> They are in my experience.  You get the choice of positive edge, negative
>>> edge and if you're lucky, both.  I used the capture feature on PIC timers
>>> back in the late 90s to capture automotive engine timing signals and log
>>> engine timing etc., but that's another story.
>>> 
>>> But the big gotcha is that the external signal is going to be synchronized
>>> to an internal clock, often by a couple of D flip-flops.  This introduces a
>>> delay of two to three internal clocks (it can be three if the D flip-flop
>>> setup or hold time is violated and the first flip-flop goes metastable).
>>> It was looking for where/how the synchronization was done on the STM32
>>> timers that led me to the application note (AN4776) that I posted earlier.
>>> 
>>> FWIW, it's equally entertaining to work out when a write to a pin that's
>>> designated as output actually appears on the pin.  Immediately (subject to
>>> propagation delays) never seems to be the answer for the ARM based chips
>>> I've asked about.  The answers tend to be of the form mumble mumble
>>> pipelining mumble mumble…
>> 
>> 
>> This is also is what gets you into limitations like the input clock to the 
>> timer being
>> no greater than 1/4 the applicable MCU clock. The other key there being that 
>> the
>> clock they use may be the I/O clock at 50 MHz and not the CPU clock at 200
>> MHz. Indeed the information on this sort of thing may be 900 pages into a
>> 1200 page document ….
>> 
>> I’m not trying to say that I *know* this is the case on the F7’s. It is 
>> stuff I’ve run
>> into on other ARM parts. It’s never easy to dig into. My take away has always
>> been that for precision / deterministic stuff, go to a FPGA. Something like 
>> the
>> FPGA / ARM combo’s might work. The cost for them always seems a bit
>> crazy unless you need a *lot* of ARM <-> FPGA I/O horsepower.
>> 
> 
> 
> It might be faster to just try some experiments.  You could probably set up 
> an experiment with a signal generator or oscillator with a bit of an offset 
> so the zero crossing of the unknown slides across the phase of the processor 
> clock.  Not to say that you'd uncover obscure corner cases, but it *might* be 
> easier than reading the 1000s of pages and jumping back and forth in the doc 
> between the description of the "counter timer core" and the "clock 
> distribution core" and the "processor instruction timing" and the "input 
> output multiplexer" and the (well, you get the idea).   I find that rummaging 
> on the web for some example code, getting it working, then modifying it seems 
> to be a good way - coming up with how to set all those configuration bits in 
> countless registers from scratch is a chore - some sort of starting place is 
> a good thing.

Indeed the whole process of rummaging through a massive pile of docs on a cheap 
little part can be 
a major hassle. You often do better running their “configuration wizard” and 
just trying out the result. 
I’ve even run into cases where the wizard knows more about the part than the 
doc's do. When I go back
with questions, the answer is often “trust the wizard, ignore the doc’s”. That 
makes you feel really good
about spending a week digging through all that stuff …..

Regardless of how you do it, if the objective is an instrument you trust, there 
is no easy shortcut way
to get it all done. The corner cases will always pop up and get you down the 

Re: [time-nuts] Frequency counter questions

2017-04-25 Thread jimlux

On 4/25/17 4:42 AM, Bob kb8tq wrote:

Hi


On Apr 25, 2017, at 1:24 AM, Orin Eman  wrote:

On Mon, Apr 24, 2017 at 5:16 PM, Bob kb8tq  wrote:


Hi



On Apr 24, 2017, at 6:54 PM, Hal Murray  wrote:


kb...@n1k.org said:

You have a “gate” from the GPSDO and a “signal” from somewhere else. If

you

want the STM to do the whole thing, the “gate” pin needs to get the job

done

in  X +/-  1 cycles of the “signal” pin. Delay X (if it’s consistent)

isn’t

a problem. Having a
+/- 1 cycle delay *is* a problem. The interrupt servicing structure in

the

MCU may or may not be able to hit things +/- 10 ns or even +/- 100 ns.
Sometimes a “lower power” MCU with simple code is better at this than a
multi core gizmo running a high level operating system.


Some of the counter/timer hardware has another register where the

hardware

will save a copy of the main counter when another signal happens.  If

your

gate time is the time between two pulses rather than the width of a

single

pulse, then all the software has to do is read that copy-register before

the

next pulse happens.


Works a bit better if the input is edge sensing rather than level sensing
….
(copy on positive edge vs keep copying the whole time the input is high)




They are in my experience.  You get the choice of positive edge, negative
edge and if you're lucky, both.  I used the capture feature on PIC timers
back in the late 90s to capture automotive engine timing signals and log
engine timing etc., but that's another story.

But the big gotcha is that the external signal is going to be synchronized
to an internal clock, often by a couple of D flip-flops.  This introduces a
delay of two to three internal clocks (it can be three if the D flip-flop
setup or hold time is violated and the first flip-flop goes metastable).
It was looking for where/how the synchronization was done on the STM32
timers that led me to the application note (AN4776) that I posted earlier.

FWIW, it's equally entertaining to work out when a write to a pin that's
designated as output actually appears on the pin.  Immediately (subject to
propagation delays) never seems to be the answer for the ARM based chips
I've asked about.  The answers tend to be of the form mumble mumble
pipelining mumble mumble…



This is also is what gets you into limitations like the input clock to the 
timer being
no greater than 1/4 the applicable MCU clock. The other key there being that the
clock they use may be the I/O clock at 50 MHz and not the CPU clock at 200
MHz. Indeed the information on this sort of thing may be 900 pages into a
1200 page document ….

I’m not trying to say that I *know* this is the case on the F7’s. It is stuff 
I’ve run
into on other ARM parts. It’s never easy to dig into. My take away has always
been that for precision / deterministic stuff, go to a FPGA. Something like the
FPGA / ARM combo’s might work. The cost for them always seems a bit
crazy unless you need a *lot* of ARM <-> FPGA I/O horsepower.




It might be faster to just try some experiments.  You could probably set 
up an experiment with a signal generator or oscillator with a bit of an 
offset so the zero crossing of the unknown slides across the phase of 
the processor clock.  Not to say that you'd uncover obscure corner 
cases, but it *might* be easier than reading the 1000s of pages and 
jumping back and forth in the doc between the description of the 
"counter timer core" and the "clock distribution core" and the 
"processor instruction timing" and the "input output multiplexer" and 
the (well, you get the idea).   I find that rummaging on the web for 
some example code, getting it working, then modifying it seems to be a 
good way - coming up with how to set all those configuration bits in 
countless registers from scratch is a chore - some sort of starting 
place is a good thing.



___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-25 Thread Bob kb8tq
Hi

> On Apr 25, 2017, at 1:24 AM, Orin Eman  wrote:
> 
> On Mon, Apr 24, 2017 at 5:16 PM, Bob kb8tq  wrote:
> 
>> Hi
>> 
>> 
>>> On Apr 24, 2017, at 6:54 PM, Hal Murray  wrote:
>>> 
>>> 
>>> kb...@n1k.org said:
 You have a “gate” from the GPSDO and a “signal” from somewhere else. If
>> you
 want the STM to do the whole thing, the “gate” pin needs to get the job
>> done
 in  X +/-  1 cycles of the “signal” pin. Delay X (if it’s consistent)
>> isn’t
 a problem. Having a
 +/- 1 cycle delay *is* a problem. The interrupt servicing structure in
>> the
 MCU may or may not be able to hit things +/- 10 ns or even +/- 100 ns.
 Sometimes a “lower power” MCU with simple code is better at this than a
 multi core gizmo running a high level operating system.
>>> 
>>> Some of the counter/timer hardware has another register where the
>> hardware
>>> will save a copy of the main counter when another signal happens.  If
>> your
>>> gate time is the time between two pulses rather than the width of a
>> single
>>> pulse, then all the software has to do is read that copy-register before
>> the
>>> next pulse happens.
>> 
>> Works a bit better if the input is edge sensing rather than level sensing
>> ….
>> (copy on positive edge vs keep copying the whole time the input is high)
> 
> 
> 
> They are in my experience.  You get the choice of positive edge, negative
> edge and if you're lucky, both.  I used the capture feature on PIC timers
> back in the late 90s to capture automotive engine timing signals and log
> engine timing etc., but that's another story.
> 
> But the big gotcha is that the external signal is going to be synchronized
> to an internal clock, often by a couple of D flip-flops.  This introduces a
> delay of two to three internal clocks (it can be three if the D flip-flop
> setup or hold time is violated and the first flip-flop goes metastable).
> It was looking for where/how the synchronization was done on the STM32
> timers that led me to the application note (AN4776) that I posted earlier.
> 
> FWIW, it's equally entertaining to work out when a write to a pin that's
> designated as output actually appears on the pin.  Immediately (subject to
> propagation delays) never seems to be the answer for the ARM based chips
> I've asked about.  The answers tend to be of the form mumble mumble
> pipelining mumble mumble…


This is also is what gets you into limitations like the input clock to the 
timer being
no greater than 1/4 the applicable MCU clock. The other key there being that 
the 
clock they use may be the I/O clock at 50 MHz and not the CPU clock at 200 
MHz. Indeed the information on this sort of thing may be 900 pages into a 
1200 page document ….

I’m not trying to say that I *know* this is the case on the F7’s. It is stuff 
I’ve run
into on other ARM parts. It’s never easy to dig into. My take away has always 
been that for precision / deterministic stuff, go to a FPGA. Something like the
FPGA / ARM combo’s might work. The cost for them always seems a bit 
crazy unless you need a *lot* of ARM <-> FPGA I/O horsepower. 

Bob


> 
> Orin.
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-25 Thread Orin Eman
On Mon, Apr 24, 2017 at 5:16 PM, Bob kb8tq  wrote:

> Hi
>
>
> > On Apr 24, 2017, at 6:54 PM, Hal Murray  wrote:
> >
> >
> > kb...@n1k.org said:
> >> You have a “gate” from the GPSDO and a “signal” from somewhere else. If
> you
> >> want the STM to do the whole thing, the “gate” pin needs to get the job
> done
> >> in  X +/-  1 cycles of the “signal” pin. Delay X (if it’s consistent)
> isn’t
> >> a problem. Having a
> >> +/- 1 cycle delay *is* a problem. The interrupt servicing structure in
> the
> >> MCU may or may not be able to hit things +/- 10 ns or even +/- 100 ns.
> >> Sometimes a “lower power” MCU with simple code is better at this than a
> >> multi core gizmo running a high level operating system.
> >
> > Some of the counter/timer hardware has another register where the
> hardware
> > will save a copy of the main counter when another signal happens.  If
> your
> > gate time is the time between two pulses rather than the width of a
> single
> > pulse, then all the software has to do is read that copy-register before
> the
> > next pulse happens.
>
> Works a bit better if the input is edge sensing rather than level sensing
> ….
> (copy on positive edge vs keep copying the whole time the input is high)



They are in my experience.  You get the choice of positive edge, negative
edge and if you're lucky, both.  I used the capture feature on PIC timers
back in the late 90s to capture automotive engine timing signals and log
engine timing etc., but that's another story.

But the big gotcha is that the external signal is going to be synchronized
to an internal clock, often by a couple of D flip-flops.  This introduces a
delay of two to three internal clocks (it can be three if the D flip-flop
setup or hold time is violated and the first flip-flop goes metastable).
It was looking for where/how the synchronization was done on the STM32
timers that led me to the application note (AN4776) that I posted earlier.

FWIW, it's equally entertaining to work out when a write to a pin that's
designated as output actually appears on the pin.  Immediately (subject to
propagation delays) never seems to be the answer for the ARM based chips
I've asked about.  The answers tend to be of the form mumble mumble
pipelining mumble mumble...

Orin.
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-24 Thread Bob kb8tq
Hi


> On Apr 24, 2017, at 6:54 PM, Hal Murray  wrote:
> 
> 
> kb...@n1k.org said:
>> You have a “gate” from the GPSDO and a “signal” from somewhere else. If you
>> want the STM to do the whole thing, the “gate” pin needs to get the job done
>> in  X +/-  1 cycles of the “signal” pin. Delay X (if it’s consistent) isn’t
>> a problem. Having a
>> +/- 1 cycle delay *is* a problem. The interrupt servicing structure in the
>> MCU may or may not be able to hit things +/- 10 ns or even +/- 100 ns.
>> Sometimes a “lower power” MCU with simple code is better at this than a
>> multi core gizmo running a high level operating system.  
> 
> Some of the counter/timer hardware has another register where the hardware 
> will save a copy of the main counter when another signal happens.  If your 
> gate time is the time between two pulses rather than the width of a single 
> pulse, then all the software has to do is read that copy-register before the 
> next pulse happens.

Works a bit better if the input is edge sensing rather than level sensing ….
(copy on positive edge vs keep copying the whole time the input is high)

Bob


> 
> 
> -- 
> These are my opinions.  I hate spam.
> 
> 
> 
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-24 Thread Bob kb8tq
Hi

I believe what you are going to find is that the 3586 has an IF strip in it. 
It does a heterodyne process to the IF center frequency and then indicates
things from there. If the IF strip is out of alignment, you get a reading error.
Probably worth digging into the service manual on the 3586.

Bob

> On Apr 24, 2017, at 6:26 PM, Jerry Hancock  wrote:
> 
> Orin,  Thanks, this goes beyond interesting and I don’t know how you found 
> it.  I’ll be staring at this doc for the rest of the week.  I have a dozen or 
> so of the Nucleo boards around include the high end F7 types so I’ll see if I 
> can duplicate their code on the System Workbench they reference (and I have 
> installed).
> 
> This afternoon I hooked up the output of my 3586 F0 (with the GPSDO 
> reference) set to 15,000,000.0Mhz and then used my 3336 set to the same 
> (again with the GPSDO) to see if I had any creep on my TDS3054B scope after 
> syncing the two signals.  Just setting the 3336 to .001 higher causing the 
> sine waves to go out of sync noticeably in a minute.  It’s been running about 
> 2 hours and they still overlap perfectly when set to the same frequency.  
> 
> I think we all know what the issue is here in that the 3586 counter is 
> probably adding a count here or there.  It’s just curious that it never seems 
> to drop a count.  I would have thought I would see +.1 and -.1 with an equal 
> distribution over a reasonable period of time of a few minutes but I don’t; I 
> always see the +.1 or .0, never a 999.9 count (-.01).
> 
> If someone has a 5335 counter in the SF bay area they would like to unload, 
> please send me a note at meters at hanler dot com.
> 
> By the way, your Geller ref is still running perfectly.  I’ll have to send it 
> back to you for calibration soon as I think I have had it a year.
> 
> Jerry
> 
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-24 Thread Hal Murray

kb...@n1k.org said:
> You have a “gate” from the GPSDO and a “signal” from somewhere else. 
> If you
> want the STM to do the whole thing, the “gate” pin needs to get the job 
> done
> in  X +/-  1 cycles of the “signal” pin. Delay X (if it’s consistent) 
> isn’t
> a problem. Having a
> +/- 1 cycle delay *is* a problem. The interrupt servicing structure in the
> MCU may or may not be able to hit things +/- 10 ns or even +/- 100 ns.
> Sometimes a “lower power” MCU with simple code is better at this than a
> multi core gizmo running a high level operating system.  

Some of the counter/timer hardware has another register where the hardware 
will save a copy of the main counter when another signal happens.  If your 
gate time is the time between two pulses rather than the width of a single 
pulse, then all the software has to do is read that copy-register before the 
next pulse happens.


-- 
These are my opinions.  I hate spam.



___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Re: [time-nuts] Frequency counter questions

2017-04-24 Thread Jerry Hancock
Bob, I have an STM32F769 disco as well as the Nucleo version.  The big 
difference between the two is the LCD display on the Disco from what I remember.

I’ll play around with the code this week and report back.
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-24 Thread Bob kb8tq
Hi


> On Apr 24, 2017, at 3:49 PM, Chris Albertson  
> wrote:
> 
> On Mon, Apr 24, 2017 at 10:13 AM, Bob kb8tq  wrote:
> 
>> Hi
>> 
>> Some of the process below is “not trivial”. One example:
>> 
>> You have a “gate” from the GPSDO and a “signal” from somewhere else. If you
>> want the STM to do the whole thing, the “gate” pin needs to get the job
>> done in
>> X +/-  1 cycles of the “signal” pin. Delay X (if it’s consistent) isn’t a
>> problem. Having a
>>> +/- 1 cycle delay *is* a problem. The interrupt servicing structure in
>> the MCU
>> may or may not be able to hit things +/- 10 ns or even +/- 100 ns.
>> Sometimes a
>> “lower power” MCU with simple code is better at this than a multi core
>> gizmo running
>> a high level operating system.
> 
> -- 
> 
> C
> 
> The STM32 is in fact a low level micro controller that does not run an OS.


The STM being discussed is what they call an F7 part. A representative 
board running it is (= the one here on my desk):

http://www.st.com/en/evaluation-tools/32f769idiscovery.html 


It’s a board with 128 Mb of RAM and 512 Mb of flash. Among the other stuff on 
there is an RJ-45 ethernet jack There are a variety of RTOS options available
along with some cut down Linux versions. Trying to do ethernet without at least
an RTOS does not make much sense. It’s what they are calling an Cortex-M7 
rather than
a Cortex M4. There are a number of similar boards. If it’s an STM 32F7, the 
features
on the board will be similar to the one sitting here. 

Indeed the term STM32 covers a lot of ground and we have zigged and zagged 
a bit. Repeating all of the details from every earlier post in the thread makes
things even longer than they already are. Some amount of abbreviation is
inevitable. 

Bob

> 
> The chips contain counters and other hardware so most of the real-time
> stuff is not done in software.  You need to set this up so the on-chip
> hardware outside of the CPU is used.
> 
> There are two basic types of ARM computers, the "Cortex A" is what is in
> your phone and these have multi cores, GHz class clock speeds, gigabytes
> class memories and run an OS.   The other is ARM "Cortex M".  These are
> much smaller and run on about 100 uA of current with clocks about 100 MHz
> and kilobyte class memories and don't support running an OS.  These are
> used in embedded applications such as the throttle control in your car or a
> high end battery charger.  These cost about $1 each and the physical chip
> is about 3/8 inches square.I buy them quality one as a "Nucleo" board
> for about $12.  It is like an Arduino but about (literally) 100X better
> specs and half the cost.  About the same physical size.But for this
> counter project I'd use a generic STM32 board from eBay.  They sell for
> about $2 shipped
> 
> Take a look at this device.  It has a lot of power.  It can even be
> programmed using the Arduino IDE or the gnu toolchain and others.  You
> can't beat the price or the size.
> ...ebay.com/itm/New-STM32F103C8T6-ARM-STM32...
> 
> 
> 
> 
> 
> hris Albertson
> Redondo Beach, California
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-24 Thread Jerry Hancock
Orin,  Thanks, this goes beyond interesting and I don’t know how you found it.  
I’ll be staring at this doc for the rest of the week.  I have a dozen or so of 
the Nucleo boards around include the high end F7 types so I’ll see if I can 
duplicate their code on the System Workbench they reference (and I have 
installed).

This afternoon I hooked up the output of my 3586 F0 (with the GPSDO reference) 
set to 15,000,000.0Mhz and then used my 3336 set to the same (again with the 
GPSDO) to see if I had any creep on my TDS3054B scope after syncing the two 
signals.  Just setting the 3336 to .001 higher causing the sine waves to go out 
of sync noticeably in a minute.  It’s been running about 2 hours and they still 
overlap perfectly when set to the same frequency.  

I think we all know what the issue is here in that the 3586 counter is probably 
adding a count here or there.  It’s just curious that it never seems to drop a 
count.  I would have thought I would see +.1 and -.1 with an equal distribution 
over a reasonable period of time of a few minutes but I don’t; I always see the 
+.1 or .0, never a 999.9 count (-.01).

If someone has a 5335 counter in the SF bay area they would like to unload, 
please send me a note at meters at hanler dot com.

By the way, your Geller ref is still running perfectly.  I’ll have to send it 
back to you for calibration soon as I think I have had it a year.

Jerry

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-24 Thread Bob kb8tq
Hi

One advantage of keeping this on list — There are 3586B Guru’s running around 
here. 
I’m sure one of them will hop in to explain a bit more about what’s going on 
inside that
beast. Since (as you point out) you can put the same signal in as the 
reference, it may
be as simple as cranking pot R358242 to zero the reading …. maybe not. 

The road from “I wonder” to a full bench of TimeNut gear can be an amazingly 
short one.
Before you get into a build it yourself precision counter project, at least 
take a look at 
things like the HP 5334 and 5335 on the usual auction sites. They (and a large 
number
of other candidates) will do this job for you and do a number of future jobs as 
well. 
Depending on how the market is going, cost should be sub $150 delivered and sub
$100 with some time spent shopping (and maybe some risk). There’s also the 5386 
out there, not my favorite counter, but a wonderful thing if you have dyslexia 
and are 
typing 3586 :)

While the “I can wait for the reading” idea sounds good in theory. It rarely 
works well in 
practice. Temperature variations, warmup drift, and other stuff do happen in a 
lot less
than 10,000 seconds (or even 1,000 seconds). If you have to adjust something, 
even 
100 seconds can be a major pain. The constant 9 digits a second that the bench
counters provide can be very useful. 

Bob




> On Apr 24, 2017, at 3:06 PM, Jerry Hancock  wrote:
> 
> This is an exercise more than anything.  It started when I noticed the 
> counter in a 3586B I purchased was +1 count unless I dropped the input 
> frequency .25hz.  I was using my GPSDO reference for it and the 3336 it was 
> counting.  I then took my GPSDO and tried reading that directly and I see the 
> same thing.  This is annoying more than anything and I assume there is a 
> slight gate phase related issue.  I don’t have anything to read the jitter on 
> my GPSDO which is a Lucent RFTG-U with the REF1 and REF0 but since I am using 
> it as the reference and the signal under test, it shouldn’t matter at .1hz.  
> If I run the count over 3 minutes, the count is .923hz high consistently. To 
> put a finer point on it, reading 10,000,000.00hz from my GPSDO, It will read 
> consistently 10,000,000.1 or 10,000,000.0 with the distribution of each to 
> average 10,000,000.923 over 5 minutes.  If I drop the input frequency by 
> .25hz, it will read 10,000,000.0 without a 10,000,000.1 until the cows come 
> home.  I’v
 e 
> let it run about a day to check. 
> 
> So I was thinking, o.k., let’s put a frequency counter on the back to read 
> the F0 output signal rom the 3586B and see what it reads but I then realized 
> I don’t have anything that accurate.  I do have a lot of micro processors 
> around, everything from the lowly PIC thru the DSPIC to the STM32F7’s, F4’s 
> and if I have to, I will get a FPGA and go from there.  I could purchase an 
> HP 12 digit counter if I could find one locally as I am tired of paying 
> shipping but haven’t found one to date. 
> 
> So no really pressing reason for the counter other than just curious as to 
> what is causing the issue with the 3586B.  By the way, when I read any of the 
> WWV signals they count +.1hz as well under constant signal.  I am pretty sure 
> the 3586B is recognizing my reference input as the OCXO is dialed to 
> 10,000,000.0 and the standard oscillator is a little high at +.4 (if I 
> disconnect the OCXO strap) and I haven’t looked into it yet.
> 
> Thanks for the interest and help
> 
> Jerry
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-24 Thread Orin Eman
Hi Jerry,

See AN4776 on st.com.  Section 2.6 looks particularly interesting.

Orin.

On Mon, Apr 24, 2017 at 12:06 PM, Jerry Hancock  wrote:

> This is an exercise more than anything.  It started when I noticed the
> counter in a 3586B I purchased was +1 count unless I dropped the input
> frequency .25hz.  I was using my GPSDO reference for it and the 3336 it was
> counting.  I then took my GPSDO and tried reading that directly and I see
> the same thing.  This is annoying more than anything and I assume there is
> a slight gate phase related issue.  I don’t have anything to read the
> jitter on my GPSDO which is a Lucent RFTG-U with the REF1 and REF0 but
> since I am using it as the reference and the signal under test, it
> shouldn’t matter at .1hz.  If I run the count over 3 minutes, the count is
> .923hz high consistently. To put a finer point on it, reading
> 10,000,000.00hz from my GPSDO, It will read consistently 10,000,000.1 or
> 10,000,000.0 with the distribution of each to average 10,000,000.923 over 5
> minutes.  If I drop the input frequency by .25hz, it will read 10,000,000.0
> without a 10,000,000.1 until the cows come home.  I’ve
>  let it run about a day to check.
>
> So I was thinking, o.k., let’s put a frequency counter on the back to read
> the F0 output signal rom the 3586B and see what it reads but I then
> realized I don’t have anything that accurate.  I do have a lot of micro
> processors around, everything from the lowly PIC thru the DSPIC to the
> STM32F7’s, F4’s and if I have to, I will get a FPGA and go from there.  I
> could purchase an HP 12 digit counter if I could find one locally as I am
> tired of paying shipping but haven’t found one to date.
>
> So no really pressing reason for the counter other than just curious as to
> what is causing the issue with the 3586B.  By the way, when I read any of
> the WWV signals they count +.1hz as well under constant signal.  I am
> pretty sure the 3586B is recognizing my reference input as the OCXO is
> dialed to 10,000,000.0 and the standard oscillator is a little high at +.4
> (if I disconnect the OCXO strap) and I haven’t looked into it yet.
>
> Thanks for the interest and help
>
> Jerry
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/
> mailman/listinfo/time-nuts
> and follow the instructions there.
>
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-24 Thread Chris Albertson
On Mon, Apr 24, 2017 at 10:13 AM, Bob kb8tq  wrote:

> Hi
>
> Some of the process below is “not trivial”. One example:
>
> You have a “gate” from the GPSDO and a “signal” from somewhere else. If you
> want the STM to do the whole thing, the “gate” pin needs to get the job
> done in
> X +/-  1 cycles of the “signal” pin. Delay X (if it’s consistent) isn’t a
> problem. Having a
> > +/- 1 cycle delay *is* a problem. The interrupt servicing structure in
> the MCU
> may or may not be able to hit things +/- 10 ns or even +/- 100 ns.
> Sometimes a
> “lower power” MCU with simple code is better at this than a multi core
> gizmo running
> a high level operating system.

-- 

C

The STM32 is in fact a low level micro controller that does not run an OS.

The chips contain counters and other hardware so most of the real-time
stuff is not done in software.  You need to set this up so the on-chip
hardware outside of the CPU is used.

There are two basic types of ARM computers, the "Cortex A" is what is in
your phone and these have multi cores, GHz class clock speeds, gigabytes
class memories and run an OS.   The other is ARM "Cortex M".  These are
much smaller and run on about 100 uA of current with clocks about 100 MHz
and kilobyte class memories and don't support running an OS.  These are
used in embedded applications such as the throttle control in your car or a
high end battery charger.  These cost about $1 each and the physical chip
is about 3/8 inches square.I buy them quality one as a "Nucleo" board
for about $12.  It is like an Arduino but about (literally) 100X better
specs and half the cost.  About the same physical size.But for this
counter project I'd use a generic STM32 board from eBay.  They sell for
about $2 shipped

Take a look at this device.  It has a lot of power.  It can even be
programmed using the Arduino IDE or the gnu toolchain and others.  You
can't beat the price or the size.
...ebay.com/itm/New-STM32F103C8T6-ARM-STM32...





hris Albertson
Redondo Beach, California
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-24 Thread Jerry Hancock
This is an exercise more than anything.  It started when I noticed the counter 
in a 3586B I purchased was +1 count unless I dropped the input frequency .25hz. 
 I was using my GPSDO reference for it and the 3336 it was counting.  I then 
took my GPSDO and tried reading that directly and I see the same thing.  This 
is annoying more than anything and I assume there is a slight gate phase 
related issue.  I don’t have anything to read the jitter on my GPSDO which is a 
Lucent RFTG-U with the REF1 and REF0 but since I am using it as the reference 
and the signal under test, it shouldn’t matter at .1hz.  If I run the count 
over 3 minutes, the count is .923hz high consistently. To put a finer point on 
it, reading 10,000,000.00hz from my GPSDO, It will read consistently 
10,000,000.1 or 10,000,000.0 with the distribution of each to average 
10,000,000.923 over 5 minutes.  If I drop the input frequency by .25hz, it will 
read 10,000,000.0 without a 10,000,000.1 until the cows come home.  I’ve 
 let it run about a day to check. 

So I was thinking, o.k., let’s put a frequency counter on the back to read the 
F0 output signal rom the 3586B and see what it reads but I then realized I 
don’t have anything that accurate.  I do have a lot of micro processors around, 
everything from the lowly PIC thru the DSPIC to the STM32F7’s, F4’s and if I 
have to, I will get a FPGA and go from there.  I could purchase an HP 12 digit 
counter if I could find one locally as I am tired of paying shipping but 
haven’t found one to date. 

So no really pressing reason for the counter other than just curious as to what 
is causing the issue with the 3586B.  By the way, when I read any of the WWV 
signals they count +.1hz as well under constant signal.  I am pretty sure the 
3586B is recognizing my reference input as the OCXO is dialed to 10,000,000.0 
and the standard oscillator is a little high at +.4 (if I disconnect the OCXO 
strap) and I haven’t looked into it yet.

Thanks for the interest and help

Jerry
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-24 Thread Bob kb8tq
Hi

Some of the process below is “not trivial”. One example:

You have a “gate” from the GPSDO and a “signal” from somewhere else. If you
want the STM to do the whole thing, the “gate” pin needs to get the job done in 
X +/-  1 cycles of the “signal” pin. Delay X (if it’s consistent) isn’t a 
problem. Having a
> +/- 1 cycle delay *is* a problem. The interrupt servicing structure in the MCU
may or may not be able to hit things +/- 10 ns or even +/- 100 ns.  Sometimes a
“lower power” MCU with simple code is better at this than a multi core gizmo 
running
a high level operating system. 

Lots of things to dig into.

Bob

> On Apr 24, 2017, at 12:45 PM, Chris Albertson  
> wrote:
> 
> On Sun, Apr 23, 2017 at 6:25 PM, Jerry Hancock  wrote:
> 
>> 
>> 
>> So to summarize, if I limit my high resolution to 99,999,999.999hz and use
>> a gate of 1000 seconds, would that get me to .01hz?  If not, then what
>> would the possible resolution be?
>> 
> 
> It is best to keep this kind of discussion on the list.  That way if some
> one like me sys something dumb, it will get noticed and called out.
> 
> OK, so it seems you
> 
> (1) are interested in measuring frequency up to 100 MHz but no higher.
> (2) want to use an STM32 ARM uP to
> (3) Are using the older (and simpler) design that simply counts cycles and
> divides by the gate time to measure frequency
> 
> If the above assumptions are wrong.  STOP reading now and post corrections
> or additions
> 
> OK so we are good to go
> 
> I assume you know about and intend to use the built in counter/timmer on
> the STM32.   You first step is to find out the maximum pule rate you can
> place on that pin.  Lets guess it is 48 MHz. But you are a conservative
> engineer an want to de-rate it to 24 MHz.
> 
> This means to measure up to 100 MHz you will need a prescaler that can
> divide by 4.This will transform you maximum 100 MHz to a maximum of 25
> MHz.   It will force you into using 4X longer gate time.   This is the only
> reason to pre-scale, because you can't otherwise process the signal.
> 
> Now it is very simple.   You write software that starts the counters on the
> desired pin and then your GPS sends a signal every one second (You do NOT
> need to divide down the 10MHZ from a GPSDO because the GPS already has a
> one pulse per second output that feeds the DO.)   SO every one second you
> read the number of counts and keep doing this for as many seconds as you
> need   After the gate time which might be one second or 4,000 seconds you
> add up all the one second readings and compute the answer.
> 
> Actually you can do better given the excess computer power you have:  You
> can output a frequency estimate after the first send and then each second
> you can output a more accurate value until finally after 4,000 seconds out
> have 0.001 Hz.   So in the first second you put up a display that is good
> for +/- 4 hZ and then four seconds later you can be a 1.0 Hz and after an
> hour 0.001 Hz
> 
> As I wrote before.   I use the "trigger" output of my old Tektronix scope
> as input to my counter because the scopes trigger is MUCH better.   If you
> own a 'scope this will save you a LOT of work as all you would need to
> build is a voltage converter to take the trigger output to 3v3 volts for
> the STM32.  The STM already can do rescaling and counting.Connect an
> I2C display and you are done with the hardware.  For a better and cheaper
> display, the STM32 can serve a web page and then you see the frequency on
> your phone.
> 
> 
> 
> 
> 
> 
> Chris Albertson
> Redondo Beach, California
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-24 Thread Chris Albertson
On Sun, Apr 23, 2017 at 6:25 PM, Jerry Hancock  wrote:

>
>
> So to summarize, if I limit my high resolution to 99,999,999.999hz and use
> a gate of 1000 seconds, would that get me to .01hz?  If not, then what
> would the possible resolution be?
>

It is best to keep this kind of discussion on the list.  That way if some
one like me sys something dumb, it will get noticed and called out.

OK, so it seems you

(1) are interested in measuring frequency up to 100 MHz but no higher.
(2) want to use an STM32 ARM uP to
(3) Are using the older (and simpler) design that simply counts cycles and
divides by the gate time to measure frequency

If the above assumptions are wrong.  STOP reading now and post corrections
or additions

OK so we are good to go

I assume you know about and intend to use the built in counter/timmer on
the STM32.   You first step is to find out the maximum pule rate you can
place on that pin.  Lets guess it is 48 MHz. But you are a conservative
engineer an want to de-rate it to 24 MHz.

This means to measure up to 100 MHz you will need a prescaler that can
divide by 4.This will transform you maximum 100 MHz to a maximum of 25
MHz.   It will force you into using 4X longer gate time.   This is the only
reason to pre-scale, because you can't otherwise process the signal.

Now it is very simple.   You write software that starts the counters on the
desired pin and then your GPS sends a signal every one second (You do NOT
need to divide down the 10MHZ from a GPSDO because the GPS already has a
one pulse per second output that feeds the DO.)   SO every one second you
read the number of counts and keep doing this for as many seconds as you
need   After the gate time which might be one second or 4,000 seconds you
add up all the one second readings and compute the answer.

Actually you can do better given the excess computer power you have:  You
can output a frequency estimate after the first send and then each second
you can output a more accurate value until finally after 4,000 seconds out
have 0.001 Hz.   So in the first second you put up a display that is good
for +/- 4 hZ and then four seconds later you can be a 1.0 Hz and after an
hour 0.001 Hz

As I wrote before.   I use the "trigger" output of my old Tektronix scope
as input to my counter because the scopes trigger is MUCH better.   If you
own a 'scope this will save you a LOT of work as all you would need to
build is a voltage converter to take the trigger output to 3v3 volts for
the STM32.  The STM already can do rescaling and counting.Connect an
I2C display and you are done with the hardware.  For a better and cheaper
display, the STM32 can serve a web page and then you see the frequency on
your phone.






Chris Albertson
Redondo Beach, California
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-24 Thread Tim Shoppa
Jerry, for a 100MHz PIC based counter a prescaler will be necessary. But it 
will not be necessary for a 30MHz counter.

Prescalers do not have to be by divisors of 10. I recall the PIC counter input 
to be good to 50MHz so the prescaler could just be a divide by two if you need 
a 100MHz counter and it *has* to be done by a PIC.

Of course there are lots of logic families that don't need a prescaler at 
100MHz and could be used to make a frequency counter.

Most frequency counter designs out there on the net introduce an extra count or 
two due to flawed conception of gate.

Tim N3QE

Sent from my VAX-11/780

> On Apr 23, 2017, at 9:25 PM, Jerry Hancock  wrote:
> 
> For some reason I am not getting the individual emails so I apologize for not 
> replying more promptly.  I’ll have to check my profile.
> 
> As far as I can tell from the notes, and by the way, the number of notes was 
> why I was trying to move this off list, to get to .001hz I need to measure 
> over 1000 seconds.  This is ok.  Since I am looking for an average over time 
> anyway, this is not a problem.  By the way I am using a GPSDO and planned to 
> use it divided down for the gate.
> 
> The only reason I mentioned a prescaler was that there was a 12 digit counter 
> schematic on the web that looked pretty complete.  This person used a 
> prescaler and I was trying to wrap my head around how this helped with 
> resolution and I guess from the replies, that is not a practical solution 
> (using a prescaler) when you want high resolution unless I use the inverse 
> operation which I can’t remember what it is called off the top of my head.
> 
> I’ve seen some HP 12 digit counters but since I have a GPSDO and who knows 
> how many micro development boards around here, I thought I would take a run 
> at it.
> 
> So to summarize, if I limit my high resolution to 99,999,999.999hz and use a 
> gate of 1000 seconds, would that get me to .01hz?  If not, then what would 
> the possible resolution be?
> 
> Thanks for all the input, very helpful.
> 
> Jerry
> 
> 
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-24 Thread Bob kb8tq
Hi

Let’s back off a bit. 

To most of us, a 12 digit counter displays 12 digits regardless of the 
frequency 
you put into it. That’s been the way good bench counters have done it since 
the early 1970’s. Typically the number of digits is specified at a one second 
gate time. An HP 5335 is one example. It is called a 9 digit (or more properly 
9 digit per second) counter. Over the last 30 years, the last “per second” part
has commonly been dropped. 

In the world of computers, the number of digits displayed is not the big deal
it was back in the days of nixie tubes. As Chris points out, comping up a 
display
is what things like the F7 are intended to do. The Discovery boards are a 
cheap way to get this running. 

Thus the confusion.

If you prescale you divide down the input frequency. The counter is “reading”
the divided down frequency. That’s not a big deal on a modern counter. It is
a big deal on an old style counter On an old style counter, you don’t get a 
constant number of digits at a given gate time. If you put in 1,000 cycles (also
called Hertz ..) and count them for one second, there will be four digits 
displayed. 
If you prescale the signal by 100, your counter will display 10 (two digits 
displayed).
In general prescalers are something to avoid on an old style counter.

With a modern 9 digit counter, if you put in 1,000 Hz and ran for a second you 
would
get 1,000.123456 on the display. You might or might not get good accuracy in 
all those digits. That’s roughly what the display would look like. 

So now back to the real questions: 

What is your input signal? How high is it in frequency? Is there a range of 
frequencies? 
Is it modulated? …..

What kind of accuracy are you after? (resolution and accuracy are two different 
things).

Is this a learning experience? Would a purchased counter for < $100 be an 
equally good
answer? 

Is the count it’s self significant? There are *many* different ways to measure 
frequency 
other than a straight counter. 

Lots of fun.

Bob


> On Apr 23, 2017, at 9:25 PM, Jerry Hancock  wrote:
> 
> For some reason I am not getting the individual emails so I apologize for not 
> replying more promptly.  I’ll have to check my profile.
> 
> As far as I can tell from the notes, and by the way, the number of notes was 
> why I was trying to move this off list, to get to .001hz I need to measure 
> over 1000 seconds.  This is ok.  Since I am looking for an average over time 
> anyway, this is not a problem.  By the way I am using a GPSDO and planned to 
> use it divided down for the gate.
> 
> The only reason I mentioned a prescaler was that there was a 12 digit counter 
> schematic on the web that looked pretty complete.  This person used a 
> prescaler and I was trying to wrap my head around how this helped with 
> resolution and I guess from the replies, that is not a practical solution 
> (using a prescaler) when you want high resolution unless I use the inverse 
> operation which I can’t remember what it is called off the top of my head.
> 
> I’ve seen some HP 12 digit counters but since I have a GPSDO and who knows 
> how many micro development boards around here, I thought I would take a run 
> at it.
> 
> So to summarize, if I limit my high resolution to 99,999,999.999hz and use a 
> gate of 1000 seconds, would that get me to .01hz?  If not, then what would 
> the possible resolution be?
> 
> Thanks for all the input, very helpful.
> 
> Jerry
> 
> 
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-23 Thread Bruce Griffiths
Reciprocal counter where one measures the period of the output of a divide by N 
and then takes the reciprocal of this period multiplied by N as the frequency 
of the divider input. With a 100MHz clock one can achieve ~ 0.01ppm resolution  
for a 1 second averaging time. if one uses interpolators with 100ps resolution 
(equivalent to a 10GHz clock)  the resolution improves to ~0.1ppb for a 1s 
averaging time.

Bruce

> 
> On 24 April 2017 at 13:25 Jerry Hancock  wrote:
> 
> For some reason I am not getting the individual emails so I apologize for 
> not replying more promptly. I’ll have to check my profile.
> 
> As far as I can tell from the notes, and by the way, the number of notes 
> was why I was trying to move this off list, to get to .001hz I need to 
> measure over 1000 seconds. This is ok. Since I am looking for an average over 
> time anyway, this is not a problem. By the way I am using a GPSDO and planned 
> to use it divided down for the gate.
> 
> The only reason I mentioned a prescaler was that there was a 12 digit 
> counter schematic on the web that looked pretty complete. This person used a 
> prescaler and I was trying to wrap my head around how this helped with 
> resolution and I guess from the replies, that is not a practical solution 
> (using a prescaler) when you want high resolution unless I use the inverse 
> operation which I can’t remember what it is called off the top of my head.
> 
> I’ve seen some HP 12 digit counters but since I have a GPSDO and who 
> knows how many micro development boards around here, I thought I would take a 
> run at it.
> 
> So to summarize, if I limit my high resolution to 99,999,999.999hz and 
> use a gate of 1000 seconds, would that get me to .01hz? If not, then what 
> would the possible resolution be?
> 
> Thanks for all the input, very helpful.
> 
> Jerry
> 
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to 
> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
> 
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-23 Thread Chris Albertson
Confusion comes about because there is a ton of on-chip hardware an
addition to the CPU.  An edge detector, prescaller and a few hardware
counters on the STM32.   So I said he'd likely not be actually counting in
software but just setting up the desired tiger condition, loading the
prescaler then letting it run for a gate interval and finally reading out
the count. The hardware is good for some tens of MHz.  But you really
have to be careful in your programming to get this exactly right.  Easy to
by off by one.

The chip has all kinds of other devices that greatly off load the CPU for
example making PWM outputs.

But you are right, we don't know what the OP wants to do.  Is he a ham what
needs to monitor the output of a transmitter and is this HF or microwave.
We's need to know the real world use case in order to suggest a solution.



On Sun, Apr 23, 2017 at 12:48 PM, Bob kb8tq  wrote:

>
> >
> > Yes, But I assume he is not going to do the actual counting in software.
>
> Except that’s not what he *said* he was trying to do. Thus the confusion
> and attempt
> to clarify what he’s trying to do. We now have a half dozen people who are
> equally
> confused about the task and no further input from the only person who
> actually
> *knows* what he’s trying to do. If indeed you have registers and the like,
> then they
> are probably in an FPGA. If you already have an FPGA doing the high speed
> stuff,
> the need for the F7 is even more questionable. Yes it’s a $12 or so chip,
> what needs
> to be done can be done with a $2 chip. Not only is would it be cheaper. It
> likely
> would be faster and easier to get working.
>
> Bob
>
>
> > He will likely be using the CPU to set and read some registers and
> control
> > the user interface.
> >
> > The time stamping idea is not bad.  But today you do NOT need to "post
> > process".  Your little processor could do this in nearly real-time and
> > you'd have results on the screen in seconds.
> >
> >
> >
> > --
> >
> > Chris Albertson
> > Redondo Beach, California
> > ___
> > time-nuts mailing list -- time-nuts@febo.com
> > To unsubscribe, go to https://www.febo.com/cgi-bin/
> mailman/listinfo/time-nuts
> > and follow the instructions there.
>
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/
> mailman/listinfo/time-nuts
> and follow the instructions there.
>



-- 

Chris Albertson
Redondo Beach, California
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


[time-nuts] Frequency counter questions

2017-04-23 Thread Jerry Hancock
For some reason I am not getting the individual emails so I apologize for not 
replying more promptly.  I’ll have to check my profile.

As far as I can tell from the notes, and by the way, the number of notes was 
why I was trying to move this off list, to get to .001hz I need to measure over 
1000 seconds.  This is ok.  Since I am looking for an average over time anyway, 
this is not a problem.  By the way I am using a GPSDO and planned to use it 
divided down for the gate.

The only reason I mentioned a prescaler was that there was a 12 digit counter 
schematic on the web that looked pretty complete.  This person used a prescaler 
and I was trying to wrap my head around how this helped with resolution and I 
guess from the replies, that is not a practical solution (using a prescaler) 
when you want high resolution unless I use the inverse operation which I can’t 
remember what it is called off the top of my head.

I’ve seen some HP 12 digit counters but since I have a GPSDO and who knows how 
many micro development boards around here, I thought I would take a run at it.

So to summarize, if I limit my high resolution to 99,999,999.999hz and use a 
gate of 1000 seconds, would that get me to .01hz?  If not, then what would the 
possible resolution be?

Thanks for all the input, very helpful.

Jerry


___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-23 Thread Bob kb8tq
Hi


> On Apr 23, 2017, at 2:43 PM, Chris Albertson  
> wrote:
> 
> On Sun, Apr 23, 2017 at 7:38 AM, Bob kb8tq  wrote:
> 
>> 
>> 
>> If you want to do something like the 53131 or even the 5335, you will need
>> something a bit different
>> than the F7 to do it. They are wonderful MCU’s but not really fast enough
>> to do the fancy stuff.
>> 
> 
> 
> Yes, But I assume he is not going to do the actual counting in software.

Except that’s not what he *said* he was trying to do. Thus the confusion and 
attempt
to clarify what he’s trying to do. We now have a half dozen people who are 
equally 
confused about the task and no further input from the only person who actually 
*knows* what he’s trying to do. If indeed you have registers and the like, then 
they
are probably in an FPGA. If you already have an FPGA doing the high speed stuff,
the need for the F7 is even more questionable. Yes it’s a $12 or so chip, what 
needs
to be done can be done with a $2 chip. Not only is would it be cheaper. It 
likely 
would be faster and easier to get working. 

Bob


> He will likely be using the CPU to set and read some registers and control
> the user interface.
> 
> The time stamping idea is not bad.  But today you do NOT need to "post
> process".  Your little processor could do this in nearly real-time and
> you'd have results on the screen in seconds.
> 
> 
> 
> -- 
> 
> Chris Albertson
> Redondo Beach, California
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-23 Thread Bob kb8tq
Hi


> On Apr 23, 2017, at 12:43 PM, Richard Solomon <w1...@outlook.com> wrote:
> 
> At that resolution, you need a very accurate and stable Time Base.
> 
> A GPSDO may not be good enough for 10 e12 measurements.
> 

If buy some truly strange chance, this *is* a 100,000 second gate time exercise
(which I very much doubt) …. a GPSDO may well be just fine for that level of 
performance. 
It would need to have a good antenna location and to be in a reasonable 
environment.
Other than that an OCXO based device should not have a lot of trouble after a 
couple days warmup. 

If somehow this morphs into a three sigma at 1x10^-12 accuracy at 1 second 
project 
then indeed, a GPSDO is not in any way going to be adequate to the task. You 
can pretty well
extend that to 10 and 100 seconds without much chance of being contradicted.  
You also
aren’t going to get that sort of accuracy at 1 second without doing a lot of 
heavy lifting 
counter hardware wise. The MCU choice becomes a very minor point on a fairly
long list. 

Bob


> 
> 73, Dick, W1KSZ
> 
> 
> Sent from Outlook<http://aka.ms/weboutlook>
> 
> From: time-nuts <time-nuts-boun...@febo.com> on behalf of Jerry Hancock 
> <je...@hanler.com>
> Sent: Sunday, April 23, 2017 12:14:49 AM
> To: Discussion of precise time and frequency measurement
> Cc: met...@hanler.com
> Subject: [time-nuts] Frequency counter questions
> 
> Hello,  I would like to find a person that would be able to answer some 
> frequency counter questions I have.
> 
> Basically, I am thinking of building my own using one of the high end STM32F7 
> boards as the counter.  I would like it to count reliably to 12 digits (e.g. 
> 30,000,000.001x hz).  I am not worried about input conditioning as I have a 
> circuit that is suitable for my needs.  Most of my questions have to do with 
> using a prescaler on the front (divide by N where what is N) to get to the 
> desired resolution when using multiples of the PPS coming from my GPSDO.  
> Gate times could be as long as needed to get the resolution.  So what 
> prescaler do I need and what gate time is required are the first two 
> questions.  I suggest if someone is willing to help that they either reply 
> here with an email address or send a note to meters at hanler dot com.  This 
> is for my own non-commercial use.
> 
> Thanks!
> 
> Jerry
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-23 Thread Richard Solomon
At that resolution, you need a very accurate and stable Time Base.

A GPSDO may not be good enough for 10 e12 measurements.


73, Dick, W1KSZ


Sent from Outlook<http://aka.ms/weboutlook>

From: time-nuts <time-nuts-boun...@febo.com> on behalf of Jerry Hancock 
<je...@hanler.com>
Sent: Sunday, April 23, 2017 12:14:49 AM
To: Discussion of precise time and frequency measurement
Cc: met...@hanler.com
Subject: [time-nuts] Frequency counter questions

Hello,  I would like to find a person that would be able to answer some 
frequency counter questions I have.

Basically, I am thinking of building my own using one of the high end STM32F7 
boards as the counter.  I would like it to count reliably to 12 digits (e.g. 
30,000,000.001x hz).  I am not worried about input conditioning as I have a 
circuit that is suitable for my needs.  Most of my questions have to do with 
using a prescaler on the front (divide by N where what is N) to get to the 
desired resolution when using multiples of the PPS coming from my GPSDO.  Gate 
times could be as long as needed to get the resolution.  So what prescaler do I 
need and what gate time is required are the first two questions.  I suggest if 
someone is willing to help that they either reply here with an email address or 
send a note to meters at hanler dot com.  This is for my own non-commercial use.

Thanks!

Jerry
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-23 Thread Chris Albertson
On Sun, Apr 23, 2017 at 7:38 AM, Bob kb8tq  wrote:

>
>
> If you want to do something like the 53131 or even the 5335, you will need
> something a bit different
> than the F7 to do it. They are wonderful MCU’s but not really fast enough
> to do the fancy stuff.
>


Yes, But I assume he is not going to do the actual counting in software.
He will likely be using the CPU to set and read some registers and control
the user interface.

The time stamping idea is not bad.  But today you do NOT need to "post
process".  Your little processor could do this in nearly real-time and
you'd have results on the screen in seconds.



-- 

Chris Albertson
Redondo Beach, California
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-23 Thread Chris Albertson
 Assuming you are counting every cycle with no pre-scaler and can't measure
the period, the answer is easy.

If you want to measure Hz then the gate needs to be 1 second.  If you want
to measure too 0.1 Hz then you need a 10 second gate.  In your case 0.001
Hz you need to count for 1,000 seconds.

If you use a prescaler let's say it is a "divide by N" then you multiply
the gate time by N.

If the frequency is high and you want to measure to .001 Hz then you need a
really large maximum count and will overflow a 32 bit integer  You want 12
digits so you need to use a 64 bit integer counter.

The STM32 has some pre-scalers built in and a built in counter too, I
think.  I don't know what their maximum speed is.   You don't need the
compute power is an STM32 but "why not" as they cost only $12, I use the
Nucleo boards and mbed.

The problem with counting to 12 digits is that you are only measuring the
average frequency over a very long interval.  The signal is likely not that
stable.   Lets say during that 10 second gate the signal was DC or zero Hz
for 5 seconds then went to 2 MHz.  You meter would read 1.000 MHz but the
signal was NEVER 1 MHz.


The OTHER way to measure frequency is harder but faster.  You measure the
period.   A perfect meter could mere the unknown frequency in one cycle.
It would not be an average.   But there are no perfect meters.

On Sun, Apr 23, 2017 at 12:14 AM, Jerry Hancock  wrote:

> Hello,  I would like to find a person that would be able to answer some
> frequency counter questions I have.
>
> Basically, I am thinking of building my own using one of the high end
> STM32F7 boards as the counter.  I would like it to count reliably to 12
> digits (e.g. 30,000,000.001x hz).  I am not worried about input
> conditioning as I have a circuit that is suitable for my needs.  Most of my
> questions have to do with using a prescaler on the front (divide by N where
> what is N) to get to the desired resolution when using multiples of the PPS
> coming from my GPSDO.  Gate times could be as long as needed to get the
> resolution.  So what prescaler do I need and what gate time is required are
> the first two questions.  I suggest if someone is willing to help that they
> either reply here with an email address or send a note to meters at hanler
> dot com.  This is for my own non-commercial use.
>
> Thanks!
>
> Jerry
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/
> mailman/listinfo/time-nuts
> and follow the instructions there.
>



-- 

Chris Albertson
Redondo Beach, California
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-23 Thread Bob kb8tq
Hi

Counting 12 digits is relatively easy, if that is the only constraint. Bring 
your “signal” into one of the 
timer clock inputs on the MCU. If your “signal” is 10 MHz that will be simple. 
If it’s 30 GHz it will be
more difficult. 

10 MHz gives you 7 digits a second. To get to 12 digits, you need 100,000 
seconds. Roughly speaking,
your counter “gate time” would be one day.  If your input is 1 MHz, your “gate 
time” would be 10 days.

My *guess* is that there is a disconnect between what you want to do and what 
I’m hearing you want to do.



If you want to do something like the 53131 or even the 5335, you will need 
something a bit different 
than the F7 to do it. They are wonderful MCU’s but not really fast enough to do 
the fancy stuff.

Bob


> On Apr 23, 2017, at 3:14 AM, Jerry Hancock  wrote:
> 
> Hello,  I would like to find a person that would be able to answer some 
> frequency counter questions I have.  
> 
> Basically, I am thinking of building my own using one of the high end STM32F7 
> boards as the counter.  I would like it to count reliably to 12 digits (e.g. 
> 30,000,000.001x hz).  I am not worried about input conditioning as I have a 
> circuit that is suitable for my needs.  Most of my questions have to do with 
> using a prescaler on the front (divide by N where what is N) to get to the 
> desired resolution when using multiples of the PPS coming from my GPSDO.  
> Gate times could be as long as needed to get the resolution.  So what 
> prescaler do I need and what gate time is required are the first two 
> questions.  I suggest if someone is willing to help that they either reply 
> here with an email address or send a note to meters at hanler dot com.  This 
> is for my own non-commercial use.
> 
> Thanks!
> 
> Jerry 
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-23 Thread Azelio Boriani
Up to the point that, to get 1milliHz resolution, you have to wait
1000 seconds (without the prescaler)? If you have a prescaler then it
will be N*1000 seconds...

On Sun, Apr 23, 2017 at 9:14 AM, Jerry Hancock  wrote:
> Hello,  I would like to find a person that would be able to answer some 
> frequency counter questions I have.
>
> Basically, I am thinking of building my own using one of the high end STM32F7 
> boards as the counter.  I would like it to count reliably to 12 digits (e.g. 
> 30,000,000.001x hz).  I am not worried about input conditioning as I have a 
> circuit that is suitable for my needs.  Most of my questions have to do with 
> using a prescaler on the front (divide by N where what is N) to get to the 
> desired resolution when using multiples of the PPS coming from my GPSDO.  
> Gate times could be as long as needed to get the resolution.  So what 
> prescaler do I need and what gate time is required are the first two 
> questions.  I suggest if someone is willing to help that they either reply 
> here with an email address or send a note to meters at hanler dot com.  This 
> is for my own non-commercial use.
>
> Thanks!
>
> Jerry
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Frequency counter questions

2017-04-23 Thread Magnus Danielson

Hi Jerry,

Consider building a fractional frequency counter. In it, you will 
measure both the time and number of input events.


Consider building a time-stamping counter, in which post-processing can 
combine multiple timestamps (each holding time and event counters), as 
post-processing can help to improve resolution.


Consider how you can achieve highest time resolution of your start time 
and stop time, i.e. time-stamping.


Cheers,
Magnus

On 04/23/2017 09:14 AM, Jerry Hancock wrote:

Hello,  I would like to find a person that would be able to answer some 
frequency counter questions I have.

Basically, I am thinking of building my own using one of the high end STM32F7 
boards as the counter.  I would like it to count reliably to 12 digits (e.g. 
30,000,000.001x hz).  I am not worried about input conditioning as I have a 
circuit that is suitable for my needs.  Most of my questions have to do with 
using a prescaler on the front (divide by N where what is N) to get to the 
desired resolution when using multiples of the PPS coming from my GPSDO.  Gate 
times could be as long as needed to get the resolution.  So what prescaler do I 
need and what gate time is required are the first two questions.  I suggest if 
someone is willing to help that they either reply here with an email address or 
send a note to meters at hanler dot com.  This is for my own non-commercial use.

Thanks!

Jerry
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


[time-nuts] Frequency counter questions

2017-04-23 Thread Jerry Hancock
Hello,  I would like to find a person that would be able to answer some 
frequency counter questions I have.  

Basically, I am thinking of building my own using one of the high end STM32F7 
boards as the counter.  I would like it to count reliably to 12 digits (e.g. 
30,000,000.001x hz).  I am not worried about input conditioning as I have a 
circuit that is suitable for my needs.  Most of my questions have to do with 
using a prescaler on the front (divide by N where what is N) to get to the 
desired resolution when using multiples of the PPS coming from my GPSDO.  Gate 
times could be as long as needed to get the resolution.  So what prescaler do I 
need and what gate time is required are the first two questions.  I suggest if 
someone is willing to help that they either reply here with an email address or 
send a note to meters at hanler dot com.  This is for my own non-commercial use.

Thanks!

Jerry 
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.