EMRFD Message Archive 13814

Message Date From Subject
13814 2017-04-19 07:11:43 Cordesses Roland Simple and low cost GPS controlled oscillator
Hello,
The frequency counter in my ham workshop has an accuracy and stability  in the region of a few ppm and has a connector for a more accurate external time base.
So I designed a simple and low cost 10 MHz GPS controlled oscillator to improve its accuracy. I was not looking for an uncertainty of 10-10 or better : a two-order improvement compared with that of my frequency counter, i.e. a few parts per 10-8, was my target.

It uses a cheap GPS board, an Adafruit Si5351 to generates the RF signal and an Arduino Nano is doing almost all the work.

This time base is presented in my Web page and  may be of interest to some of you :

http://roland.cordesses.free.fr/GPS_Si2cor.html

73 de Roland F2DC




13815 2017-04-19 09:45:26 trc_wm Re: Simple and low cost GPS controlled oscillator
On 19-4-2017 15:44, Cordesses Roland f2dc.cordesses@gmail.com [emrfd] wrote:
 
Hello,
The frequency counter in my ham workshop has an accuracy and stability  in the region of a few ppm and has a connector for a more accurate external time base.
So I designed a simple and low cost 10 MHz GPS controlled oscillator to improve its accuracy. I was not looking for an uncertainty of 10-10 or better : a two-order improvement compared with that of my frequency counter, i.e. a few parts per 10-8, was my target.

It uses a cheap GPS board, an Adafruit Si5351 to generates the RF signal and an Arduino Nano is doing almost all the work.

This time base is presented in my Web page and  may be of interest to some of you :

http://roland.cordesses.free.fr/GPS_Si2cor.html

73 de Roland F2DC


Hi Roland,

That is an interesting setup you've made! Thanks for writing about this; very nice indeed.

73,
Niels PA1DSP.

13816 2017-04-19 09:58:12 Dana Myers Re: Simple and low cost GPS controlled oscillator
13817 2017-04-19 10:04:14 Roy Appleton Re: Simple and low cost GPS controlled oscillator
Very nice project!

Roy
WA0YMH

13824 2017-04-26 10:42:03 jgaffke Re: Simple and low cost GPS controlled oscillator
Interesting indeed, and inspired this post I just put up on the AT-Spring group.
Would be nice to get that desktop PC out of the loop.
Unlike you, I haven't actually gotten anything to work, just mulled over ideas.
I'd guess all of this has been done before.


##############
You could likely use that 16mhz oscillator as a reference for an Si5351.
The Si5351C in the 20pin QFN accepts an external clock anywhere between 10mhz and 100mhz,
if over 40mhz it must use CLKIN_DIV to bring the PLL reference down between 10mhz and 40mhz.

The Si5351A in the 10 pin MSOP used on Steve's rig says it wants a crystal between 25 and 27mhz.
But the Etherkit breakout board has an option to drive it with an external 25mhz TCXO.
I'd bet the 25-27 mhz restriction is there just to get the internal crystal oscillator going,
and that you could drive one of those crystal pins with anything between 10 and 40 mhz.

OK, now I'll go off the deep end here, you may quit reading if not interested in really precise
control of the Si5351 frequency.

As previously suggested we could discipline an Si5351 (A or C) using the pulse-per-second output 
from a GPS receiver.   Assume one of the 3 outputs from the Si5351 is set to 10mhz, and that 
10mhz drives a 16 bit freerunning counter-timer inside the microcontroller that is used
to program the Si5351 I2C port.  The counter-timer is programmed to be free-running, rolling over
back to zero when it reaches a count of 9999.  So the counter-timer is rolling over at a rate 
of 10mhz/10000, or once each millisecond.  The pps from the GPS goes into the microcontroller 
to capture the current 16 bit count once each second.  If the 10mhz were exactly on frequency,
the 16 bit count should be exactly the same on each capture.   The microcontroller reads that
16 bit count and see by how much and in which direction it is moving, and periodically adjusts
the Si5351 registers to minimize that movement.  So basically huff-and-puff stablization, 
with counter and counter-capture and oscillator correction all implemented inside
a $0.50 microcontroller.

