Author Topic: Lars DIY GPSDO with Arduino and 1ns resolution TIC  (Read 275761 times)

jozefch, bogdanbrudiu and 1 Guest are viewing this topic.

Offline MIS42N

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #875 on: February 08, 2021, 05:13:22 am »
I'd like to use a larger elevation mask angle to tame the ionospheric effects on the ToF but the only effective way to achieve a basic freezing of the last valid EFC voltage that immediately springs to mind involves cascading an ADC with a DAC between the PLL buffer amp and the EFC terminal on the OCXO which strikes me as being as much trouble as using a microcontroller to perform the PLL function in software and abandon the simplistic charms of the basic hardware PLLed design altogether.


 John
If you go for a software solution, it opens up a whole lot of control options that may be very difficult in hardware. It also allows one to ignore the second to second quality of the timing signal and just work from averages.

I am using a NEO-6 GPS module cost me less than $10AU, I feed the 1ppS directly into the uP no intervening circuit. The uP can time that to the nearest 25nS. Over 256 seconds it is rare to see variance of more than 10nS and that could be temperature drift.

I then run a least squares linear interpolation over 8 x 256 second averages, which yields two figures - the slope (i.e. the amount the frequency is off from 10MHz) and the average. It is then possible to calculate a current phase error and from that correct for two things - the phase error + the slope. (This needs a calibration when setting the system up, to determine the actual control voltage/frequency change value. The uP is programmed so if this is not in non-volatile memory, it does a long run to work it out then swings over to disciplining mode).

The control voltage is only altered if the phase error gets to a certain point. For the 8 x 265 seconds averages that is 1Hz (360 degrees) and the uP changes the voltage to bring it back in phase 2048 seconds later. So if nothing is amiss, the maximum frequency error is 10MHz +- 0.001 Hz. Holdover is not a problem because I'm not that fussy about the quality of the 1ppS and I correct at long intervals. Lost cycles are registered as 1ppS arriving at the correct time which dilutes the stats a bit. However since I set up the antenna to see most of the sky I'm not aware of it dropping out.

The innovation that is difficult to be duplicated in PLL is when the phase error drops to zero but there is a slope (frequency error), the uP just compensates for the frequency error. If the system is stable (temperature wise) it can then run for several hours before the phase error gets to 1Hz. This effectively stops any hunt in the control.

The other thing hardware may have trouble with is the software will jump on any large deviation and correct it. The algorithm is (arbitrarily) set up to kill off any deviation in the same time it took to detect the deviation. That can be as short as 5 seconds. It isn't designed to lock in as quickly as a PLL, at startup the frequency has to come within 2Hz of 10MHz before control kicks in. This is also catered for on the calibration where a fairly good startup control voltage is stored in non-volatile memory. It is applied at startup and usually the control kicks in about 30 seconds later. As long as the frequency is within 2Hz it doesn't take long to get it under control. The 'lock' indication is delayed until the frequency is verified to be 10MHz +- 0.01 Hz. - takes about 5 minutes.

This was never intended as a timenuts quality project. It was aimed to get 1e-9 accuracy at minimum cost (I think all up about $50AU at this time, less than $40US). It does that, and surprising to me manages 1e-10 most of the time. It is tempting to improve it but I think it's back to the drawing board for a timenuts solution. I am currently working on committing this design to a PCB so it is easy for someone else to build. When I understand KiCad, I'm halfway there.

A note about DACs - I think the Lars design as I understand it uses 2 x 8-bit PWM to emulate a 16 bit DAC. The oscillator I use has a V/Hz slope of 0.1V/Hz (roughly). A 16 bit DAC producing 5V has quite large voltage steps (just under 1mV) so will set the frequency to the nearest 0.00076Hz which is not very accurate. I use a 10-bit PWM dithered to emulate a 24-bit DAC, eliminating the DAC from the equation (accuracy wise. temperature is another matter).
 

Offline Johnny B Good

  • Frequent Contributor
  • **
  • Posts: 811
  • Country: gb
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #876 on: February 09, 2021, 12:30:11 am »
@MIS42N

 With great power (of all those opened up control options) comes great responsibility. The charm of a simple James Miller design is that most of those responsibilities are lifted from your shoulders by a near foolproof hardware solution, assuming the deficiencies of the GNSS itself allow sufficient accuracy and stability to meet your needs.

 It seems to me that the bulk of the control algorithms exist purely to overcome the GNSS's inherent deficiencies as a time transfer medium. If you look at this comparison here:-

