[time-nuts] Lars GPSDO on EEVblog
magnus at rubidium.dyndns.org
Sat Sep 8 11:57:33 EDT 2018
On 09/07/2018 09:50 PM, Lars Walenius wrote:
> Hello, thought it might be better to copy the text that I wrote in a another thread (PLL/GPSDO/etc learning resources for mere mortals) if someone has comments on my GPSDO controller:
> I heard Jim mentioned my GPSDO. I would not go to the time nuts archive as that describes a far from ready software design. The hardware is almost identical. Last year I published a new design on EEVBlog:
This is an impressive one for being this simple.
Would love to take it for a test-spin.
It would be interesting to test the linearity of the TIC separately for
Would it be possible for you to migrate the document into a common PDF
rather than have it spread out?
Maybe include a link for it.
> This is a, as I think, a much more robust design and much more tested. By just setting the”gain” it will make a stable 1Hz digital PLL. As the DAC can be set and you have a counter with 1ns resolution you don’t need any extra instruments to do this. The nice thing is that the controller is very flexible and can handle all kinds of 10MHz oscillators as XO, TCXO, OXCO and rubidium. The useful control range of the oscillators is 0.001-6ppm. As only a 1PPS with 3.3-5V amplitude is needed a wide variation of GPS modules can be used. The time constant can be set from 4 to 32000 seconds and stored in EEPROM.
Cool. Does it self-calibrate the oscillator gain constant? It should be
able to, and thus auto-set the loop gain balance and hence get good
control of the loop parameters. The PI loop as such is stable, but you
want to make sure it is well damped.
> In the 21 pages of instruction I describe the design and also give performance data as both a GPSDO and a time interval counter. As Jim says my GPSDO gives useful information how you can do your own GPSDO. On the first pages I have some discussion of the GPS modules like NEO7M that can be used and also about different oscillators. Note I think the oscillators are the first you should think of as they set the most important specs for the GPSDO. See also the user manual for Stanford FS740 that contains a lot of information about a modern GPSDO. Here the link to Stanford FS740 seems to be broken in my instruction. Today this worked: https://www.thinksrs.com/downloads/pdfs/manuals/FS740m.pdf See for example pages 25-35 for a good description of the GPSDO part. In the end of the manual you also find complete schematics!
> On pages 8-9 in my instruction you find a very short description of my software and it is a standard PI-loop with a low pass filter before just as in the FS740. Paul-Henning has a very simple introduction to the PI-loop that I like http://phk.freebsd.dk/time/20141018.html . I would also recommend learning from the GPSDO simulator by Tom Van Baak http://www.leapsecond.com/pages/gpsdo-sim/ it also uses a PI-loop + low pass filter and his code tells you a lot.
Very nice little toy to get some experience with before going to
> From Tom’s GPSDO simulator you can also learn how the time resolution and the DAC resolution work with real time data. Magnus Danielsson in March 2014 published the result of some his simulations with different time and DAC resolutions on time nuts. My takeaway was that a time resolution below 5-10ns was ok and DAC resolutions in the ballpark of the oscillator ADEV was fine, but have a look on his data.
Nice to find that you made good use of my exercise, which I hardly
remember myself. However, it goes to show what a group effort it is to
figure out details. We do learn from each other, and is stronger as a group.
Remeber that you can increase your DAC resolution by pushing out a mix
of nearby values. The PWM is maybe mentally the simplest, but also the
ugliest method as it pushes the highest amplitude to the lowest
frequency which makes it hardest to filter. I've used a "inverse PWM
spectrum" appraoch forcing the highest amplitude to the highest
frequency, which causes less phase noise due to the alternation.
Similiar behavior is expected from say first degree sigma-delta
modulation for interpolation. The benefit of such improved DAC
resolution is that the steered oscillator does less extensive "coasting"
up and down, creating modulation side-bands which affects phase noise /
short term stability. Also, when going into hold-over, this increases
the ability to steer the oscillator closer to the frequency compensation
it needs as you go open loop. Resolution of the TIC has similar
behavior, but you can't win them all, so just try to reduce it until it
is not a major issue. Over time the noise from GPS-receiver washes some
of it out in the closed loop.
> On page 15 in my instruction you find a list of basic links that I have found useful. Some links seems broken so for example for Stanford’s you have to find again on their homepage.
> On pages 16-17 you find help commands and description of serial information. By the way Mark Sims excellent LH can read this and use the time, DAC and temperature data that are spit out every second http://www.eevblog.com/forum/metrology/lady-heather-v6-beta-for-windows-exe/?all . This together with the GPS module of choice serial output data should make this very useful. I am sorry I haven’t used this as I am very weak of chemo and haven’t done anything to my GPSDO for a long time.
Sorry to hear about being weak of chemo, hope of quick recovery!
> Page 18 shows setup to read for example DAC data into Timelab.
> On page 19 you find some ADEV results of two of my prototype GPSDO’s. One with a TCXO DOT050V and one with a OCXO 131(that by purpose uses a bad DAC resolution of 1.2E-11 but still gets ADEV’s in the 5E-12 range.
> Last two pages show data with the controller used as a time interval counter. By measuring the TIC with a PICDIV PD26 it is possible to enter a few linearization parameters in EEPROM and get ADEV’s in the 8E-10 range at 1sec.
> Even if I don’t recommend reading specific about my GPSDO on time nuts I really recommend to search and read the time nuts archive. It is a lot of useful information and a special thank to Bob kb8tq who contributes with so much valuable information. After I published the GPSDO on time nuts I also got good help from Jim H with the hardware interrupt in the ATmega328. With the hardware interrupt the 200ns resolution on timer 1 works well with a jitter of just 40ns p-p. TvB also gave the idea to set the timer1 to an factor that suits the input frequency that in this case is 5Mhz so I choose 50000(-1) (instead of 65536-1). This gives overflow at 10ms and is easy to handle. I could probably thank a lot more people for good advises.
I applaud your detailed reference to people's contributions! Credit
where credit is due! Also, that you take the time to follow up on the
> Ps. Note that Lars GPSDO is more a 10MHz frequency reference, not a time reference and by that I mean it has no jitter free PPS out. This can be added by external hardware.
Maybe that would be an interesting addition to the project to have it
"complete" in this regard.
More information about the time-nuts