The counter timer on a Mega328P is not ideal for this, though could work well enough.  
It has a max count rate of a mhz or two, and counter increments and captures are resynced 
to the processor clock before being applied to the counter.  Some of the MSP430's might be 
better suited.
 
Jerry, KE7ER

13825 2017-04-26 11:15:31 jgaffke Re: Simple and low cost GPS controlled oscillator
Looking closer at your webpage, that PC is in there only to test the stability.  And looks like you have arrived at an ideal solution.
Jerry
13826 2017-04-26 19:15:42 ac2gl Re: Simple and low cost GPS controlled oscillator
If you want to build your own, have a look at
http://cwtd.org/CWTD_GPSDO/index.html
Dave AC2GL
13827 2017-04-26 21:42:43 Hans Summers Re: Simple and low cost GPS controlled oscillator
Hi Jerry
 
The Si5351A in the 10 pin MSOP used on Steve's rig says it wants a crystal between 25 and 27mhz.
 But the Etherkit breakout board has an option to drive it with an external 25mhz TCXO.
I'd bet the 25-27 mhz restriction is there just to get the internal crystal oscillator going,
 and that you could drive one of those crystal pins with anything between 10 and 40 mhz.

You *can*, some QRP Labs kits constructors tried this, and it does work. But the output spectral purity suffers a lot, in some cases. It appears that the internal PLL in the Si5351A is optimised for the range 25-27MHz.  
 
 As previously suggested we could discipline an Si5351 (A or C) using the pulse-per-second output
 from a GPS receiver.   Assume one of the 3 outputs from the Si5351 is set to 10mhz, and that
 10mhz drives a 16 bit freerunning counter-timer inside the microcontroller that is used
 to program the Si5351 I2C port.  The counter-timer is programmed to be free-running, rolling over
 back to zero when it reaches a count of 9999.  So the counter-timer is rolling over at a rate
 of 10mhz/10000, or once each millisecond.  The pps from the GPS goes into the microcontroller
 to capture the current 16 bit count once each second.  If the 10mhz were exactly on frequency,
 the 16 bit count should be exactly the same on each capture.   The microcontroller reads that
 16 bit count and see by how much and in which direction it is moving, and periodically adjusts
 the Si5351 registers to minimize that movement.  So basically huff-and-puff stablization,
 with counter and counter-capture and oscillator correction all implemented inside
 a $0.50 microcontroller.

This is basically the method used in stabilising all the QRP Labs kits which provide GPS discipline, all use the Si5351A Synth (10-pin MSSOP, pre-soldered at the PCB factory) in the Si5351A Synth module kit http://qrp-labs.com/synth (there are also TCXO pads on the board if required):

Ultimate3S QRSS/WSPR/JT65/etc transmitter http://qrp-labs.com/ultimate3/ u3s
ProgRock "programmable crystal" http://qrp-labs.com/progrock 
 
 The counter timer on a Mega328P is not ideal for this, though could work well enough.
 It has a max count rate of a mhz or two, and counter increments and captures are resynced
 to the processor clock before being applied to the counter.  Some of the MSP430's might be
 better suited.

Yes - the AVR processors have synchronous counter/timer inputs, unfortunately! The maximum count rate is 40% of the system clock. If you use the maximum 20MHz system clock, the maximum count rate is 8MHz. However - the Si5351A has three outputs! So if necessary one of the outputs can be used as the system's RF output, and one of the others can be used to drive the "frequency counter", and can be set to a division of the main output. The Si5351A provides a final division stage on each output as a power of two from 1 to 128. So it is easy to set up outputs with relationships of exact multiples of 2, perfect for configuring one output to be below the 8MHz requirement of a 20MHz AVR.

Another alternative is to measure the 27MHz crystal reference (or 25MHz) of the Si5351A reference. You can configure the Si5351A to route the 27MHz (or a divided version of it) to one of the three outputs. So bypassing all the PLL stuff completely. Then measure the 27MHz value in the same "Huff Puff" way. 