http://www.leapsecond.com/pages/gpsdo/

 It would seem that the other three microcontroller based contemporaries to that James Miller example are just nicely managing to 'stand still' despite all their microcontroller goodness. One of them at least is managing to do a little better and the other two aren't performing noticeably worse (probably an achievement in itself for the state of the art in microcontroller based GPSDO design way back in February 2008  ;)).

 I think the main reason for the James Miller GPSDO's astounding performance was his choice of a special ultra low phase noise AXIOM40 OCXO. As I've already mentioned, the LO (normally an OCXO) is the key component in any GPSDO design.

 Developing and building (or even just building from a published design) a microprocessor alternative to the foolproof hardware PLL setup puts you in a whole new world of pain regarding voltage stability issues (multiple LDOs) and thermal management (temperature control or compensation) over individual temperature sensitive components.

 The good old fashioned hardware PLL neatly sweeps all of this under the carpet to be dealt with on mass by the PLL's feedback loop, leaving only the critical thermal management issue as a bought in solution, aka, that all important OCXO (or DOCXO).

 It's true enough that a well implemented microcontroller based design can do so much more than that basic design of James Miller's GPSDO. Just be prepared to put a lot more work into such a project than you ever imagined it would take. >:D

 Your own strategy is but a variation of this Lars DIY GPSDO design using much longer time scales to gather data by which to gently nudge, rather than whip, your LO into submission. It has merit but I think the time scales you propose are more suited to disciplining a well temperature stabilised Rb oscillator than any OCXO, including even high quality DOXCOs.

 The only thing that I found a little confusing at first in your description was the use of the expression "1Hz" where, after careful re-examination, I think you really meant to say "1 full cycle". This made it look as though you were correcting at offsets of 1Hz, a horrifyingly large error at first glance. ::) :palm: Anyway, I look forward to seeing your new topic thread on this project once you're ready to announce its birth. :popcorn:

 I'm in the middle of turning my LPRO-101 Rb oscillator into an RFS capable of staying within +/-50ns or better of GPS time over 24 hour periods. I've gotten as far as stabilising the base plate temperature to within 0.1 deg which made a definite improvement over its frequency stability when it had simply sat on top of a large quarter inch thick aluminium heatsink plate on my workbench. It's only an improvement because the room temperature still has some influence due to uncontrolled thermal leakage paths in the current test setup. I'll be using a room air temperature sensor in the finalised project to null out this effect.

 I've got it resting in the metal instrument case I was intending to mount it in with the lid off to allow the PWM controlled fan access to fresh air. I still haven't brought myself to despoil this virgin project case with ventilation holes since it doesn't give me quite enough clearance to wrap all but the heatsink fins in thermal insulation to minimise uncontrolled heat leakage that would dilute the thermal control by the cooling fan. I'm now thinking a cheap plastic project case might be my best alternative to continue this project after all. ::)

 It had taken a Herculean effort to dismiss all the plastic enclosures being offered by ebay and Amazon sellers in favour of suitably sized extruded aluminium project boxes that weren't ridiculously over-priced even by Chinese vendors before I found a suitably sized one at a reasonable price. It now sits, perched on top of other junk er, useful bits, assembled but unused.

 Gah! If I'd only realised back then, the need for such exquisite thermal regulation (and ultimately barometric compensation), I could have saved all that Herculean effort and picked out a cheap plastic instrument case straight from the get go :palm: Never mind, I might have this 'little' project done and dusted by August (only a year after purchasing the LPRO-101).

 The main reason for my investing in a Rb oscillator had been to allow me to quantify the 6ns or so pk-pk subsonic phase wobble I'd gotten a glimpse of when micro-managing the frequency calibration of the OCXO I'd installed into my FY6600 by varying its case tilt angle to fine trim it using the 2G Tip over effect and hope the room temperature remained constant for the next hour or two to bring the frequency drift to a halt long enough to pick out these ionospheric induced phase shifts that could otherwise only be guessed at against a moving background frequency drift.

 During the late summer months before heating season kicked in, the initial bench setup proved sufficient for the task, relieving me of the unenviable job of micromanaging the AWG's OCXO's calibration. However, once the luxury of stable room temperatures had been swept aside at the start of the heating season, I soon realised the need to install it in a thermally stabilised enclosure, hence this current project.

 I've now reached a state where my goal looks to be quite attainable. I've been monitoring the GPSDO and RFS waveforms with my SDS2504XPlus over the past 48 hours or more with persistance set to infinity to show the accumulated drift over 12 hour or longer periods. I've been taking screenshots every so often to record the drift and the GPSDO's 'wobble' over the past 6 hours or so. I've picked out a small selection from the 27 I recorded which I'll attach to this post. Also attached are a couple of photos showing the hand drawn schematic of the MK II GPSDO and a view of the part built project to give you all a flavour of my own modest efforts.

 The schematic is laid out to largely mirror the physical component layout. It omits stuff like the buck converters and the five matched 1K resistors with 120 ohm resistor link to the OCXO's Vref pin and the 50K trimpot across the resistor divider chain to trim their volt drops to precisely 1v each. The GPS module was unmounted at that stage of the project, simply being connected by short but unshielded wires (critcal in the case of the PPS when I tested PLL frequencies above the 100KHz it's currently running at - now that it's installed with a short coax link, I might retest at 1 and 10MHz to see if I can gain any performance improvement).

 John
« Last Edit: February 09, 2021, 12:42:02 am by Johnny B Good »
John
 
The following users thanked this post: MIS42N

Offline MIS42N

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #877 on: February 09, 2021, 12:32:09 pm »
@Johnny B Good

Most interesting. I am not sure what I am looking at with the 'scope traces. Or what to make of the leapsecond link. I am still coming to terms with this stuff.

You say "...assuming the deficiencies of the GNSS itself allow sufficient accuracy and stability to meet your needs." - 100% right, but there are two ways to get the accuracy and stability. One is to pay a lot of money for a dual frequency receiver specifically designed to compensate for ionic disturbances and (if used for mapping or similar) capable of centimeter accuracy. It is not the actual GNSS that is deficient, it is the transfer of that information to a distant receiver through an unruly signal path and the capability of the receiver to render the received data faithfully.

The second way is to accept that neither the path or receiver are reliable in the short term, but any perturbations from ideal behaviour can be reduced to insignificance if sufficient samples are collected. For example, if arrival of 1ppS is +-100nS and has normal distribution then collecting 10,000 samples and averaging them should give a much better indication of the true arrival time of the 1ppS. Unfortunately some aspects of the system don't follow a normal distribution but collecting samples is still effective.

The first solution then makes the choice of oscillator fairly trivial. As long as it has the required stability, PLL imposes the required accuracy.