Then you start to play with optimising the correction steps - so that in the beginning at power up it applies coarse corrections to steer quickly towards the correct output frequency, and as it gets there, do finer and finer corrections so that the frequency control is very precise. It is a lot of fun to try to optimise the method of "homing in" on the desired frequency as fast as possible, yet not overshoot or oscillate, and still be able to correct any temperature-induced drift quickly enough!

73 Hans G0UPL
13846 2017-05-03 07:17:43 jgaffke Re: Simple and low cost GPS controlled oscillator
Hans,

You have some nice stuff there at QRP Labs, and some extremely friendly prices.

Looking at Dave's post pointing to the CWTD project, do you see advantages for going with 
that approach?  I had not known that some of the cheap GPS chips could be configured for 
10mhz out in addition to pulse-per-second.  The 10mhz reference would make updates to the 
local oscillator much faster.  But then if the oscillator is stable enough, updates every few seconds 
or minutes are likely enough.   Just moving it one part per billion once each minute should lock it 
within a few hours if the oscillator was first brought in close by listening to the zero-beat.

> But the output spectral purity suffers a lot, in some cases. It appears that the internal PLL 
> in the Si5351A is optimised for the range 25-27MHz.  

Very good to know.  Perhaps a tuned circuit in the oscillator is disturbing things.
The Si5351C does provide a separate pin for an external 10-40mhz reference, 
that one is probably clean.

After more than a decade, it's amazing how there's still spots where the Si570 is the best choice.
Especially for homebrewers, as it's easy to use ugly style.
Here's a thought:  start with a bare double sided PC board.
Dead bug an Si570 and some dip14 MSP430 or the like, feed the MSP430 a pps from a GPS.
Put a bunch of surfacemount resistors on the back side which can get turned on through a 2n7000 by
the MSP430, the MSP430 uses its internal temperature sensor to hold board temps constant.
The solid sheets of copper front and back help spread the heat evenly.
Could make a nice 10mhz reference, easy to reproduce without fabbing a circuit board.

Though unlike the Si5351 you don't get other arbitrary outputs, which would be very very nice.  
Perhaps the Si5338 or Si5341 would make a better choice than the Si5351 if going high end,
giving less phase noise and less crosstalk between outputs.
 
Jerry, KE7ER

 
13847 2017-05-04 00:53:42 Hans Summers Re: Simple and low cost GPS controlled oscillator

Hi Jerry
 
 You have some nice stuff there at QRP Labs, and some extremely friendly prices.

:-)   And it's nice to see also that Dave's CWTD project uses the QRP Labs OCXO kit http://qrp-labs.com/ocxokit 
 
 Looking at Dave's post pointing to the CWTD project, do you see advantages for going with
 that approach?  I had not known that some of the cheap GPS chips could be configured for
 10mhz out in addition to pulse-per-second.  The 10mhz reference would make updates to the
 local oscillator much faster.  But then if the oscillator is stable enough, updates every few seconds
 or minutes are likely enough.   Just moving it one part per billion once each minute should lock it
 within a few hours if the oscillator was first brought in close by listening to the zero-beat.

I don't really exactly know the answer to that question. The 10MHz output allows an analogue phase locked loop to be used. The 1pps method seems quite suitable for microprocessor control. With a microprocessor you can also vary, what effectively is the digital equivalent of the loop bandwidth. So you can initially aggressively apply a quick correction until the 10MHz is brought close to target, then gradually slacken off the frequency updates to give finer and finer corrections. Another advantage is that you can store the parameters in EEPROM so that the "lock" happens faster at the next switch on. It's quite a fascinating type of project to work on.  
 
> But the output spectral purity suffers a lot, in some cases. It appears that the internal PLL  > in the Si5351A is optimised for the range 25-27MHz.


 Very good to know.  Perhaps a tuned circuit in the oscillator is disturbing things.
The Si5351C does provide a separate pin for an external 10-40mhz reference,
 that one is probably clean.

The beauty of the Si5351A is that it provides a lot of functionality and performance for the very low price. The Si570 costs of the order of 10x more! The other Si5351 variants are also more expensive. For many purposes the Si5351A features are enough! But I agree in some applications, an Si570 or other similar device may be warranted. 

73 Hans G0UPL