The second solution is much more dependent on the quality of the oscillator, as it needs to be better than the vagaries of the 1ppS. And an el cheapo GPS module is not correcting for diurnal ionospheric conditions. So the oscillator ideally has predictable behaviour for a day (predictable being an error of less than your design target). If that target is (say) 1e-11 then setting a control voltage and letting the oscillator run should result in loss or gain of no more than 8 cycles per day. If the target is 1e-12 then less than a cycle.

Assuming an oscillator of the required quality (after controlling or the environmental variables like voltage stability, temperature etc) one then has to decide when to discipline the oscillator. Do you let it wander the 8 cycles or do you let it wander 1 cycle then pull it into line?

As stated in the last post, my aim was a modest 1e-9, a deviation of 1 cycle in 100 seconds. [as an aside, apologies for calling it 1Hz, clearly the wrong term. I've been wrapped over the knuckles all my life for not using the correct terminology]. To cater for short term GPS madness, I decided to go with 2 cycles over 256 seconds. If the 1ppS average arrival time has shifted less than 2 cycles, I claim (but without an better external reference, cannot prove) that we are within 1e-9 of the correct frequency.

I liked the photo of the actual circuit. I tried to take one of mine, the light was too poor for a good one. It has only the GPS module, a uP, an oscillator and some passive components (still working on providing a BNC output, haven't decided yet how to do it). I put the circuit in my first post - Reply #785 on: November 19, 2020

I'm in the process of adding a "user interface" to the uP. Originally it just output logging data but I now get it to store the last 24 control voltage adjustments and send them out the serial interface on request (via serial input). Unfortunately another change I've made stops the processor receiving data if I ask for history. Here's the last data (starting with a warmed up oscillator). The first 15 minutes are dealing with the fact that startup control volts is not perfect so there's a bit of bouncing around. After that there's 6 corrections in 12 hours and an imputed frequency error of less than 1e-10. This is a log of the 'conversation' with the uP, the AT to get attention might stir memories of early modems. This the actual output of the uP, it isn't edited.

ATt
Time Stamp: Date 090221 Time 101157 UTC.
ATh
 Time 214851 UTC. Ctrl 2.0495521 -0.897 ppb
 Time 215306 UTC. Ctrl 2.0500885 0.510 ppb
 Time 215825 UTC. Ctrl 2.0492578 -0.789 ppb
 Time 220240 UTC. Ctrl 2.0498134 0.528 ppb
 Time 225351 UTC. Ctrl 2.0497313 -0.078 ppb
 Time 231926 UTC. Ctrl 2.0497774 0.044 ppb
 Time 002325 UTC. Ctrl 2.0498604 0.079 ppb
 Time 005316 UTC. Ctrl 2.0498061 -0.052 ppb
 Time 053035 UTC. Ctrl 2.0498677 0.059 ppb
 Time 060026 UTC. Ctrl 2.0498110 -0.054 ppb


The current programming in the uP is at its limit, I have to rewrite the arithmetic modules to get better results. But I think the lack of temperature of voltage control means the circuit as a whole is near its limits also, so next step is a complete redesign.

As an afterthought, I didn't understand " It has merit but I think the time scales you propose are more suited to disciplining a well temperature stabilised Rb oscillator than any OCXO, including even high quality DOXCOs." - could you clarify?
 

Offline Johnny B Good

  • Frequent Contributor
  • **
  • Posts: 811
  • Country: gb
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #878 on: February 13, 2021, 11:48:46 am »
@MIS42N

 I meant to explain the scope traces - sorry! I'm triggering from CH1 (yellow trace) which is monitoring the GPSDO's 10MHz output. CH2 (magenta trace) is monitoring the output from my very much modified cheap Chinese "toy" FY6600-60M AWG into which I'd fitted a 10MHz OCXO (plus a 5 times clock multiplier chip) to replace the original and rather crap 50MHz smd XO Feeltech had cheaped out on as a clock reference source and, more importantly, had added an external reference input socket to let me injection lock the OCXO to an external atomic clock derived 10MHz frequency reference such as a GPSDO or Rubidium atomic clock.

 In this case, I have it locked to my LPRO-101 Rubidium oscillator so that I can dial in calibration adjustments in increments as small as 1uHz (in practice, I'm using 10uHz steps). Basically, the AWG is acting as a proxy for the RFS, allowing me to precisely trim the Rubidium locked frequency without my having to struggle with the RFS's own frequency trimpot, putting unnecessary wear and tear on it just to cater for room temperature variations that will stop being a problem once I've finally completed my RFS project.

 In short, CH2 is the Rubidium reference. When their frequencies match exactly, both traces will remain stationary. CH1 being used as the trigger signal will remain fixed whilst any frequency/phase shifts of the Rubidium frequency on CH2 relative to the triggering signal on CH1 will produce a drift or change in phase offset. The use of the word "relative" in the above statement is a vital part of the description since you will observe the same effect (only with an opposite drift direction to the former case) if the triggering signal on CH1 is varying whilst that on CH2  remains rock steady. BTW, in case you missed it, the bottom right hand corner shows the date and time, effectively time stamping each of these screen shots.

 What you choose to trigger from, from out of two or more signals being displayed on a CRO, or in this case a DSO, is entirely arbitrary but the general rule is to trigger from the most stable and accurate frequency source (normally a frequency source locked to a lab standard reference such as a GPSDO or RFS).

 In this case, there is some conflict over which is the best choice, On the one hand, the GPSDO is frequency stable in the long term but it suffers subsonic phase modulation from the imperfectly corrected electron density of the ionosphere (ionosphere correction data is a standard part of the GNSS message packet payload) whilst on the other hand, the RFS is free of such subsonic phase modulations but suffers a temperature induced frequency drift that is yet to be fully mitigated.

 Once I have gotten my LPRO-101 fully stabilised against temperature (and ultimately pressure) variations, I would make this the reference in order to observe the GPSDO's 5ns or so pk-pk phase shifts in rather more detail than I can do right now. Since I'm currently working on improving the RFS's long term frequency stability against variations of ambient temperature, I'm using the GPSDO as the reference, "Warts and all". ::)

 By using infinite persistence", I can record not only the subsonic phase shifts which are reflected onto the RFS (magenta trace) but also the hours long drift in frequency of my less than perfect RFS (at least until it slips one whole cycle out of phase with the GPSDO - then I have to clear the traces and start over). I'm aiming to extend this time from some ten hours or so out to two or more days worth before it completes a full cycle of drift. ::) From my results so far, this does look rather doable, given enough time and effort to get everything just right.

 In view of the many sources of error (residual errors after applying the ionospheric correction data being a major one in a single frequency setup) such as tropospheric propagation delay errors, orbital position errors, on board clock timing errors and a few other error sources besides that I can't recall right now, even with a dual frequency setup, it's a bloody minor miracle that it's even possible to achieve metre scale accuracy let alone the centimetre scale accuracy you mentioned. I know it's all based on sound scientific principles but to me, it's verging on it all being an exquisite magic trick. :)

 You mentioned the use of a (damn bloody expensive) dual frequency timing module (not forgetting the additional expense of a dual frequency timing antenna) to eliminate this source of error. However, that still leaves all the other smaller error sources to be dealt with.

 The only problem with the hardware PLL is that it lacks the sophistication to do anything more than integrate anywhere from the last 100 to 1000 (and in some cases a little more) second's worth of PWM output to control the EFC voltage whereas the microcontroller can run sophisticated PID algorithms with Kalman filtering capable of dealing with the much longer time scales that can benefit a Rubidium based LO along with logging data to monitor performance and  permit post mortem analysis of any rare and unusual events that may pop up. This leaves the microcontroller faced with a game of "Whack-A-Mole" dealing with the issue of temperature effects on the LDO(s) and DAC's voltage references which makes assembling and refining the required algorithms a rather interesting exercise to say the least.

 Your last question, in regard of my comment about the correcting adjustment time scales being better suited to a Rb oscillator were based on my perception that you were allowing for a rate of as long as just one adjustment every two hours which few to no OCXOs can sustain the required one cycle drift accuracy for, other than by pure chance. A high quality DOCXO just might manage the required stability with reasonable repeatability but for the two hour and longer time scales I thought you'd had in mind, only a Rb oscillator could reliably meet this requirement, assuming its base plate temperature is kept closely tied to a fixed temperature against ambient temperature variations.

 If you also apply barometric compensation as well as maintain tight temperature control of a Rubidium oscillator's base plate, the microcontroller will land up effectively compensating largely for the daily ageing drift rate of <1.67E-12 (one thirtieth of the <5E-11 per month figure quoted by the manufacturer of the LPRO-101).

 I'm aiming to create an RFS free from temperature and barometric induced frequency errors, leaving only the ageing drift to contend with. When I've completed those parts of my RFS project, the next obvious step to take will be the addition of a suitable microcontroller based GPSDO to compensate even that small error component. I could land up using a variant of the Lars design or even yours if you manage to reach a successful conclusion. >:D

 The barometric compensation part of this project will require the use of a Nano3 anyway just to interface the BMP280 pressure/temperature sensor module and, once I've added that to the mix, I'll be just one small misstep away from falling down the rabbit hole that is microcontroller based GPSDO territory. |O :palm:

Regards, John

PS I started writing this reply several days back but it got hijacked by "Real Life" events in the form of a fuse blowing fault with our 40 year old central heating electrics (a shorted out 47nF 250vac filter cap in the boiler - a free standing cast iron lump heat exchanger model destined to outlive by an order of magnitude longer than all of these new fangled aluminium based condensing types that need replacing every seven years on the average, eating up those modest savings on the gas bill and then some! ::)).

 The original fault was further compounded by a dicky motor in the 3 port mid position diverter valve assembly going into complete failure requiring a second visit by our tame British Gas engineer a couple of the very coldest days of the year later before we could once more enjoy the benefit of a fully functioning central heating system.
« Last Edit: February 13, 2021, 11:03:13 pm by Johnny B Good »
John
 
The following users thanked this post: MIS42N

Offline dandober

  • Newbie
  • Posts: 4
  • Country: us
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #879 on: February 13, 2021, 11:49:19 pm »
Hello all, I have read some of the posts regarding this design and have seen a few other GPSDO designs. To date my understanding of these designs is a GPS receiver tracks SV's and provides a 1PPS signal. A local ref,  TCXO/OCXO ,etc is divided down to 1pps and phase compared to derive a steering signal to the ref. The steering signal is typ a DAC.
   Assuming that is how most all ( all?) GPSDO have been done I have question: Has anyone done a GPSDO by directly injecting the reference osc into the GPS receiver? FOr example, the UBLOX 5T/6T/8T timing rec use a 26 MHz clock interal clock, all GPS measurements made r wrt to this clock. I have removed this clock, a tiny thing, attached a coax and fed the time rec of a 5T and a 6T rec.
   The result is a DIRECT reading in UCenter software ( UBLOX) of the rate error on the 26MHz applied clock. I have used a external SG, hp 8642B to supply this 26Mhz to the UBLOX rec. The 8642B I supplied a 10MHz from a Trimble Thunderbolt. The idea being to provide a near perfect 26MHz to the Ublox rec and see what it claimed the rate error was ( in ns/sec). My exoperments have confirmed the UBLOX indeed did report near zero rate error when fed that 26Mhz that was tied to my trimble GPSDO. I observed near zero mean data and noise around a few parts in 10^-11. 
   Its not hard to replace the 8642B with a 26MHZ xtal osc / PLL to 10MHZ from a TCXO/OCXO etc . And using data from Ucenter drive a DAC ( to 10MHz OCXO/TCXO...) to drive UCENTER reported rate error data  to near zero. IN fact one can also add the UCENTER reported phase error data to the control method , properly averaged. ( if u reset the rec it can wake up with phase error near zero and if the rec clk s near perfect it dont move)
    It seems to me such a method relieves the GPSDO of the need to accurately measure phase between two 1PPS signals. Uceneter ALREADY does this  wrt to its own internal ref clock. In addition rate and phase data from Ucenter SW seem to be of quite high fidelity , esp with rec in time mode AND I think it may be possible to get increased measurement fidelity as the receiver is now measuring AGAINST a high quality OCXO ( assuming that is used) rather than a cheesy tiny TCXO?
I have been aware of this method for over a decade and yet have not seen an implementation of it by any manufacture. Perhaps the fear of replacing the UBLOX clock stops that. ( same trick can be done with Trimble Res T etc, diff freq of ref clk)  But for DIY its not a problem . So , I am wondering if this has been done and if so by who ?
I am attaching a paper I wrote regarding this method.

Dan D.

 

Offline thinkfat

  • Supporter
  • ****
  • Posts: 2152
  • Country: de
  • This is just a hobby I spend too much time on.
    • Matthias' Hackerstübchen
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #880 on: February 14, 2021, 12:38:51 pm »
I know this design came up on the time-nuts mailing list end of last year. It has been implemented at least once, though in a slightly convoluted manner using a configurable delay line to do a sawtooth correction in hardware.
Everybody likes gadgets. Until they try to make them.
 

Offline MIS42N

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #881 on: February 14, 2021, 12:47:54 pm »
Your last question, in regard of my comment about the correcting adjustment time scales being better suited to a Rb oscillator were based on my perception that you were allowing for a rate of as long as just one adjustment every two hours which few to no OCXOs can sustain the required one cycle drift accuracy for, other than by pure chance. A high quality DOCXO just might manage the required stability with reasonable repeatability but for the two hour and longer time scales I thought you'd had in mind, only a Rb oscillator could reliably meet this requirement, assuming its base plate temperature is kept closely tied to a fixed temperature against ambient temperature variations.

Thanks for the comprehensive reply. Including the battle of the heater. I live in Newcastle Australia so heating is optional, cooling is desirable. We were previously living 1000m above sea level, frosts at least 100 days a year. Heating was by wood fire, lit in Autumn and let go out late Spring. Now we are 6m above sea level, only 4km from the sea so get the benefit of a coastal climate.

I think you underestimate OCXOs. My last project built some years back used a second hand Morion MV89 DOCXO, and I had the perception that all the problems I had with it were due to the external circuit and the underpowered processor (I was using a PIC16F628A). This may have been compounded by a bad environment and not ideal GPS reception. I am certain it was drifting less than 1 cycle in 3 hours when conditions were right.

The current OCXO (OSC5A2B02 - used, cost about $4AU) is much better than I expected. If you look at the figures in my last post, it ran from 005316 UTC to 053035 UTC before correction (over 4-1/2 hours) and at the time stamp of 101157 UTC. had been running uncorrected since 060026 UTC. (over 4 hours). Although the corrections applied are around the 0.05 ppb (i.e. 5e-11) this is an artifact of the arithmetic, which aims to make the one cycle correction in 2048 seconds (which works out to 0.05ppb). The change in those 4 hour periods is 1 cycle which implies a drift of less than 1e-11.

I've noticed the reported control volts is lower at night. This is probably due to changes in supply voltage. A 7805 can have a temperature coefficient up to 1mV/°C. The 2V control would then have a change of around .4mV/°C. With a sensitivity of 0.1V/Hz that causes a change of 0.004Hz/°C which would be dominant. I am seeing less than that, so I assume the supply is more stable (it is a 5V switch mode salvaged from an old piece of networking equipment). My next improvement is to address this, then we shall see if an OCXO is as good as I believe it to be.

My belief comes from working in a laboratory many years ago that had a 5MHz DOCXO that was calibrated against a cesium beam once a week. After several months it had a completely predictable ageing and by tweaking the control voltage before calibration was usually 'spot on'. Had we at that time a uP that could apply the ageing correction continuously I think that oscillator would be better than a rubidium standard.

On the "user interface" side, reading history no longer affects the reception. I've also added some counters - up time in seconds, number of seconds the GPS unit reports invalid data, number of missed pulses, number of rejected pulses (both caused by interference). These are diagnostic, I haven't seen bad data unless I deliberately turn off the GPS unit for a few seconds. Also a sanity checker that resets the uP if signal is lost for a time (30 seconds at the moment). Getting close to a finished product.
 

Offline MIS42N

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #882 on: February 15, 2021, 02:22:10 am »
   Assuming that is how most all ( all?) GPSDO have been done I have question: Has anyone done a GPSDO by directly injecting the reference osc into the GPS receiver? FOr example, the UBLOX 5T/6T/8T timing rec use a 26 MHz clock interal clock, all GPS measurements made r wrt to this clock. I have removed this clock, a tiny thing, attached a coax and fed the time rec of a 5T and a 6T rec.
Perhaps the reason not many people try this is that it doesn't appear to give any advantage. Most people conventionally want a stable 10MHz oscillator that is disciplined according to information provided by a GPS receiver. The receiver you use provides a 1ppS signal and tells you how inaccurate it is. If hardware can measure the (inaccurate) 1ppS to the degree of accuracy required, then software can calculate when an accurate 1ppS should arrive and discipline on the basis of that. No need to have an accurate oscillator in the GPS. The hardware to measure arrival time is simpler than that required to lock a 26MHz oscillator to a 10MHz reference signal and inject it into the GPS.

Did I miss something?
 

Offline thinkfat

  • Supporter
  • ****
  • Posts: 2152
  • Country: de
  • This is just a hobby I spend too much time on.
    • Matthias' Hackerstübchen
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #883 on: February 15, 2021, 09:34:54 am »
   Assuming that is how most all ( all?) GPSDO have been done I have question: Has anyone done a GPSDO by directly injecting the reference osc into the GPS receiver? FOr example, the UBLOX 5T/6T/8T timing rec use a 26 MHz clock interal clock, all GPS measurements made r wrt to this clock. I have removed this clock, a tiny thing, attached a coax and fed the time rec of a 5T and a 6T rec.
Perhaps the reason not many people try this is that it doesn't appear to give any advantage. Most people conventionally want a stable 10MHz oscillator that is disciplined according to information provided by a GPS receiver. The receiver you use provides a 1ppS signal and tells you how inaccurate it is. If hardware can measure the (inaccurate) 1ppS to the degree of accuracy required, then software can calculate when an accurate 1ppS should arrive and discipline on the basis of that. No need to have an accurate oscillator in the GPS. The hardware to measure arrival time is simpler than that required to lock a 26MHz oscillator to a 10MHz reference signal and inject it into the GPS.

Did I miss something?

Indeed, supplying the GPS receiver with an external reference clock will require a low-jitter PLL. Si5351 seems to be popular. That means replacing a low-complexity frequency divider with a more complex integrated PLL.

What I envision being a low-complexity GPSDO architecture would be in using the "time marking" feature of the Ublox receivers, which should provide nanosecond-accurate UTC timestamps for events received on an EXTINT input. I've not tried that myself yet, but it would just take a low-jitter divider to feed a 1Hz signal into an EXTINT and some DAC to control the EFC voltage of an OCXO.
Everybody likes gadgets. Until they try to make them.
 

Offline dandober

  • Newbie
  • Posts: 4
  • Country: us
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #884 on: February 15, 2021, 11:39:10 pm »
I posted this elsewhere and have been made aware there is a UBLOX product that steers its VCTCXO via DAC: LEA-M8F, I have attached an image of it .

It does not produce a super clean 10MHz. You would have to lock a clean 10MHz to it to get that to happen.

Its pretty clear that UBLOX saw an advantage to steering their local clock, other wise why the LEA-8MF.??

I can think of a few::

UBLX Time error resolution/accuracy of local 1PPS to GPS 1PPS measurement: Sub nano second. (Not what u see on 1PPS pin of rec, see below) ( this leve of resolution/precisions diff to do when roll ur own counter, which designs that compare 1PPS with local via hrdwr, a counter is not used as it falls out of curve fit in PVT solution of receiver) 

Rate Error of local clock: Resolution 0.001ns/sec, accuracy around 10 times that?  There is no DIRECT rate error information provided by roll your own 1PPS compare designs. The rate also SHOULD be based on Carrier phase observations inside the receiver, which have orders or magnitude lower noise than CODE PHASE observations as MUST be used in correcting LOCAL 1PPS from rec. No external 1PPS method can incorp Carrier Phase directly in its steering method as it can only "see" the 1PPS provided at the rec pin.

UBLX and nearly all low cost timing rec produce a 1PPS pulse that has QUATIZATION jitter ( in addition to CODE PHASE NOISE) , This comes about as they use a digital method to steer the external 1PPS signal. If you PROPERLY design the control loop this jitter , often 20ns or so, can be eliminated by using RATE steering to nearly stop 1PPS movement wrt 1PPS GPS AND then adding a bit of the high res phase error data discussed above. Thus very low jitter EXT 1PPS pulse results ( the quan jitter is defeated) My understanding is the UBLX design does this.

From a control system point of view I will always take the lowest noise measurements I can get. In addition If there is way to get even MORE information about the controlled target ( here a 10MHz target clock) I would ALWAYS want that, And that extra info( that no ext method can deliver easily) is Extreme fidelity clock RATE error! The most important thing to control in the loop is not PHASE its RATE!( iE 1ST STEER RATE ERR TO ZERO then PHASE ERR TO ZERO)  To be blunt when you see the sheer QUALITY of the rec generated clock error terms , as provided by UBLOX for free via UCENTER, there is no comparison what EXTERNAL measurements/comparison can provide via 1PPS phase observations using ext 1PPS .

As for ADDING a 26MHZ PLL...that is two parts of cost:  26MHZ VCXO ( available thru DK, not a custom part) and a ADF4002 PLL chip that will lock the 26MHz to 10MHz. The spectral purity req of GPS rec is not stringent as at best there is at most 50dB carrier to noise ratio of SV signal at earths surface. The locked 26MHz to 10MHz is not a challenge from design, cost , complexity point of view.

I am not sure anyone read the attached paper to my original post. But in that paper I outlined how I used my existing HP 8642B SG as the 26MHz to a LEA5t rec I bought on ebay for $13.  The UBLx now provides direct read out of the rate/freq error of the 8642B , which is based on an internal reference. When I locked 42B to  another 10MHz, from my 8566B Spectrum Analyzer ( its a vry high end 10M OCXO inside) , the UBLOX displayed the new error now from my 8642B as its ref was from 66B SA. The displayed error happens every second. You would need a 12 digit freq counter to compete with the freq err data from UBLOX lea5T, that wd very likely struggle to make the a similar precision measurement inside a second?

SO here is what you get for $13 and a small amount of effort: A 12 digit Freq counter that produces a measurement every one sec( maybe faster even?( I think 6T does sub second updates))
A atomic clock via the GPS/GNSS system of SV's that the above internal "virtual" rec counter is referenced to.
And if you steer the 10MHz ref you get get a SMOOTH 1PPS ext pulse MINUS the quantization error

With this system I can easily "set" any of 10Mhz reference I have in my SG's , SA's etc. I can also check Ruby Osc.  rate error quickly and easily. All for $13.

-Dan D.
GPS/GNSS engineer , 1990 to present




 
 

Offline MIS42N

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #885 on: February 16, 2021, 06:16:57 am »
@dandober

I did read your paper. Twice. Once late at night and I was struggling a bit to get my head around it. So again in the morning when I'd had the morning coffee.

I was rather amused that $13 and a small amount of effort left out the cost of a HP 8642B SG ($2K?).

It depends on the purpose of your GPSDO. Is it a frequency source? I would suggest that most amateurs are not looking for anything more than 10MHz+-0.01Hz. The 10MHz can feed into a PLL to synthesise other frequencies as required. This allows them to run SSB at GHz frequencies, or the digital signals that occupy a few Hz bandwidth (I've forgotten what that mode is called). My el cheapo GPSDO (second hand $4 OCXO, PIC16F1455, NEO-6 GPS) does that easily, and with a stable temperature it will hold +-0.001Hz.

If the purpose of the GPSDO is to calibrate other equipment, then your approach looks good. I am not sure how well a single frequency GPS deals with atmospherics, it is suggested by others that in the region of 10^-11 it isn't great, and at that point one has to resort to very high quality oscillators and long averaging periods. However, it seems (on a quick read of the specs) that the LEA-M8F is already doing what you propose, it has inputs for external frequencies and can report phase errors. It also has the ability (it says) to discipline an external oscillator. I didn't read in too much depth but it seems they have pinched your idea.



 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4795
  • Country: pm
  • It's important to try new things..
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #886 on: February 16, 2021, 07:15:57 am »
@MIS42N: plz be so kind and do start to elaborate your design in a new thread (as recommended to you twice already). This thread is about Lars' design..
 
The following users thanked this post: bingo600, Jacon

Offline dandober

  • Newbie
  • Posts: 4
  • Country: us
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #887 on: February 16, 2021, 09:23:02 am »
Lars;

  the 8642B is overkill to make the 26Mhz ..plenty others out there that cost less, weight less, etc that could produce a "clean enough" 26MHz to do the job...key req for general purpose use in this app is for SG to accept an external 10MHz.  Then u can lock the SG and measure all the ref u wish..

 I left out the SG as Rf  types typ have one already. But yes, its good u laughed at my joke.

Yes atmosphere is a big issue ..esp for phase...less so for Phase Rate .

I hope to do some experiments soon to determine the fidelity of the UBLOX 6T reported carrier phase data.

As for pinching the idea..its old one...I worked on a high end timing rec, years ago.  that steered its own clock to zero out phase error. But it was primitive by todays standards.

I see the powers that be wish me to bow out of this conversation, see  comment by IMO.

Color me gone.

-Dan







 

Offline Mike99

  • Regular Contributor
  • *
  • Posts: 130
  • Country: gb
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #888 on: February 19, 2021, 03:12:35 pm »
I now have two working GPSDOs that read the exact same freuency on my 9 digit counter - good enough for HF radio I think.

My solution to providing the 1PPS was to buy these modules:

https://www.ebay.co.uk/itm/Neo-6M-NE0-7M-GPS-Mini-Satellite-Positioning-Module-51-SCM-MCU-For-Arduino/142760332765?hash=item213d2dcddd:g:U6oAAOSwXeJawafs

I removed the fake ublox chips with a hot air gun and soldered in genuine ones from Digikey. One GPSDO has a NEO-8M, the other an M8T.

Mike
 
The following users thanked this post: Bryan, Dbldutch

Offline thinkfat

  • Supporter
  • ****
  • Posts: 2152
  • Country: de
  • This is just a hobby I spend too much time on.
    • Matthias' Hackerstübchen
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #889 on: February 20, 2021, 08:49:44 am »
I now have two working GPSDOs that read the exact same freuency on my 9 digit counter - good enough for HF radio I think.

My solution to providing the 1PPS was to buy these modules:

https://www.ebay.co.uk/itm/Neo-6M-NE0-7M-GPS-Mini-Satellite-Positioning-Module-51-SCM-MCU-For-Arduino/142760332765?hash=item213d2dcddd:g:U6oAAOSwXeJawafs

I removed the fake ublox chips with a hot air gun and soldered in genuine ones from Digikey. One GPSDO has a NEO-8M, the other an M8T.

Mike

Just out of curiosity, how'd you figure those were fake?
Everybody likes gadgets. Until they try to make them.
 

Online bingo600

  • Super Contributor
  • ***
  • Posts: 1989
  • Country: dk
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #890 on: February 20, 2021, 10:46:49 am »
I see the powers that be wish me to bow out of this conversation, see  comment by IMO.

Color me gone.

-Dan

Dan

I doubt the comment was meant for you , or any design providing an accurate 1PPS that could be used in Lars design (the thread here).

It was probably meant for the PIC based design the MIS42N has done , and described in this thread.
That design is not based on Lars design , and ought to get a thread of it's own.

Btw: Dan's paper is in this entry , thank you
https://www.eevblog.com/forum/projects/lars-diy-gpsdo-with-arduino-and-1ns-resolution-tic/msg3463482/#msg3463482

I have some quite good 26MHz Pletronics OCXO's , that i got for cheap's  ~$5 , and a Lea5T ... hmmm.....


/Bingo
« Last Edit: February 20, 2021, 10:57:53 am by bingo600 »
 

Offline Mike99

  • Regular Contributor
  • *
  • Posts: 130
  • Country: gb
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #891 on: February 20, 2021, 01:01:20 pm »
Just out of curiosity, how'd you figure those were fake?

They wouldn't respond to UBX commands to change the settings.

EDIT: not quite true. They did respond to the commands but wouldn't save the settings, so the modules reverted to Portable mode when they were switched on, which is no good for a GPSDO.

They cannot possibly sell them at such a low price with genuine ublox modules, although IMHO they are worth the money just to get the PCB. It's not one I could make at home.

https://portal.u-blox.com/s/question/0D52p00008HKEEECA5/psa-fake-ublox-modules-and-potential-ways-to-identify-them

Mike
« Last Edit: February 21, 2021, 10:33:20 am by Mike99 »
 

Offline dandober

  • Newbie
  • Posts: 4
  • Country: us
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #892 on: February 20, 2021, 11:20:43 pm »
Bingo;

  Well I am back , we will see if they get upset. I checked out the 26 ocxo xcel file , looks like a perfect candidate for driving lea6/5T.

If u have a 16 bit DAC and Aurdino , read the rate and phase error from Ucenter , drive the DAC with scaled rate err and u have a GPSDO. U can also add a small bit of ublx reported phase err avg w long tc, ~5min, this now makes UBLX 1pps phase smooth...if dome roght, no more jumps. To make 10Mhz locked to GPS, ! Just lock a 10MHz to 26MHz and now u have a 10MHz that is tied to GPS rate as close as your CAREFUL steering by DAC allows.

Now use that same PLL AGAIN, except now lock 26MHz to your XTAL source of choice:::
For generic freq err meter, lock the 26MHz to source u wish to find freq err wrt GPS time. I like the ADF4002 for this...easy PLL. Just set the dividers up for the freq of interest, now 26ocxo is locked to that. Err in ucenter is now the source to the 26 is locked to, so any rate erros are due to source u are locked to. . The source in question should be off by less than 20ppm?? ( not sure when ublx will be unhappy with rate err of its clock)


any more of the 26MHz VCOCXOs around??
-Dan

 
 

Online bingo600

  • Super Contributor
  • ***
  • Posts: 1989
  • Country: dk
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #893 on: February 21, 2021, 08:28:05 am »
any more of the 26MHz VCOCXOs around??
-Dan

Dan
Most of the info regarding these OXCO's , incl. the exce , was made by J.Beale - Credit goes to him.

I doubt there are more of these on e-bay, they were sold back in 2011 by an e-bay seller petlor
I think they were surplus GSM stuff.

/Bingo

 

Offline MIS42N

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #894 on: February 25, 2021, 01:56:05 am »
@MIS42N: plz be so kind and do start to elaborate your design in a new thread (as recommended to you twice already). This thread is about Lars' design..
I didn't want to do that until it was bulletproof. But you have a point.

The new thread is https://www.eevblog.com/forum/projects/budget-gpsdo-a-work-in-progress/
 
The following users thanked this post: Johnny B Good

Offline Mike99

  • Regular Contributor
  • *
  • Posts: 130
  • Country: gb
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #895 on: March 08, 2021, 04:55:50 pm »
After my Vectron OCXO died I fitted my Lars/PaulV GPSDO with a Bliley NV47A, followed by a differential amp to square up the sinewave. The 10MHz output is isolated with a Mini-Circuits 50 ohm transformer.

Performance isn't brilliant (see attached) but the spike in the TIC is particularly interesting. It happens consistently when I connect the 10MHz output to test equipment (scope, counter etc.). I suspected an earth problem, and after a while realised that the Raspberry Pi that I use to monitor the data is powered from a wall wart, while everything else is connected to mains earth. The Pi is in a metal case which is not earthed, and using a DVM I measured 1.5V rms of 50Hz between the Pi case and the GPSDO earth.

Some tidying up is needed ...

Mike
« Last Edit: March 08, 2021, 04:59:26 pm by Mike99 »
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4795
  • Country: pm
  • It's important to try new things..
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #896 on: March 08, 2021, 06:07:58 pm »
Just out of curiosity, how'd you figure those were fake?

They wouldn't respond to UBX commands to change the settings.

EDIT: not quite true. They did respond to the commands but wouldn't save the settings, so the modules reverted to Portable mode when they were switched on, which is no good for a GPSDO.
..
My current understanding is the ublox module needs a battery backup to remember the settings, or am I mistaken?
 

Offline thinkfat

  • Supporter
  • ****
  • Posts: 2152
  • Country: de
  • This is just a hobby I spend too much time on.
    • Matthias' Hackerstübchen
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #897 on: March 08, 2021, 07:19:08 pm »
You can save settings to flash, too. If the module has flash.
Everybody likes gadgets. Until they try to make them.
 

Offline Mike99

  • Regular Contributor
  • *
  • Posts: 130
  • Country: gb
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #898 on: March 08, 2021, 09:24:38 pm »
You can save settings to flash, too. If the module has flash.

Indeed you can, on the versions of the genuine modules that have flash memory.

These boards come with external memory and battery/supercap backup but it doesn't last very long.

Mike
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4795
  • Country: pm
  • It's important to try new things..
Re: Lars DIY GPSDO with Arduino and 1ns resolution TIC
« Reply #899 on: March 09, 2021, 09:42:04 am »
Afaik for example the 7"M" is rom-based (an needs battery backup) and 7"N" has got the flash (provided it is not fake)..
https://portal.u-blox.com/s/question/0D52p00008HKCbDCAX/how-update-firmware-for-ublox-7-by-ucenter
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf